blob: c0868cb22eb1aabbe6626eca8f195f4cb70d9e25 [file] [log] [blame] [view]
iomodod85f91a2021-02-18 21:00:12 +04001
2# PCloud Architecture
3PCloud is a bundle of several services: Knowledge Graph, AppManager, EventProcessor, VPN, OAuth.
4
5
6## Knowledge Graph
7Knowledge graph contains all the data and abstracts away PCloud persistance. Gives capability to store and retrieve information. It's a service that runs on a dedicated node in the Kubernetes cluster.
8Let's use layered architecture for the Knowledge Graph implementation.
9
10
11### Store Layer
12Store Layer abstracts away the actual DB implementation. DB supported will be Postgres, but adding or changing to MySQL or any other DBMS will not affect the interface. In future different parts of the interface might store the data in the different Databases - relational, GraphDB, DocumentDB or any other.
13
14Store layer contains different stores such as: User, Permission, OAuth, Network, Device, Password Stores. Right now all of these essentially are different tables in the Postgres.
15
16
17
18### Application Layer
19Application Layer acts as a middleware, all the permission checking is done there. AppLayer "has" the Store and performs appropriate actions. AppLayer is communicated through an interface.
20
21
22### REST API Layer, gRPC Layer, CLI Layer? ...
23These layers are on top of the Application Layer. Other services (AppManager) communicate to the Knowledge graph from here.
24
25
26## App Manager
27...
28
29## Event Processor
30...