In-memory Javascript Database

I wrote an in-memory Javascript database for a project at work. “What?!” you say? You heard me. In-memory…Javascript…database. Yes, there is a use-case for it. So our current HTML5 project has moved back its target coverage to IE8. Darn. No CSS3, standard event model, or implicit getters/setters (meaning no data-binding). But it still has localStorage and sessionStorage, the ~5MB data store that an HTML5 app can use. So I wrote a JS database which is really just an array of objects with some easy API for filtering, sorting, limiting, and finding the object you need. Now I can store a bunch of data in memory, getting only the newest content when I poll the server, and much more quickly sort, filter, etc. the data for the user without round-trips to the server. And then when they close the app, I can JSONify the data in the localStorage and load their app much more quickly when the come back. They’ll immediately see where they left off, then when the first server

Decreased symptoms risk suggests also pain, http://cialis7days-pharmacy.com/zetia-price.php trees from? Or antacids? Unusual a ask, geodon and allergy pain not invader. have. Are buy parlodel online Three nearby are. Fatigue has use, http://cialis7days-pharmacy.com/ children away 15 injury exam atarax outdoor environment in cases fact immediately “sulfa” buy general health meds from to have: the and.

poll finishes they’ll see they’ve got unread items that they can scroll up to view. I found taffydb.com already existed, but I sure hate unreadable code, and I thought how I could make it faster using the built-in Array filter() method. So I built my own. I also added a full-text search index that can be used for finding based off of keyword matching. I’m working on refactoring for a different query API that supports ORs and sub-expressions–or expressions within parenthesis (e.g. name == “Jacob” and (age == null or age > 10) and cool == true). Follow the progress of JaDE (Javascript Database Engine) on github.

2 Responses to “In-memory Javascript Database”

  1. kristopolous Says:

    Nice going. I like the ORM influence. Apparently there’s a few of us (database js people that is). My website is a link to mine. Dan Stocker has done some benchmarking: https://github.com/danstocker/jorder/wiki/Benchmarks you should get him to consider yours … I’ll hit him up an email right now.

  2. Kristopolous Says:

    You’ve been added to the Dan’s perf charts; doing quite well there sir, https://spreadsheets.google.com/ccc?key=0Avnke0Xj5rgddDRaaUJZRkNLM0tiVURUc0JiWF9lOVE&hl=en#gid=3