...
[raul.kripalani]: I don't like transmitting bundle symbolic names over the wire, as it couples the serialising party with the deserialising party, forcing both to contain the class inside the same bundle. As I said in the mailing list, making this assumption would be a short-sighted strategy, as users may be sharing caches across applications across multiple containers, where classes live in different bundles in different containers.
[romain.gilles]: I see the point for the cache use case but cache is not the only use case. If I remember correctly Ignite comes from GridGain company and it was at the beginning more a distributed computing solution than a distributed caching solution. Maybe now we can see it as a distributed caching but it is still very interesting for distributed computing. In this use case I don't see a cluster of distributed computing have different implementation of the computation unit. For example let say you are using it in order to price deals store in partitioned cache. Then the bank will be quite disappointed to gate different (inconsistent) pricing result accross the cluster. Secondly, you don't want to export the computation logic unit because it is a private detail. therefore it will not be in the exported package. How can we solve this kind of use case?
I also don't think it's necessary. We just need the package name + package version. An OSGi container cannot expose the same package under the same version number twice, so the tuple (package name, package version) is enough to unambiguously locate the Bundle that exports our class.
Now, what we need to do is determine HOW we locate the Bundle. I have two ideas in mind:
I also don't think it's necessary. We just need the package name + package version. An OSGi container cannot expose the same package under the same version number twice, so the tuple (package name, package version) is enough to unambiguously locate the Bundle that exports our class.
Now, what we need to do is determine HOW we locate the Bundle. I have two ideas in mind:
With either of these approaches, I think we don't need pessimistic and/or optimistic strategies. Just a single strategy would be enough.[romain.gilles]: Finally I think we may need a way to be aware of the start and the end of a serialization / deserialization of an object graph in order to handle some optimizations. Or at least provide a way in the method signature to manage mapping.
Here's how the pessimistic codec implementation might look like (in pseudo-code):
...