Re: Lisp backend protocol



Tim X <timx@xxxxxxxxxxxxxxx> writes:

Bill Atkins <NOatkinwSPAM@xxxxxxx> writes:

ram@xxxxxxxxxxxxxxxxxx (Stefan Ram) writes:

Ari Johnson <iamtheari@xxxxxxxxx> writes:
Stefan Ram wrote:
SELECT RESULT FROM FACTORIAL WHERE ARGUMENT=5;
The problem with this is that you then have a Lisp out there
polling the SQL server, unless I've misunderstood you again (a
good possibility).

A process reads SQL queries, like »SELECT RESULT FROM
FACTORIAL WHERE ARGUMENT=5;« and maps them to Lisp calls, like
»(FACTORIAL 5)«. It then returns the value of this expression
as a single-valued table.

There is no need for polling: A process controlled by
functions written in Lisp acts as the SQL server.

The client believes he is querying tables, while in fact he
is invoking lisp functions.

As another example, »( f( g 2 3 ))« is translated to:

SELECT RESULT FROM f WHERE ARGUMENT =
( SELECT RESULT FROM g WHERE ARGUMENT=2 AND ARGUMENT1=3 );

Hideous!

Thus, a user or PHP-environment knowing how to query an SQL
server can invoke Lisp functions with no need to be aware of it.

I'm afraid I'd have to agree this is hideous and I cannot see what it
would give you as you would essentially be limiting what you could do
in lisp to what you could express in SQL i.e. the question is limited
to SQL expressions and while you could process data in any way you
like to get the answer and return it as a psudo SQL table, the type of
question you can ask is still restricted to the questions you can
ask/express in SQL - in which case, what benefit would you get you
cannot already get with a decent database which supports stored
procedures?

The benefits are obvious howerver. Compare:

$server=mysql_select_db($base,mysql_connect($host,$login,$pwd));
$result=mysql_query("SELECT RESULT FROM f
WHERE ARGUMENT = ( SELECT RESULT FROM g
WHERE ARGUMENT=2
AND ARGUMENT1=3 )",$server);
$row=mysql_fetch_assoc($result);
echo $row['RESULT'];

vs.:

$server=lisp_connect($host,$login,$pwd));
$result=lisp_query("SELECT RESULT FROM f
WHERE ARGUMENT = ( SELECT RESULT FROM g
WHERE ARGUMENT=2
AND ARGUMENT1=3 )",$server);
$row=lisp_fetch_assoc($result);
echo $row['RESULT'];


See? It's exactly the same, there's nothing more to learn. Just
s/mysql/lisp/ to use the lisp server instead of the mysql server. You
could even call it LISQL and hide the fact that you've implemented
that server with a slow interpreted languages from beyond grave.

--
__Pascal Bourguignon__ http://www.informatimago.com/

This is a signature virus. Add me to your signature and help me to live.
.



Relevant Pages

  • Re: Lisp backend protocol
    ... The problem with this is that you then have a Lisp out there ... A process reads SQL queries, ... There is no need for polling: ... functions written in Lisp acts as the SQL server. ...
    (comp.lang.lisp)
  • Re: Lisp backend protocol
    ... The problem with this is that you then have a Lisp out there ... A process reads SQL queries, ... There is no need for polling: ... functions written in Lisp acts as the SQL server. ...
    (comp.lang.lisp)
  • OnUpdate-type event notification for SQL Server tables?
    ... I'm looking for advice on the best way to monitor a specific SQL ... Server 2000 table for changes from an external application. ... Obviously I can monitor the table for changes by polling once per ...
    (microsoft.public.sqlserver.programming)
  • RE: Fulltext failure on a 2 node cluster
    ... Server full-text search resource online: "SQL Cluster Resource 'Full Text' ...
    (microsoft.public.sqlserver.clustering)
  • Re: HELP PLEASE ~ ???
    ... You mentioned that it went ahead and added a SQL ... SQL Server 2000 database for all my data. ... find the connectionString in the newly recreated SQLExpress database. ... The connection string specifies a local Sql Server Express instance ...
    (microsoft.public.dotnet.framework.aspnet)