Asynchronous ODBC

Michael FIG <>
Wed May 31 04:35:49 CEST 2006

Hi all,

I'm new to (but falling in love with) Erlang, and I'm interested in porting a medium-sized project that is a soft realtime system.  It took a lot of work to get the database interactions correct, due to the latency of the database connection.  Eventually, we settled on a caching asynchronous database system that used a message queue for multiple requests.  Other constraints forced us to make the production system multithreaded, but I am hoping to get away from that in the Erlang implementation.

Looking at odbc.erl, everything is written in a synchronous style, so it appears the only way to use it asynchronously is to write an asynchronous wrapper for it and run the wrapper on another node so that when it blocks during each call() it doesn't block the caller of the wrapper.

I can think of a couple of ways to modify the odbc.erl code to allow asynchronous calls (whose results get sent to a user-specified pid, maybe with a ref that can be used to match up replies to requests), but I wanted to write here first to see if there is any advice for solving this problem, or anybody who's come up against it before.  It is quite important to me that this solution also allow for multiple ODBC connections within the same Erlang node, none of which would block the other.

Thanks in advance for any help you can offer,

Michael FIG <>, PMP
VP Technology
MarkeTel Multi-Line Dialing Systems, Ltd.
Phone: (306) 359-6893 ext. 528

More information about the erlang-questions mailing list