bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bayonne-devel] SQL support


From: Dmitry Agafonov
Subject: Re: [Bayonne-devel] SQL support
Date: Fri, 08 Apr 2005 12:39:20 +0400
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Julien Chavanton wrote:

I guess it would be more clean and simple for bayonne to let the scripting 
engine provide the database connection !
As for me - I think, that "permanent" connections will follow the ideas of non-blocking operation as "connect" and "disconnect" phases can be slow (not for mysql though). Many databases will
love you much more if you connect once for 30 queryes than 30 times :)
Moreover, system may use smaller number of SQL gateways than trunk count as each query will
use one (any) available connection from a pool.

On the other hand SQL query can became simple analog of TGI and may be joined as some kind of GenericGateway class of ccscript or commoncpp with TGIGateway, MySQLGateway,
ODBCGateway, etc. That is why I compared SQL and TGI work in my post.



-----Original Message----- From: address@hidden on behalf of David Sugar Sent: Wed 4/6/2005 09:49 AM To: Dmitry Agafonov Cc: address@hidden Subject: Re: [Bayonne-devel] SQL support
        
        

        -----BEGIN PGP SIGNED MESSAGE-----
        Hash: SHA1
        
        In ccscript3 what I did was create a connection to an associated
        database as each script is compiled.  The
        use statement was extended to pass the name of the database for the
        script that expects to connect.  Hence,
        each script can have it's own private database reference, and different
        scripts can have different database
        connections associated with them.  When old scripts are purged, old
        connections are torn down.  The only
        database operations that occur during execution are now the actual
        queries, in an async thread.
        
        Dmitry Agafonov wrote:
        > Hello!
        >
        > I just get myself to the idea of SQL usage in bayonne (ccscript).
        >
        > Imagine a pool of SQL connections, ready to answer any query.
        > One connection per SQL gateway thread (like TGI).
        >
        > Just ping() connection on script startup and cleanup result sets on
        > script ending.
        >
        > Simple schema, isn't it?
        >
        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.1 (GNU/Linux)
        Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
        
        iD8DBQFCU+jSJlWtSTiTVsYRAl/eAJkBxsEaOXY2kr9xDzdviw0hhc7QFACfQMgW
        BNSLEFiwDAkbOlwvytLQCS8=
        =bVYw
        -----END PGP SIGNATURE-----
        






--
Dmitry





reply via email to

[Prev in Thread] Current Thread [Next in Thread]