Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7229

v2 rest api should make it easier to use the pdx ReflectionBasedAutoSerializer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • management
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              echobravo Ernest Burghardt
              dschneider Darrel Schneider
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h