← Back to team overview

u1db-discuss team mailing list archive

Re: API Design

 

On Wed, 2011-11-16 at 10:15 +0000, Stuart Langridge wrote:
> JSON is not the storage format.

All evidence points to the contrary.

> The storage format is completely defined by the back end. Your back end
> can store the data in a big csv file if it likes.

This is actually the container format. There is a difference between it
and the storage format. The storage format is what we have to store the
application's data in. The container format is *where* we store it. The
container can be SQL, nmdb, csv (but really, converting between csv and
JSON would just be idiotic), or files on disk.

>  We're not talking
> about JSON because that's the format the data is stored in.

Actually, we are. :)

>  We're
> talking about JSON because that's the format your implementation has to
> talk in order to do syncs.

This is mostly irrelevant. If it *HAS* to be JSON in the sync protocol,
then the obvious best solution for client/server is to just store that
blob of JSON in whatever container it prefers to use. Most clients are
going to use SQLite, and for the server, the clients don't care what
container it is stored int.





Follow ups

References