Kinto - lightweight JSON storage service

Kinto is an open source JSON storage service that offers synchronisation and sharing features. It is lightweight, implemented in Python and built using Cliquet.

Kinto JSON storage serviceKinto is an open source JSON storage service that offers synchronisation and sharing features. It is lightweight, easy to use and easy to self-host. This service has been developed at Mozilla and released under the Apache licence.

Kinto uses Python. This programming language was chosen due to its expressiveness and powerful data structures. The more important detail is that Python is used at implementation level, while this JSON storage service is defined by an HTTP protocol and it could be implemented in any programming language.

Kinto server was built using Cliquet - a micro-services API toolkit. There are no packages for particular OS, but it is easy to run Kinto server using Makefile or Dockerfile. The service also can be installed with pip or via an image set up (on the Docker hub).

The main Kinto features:

  • Synchronisation
  • Fine-grained permissions
  • JSON Schema validation
  • Self-hostable
  • Universal and multi clients
  • Offline-first client
  • Easy query mechanism
  • Conflict resolution Validation
  • File storage (not fully implemented yet)
  • Batch/bulk operations
  • Changes stream
  • Pluggable authentication
  • Pluggable storage / cache

Kinto can be applied if you want to build collaborative applications with fine-grained permissions, develop a generic web database for front-end apps, synchronise application data between different devices, or store encrypted data at a tightly controlled location.

This service introduces several concepts that assist with synchronisation and sharing: record, collection, bucket. A record is the actual stored data. It is the smallest data unit in Kinto and it does not include schema, so the JSON content is not limited. Records are grouped into collections. In this way records can be filtered, sorted or manipulated as a list. Every Kinto object has the following properties: a unique identifier, a revision number, and a set of permissions. A bucket is an abstract notion (similar to namespaces) that helps in organizing of collections and their permissions.

Kinto features synchronization but focuses on offering the basics for concurrency control and polling for changes. Since a revision number is automatically incremented on change of any object, clients can obtain the list of changes that occurred on a collection of records since a certain revision. However, Kinto does not keep old revisions of objects and does not try to resolve conflicts automatically.

At its core Kinto is a Python-based service where client applications can store and retrieve JSON data. Such features as JSON schema validation, synchronisation, self-host ability, universal and multi clients allow Kinto to compete with CouchDB, Hoodie, Firebase, Remote-Storage, Parse, and Kuzzle. For more information read the documentation or view source code.

Connect with our experts Let's talk