This is an old revision of the document!
Table of Contents
Peonect Architecture
Overview
Site
Site is base compute unit of Peonect network. It consists of a web server that serves local connections and authenticates users. Its functions are:
- Authenticate user (a site normally has one user, preferably with unique domain)
- Execute memo apps (see later)
- Hold users memos, provide pserver interface
- Keep track of folders with subscribers, notify pServer on changes
Memo App
Memo is data structure that has associated data handler, similarily to data and code separation in OOP. Code is written in Lua and is executed in sandbox. API methods to read and call referenced Memos allows writing sophisticated applications.
Exported Folders
Memos are stored into Folders in “Private” area, that is visible to owner only. User might choose to mark some folders as externally accessible, for others to be able to see them. Exported folders have mandatory “Epoch” and “Digital Signature”. They also might be encrypted with public key of intended recipients, thus limiting who can see the content.
pCache server
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:
- retrieve list of subscriptions from sites under its control, send back matching Memos
- retrieve “exported” data from sites 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
penQL
Microapps need to access data from other Memos. The penQL is expressible enough to fulfill requests like these:
- what is default measurement system of the owner X? Imperial or standard
- Create stored query with lifetime duration of 2 hours from now: find People who live in radius of 100 meters from me and have Subscription to me of kind Memo=Message
- Get results of a stored query, iterate over results
