Tuesday, April 21st, 2009

Persevere’s JavaScriptDB: Impressive JSON Performance

Category: Database, JavaScript, JSON

Kris Zyp recently posted about an intriguing new chapter in the application persistence space:

The latest beta of Persevere features a new native object storage engine called JavaScriptDB that provides high-end scalability and performance. Persevere now outperforms the common PHP and MySQL combination for accessing data via HTTP by about 40% and outperforms CouchDB by 249%. The new storage engine is designed and optimized specifically for persisting JavaScript and JSON data with dynamic object structures. It is also built for extreme scalability, with support for up to 9,000 petabytes of JSON/JS data in addition to any binary data.

This comparison isn’t exactly apples-to-apples as it turns out–for the web app use case, Perservere has a bunch of value-adds on top of data storage:

Persevere/JavaScriptDB goes further [than relational DBs] with the flexibility to evolve schemas and handle partial schemas. Persevere also provides integrated server side JavaScript (SSJS) with persistence, Comet-driven data change notifications, JSONQuery, standards based HTTP interface with content negotiation, JSON-RPC interface to SSJS, cross-domain handling, CSRF protection, and more. All of these things are additional features that one would have to add to the stack for other storage systems, making them even slower. Persevere includes this functionality out of the box, while still maintaining extremely fast performance.

Kris spends a bit of time in his post explaining his test setup, but then gets to the good stuff:

So how does Persevere achieve this level of performance with the JavaScriptDB storage? The dynamic object-oriented nature of the data that is stored in JavaScriptDB is much different than that of a traditional relational database, so a number of innovative approaches were employed.

He goes into quite a bit of detail explaining the implementation details behind JavaScriptDB. The summary (with lightly edited quotes) is:

  • Direct Data-Bound Object Representation: “In a traditional application stack, a record must have separate in-memory representations for [the database] and [the application] result set which then might be mapped to an object representation. With JavaScriptDB, the single in-memory object is reused for all result sets and data caching.”
  • Shared Cache of Objects with Copy-on-Write
  • Append-based Database Storage: “Many traditional database commit data to a transaction log before committing data to the table, requiring multiple writes. JavaScriptDB appends transactional data directly to the main storage file; writes can be committed with a single IO operation.”
  • Adaptive On-Demand Concurrent Indexing
  • Batched writes in integrity mode
  • Pluggable Storage

Check out the full post all the details.

Posted by Ben Galbraith at 1:00 pm

4.6 rating from 51 votes


Comments feed TrackBack URI

JSON persistence: This is exactly the news I was waiting for ;)

Comment by nunziofiore — April 21, 2009

Well.. To be fair to CouchDB he is benchmarking a very old version.

Comment by JonGretar — April 21, 2009

What is this for? Is it better than LAMP + memcache? Do I need browser plugin for this? Is it opensource? Does it work cross-platform, cross-browser? Why not use SQLite builtin Firefox (apart from that, its right now reserved for extensions only)?

Summary is pretty crappy on those subjects.

Comment by paziek — April 22, 2009

@paziek This is a open source server side database. None of your questions regarding the client (plugin, etc.) apply.

Comment by Malde — April 22, 2009

Leave a comment

You must be logged in to post a comment.