Subject Re: [Firebird-Architect] Embedded Javascript
Author Jim Starkey
Rocky Castaneda wrote:
> Have you considered ZK for this matter? (ZKOSS.ORG)
> On Sun, Dec 14, 2008 at 3:25 AM, Jim Starkey <jstarkey@...> wrote:
>> Did the idea go anywhere? Is there a good model for extending
>> JavaScript for SQL access?
Actually, I have something quite different in mind. I'm pondering a
(non-stored) procedure language in which a client can define an
arbitrarily complex set of operations to be executed on the server to
minimize round trips between the client and the server. A procedure
could be cached on a server, but wouldn't necessarily persist on the
server. The basic requirements for the language are that it
computationally complete (call, branch, loop, throw/catch, etc.) and
support some notion of object that can be used to return complex results
to the client. Bootstrapping off a generally accepted language is a
plus. Running in a defensible sandbox is an absolute requirement.

What I'm considering is extended JavaScript for SQL access (probably a
hundred ways to do this). The client would pass a JavaScript request
(or the name of a predefined JavaScript object) to the server, the
server would execute the given procedure, and return whatever the
procedure returned to the list. The return might be an object, a string
or number, or list of records and values, a number of lists of records
and value, correlated or serial, or whatever.

JavaScript is a little loosey-goosey on types for my taste, all numerics
as doubles doesn't please me, but otherwise looks interesting.

I've never seen an ad hoc database stored procedure that I've like.
Heavy duty server side stuff is better in Java, but Java is a tad heavy
for the application.

Anyone have any other interesting candidates?

Jim Starkey
President, NimbusDB, Inc.
978 526-1376