Shared or Dedicated Property Descriptors - evomimic/map-proto1 GitHub Wiki
OBSOLETE -- this content was moved to MAP Property Descriptors
It makes sense for at least some, but certainly not all, property type descriptors to be shared across holon types. Independent descriptors need to be independently identifiable and stored. However, to avoid the need for client to make multiple requests to build a complete set of descriptors for a HolonDescriptor, the server should always return complete descriptors.
Proposed solution (Long Term):
- Support both dedicated (i.e., owned by a single HolonDescriptor) and shared (i.e., separately stored and referenced from multiple HolonDescriptor properties).
- The HolonDescriptor returned to the client (i.e., the HolonDescriptor DTO) should always contain fully populated property type descriptors -- even if some are shared (and therefore stored independently).
This means that retrieval of shared property type descriptors needs to be performed on the server side. There is design freedom with respect to when this retrieval happens. Since retrieval of property type descriptors is expected to be far more frequent than updates, it makes sense to cache shared descriptors in the HolonDescriptors that reference them. Propagation of updates can then happen as a background process when/if descriptors are changed. However, this adds substantial complexity -- much of which can be abstracted into a shared publish/subscribe infrastructure. But we don't have that infrastructure currently.
For now, the simplest path forward is to just support dedicated property descriptors and add independent (shared) property descriptors as a future enhancement. However, it should be transparent whether a property_descriptor is shared or dedicated.
Proposed Solution (Near Term)
- All property descriptors will be dedicated (i.e., owned by a single HolonDescriptor).
pub struct PropertyDescriptor {
pub header: TypeHeader,
details: PropertyDescriptorDetails,
}