Persistent storage

31 views
Skip to first unread message

h3raLd

unread,
Oct 4, 2009, 1:20:17 PM10/4/09
to CloudKit
I spent a while looking at this group, Cloudkit docs, examples etc.
and -- PLEASE do correct me if I'm wrong! -- I realized that the only
way Cloudkit can persist data to disk seems to be through Tokyo
Cabinet, while some time ago it was also possible to use SQLite or
MySQL...

While I do like Tokyo cabinet, I'm not 100% happy because it's not
exactly cross-platform (Windows...?), so I was wondering if there's
any other adapter available. What about allowing periodic and/or on-
demand "dumps" of MemoryTables? Would that be feasible?

Jon Crosby

unread,
Oct 5, 2009, 1:43:08 PM10/5/09
to clou...@googlegroups.com
On Sun, Oct 4, 2009 at 7:20 AM, h3raLd <h3r...@gmail.com> wrote:

I spent a while looking at this group, Cloudkit docs, examples etc.
and -- PLEASE do correct me if I'm wrong! -- I realized that the only
way Cloudkit can persist data to disk seems to be through Tokyo
Cabinet, while some time ago it was also possible to use SQLite or
MySQL...

This is correct. At one point, CloudKit did use SQLite for the default store, moving to DataMapper for a while so that other databases could be used.
 

While I do like Tokyo cabinet, I'm not 100% happy because it's not
exactly cross-platform (Windows...?), so I was wondering if there's
any other adapter available.

The in-memory adapter is the only other one available today, but that will change in the next release.
 
What about allowing periodic and/or on-
demand "dumps" of MemoryTables? Would that be feasible?

To make this work for the current release, one could either extend the in-memory adapter or create a new adapter that had the same interface, writing to disc upon receiving a trigger event (such as time or size).

The plan for this next release is to use the JavaScript bridge (see the jsonquery branch on GitHub) and do most of the persistence work on the JavaScript side. This new store will have adapters for file storage (on the server) and will be used in the browser as well (using HTML5 storage, for example).

-Jon



h3raLd

unread,
Oct 5, 2009, 4:08:23 PM10/5/09
to CloudKit
Much better! Thanks a lot for your reply. I'll have a look at the
jsonquery branch.

I guess the next question is... how long till the next release
then? :-)

Jon Crosby

unread,
Oct 5, 2009, 4:22:03 PM10/5/09
to clou...@googlegroups.com
I don't have a definite date for the next release, but I can give you a snapshot of its progress. The JSON bridge that is being used has been extracted as its own project, published as "snarl" under my user account (jcrosby) on GitHub. The next piece, the JavaScript storage engine, is working with its own in-memory adapter but has not been published because I am refactoring the storage adapter interface to support easier querying. Once that part is solid, I will publish that as its own project and then pull it into CloudKit so that others can hack on it and write adapters for any backend they wish to support.

I'll keep everyone posted on the blog (http://blog.joncrosby.me) and on this mailing list. As soon as the JavaScript storage adapter interface is solid, I will post in both locations.

-Jon
Reply all
Reply to author
Forward
0 new messages