Hi John, Re. Javascript being slow you may be interested in EJScript which is an Embedded Javascript implementation with a Native Code Compiler. See: http://www.ejscript.org/products/ejs/doc/guide/ejs/language/overview.html and http://www.ejscript.org I have not (yet) used it so can't comment further.
I also use JSON with SQLite and have C/C++ code to parse and build a tree (DOM) from JSON. Along with some simple JSON Path style lookup. And re. Sockets and doubles. I've written a layer that basically sends/receives variants using sockets. If you are familiar with Boost::Any it is like that, however I use different implementation. Wednesday, June 11, 2008, 10:48:31 AM, you wrote: JS> We use an application server I wrote which handles HTTP, serves file and JS> has embedded Sqlite for the RPCs. The RPC can deliver its result either JS> in XML for widely distributed applications or as JSON if it is JS> responding to a WWW browser in AJAX mode. JS> We keep a local library of SQL RPCs so that SQl never appears on the JS> network and we have immunity from injection attacks. It also means that JS> we can cache compiled SQL, a useful performance win. JS> We use the Expat parser in remote programs using the XML format. A JS> wrapper makes it a verifying parser to ensure well formed XML. JS> The server is multi threaded and maintains a pool of live threads so it JS> can respond quickly and assign multiple threads to one browser JS> connection. Shared cache in Sqlite and some extra caching to maintain JS> multiple open databases and results makes Sqlite behave like a simple to JS> use enterprise DB server, but without the overhead of extra processes. JS> We use mutexes for synchronization, set up as read and write locks and JS> avoid the POSIX file locks. JS> We installed Javascript as a procedural language to be used by Sqlite JS> instead of PL/SQL but that is not a great success (v. slow) and we are JS> going to experiment with using Python. JS> Based on our experience you should be very happy with your Sqlite based JS> RPC capability. JS> Alex Katebi wrote: >> John & John, >> >> Actually my API used to be XML using SCEW a DOM like XML parser that uses >> Expat. >> >> For my particular application RPC made more sense to me. What could be >> easier than a function call? Another advantage was that I did not have to >> create any functions. I am just using SQLite's C API. Now the users of my >> application can query any table on the server side using select. Since my >> application is a network server, and network debugging capability is >> crucial. >> The only ugliness is that select locks the tables. I wish D. Hipp would give >> us an option for pStmt to create a temporary table of the select result set >> and delete that temp table after finalize automatically. This way a client >> can sit on a prepare/step for a long time. >> >> I solved the endian issue pretty easy by sending the type code. >> >> Thanks, >> -Alex >> >> >> On Tue, Jun 10, 2008 at 3:07 PM, John Elrick <[EMAIL PROTECTED]> >> wrote: >> >>> Alex Katebi wrote: >>>> Yes I need to do it as 8 byte buffer. Convert the endianess to the >>> network >>>> then back to host for 8 byte integer. >>>> I think XML is great for command validation and CLI auto typing, help >>> etc. >>>> Besides parsing issue, XML can not handle binary data directly. >>>> >>> As John pointed out, XML is not intended to handle binary data >>> directly. We use XML as a transfer medium for binary data and simply >>> base64 encode it before encapsulation. >>> >>> >>> John Elrick >>> Fenestra Technologies >>> _______________________________________________ >>> sqlite-users mailing list >>> sqlite-users@sqlite.org >>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >>> >> _______________________________________________ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users JS> _______________________________________________ JS> sqlite-users mailing list JS> sqlite-users@sqlite.org JS> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Best regards, Neville Franks, http://www.surfulater.com http://blog.surfulater.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users