Le dimanche, 29 janvier 2012 à 10:56, Diego Olivier Fernandez Pons a écrit :

> Therefore I thought I could add a "cache" on the client side, meaning an 
> in-memory SQL database that would receive a big block of data from the server 
> and work on it till the client writes a query that needs some data that is 
> not available locally in which case it would request it from the server, etc.
>  
> I haven't found anything like that ready-to-use, so I was considering 
> reengineering existing OCaml code (database + web) and maybe compile it to 
> JavaScript. I have control on the client so I can afford installing an OCaml 
> runtime if needed albeit impractical though.
If you can afford to install recent browsers, on the javascript side.

Webdatabase [1] would have made your day but the spec has been withdrawn. It 
seems work along these lines was pursued in IndexedDB [2] but it may be a 
little bit early to use it.

If the dataset is not too huge and your queries are simple enough you may be 
able to hack a thin layer on top of webstorage [3]. But beware that this gives 
you no more than a persisent hashtable and I have no indication of the kind of 
performance you'd get. The advantage is that this is a candidate 
recommandation.  

Note, I have used neither of those. Just know their existence.  

Best,

Daniel

[1]
http://www.w3.org/TR/webdatabase/
http://caniuse.com/#search=websql



[2]
http://www.w3.org/TR/IndexedDB/
http://caniuse.com/#search=indexed

[3]  
http://www.w3.org/TR/webstorage/ (http://www.w3.org/TR/webstorage/#storage)
http://caniuse.com/#search=webstorage







-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to