You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/01/06 21:12:33 UTC
[GitHub] [geode] kirklund edited a comment on pull request #7217: GEODE-9758: Add internal serial filter API
kirklund edited a comment on pull request #7217:
URL: https://github.com/apache/geode/pull/7217#issuecomment-1006912891
Quick walkthrough of how Geode uses this new internal serialization filter API. Please note this is an INTERNAL API so we can make further changes for refinement anytime.
InternalDataSerializer uses DelegatingObjectInputFilterFactory which delegates to a reflective wrapper for Java's ObjectInputFilter API which changed in newer Java versions. InternalDataSerializer uses the following classes in the geode-serialization API:
```
InternalDataSerializer -uses-> DelegatingObjectInputFilterFactory
InternalDataSerializer -uses-> NullObjectInputFilter
InternalDataSerializer -uses-> ObjectInputFilter
InternalDataSerializer -uses-> ObjectInputFilterFactory
InternalDataSerializer -uses-> SanctionedSerializableService
InternalDataSerializer -uses-> SerializableObjectConfig
```
LocatorLauncher uses EnabledGlobalSerialFilterConfigurationFactory to decorate DelegatingObjectInputFilterFactory with extra logic for conditions that must be met in order for serialization filtering to be enabled. Note that EnabledGlobalSerialFilterConfigurationFactory decorates by composition rather than inheritance. This follows "Composition over inheritance (or composite reuse principle)".
```
LocatorLauncher -uses-> DistributedSerializableObjectConfig
LocatorLauncher -uses-> EnabledGlobalSerialFilterConfigurationFactory
```
LocatorLauncher changes existing product behavior by enabling a global serial filter (aka process-wide filter affecting every ObjectInputStream) only if the new system property **_geode.enableGlobalSerialFilter_** is set to "true" (default is "false"). This is the only change in behavior in this PR. The rest of the PR is a major refactoring to define a (hopefully) well-organized internal API within geode-serialization. _I do recommend some extra review surrounding EnabledGlobalSerialFilterConfigurationFactory and this new system property._
DistributionConfig extends SerializableObjectConfig in order to be used as a SerializableObjectConfig by the serialization filter API. DistributedSerializableObjectConfig is only used when an instance of DistributionConfig cannot be available because there is no DistributedSystem connection (yet) in the local process.
```
DistributionConfig -extends-> SerializableObjectConfig
DistributedSerializableObjectConfig -extends-> SerializableObjectConfig
```
SystemManagementService uses EnabledJmxSerialFilterConfigurationFactory to inject an instance of FilterConfiguration into ManagementAgent. ManagementAgent then activates it by invoking configure when the agent starts.
```
ManagementAgent -uses-> FilterConfiguration
ManagementAgentFactory -uses-> FilterConfiguration
SystemManagementService -uses-> EnabledJmxSerialFilterConfigurationFactory
SystemManagementService -uses-> FilterConfiguration
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org