Skip to content

Membership

Charlie Crean edited this page Jan 25, 2022 · 28 revisions

Components

GroupPolicyProvider

Description

The group policy provider is responsible for providing the GroupPolicy.json file, which is part of a CPI as a GroupPolicy java object, for a given holding identity.

Implementations

There is only one implementation class implemented/planned. This implementation depends on the virtual node read component to retrieve virtual node information for a given holding identity, and the CPI information component to retrieve the CPI metadata for a virtual node. From the CPI metadata, this component can retrieve the group policy file as a string which it then parses to a GroupPolicy object. GroupPolicy objects are cached so multiple reads will return the same object. This cache is cleared when the component stops or when it goes down due to down dependencies.

Usages

This is planned to be used by the MembershipGroupReaderProvider implementation to expose the GroupPolicy object internally through the group reader objects to any interested parties. It will also be used in the static registration implementation of the MemberRegistrationService since in the case of a static network the GroupPolicy.json file will define the static member list.

Lifecycle handling (for the single default implementation)

Start event:

  • Creates cache map (if it hasn't already been created or it has been closed)
  • Create registration handle for dependencies (if it hasn't already been created)

Registration changed to status UP event:

  • Creates cache map (if it hasn't already been created or it has been closed)
  • Creates callback with virtual node service so that the cache is updated when virtual node info changes.
  • Sets lifecycle status to UP

Registration changed to status DOWN event:

  • Sets lifecycle status to DOWN
  • Closes handle on virtual node component callback
  • Closes cache map (nullifies)

Stop event:

  • Sets lifecycle status to DOWN
  • Closes handle on virtual node component callback
  • Closes handle on registration for dependency components
  • Closes cache map (nullifies)

MembershipGroupReaderProvider

Description

This component provides a group reader for a given holding identity. The given group reader gives the caller access to the group data visible to the member represented by the holding identity. This is to be used to access data such as group parameters and functionality such as member lookups.

Implementations

There is only a single planned/implemented implementation of this component. This implementation create group reader instances as requested and caches this instances for faster lookups later. It also creates subscriptions to receive group data which it caches and uses later to create the group readers as needed. These caches are cleared when this component stops or goes down and they are recreated when the component starts or comes back up.

Usages

This component is to be used by any internal component requiring a member's view on a group for group parameter or member lookups mainly. It can also be used to access the member's group policy file, or CPI whitelist. For example, this will be used by the P2P components to lookup member information.

Lifecycle handling (for the single default implementation)

Clone this wiki locally