Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host.
Kinto is used at Mozilla and released under the Apache v2 licence.
Why use Kinto?¶
We believe data belongs to the users, and not to the application authors. When writing applications, data should be made available to any device, connected or offline, and everything should be in sync.
Rather than spending a non-trivial amount of time and expertise on implementing all that (and then maintaining it!), you could use Kinto, that does all that for you:
- Expose your data over an HTTP interface, unlike databases like PostgreSQL
- Use simple HTTP requests rather than SQL
- Use Kinto.js to easily implement offline first clients
- Choose the database you want from those that Kinto supports, and use a unified API to access its data
- Manage your data using the handy admin UI
- Easily set up live push notifications for live synchronisation
- Make it possible to share data between users (using fine-grained permissions)
- Take advantage of schema validation if you need it
- A generic Web database for frontend applications.
- Build collaborative applications with fine-grained permissions.
- Store encrypted data at a location you control.
- Synchronise application data between different devices.
At Mozilla, Kinto is used in Firefox and Firefox OS for global synchronization of settings and assets, as well as a first-class solution for personal data in browser extensions and Web apps.
|Synchronisation||Fined grained permissions|
|JSON Schema validation||Universal and multi clients|
|Open Source and Self-hostable||Designed in the open|
- HTTP best practices
- Pluggable authentication
- Pluggable storage, cache, and permission backends
- Configuration via a INI file or environment variables
- Built-in monitoring
- Cache control
|File attachments on records||Live Push notifications|
|Kinto+React boilerplate||Example applications|
- Web Administration (under construction)
- Automatic service discovery
- Push notifications using the Push API (under construction)
(See our roadmap)
Bi-directionnal synchronisation of records is a very hard topic.
Kinto takes some shortcuts by only providing the basics for concurrency control and polling for changes, and not trying to resolve conflicts automatically.
Basically, each object has a revision number which is guaranteed to be incremented after each modification. Kinto does not keep old revisions of objects.
Clients can retrieve the list of changes that occured on a collection of records since a specified revision. Kinto can also use it to avoid accidental updates of objects.
Kinto synchronisation was designed and built by the Mozilla Firefox Sync team.
Kinto can execute some code when a particular event occurs. For example, when a record is created or updated in a particular collection.
See our tutorials!
Comparison with other solutions¶
Before we started building our own data storage service, we took a look at what was already out there. Our initial intent was to use and possibly extend an existing community project rather than reinventing the wheel.
However, since none of the existing solutions we tried was a perfect fit for the problems we needed to solve, notably regarding fine-grained permissions, we started our own stack using the experience we gained from building Firefox Sync.
What follows is a comparison table showing how Kinto stacks up compared to some other projects in this space.
|Easy query mechanism||✔||✔||✔||||✔||||✔|
|Conflict resolution||✔||✔||✔||✔||✔||✔ ||✔|
|Pluggable storage / cache||✔||✔|
|||Currently, user plugin in Hoodie auto-approves users, but they are working on it.|
|||CouchDB uses Map/Reduce as a query mechanism, which isn’t easy to understand for newcomers.|
|||Remote Storage allows “ls” on a folder, but items are not sorted or paginated.|
|||Kinto uses the same mechanisms as Remote storage for conflict handling.|
|||Remote Storage supports OAuth2.0 implicit grant flow.|
|||Support for decentralised discovery is planned but not implemented yet.|
You can also read a longer explanation of our choices and motivations behind the creation of Kinto on our blog.
How does Kinto compares to CouchDB / Remote Storage?¶
To see how Kinto compares to CouchDB & Remote Storage, read the comparison table.
Can I encrypt my data?¶
Kinto server stores any data you pass to it, whether it’s encrypted or not. We believe encryption should always be done on the client-side, and we make it easy to use encryption in our Kinto.js client.
Is there a package for my Operating System?¶
No, but it’s a great idea. Maintaining packages for several platforms is time-consuming and we’re a small team.
Currently we make sure it’s easy to run with Docker or Python pip.
We also have a single-click deployment on Heroku.
If you’d like to help us out by maintaining packages for your favourite OS, we’d be delighted to collaborate with you!
Why did you chose to use Python rather than X?¶
We love Python because it’s a concise & expressive language with powerful data structures & easy to learn, so it was an obvious choice for the development team.
In addition, the Operations team at Mozilla is comfortable with deploying and managing Python applications in production.
However, Python is just an implementation detail per se. Kinto is defined by an HTTP protocol that could be implemented in any language.
Is it Web Scale?¶
YES™. Have a look at the
/dev/null backend. ;-)
What is Cliquet? What is the difference between Cliquet and Kinto?¶
Cliquet is a toolkit for designing micro-services. Kinto is a server built using that toolkit.
How does Kinto authenticate users ?¶
Kinto authentication system is pluggable and controlled from settings.
By default it ships with a very simple (but limited) Basic Authentication policy, which distinguishes users using the value provided in the header.
We’d be delighted to add more built-in authentication methods into Kinto. Please reach out if you’re interested!