Persevere: JSON Storage / Application Server
Date : 2008 05 13 Category : Tech & DevelopmentKris Zyp of Sitepen has released Persevere:
An open source set of tools for persistence and distributed computing using intuitive standards-based JSON interfaces of HTTP REST, JSON-RPC, JSONPath, and HTTP Channels. The core of the Persevere project is the Persevere Server. The Persevere server includes a Persevere JavaScript client, but the standards-based interface is intended to be used with any framework or client.
The Persevere Server is an object storage engine and application server
(running on Java/Rhino) that provides persistent data storage of dynamic
JSON data in an interactive server side JavaScript environment. It is
currently in beta, and boasts a very solid feature set that should
interest JavaScript, Dojo and Ajax developers:
a standard JSON HTTP/REST web interface Dynamic object persistence - expando objects, arrays, and
JavaScript functions can be stored, for extensive JavaScript persistence
support Remote execution of JavaScript methods on the server through
JSON-RPC for a consistent client/server language platform Flexible and fast indexed query capability through JSONPath Comet-based data monitoring capabilities through HTTP Channels
with Bayeux transport plugin/negotiation support Data-centric capability-based object level security with user
management, Persevere is designed to be accessed securely through Ajax
with public-facing sites Comprehensive referencing capabilities using JSON referencing,
including circular, multiple, lazy, non-lazy, cross-data source, and
cross-site referencing for a wide variety of object structures Data integrity and validation through JSON Schema Class-based data hierarchy - typed objects can have methods,
inheritance, class-based querying Pluggable data source architectures - SQL tables, XML files,
remote web services can be used as data stores Service discovery through Service Mapping Description
You can check out a live Persevere data grid demo that auto-syncs the grid using JS such as this:
PLAIN TEXT JAVASCRIPT:var persevereStores = dojox.data.PersevereStore.getStores(); // persevere stores are auto-generated customerStore = persevereStores.Customer; // and get the Customer store dataModel = new dojox.grid._data.DojoData(null,null,{/*rowsPerPage:12,*/store:customerStore,query:"",clientSort:true}); addItem = function() { // need to specify the parent because the customerStore is hierarchical and the grid model will // call newItem without any info who the parent //customerStore.parentId="0.examples.customers"; grid.addRow({firstName: "firstName", lastName: "lastName",created:dojo.date.stamp.toISOString(new Date,{zulu:true})}); }
