Re: Multi-threaded applications for On-Line
Posted in 1997
Thanks Sunil for responding to my posting, I have consulted a few people and my understanding differs. My understanding is : The thread safe version of Informix general libraries allows an ESQL/C application that has several threads to call these library function simultaneously. What it means is that with a multi-threaded process we could open multiple sessions and insert / query simultaneously. All functions in the library are MT safe. The idea here is to achieve parallelism. I developed a multi- process application doing the same thing. It is running Great. My problem is that I have to create several shared memory buffers and semaphores to support the Inter Process Comm. All this is adding up to the overhead and my system is getting CPU bound ( 100 % CPU usage ). In order to reduce this overhead on my system I am planning to move to multi-threaded instead of multi-process. I have developed a multi-threaded prototype. A few questions which I have on my mind are: 1) Is there any other database vendor that supports multi-threading ( Solaris or POSIX threads ) without needing to install a third party package like DCE ( which is non-standard ). 2) If I go with Informix is there an alternative to not spending the $4000 for DCE threads. 3) If I am ready to install DCE package can I still use the standard POSIX threads or will I have to use their threads ( which are non standard ) I will appreciate all responses. Vijay PS I am not a user on the informix group so please send me EMAIL directly. -- |___| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | | | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | ~ ~ | Vijay Singh | Email: vsingh@bactc.com ~ ~ | CellularONE | Phone: 408-450-4433 * | Bay Area Cellular | Fax: 408-450-4495 _|_____ / \\ Telephone Co. | Portable: 408-981-9912 _/___\\_\\_\\___ /___\\ | |_/o\\____/o\\__\\ ----- Begin Included Message ----- >From sunil.mathew@mci.com Tue Mar 11 07:07:29 1997 Date: Tue, 11 Mar 1997 07:57 -0700 (MST) From: Sunil Mathew <sunil.mathew@mci.com> To: Vijay Singh <vsingh@stimpy.bactc.com> Subject: Re: Multi-threaded applications for On-Line X-Mailer: MailRoom v2.0b Content-Length: 2574 Vijay, I believe that currently you must use a DCE thread package. In our project, we were initially going to build multi-threaded Informix applications but came across two hurdles: 1. The DCE thread library 2. Although a single Informix application can open several connections to a database (or instance) and all these connections can be active, ONLY one connection is CURRENT. Informix E-SQLC appendix on multi-threading explains that CURRENT connection is a connection that transfers data between the application and Informix (if I interpret it correctly). If this is the case, then I would assume that most of the advantages of multi threading will be lost in most cases as data transfer between the database and the application usually takes the longest time. During the time a thread (CURRENT connection) is getting data, all other threads with active connections is blocked. If you have a better understanding, please email me or the listserv. Thanks, Sunil Date: Mon, 10 Mar 1997 13:53:14 -0800 (PST) From: Vijay Singh <vsingh@bactc.com> Message-Id: <199703102153.NAA06319@bactcsc1.bactc.com> To: informix-list@rmy.emory.edu Subject: Multi-threaded applications for On-Line Cc: vsingh@bactcsc1.bactc.com Sender: informix-list-owner@rmy.emory.edu Reply-To: Vijay Singh <vsingh@bactc.com> I am currently developing multi-threaded ( Solaris thread ) application for Informix On-line. I was told to wait till ESQL/C Version 7.2 to use threading in my application. Page 11-4 on the Informix ESQL/C Programmer's Manual Version 7.2 tells me that only DCE thread package is supported. I contacted Transarc Corporation's Sales Department to inquire about the DCE thread package. It costs $ 4000 just for the package. Has anybody else tried to do multi-threading on Informix? Is there an alternative way to be able to run thread safe informix applications. I would appreciate all responses. Vijay PS I am not a user on the informix group so please send me EMAIL directly. -- |___| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | | | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | ~ ~ | Vijay Singh | Email: vsingh@bactc.com ~ ~ | CellularONE | Phone: 408-450-4433 * | Bay Area Cellular | Fax: 408-450-4495 _|_____ / \\ Telephone Co. | Portable: 408-981-9912 _/___\\_\\_\\___ /___\\ | |_/o\\____/o\\__\\ ----- End Included Message ----- ----- End Included Message -----