Skip to content

A kinto clone, yet modified to run on UniSat ARM processors. Kinto is A generic JSON store ( in UniSat we deliver and synch telemetry data ) with sharing and synchronisation capabilities.

License

Notifications You must be signed in to change notification settings

UNEPG/kinto-unisat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kinto-UniSat

A kinto clone, yet modified to run on UniSat ARM processors. Kinto is A generic JSON store ( in UniSat we deliver and synch telemetry data ) with sharing and synchronisation capabilities.

kinto-unisat is based on kinto from Mozilla Foundation which originally only supports 64 bit Intel and AMD CPUS. To make it run also on ARM devices which is used on UniSat devices, we have modified some portion of the code, rebuild and also created and pushed the public container images which can be pulled from here.

CleanShot 2022-08-23 at 08.28.17

NOTES: Theoritically, you can use kinto-unisat to build your own version for any of your ARM devices, and we have mainly tested on `Raspberry Pi 3/3B+, Raspberry Pi 4B and RPi CM4 with running 64 bit Debian)

Requirements

On UniSat kinto runs on top of containers such as docker or podman.

  • Docker (Docker Compose)
  • Python3.9 + (Tested)
  • DB:
    • memcached:1
    • postgres:14

Basic Comcepts About Kinto

For detailed info, please refer to the original documentation :

Concepts

Basically, Kinto is a service where client applications can store and retrieve JSON data.

In order to provide synchronisation and sharing features for these data, Kinto introduces some basic concepts.

Kinto objects in brief:

Object Description
bucket Buckets can be seen as namespaces: collection names won’t collide if stored in different buckets.
collection A collection of records
record The actual stored data
group A named list of principals to define permissions.

Buckets, Collections, and Records

A record is the smallest unit of data. By default, there is no schema, and the JSON can contain anything.

A collection is a group of records. Records are manipulated as a list and can be filtered or sorted. Clients can obtain the list of changes that occured on the collection records since a certain revision (e.g. last synchronisation). A JSON schema can optionally be defined on the collection.

A bucket is an abstract notion used to organize collections and their permissions.

_images/concepts-general.png

Every kind of object manipulated by Kinto shares some common properties:

  • A unique identifier.
  • A revision number, automatically incremented on change.
  • A set of permissions.

Unisat Use Case

According to the Telemetry over Terminal Socket Based Data Publishing and Subscription Protocol (PSoTT protocol we need two database system, and synchronize them periodically, in the case of UniSat Data Provider/Subscription network, this is achived by using kinto (kinto-unisat/kinto-arm) more specifically.

CleanShot 2022-08-17 at 10.03.26

The IoT device (UniSat Nano-satellite) is connected with the local publisher (A RPi 3B), local publisher runs two developed backend programs :

Python based backend includes 3 paralell threads:

  • Serial Communication Thread (read and decode data from the serial port (connected to the IoT device))
  • Data handling Thread (communicates with local and remote database services (kinto instances running locally and remotely on the server))
  • Data Synching (in case of network error or temporary failfure, data is writeed to local database and synced to the cloud when network availale again)

CleanShot 2022-08-23 at 09.04.36

About

A kinto clone, yet modified to run on UniSat ARM processors. Kinto is A generic JSON store ( in UniSat we deliver and synch telemetry data ) with sharing and synchronisation capabilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages