[
https://issues.jboss.org/browse/ISPN-986?page=com.atlassian.jira.plugin.s...
]
Galder Zamarreño commented on ISPN-986:
---------------------------------------
This works nicely indeed! You can annotate a class with JBMAR's @Externalize and an
implement a JBMAR Externalizer for it and it works. No need for pre-registration.
There's a very good reason why Infinispan internally does not use JBMAR's
externalizers directly and instead has a wacky solution around JBMAR's ObjectWriter,
and that is the payload sizes. As indicated in my investigation in mid 2009 (ISPN-59),
JBMAR produced some bigger payloads with Externalizers as opposed to the solution
suggested at the time of having Externalizer's preregistered and indexed with a
number. Detailed information on the size differences can be found in ISPN-59.
However, for end users, JBMAR's Externalizers have some very good advantages.
Let's look at its characteristics:
- It contains inter-version compatibility allowing to read newer versions of the class as
long as the externalizer can read them correctly.
- No pre-registration of Externalizers because each node sends the Externalizer instance
with the first message (need to figure out what happens with cluster nodes joining later)
- This version and other information result in bigger payloads, as opposed to
Infinispan's internal externalizer architecture.
- They're very user-friendly, simply annotate with @Externalize annotation and
you're good to go!
- For framework developers or service providers, it can be tougher to encapsulate
marshalling since there're annotations involved.
On the other hand, Infinispan's inner Externalizer architecture based on JBMAR's
ObjectWriter has the following characteristics:
- Different versions of class need to be handled by the client.
- Pre-registration required using an id which will identify the object. The reader side
needs to be aware of these mappings at the start.
- Very small payloads compared to JBMAR's Externalizers.
- Not the most user-friendly. Implement an interface, figure out an Id and pre-register
externalizers.
- Easier for framework developers, simply abstract interface away.
I've got a simple for JBMAR Externalizers working already, it was dead easy! Great job
David on making this stuff easy to use. I have a doubt on new cluster nodes joining that
I'm clarifying with David. In the mean time I'm looking to abstract JBMAR away to
make using service-provider-friendly or end-user-friendly externalizers in a easy way for
Infinispan users.
Dynamic Externalizer discovery
------------------------------
Key: ISPN-986
URL:
https://issues.jboss.org/browse/ISPN-986
Project: Infinispan
Issue Type: Feature Request
Components: Marshalling
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Priority: Critical
Fix For: 5.0.0.BETA1, 5.0.0.FINAL
Look into how JBMAR sends Externalizers can be sent via the wire so that receiving side
does not need to know about Externalizers in advance.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira