[JBoss JIRA] (ISPN-7417) Implement transcoding
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7417?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes edited comment on ISPN-7417 at 4/7/17 1:22 PM:
-----------------------------------------------------------------
[~galder.zamarreno] The idea is to remove compatibility mode. For the task use case, the Infinispan server caches will be configured by default with a mime-type reflecting the storage format, for example:
_application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_
At runtime it will be possible to decorate the cache to deal with other types, for example:
{code:java}
cache.withContentType("application/x-java-object")
{code}
all operations on that decorated cache will deal with POJOs, using a internally transcoder that supports _application/x-java-object_ and _application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_ to do on-the-fly conversion
DISCLAIMER: this is all WIP at the moment, names and API calls are not final
was (Author: gustavonalle):
[~galder.zamarreno] The idea is to remove compatibility mode. For the task use case, the Infinispan server caches will be configured by default with a mime-type reflecting the storage format, for example:
_application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_
At runtime it will be possible to decorate the cache to deal with other types, for example:
{code:java}
cache.withContentType("application/x-java-object")
{code}
all operations on that decorated cache will deal with POJOs, using a transcoder that supports _application/x-java-object_ and _application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_ to do on-the-fly conversion
DISCLAIMER: this is all WIP at the moment, names and API calls are not final
> Implement transcoding
> ---------------------
>
> Key: ISPN-7417
> URL: https://issues.jboss.org/browse/ISPN-7417
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> The aim of this JIRA is to implement transcoding so that data of any type can be stored and it can be transformed on the fly, regardless of the endpoint. The work of the JIRA will be split into different subtasks to be able to split the work.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7417) Implement transcoding
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7417?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes commented on ISPN-7417:
-----------------------------------------
[~galder.zamarreno] The idea is remove compatibility mode. For the task use case, the Infinispan server caches will be configured by default with a mime-type reflecting the storage format, for example:
_application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_
At runtime it will be possible to decorate the cache to deal with other types, for example:
{code:java}
cache.withContentType("application/x-java-object")
{code}
all operations on that decorated cache will deal with POJOs, using a transcoder that supports _application/x-java-object_ and _application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_ to do on-the-fly conversion
DISCLAIMER: this is all WIP at the moment, names and API calls are not final
> Implement transcoding
> ---------------------
>
> Key: ISPN-7417
> URL: https://issues.jboss.org/browse/ISPN-7417
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> The aim of this JIRA is to implement transcoding so that data of any type can be stored and it can be transformed on the fly, regardless of the endpoint. The work of the JIRA will be split into different subtasks to be able to split the work.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7417) Implement transcoding
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7417?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes edited comment on ISPN-7417 at 4/7/17 1:21 PM:
-----------------------------------------------------------------
[~galder.zamarreno] The idea is to remove compatibility mode. For the task use case, the Infinispan server caches will be configured by default with a mime-type reflecting the storage format, for example:
_application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_
At runtime it will be possible to decorate the cache to deal with other types, for example:
{code:java}
cache.withContentType("application/x-java-object")
{code}
all operations on that decorated cache will deal with POJOs, using a transcoder that supports _application/x-java-object_ and _application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_ to do on-the-fly conversion
DISCLAIMER: this is all WIP at the moment, names and API calls are not final
was (Author: gustavonalle):
[~galder.zamarreno] The idea is remove compatibility mode. For the task use case, the Infinispan server caches will be configured by default with a mime-type reflecting the storage format, for example:
_application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_
At runtime it will be possible to decorate the cache to deal with other types, for example:
{code:java}
cache.withContentType("application/x-java-object")
{code}
all operations on that decorated cache will deal with POJOs, using a transcoder that supports _application/x-java-object_ and _application/vnd.infinispan.v9.wrapped+x-jboss-marshalling_ to do on-the-fly conversion
DISCLAIMER: this is all WIP at the moment, names and API calls are not final
> Implement transcoding
> ---------------------
>
> Key: ISPN-7417
> URL: https://issues.jboss.org/browse/ISPN-7417
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> The aim of this JIRA is to implement transcoding so that data of any type can be stored and it can be transformed on the fly, regardless of the endpoint. The work of the JIRA will be split into different subtasks to be able to split the work.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7711) Improve server-side protostream marshaller registration
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-7711?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño updated ISPN-7711:
-----------------------------------
Forum Reference: http://lists.jboss.org/pipermail/infinispan-dev/2017-March/017360.html
> Improve server-side protostream marshaller registration
> -------------------------------------------------------
>
> Key: ISPN-7711
> URL: https://issues.jboss.org/browse/ISPN-7711
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
>
> A more user friendly way to register protostream marshallers remotely is needed when the protostream marshaller is used for compatibility mode (or transcoding) in the future. It's currently possible to do it with a remote server task but that's a bit hacky.
> This server task shows how it can be done:
> {code}
> package delays.java.stream;
> import org.infinispan.manager.EmbeddedCacheManager;
> import org.infinispan.query.remote.ProtobufMetadataManager;
> import org.infinispan.tasks.ServerTask;
> import org.infinispan.tasks.TaskContext;
> import org.infinispan.tasks.TaskExecutionMode;
> import delays.java.stream.pojos.Station;
> import delays.java.stream.pojos.Stop;
> import delays.java.stream.pojos.Train;
> public class AddProtobufTask implements ServerTask {
> private TaskContext ctx;
> @Override
> public void setTaskContext(TaskContext ctx) {
> this.ctx = ctx;
> }
> @Override
> public String getName() {
> return "add-protobuf";
> }
> @Override
> public Object call() throws Exception {
> EmbeddedCacheManager cm = ctx.getCache().get().getCacheManager();
> ProtobufMetadataManager protobufMetadataManager = cm.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);
> protobufMetadataManager.registerMarshaller(new Stop.Marshaller());
> protobufMetadataManager.registerMarshaller(new Station.Marshaller());
> protobufMetadataManager.registerMarshaller(new Train.Marshaller());
> return null;
> }
> @Override
> public TaskExecutionMode getExecutionMode() {
> // Registering marshallers should be done in all nodes
> return TaskExecutionMode.ALL_NODES;
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7417) Implement transcoding
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-7417?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-7417:
----------------------------------------
Also, we need to find a common way to register marshallers, helpers or pluggable SPIs that are used by transcoders to use their job. The way protostream marshallers can be plugged server side for compatibility mode (see ISPN-7711) is not ideal.
> Implement transcoding
> ---------------------
>
> Key: ISPN-7417
> URL: https://issues.jboss.org/browse/ISPN-7417
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> The aim of this JIRA is to implement transcoding so that data of any type can be stored and it can be transformed on the fly, regardless of the endpoint. The work of the JIRA will be split into different subtasks to be able to split the work.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7711) Improve server-side protostream marshaller registration
by Galder Zamarreño (JIRA)
Galder Zamarreño created ISPN-7711:
--------------------------------------
Summary: Improve server-side protostream marshaller registration
Key: ISPN-7711
URL: https://issues.jboss.org/browse/ISPN-7711
Project: Infinispan
Issue Type: Enhancement
Reporter: Galder Zamarreño
A more user friendly way to register protostream marshallers remotely is needed when the protostream marshaller is used for compatibility mode (or transcoding) in the future. It's currently possible to do it with a remote server task but that's a bit hacky.
This server task shows how it can be done:
{code}
package delays.java.stream;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.query.remote.ProtobufMetadataManager;
import org.infinispan.tasks.ServerTask;
import org.infinispan.tasks.TaskContext;
import org.infinispan.tasks.TaskExecutionMode;
import delays.java.stream.pojos.Station;
import delays.java.stream.pojos.Stop;
import delays.java.stream.pojos.Train;
public class AddProtobufTask implements ServerTask {
private TaskContext ctx;
@Override
public void setTaskContext(TaskContext ctx) {
this.ctx = ctx;
}
@Override
public String getName() {
return "add-protobuf";
}
@Override
public Object call() throws Exception {
EmbeddedCacheManager cm = ctx.getCache().get().getCacheManager();
ProtobufMetadataManager protobufMetadataManager = cm.getGlobalComponentRegistry().getComponent(ProtobufMetadataManager.class);
protobufMetadataManager.registerMarshaller(new Stop.Marshaller());
protobufMetadataManager.registerMarshaller(new Station.Marshaller());
protobufMetadataManager.registerMarshaller(new Train.Marshaller());
return null;
}
@Override
public TaskExecutionMode getExecutionMode() {
// Registering marshallers should be done in all nodes
return TaskExecutionMode.ALL_NODES;
}
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months
[JBoss JIRA] (ISPN-7417) Implement transcoding
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-7417?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-7417:
----------------------------------------
When implementing transcoding, server tasks should be able to deal with cache instances exposing POJOs as opposed to byte[]. This is currently doable with compatibility mode but has some issues (e.g. ISPN-7710)
> Implement transcoding
> ---------------------
>
> Key: ISPN-7417
> URL: https://issues.jboss.org/browse/ISPN-7417
> Project: Infinispan
> Issue Type: Enhancement
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> The aim of this JIRA is to implement transcoding so that data of any type can be stored and it can be transformed on the fly, regardless of the endpoint. The work of the JIRA will be split into different subtasks to be able to split the work.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 9 months