| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 1 | # PCloud |
| giolekva | bb10bf0 | 2020-03-25 14:55:18 +0400 | [diff] [blame] | 2 | PCloud is a set of distributed infrustructure tools meant for setting up a personal cloud on commodity hardware such as Raspberry Pi. |
| 3 | Goal of the project is to provide: |
| giolekva | b3d409d | 2020-05-17 17:22:38 +0400 | [diff] [blame^] | 4 | * Object and file storage: distributed storage with configurable replication for durability and redundancy |
| 5 | * Knowledge graph: storing graph shaped data representing user/application generated content and relations between them |
| 6 | * Application infrastructure: to easily set up and run third-party applications, where applications can communicate with each other and produce/consume knowledge graph nodes |
| 7 | * Search infrastructure: indexing knowledge graph and making it searchable |
| giolekva | bb10bf0 | 2020-03-25 14:55:18 +0400 | [diff] [blame] | 8 | |
| giolekva | f265b97 | 2020-03-25 15:02:39 +0400 | [diff] [blame] | 9 | To prove viability of the project first milestone will be to build fully functional image storage and indexing infrustructure. User experience setting it up will look something like: |
| giolekva | bb10bf0 | 2020-03-25 14:55:18 +0400 | [diff] [blame] | 10 | * Set up PCloud on 3 or more servers and pair mobile device with it |
| 11 | * Configure IFTTT (if this then that) like worklfow to automatically: |
| giolekva | 84ac7d1 | 2020-03-25 14:57:46 +0400 | [diff] [blame] | 12 | * Back up every newly taken picture on PCloud |
| 13 | * Run face detection app on backed up pictures and store this information in Metadata service |
| 14 | * Index face annotations and make them searchable |
| giolekva | f265b97 | 2020-03-25 15:02:39 +0400 | [diff] [blame] | 15 | |
| giolekva | b3d409d | 2020-05-17 17:22:38 +0400 | [diff] [blame^] | 16 | User must be able to configure all of these from previously paired mobile device. |
| 17 | |
| 18 | # Status |
| 19 | |
| 20 | Three core infrastructure services have been prototyped: |
| 21 | * Knowledge Graph API: GraphQL based api with extensible schema |
| 22 | * Provides CRUD operations |
| 23 | * Auto-generates appropriate events upon data modification and includes them within mutation transaction |
| 24 | * Applicatioin installed by Application Manager (see below) can extend Knowledge Graph schema |
| 25 | * Application Manager: supports installing third-party applications by uploading configartion archive via web ui. |
| 26 | * Application configuration consists of: |
| 27 | * Schema extension (optional): if provided Knowledge Graph schema will be extended with new types and relations. |
| 28 | * Actions (optional): application can define any number of actions which can be invoked from other applications. Actions are parametrized. |
| 29 | * Initialization action (optional): application can configure action, provided possibly by other application, to be run post installation. |
| 30 | * Triggers (optional): applications can set up triggers on Knowledge Graph mutations. Triggers run actions. |
| 31 | * Event Processor: monitors changes in Knowledge Graph and triggers actions registered by applications installed using Application Manager. |
| 32 | * It is basically a state machine moving events from NEW to IN_PROGRESS to DONE states. |
| 33 | |
| 34 | On top of this we are running four "third-party" applications: |
| 35 | * Random Puppy: |
| 36 | * Does not use any PCloud features |
| 37 | * Deployes web server with ingress |
| 38 | * Object Store: |
| 39 | * Provides AWS S3 compatible API |
| 40 | * Exposes create-bucket-with-webhook action so other applications can create buckets and receive notifications when new objects are created. |
| 41 | * Important detail here is that object store itself is installed as a third-party app. This means other storage solution can be integrated with PCloud infrustructure without changing PCloud itself. |
| 42 | * Image importer: |
| 43 | * Registers new Knowledge Graph node type: Image |
| 44 | * Using Object Store create-bucket-with-webhook action to create new images bucket and register itself as a listener |
| 45 | * For every new object creates new Image node in Knowledge Graph |
| 46 | * Face Detector: |
| 47 | * Registers new Knowledge Graph node tupe ImageSegment and extends previously created Image type with their relation. |
| 48 | * Registers trigger on new Image nodes with action running face detection algorithm, which upon completion creates ImageSegment node for each face and attaches them to source Image. |