Subject Re: [firebird-support] Autonomous transactions or smth. like this?
Author David Johnson
This is a natural for MQ series or one of its competitors. Check out
some of the queueing products that are available.

I am playing with the idea of a queue for firebird, but it is a very
long way from ready, and I don't expect it to be production performance
for a very long time.

Another approach is to write a UDF that talks via the wire protocol to
another (firebird) database. However, synchronous transactions with
other databases may introduce performance issues, depending on the
degree of logging.

A variation, between a queueing system and a UDF that talks over the
wire to another instance of Firebird is to write a log server.

I would be tempted to write the log server in Java, essentially
connecting a client socket directly to a log4j JdbcAppender backed by
its own Firebird database instance (via the Jaybird Jdbc driver). Allow
1 to 2 days for an experienced Java programmer to do this.

The UDF, written in C, would build a buffer and spit it out a socket
connection. The wire protocol between the two pieces would be you own
invention. I've never written Firebird UDF's or sockets programs in C,
but I would guess that this would require 1 to 2 additional days for a C
programmer with both sockets and Firebird UDF experience. For C
programmers not familiar with these pieces, I would allow 30 hours for a
learning curve.

The advantage to a log server approach is that it can be reused for your
application logs, so you can potentially centralize logging of anything
with access to a network connection. However, it is not without its
issues.

On Tue, 2005-08-02 at 12:26 +0000, dosinovsky wrote:
> Hi!
>
> In my Firebird application I need to write information about all
> errors that occur in some stored procedure to a special table.
>
> The problem is that if error occurs rollback is done (at least to
> savepoint). So, I need to write error information in a special
> transaction. How can I do that? In Oracle, there is autonomous
> transactions or daemons & pipes. In PostgreSQL there is special user
> function that executes some SQL in a new connection to database. How
> can it be done in Firebird? Maybe somebody already written an
> UDF that does this thing?
>
> Thanks in advance.
>
> Regards,
> Dmitry
>
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>