[Monotone-devel] using monotone for a simple logging database
From:
John Wright
Subject:
[Monotone-devel] using monotone for a simple logging database
Date:
Fri, 28 Nov 2008 17:42:02 -0700
I am looking for some architecture direction on how I can leverage some of the netsync code from Monotone in a project I am working on. I am creating a unique private logging app on top of sqlite3. By logging I mean a simple diary where users will log small micro-bits, ala Twitter or Jaiku and I will pull a user's public entries from Twitter and other sources in to provide context for this micro-journal. I have been trying to design an architeture that combines feature of a dvcs like monotone with sqlite because:
I want a portable single file database that plays well with in my different application environements like the web, the Iphone, and Ruby on Rails. So I am developing on top of a simple logging schema in sqlite.
I want it to work equally well in offline mode and to easily sync when reconnected. I liked the git push and pull work and dream of pointing to a url of another sqlite database and sync the entries between them over http.
Ala git, it should be easy to deterimine if an entry has been tampered by comparing with a SHA1 hash of the entry to another instance of the logging repository.
Unlike a DVCS my schema is flat, there is no notion of a tree of edits/commits, just a running "straight" history of logs. Actually there are no file blobs, just the log part of a commit. I am hoping that this can means I can implement this dvcs -lite logging repository in _javascript_, Objective C, and Ruby without having to resort to anything but SHA1, basic language primitives and http and things available in most programming languages. I am writing you Monotone guys hoping somebody can help point me the relevant bits of Monotone that I can look at for inspiriation. I am of course digging around myelf but somebody might be able to expedite the process for me. I am particurlarly interested if whether some of the netsync code can be borrowed for such a purpose. I know that in netsync, partial hashing of the sqlite file is used to compute what needs to be sent between the 2 systems. Is it possible to implement a simplified version of this protocol that could work even with a _javascript_ client as one of the peers.
If this isn't an appropriate question for this forum, please ignore and my apologies,