As mentioned in this message, Cayley can be compiled to JS using GopherJS and it works quite well in the browser:
This is interesting from multiple points of view:
- We can run a Cayley engine that works entirely in browser, and even offline.
- The data can be stored in memory, Local Storage, Indexed Storage (local) or PouchDB (local+remote).
- Data on the client can be kept in (readonly) sync with Cayley server by streaming replication log back to the client.
And all we need to add the initial support is to add a build script, and maybe switch from current UUID lib to allow the code to compile without "net" dependency.
Then we can try to implement one JS-specific backend using KV abstraction (it's the easiest way right now) and store the data in Local Storage, for example.
@elliott5 Can you please share the build steps needed for building and minification of the code?