Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT "database" (client-side)

I'm looking for something like a database for GWT objects (inside the browser). It must work without HTML5 or Gears (or any browser plugins). It doesn't have to be capable of everything a database can do, but the most important features would be

  • automated indexing, on multiple columns
  • some kind of API or language to perform (a limited subset of) queries

It could be a bit similar to Taffy DB, but it must have automated indexing, and it should provide a GWT API. I hope, it would be even smaller in download size than Taffy, if it re-uses code from the GWT library.

(Maybe I should add, that I don't need permanent storage. It's ok, if the data has to be reloaded/regenerated when the user hits reload.)

like image 255
Chris Lercher Avatar asked Sep 10 '25 23:09

Chris Lercher


2 Answers

XBSDB seems to be good library for client-side db plus indexing solution.

like image 147
Ayaz Alavi Avatar answered Sep 12 '25 11:09

Ayaz Alavi


You may take a look at itemscript, it has an in memory "database" which you can query using REST-like URL fragments. I haven't tried it but it looks promising. I have to agree with tdavies that if you like Taffy, writing JSNI wrapper around it is quite trivial task.

Some time ago I created simple in-memory database-like system in GWT, where I leveraged existing Comparator interface for sorting, created simple Filter interface, and simple Query used to store any number of Comparators and Filters. Simple generic ModelManager class which stored model objects in one of collection classes and was running my Queries. It worked pretty well even without any support for indexing.

You won't find any existing solutions for your problem, I spent huge amount of time looking for one. Apart of that, why not give HTML5 a try?

like image 45
skrat Avatar answered Sep 12 '25 12:09

skrat