Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9521

CacheRegistry and CacheServiceProviderRegistry use inefficient marshalling of Node objects.

    Details

      Description

      Both the org.wildfly.clustering.registry.Registry and org.wildfly.clustering.provider.ServiceProviderRegistry currently store references to a Node object in their respective caches. The AddressableNode implementation currently serializes:

      • org.jgroups.Address
      • The logical name (typically a host name)
      • The socket binding address/port of its transport

      This is overkill. The Node should only need to serialize enough information to reconstruct itself using a NodeFactory<Address>, which should only include:

      • its Address
      • something to minimally identify the NodeFactory<Address>, with which to use to reconstruct the Node, e.g. a group name

      Unfortunately, getting a reference to the NodeFactory during deserialization isn't trivial, as these are on-demand services.

      Another approach, is to avoid referencing the Node in cache keys/values altogether. Currently, Registry<K, V> uses a Cache<Node, Map.Entry<K, V>> and ServiceProviderRegistry<K> uses a Cache<K, Set<Node>>. In both cases, we can replace Node with Address, and thus avoid unnecessary marshalling of the logical name and physical address of a member.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pferraro Paul Ferraro
                Reporter:
                pferraro Paul Ferraro
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: