Table of Contents

F1x Architecture

Overview

Terminology

Site

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:

Events routing server performs functions below:

Data Shard

Data Shard is on-disk representation of object with fields that has associated data handler (Code Shard), similarily to data and code separation in OOP.
Code Shard methods is written in Lua and is executed in sandbox. API methods to read and call referenced Objects allows writing sophisticated applications.

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.

Other option is publish whole Object, if it has “get_ahk” method, then it is published to DHT.

Router

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:

Publish/Subscribe

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.

Attraction/Proximity

To discover other objects of same kind, there is attraction-proximity “wandering search query” mechanism.

Task "match riders that go from Jerusalem to Eilat"

Objective: My Object “Intend to travel from Jerusalem to Eilat by car, 2 empty seats” need to find other objects “Intend to travel from Jerusalem to Eilat somehow”. TBD

JQ queries

Microapps need to access data from other Memos. They can run jq queries on “known” Memos:

Stored queries (subscriptions) also use jq to find matching Memos: TBD How?

Security

For the system to be popular, users must trust the system to be able to protect their data. That means that Handlers must be trusted not to misuse data.

During setup Site owner is assigned “default” set of Handlers, that been carefully audited. He might change it or “overlay” it with other Handlers sets.

In addition to trusted Handlers set, data sharing must be permitted for each case. Initially Handler has “Unknown” security level. Once it reads from internal object, it is assumed “restricted” level, and it can not publish (write into public objects), unless permitted by Site Owner. The allowance might have a checkbox “remember this choice”, thus allowing the particular combination of Handler and Object to publish.

Site security

Handlers are executed in sandbox, with access to Object fields (in the shard). Some fields are volatile, e.g. they are stored in cache area, separately from the shard. For POC we use Lua for Handlers language (RestrictedPython is possible).