User Tools

Site Tools


f1x:architecture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
f1x:architecture [2025/02/14 12:09] arief1x:architecture [2025/03/02 05:22] (current) – [Terminology] arie
Line 7: Line 7:
   * Site - F1x node installation   * Site - F1x node installation
   * Identity - public/private keypair   * Identity - public/private keypair
-  * Realm - set of objects signed by Identity private key. All shards in realm have the same realm ID. +  * RealmID - hash of Identity public key 
-  * RealmID - hash of Realm public key +  * Realm - set of objects that are related to an Identity. All shards in realm have the same realm ID. \\ Likely to be implemented as git repository, for its strong builtin sync and reconciliation feautures
-  * Epoch - positivie number representing version of the object +  * Object - contains fields of Object or Code (Handler) kind with unique name ~ObjectID 
-  * Shard - contains specific version of Object of Data or Code (Handler) kind with unique address ~ShardID. \\ Published shards have addres RealmID:ShardID. For security reasons, normal and published Shards have different location on disk. +      * mandatory fields: name, kind
-      * mandatory fields: name, kind, epoch+
       * Data shards have _handler       * Data shards have _handler
       * Code shards have _code attribute       * Code shards have _code attribute
       * Handler PubSub has method listener_SOMENAME and callback_SOMENAME. The callback method of Handler is called if result of the corresponding listener method changed. Internal logic might intentionally call listener method to invoke subscribed callbacks.       * Handler PubSub has method listener_SOMENAME and callback_SOMENAME. The callback method of Handler is called if result of the corresponding listener method changed. Internal logic might intentionally call listener method to invoke subscribed callbacks.
 +      * version - used by reflectors and Router to facilitate subscriptions
 +  * Shard - contains specific version of ObjectID kind with unique address ~ShardID
   * Handler - Code shard that knows to execute methods for certain Object kind   * Handler - Code shard that knows to execute methods for certain Object kind
   * Handlers Set - Handlers published by the same Realm   * Handlers Set - Handlers published by the same Realm
-  * Reflector - Object sole purpose is to subscribe to a listener method of referenced PRIVATE Shard. On every change - new public shard of kind "ReflectorUpdate" is created, with the new result value is stored, the shard is signed and made available for external subscribers.+  * Reflector - Object sole purpose is to subscribe to a listener method of referenced PRIVATE Object. Has unique ReflectorID (likely amalgam of source ObjectID). On every change - new public shard (with updated version) is created, with the new result value is stored, the shard is signed and made available for external subscribers. \\ For security reasons, normal and published Shards have different location on disk.
   * Publish - procedure to create Reflector   * Publish - procedure to create Reflector
-  * Subscription - Object that specifies rules to invoke methods of other Objects. The invokation is done on +  * Subscription - Object of kind Subscription that specifies rules to invoke methods of other Objects. 
-      * to Reflector: specifies Object and method to call on each new shard of kind "ReflectorUpdate" and specific ReflectorID +      * Subscription to Reflector: specifies ObjectID→method to call on each new version of specific ReflectorID 
-      * to Objects: specifies Object and method to call on each new shard of kind "X" and possibly other conditions (like geo "Y", gender "G" or age range MIN/MAX)+      * Subscription to Objects: specifies ObjectID→method to call on each new Object of kind "X" and possibly other conditions (like geo "Y", gender "G" or age range MIN/MAX) - used by [[:f1x:archtecture:attraction-proximity|Attraction/Proximity]]
   * Router - Caching/Routing/Matching Server (CRMS) - intermediate server, usually sits on internal network or at ISP   * Router - Caching/Routing/Matching Server (CRMS) - intermediate server, usually sits on internal network or at ISP
-      * Router - keep track of objects its children sites are subscribed to, forward objects to sites. Allows Sites to register as children based on IP.+      * Router - keep track of objects its children realms are subscribed to, forwards objects. Allows Realms to register as children based on IP.
       * Cacher - cache frequently accessed objects       * Cacher - cache frequently accessed objects
       * Matcher - [[:f1x:archtecture:attraction-proximity|Attraction/Proximity]] role       * Matcher - [[:f1x:archtecture:attraction-proximity|Attraction/Proximity]] role
 +  * Geo - Plus Code of [[https://en.wikipedia.org/wiki/Open_Location_Code|Open Location Code]] standard
 +
  
 ==== Site ==== ==== Site ====
  
-Site is compute infrastructure that enables users to operate Identity Realms. It consists of events routing server and presentation (like web server). \\  \\ Web server (presentation) functionality:+Site is compute infrastructure that enables users to operate Object Realms. It consists of events routing server and presentation (like web server). \\  \\ Web server (presentation) functionality:
  
   * authenticate the site user (a site normally has one user, preferably with unique domain)   * authenticate the site user (a site normally has one user, preferably with unique domain)
Line 51: Line 54:
 ==== Published Shards ==== ==== Published Shards ====
  
-Normal shards are accessible to Realm owner only. The owner might choose to publish methods of some objects using special "Reflector" objects. These also might be encrypted with public key of intended recipients, thus limiting who can see the content.+Normal shards are accessible to Realm owner only. The owner might choose to publish methods of some objects using special "Reflector" objects. These also might be encrypted with public key of intended recipients, thus limiting who can see the content. \\  \\ Other option is publish whole Object, if it has "get_ahk" method, then it is published to DHT.
  
-===== pCache server =====+===== Router =====
  
-Every Site is connected to a pCache server. It might be discovered by asking centralized "pCache servers registry". It is publicly accessible and should be at location with good connectivity. The pCache servers perform functions below:+Every Site is connected to one Router server. It discovesrs Routers by asking centralized "Router servers registry". It is publicly accessible and should be at PoP with good connectivity. The Router servers perform functions below:
  
-  * retrieve list of subscriptions from sites under its control, send back matching Memos +  * retrieve list of subscriptions from realms under its control, send back matching Objects 
-  * retrieve "exported" data from sites and share it to sites that request it. Cache the data. +  * retrieve "exported" data from realms and share it to sites that request it. Cache the data. 
-  * receive notifications from children sites about data change, forward them to upstream pServers or other sites+  * receive notifications from children sites about new Shards, forward the Shards to other Routers, while prioritizing traffic
  
 ==== Publish/Subscribe ==== ==== Publish/Subscribe ====
  
-Frequently object want to know when something changes in other specific objects. To maintain encapsulation principle, this is done by "listener" methods. When other objects indicate desire to get notifications of a "listener" method, result of the method is remembered, together with list of "subscribed" object/methods. When Object wants to "notify" subscribers on a change, it invokes listener method that returns different value, thus causing methods of subscriber objects to be called.+Frequently object want to know when something changes in other objects. To maintain encapsulation principle, this is done by "listener" methods. When other objects indicate desire to get notifications of a "listener" method, result of the method is remembered, together with list of "subscribed" object/methods. When Object wants to "notify" subscribers on a change, it invokes listener method that returns different value, thus causing methods of subscriber objects to be called.
  
 The subscribers might then recalculate a value, compare with threshold and raise nofification to user or alter return value of their own listeners, thus "publishing" a change. The subscribers might then recalculate a value, compare with threshold and raise nofification to user or alter return value of their own listeners, thus "publishing" a change.
Line 80: Line 83:
  
   * what is default measurement system of the owner? Imperial or standard   * what is default measurement system of the owner? Imperial or standard
-  * get list of neighbours who know me: +  * WHA? get list of neighbours who know me: 
-      * find Memos of kind People and have homeAt geo and have Memo of kind Subscription where (site=me and kind Memo=Message) +      * WHA? find Objects of kind People and have homeAt geo and have Memo of kind Subscription where (site=me and kind Memo=Message) 
-      * remove ones that have distance between me and homeAt more than 100 m+      * WHA? remove ones that have distance between me and homeAt more than 100 m
  
 Stored queries (subscriptions) also use jq to find matching Memos: TBD How? Stored queries (subscriptions) also use jq to find matching Memos: TBD How?
f1x/architecture.1739534962.txt.gz · Last modified: 2025/02/14 12:09 by arie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki