Darrel Schneider created GEODE-7229:
---------------------------------------

             Summary: v2 rest api should make it easier to use the pdx 
ReflectionBasedAutoSerializer
                 Key: GEODE-7229
                 URL: https://issues.apache.org/jira/browse/GEODE-7229
             Project: Geode
          Issue Type: Improvement
          Components: management
            Reporter: Darrel Schneider


gfsh configure pdx makes it somewhat easy to configure the 
ReflectionBasedAutoSerializer. All you need to do is give say 
--auto-serializable-classes=PATTERN and any classes that match PATTERN will be 
auto serialized with pdx.
Currently the v2 api requires that you set the Pdx.setPdxSerializer to a 
ClassName instance whose name is 
"org.apache.geode.pdx.ReflectionBasedAutoSerializer" and whose Properties 
contain one with the key "classes" and the value PATTERN.

The v2 rest api should make it at least as easy as gfsh and it could probably 
make it even easier. We should consider making the auto serializer the default 
if pdx is being configured. The only issue with this is the auto serializer 
needs to know which classes it should serialize and which it should leave 
alone. So just giving it the pattern ".*" could cause jdk and other framework 
classes to be serialized as pdx instead of just the domain classes.
Another thing that makes it more complicated with gfsh is it has two options; 
one for auto-serializable-classes and another for 
"--portable-auto-serializable-classes". This makes the command line look more 
complicated then it should be. I think we could instead just have the auto 
serializer pattern and then another boolean attribute that says if the auto 
serializer should check that the classes are portable. The whole portable thing 
has to do with making sure all the fields can be converted to the native 
client. Perhaps we don't need to expose this boolean if we now thing it should 
always be true or false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to