Thread: [Sqlrelay-discussion] Update two databases simultaneously / Client protocol
Brought to you by:
mused
From: Hagen M. <h.m...@WD...> - 2011-09-08 07:51:33
|
Hi, I haven't used SQLrelay yet and I'm wondering whether I could use it for our requirements. There are different client applications (.Net web application, a unix service written in C and some Script applications, e.g. written in Perl) query and update an oracle database. One of the requirements is that for each client UPDATE, INSERT or DELETE statement I have two update two data bases simultaneously. Is there a way to configure the SQLrelay to do that? The second question is, whether there is a documentation or definition of the used protocol for SQLrelay clients? Since we would have to connect some .Net client applications and there is no .Net client API in SQLrelay I could write the .Net API myself. Thanks --Hagen |
From: Hagen M. <h.m...@WD...> - 2011-09-13 15:06:06
|
David, the requirement to send the same update query to multiple databases was only a soft requirement. And I agree, that this rather should be a job for a database replication or a synchronization task. I could compile the SQL Relay and got it run after clearing a few hurdles: - In config.mk remove -Wno-long-double in CXXFLAGS (obviously my g++ doesn't know it; hope it is not essential) - Add the prefix value (in my case /opt/firstworks) in configure where it tests the rudiments includes and libs - Add /opt/firstworks/bin to the PATH variable, otherwise sqlr-start does not start correctly - Add the /opt/firstworks/lib to library path The SQL Relay connected to a Oracle data base and I sent some test queries with the command line query utility. All worked fine and the performance was impressive, so I think I can propose this solution. As for the .Net client application, I guess the system owners prefer a web service solution. Hence there is no need for a .Net capable API just now. Nevertheless there are some applications that have to access different data bases and one attractive feature of SQLrelay is that only one interface is needed. If the system owners accept my proposal and if they have some experience with this solution I can imagine that soon there will be requirements that makes a .Net capable API necessary. In this case I'll ask you for an offer. So long, Hagen |
From: David M. <dav...@fi...> - 2011-09-15 02:36:16
|
Cool, sounds good. Let me know how it goes. Dave dav...@fi... On 09/13/2011 11:05 AM, Hagen Münch wrote: > > David, > > the requirement to send the same update query to multiple databases > was only a soft requirement. And I agree, that this rather should be a > job for a database replication or a synchronization task. > > I could compile the SQL Relay and got it run after clearing a few hurdles: > > - In config.mk remove -Wno-long-double in CXXFLAGS (obviously my > g++ doesn't know it; hope it is not essential) > > - Add the prefix value (in my case /opt/firstworks) in configure > where it tests the rudiments includes and libs > > - Add /opt/firstworks/bin to the PATH variable, otherwise > sqlr-start does not start correctly > > - Add the /opt/firstworks/lib to library path > > The SQL Relay connected to a Oracle data base and I sent some test > queries with the command line query utility. All worked fine and the > performance was impressive, so I think I can propose this solution. > > As for the .Net client application, I guess the system owners prefer a > web service solution. Hence there is no need for a .Net capable API > just now. Nevertheless there are some applications that have to access > different data bases and one attractive feature of SQLrelay is that > only one interface is needed. If the system owners accept my proposal > and if they have some experience with this solution I can imagine that > soon there will be requirements that makes a .Net capable API > necessary. In this case I'll ask you for an offer. > > So long, > > Hagen > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs& more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |
From: David M. <dav...@fi...> - 2011-09-12 16:00:07
|
Hagen, SQL Relay can't currently send the same query to multiple databases, though that is on the TODO list. There are several challenges associated with doing it. All center around what to do if the db's get out of sync. If the query succeeds in one database but fails in the other, then what do you do? Two phase commit could be used with some databases, but others don't support it. There's also the possibility of auto-incrementing columns getting out of sync which can't be as easily detected as failed queries. Also, what should be done if a select is sent to more than one db? Should the result sets be merged? Should both be returned in their entirety? Should duplicates be removed? There are a few other, more obscure issues as well. Lets say though, that you just want to non-select statements to both databases and don't care if they get out of sync. I believe that SQL Relay could be readily modified to allow that. As for the .NET API, the protocol was once documented but that was a long time ago. I kept changing the protocol, the documentation got behind and I quit updating it. It's been stable for a long time now but there's no current documentation. Unfortunately, you'd have to dig through the client-side code to understand the protocol. I did recently get Rudiments and the SQL Relay client API to compile under Windows using mingw32-gcc and got the client applications to run under windows without Cygwin. The name-mangling conventions are all-wrong for use with native, non-mingw32 apps though. I'm working on getting it to compile using the MSVC compiler but I haven't gotten far with that yet. If I can figure that out soon, or figure out how to build a COM object using mingw32, then it should be possible to use the SQL Relay DLL directly from the various windows languages: VB, C#, MSVC++, etc. That's all unfinished at this point though. If you're interested, I'd be happy to work on any of these things on a contract basis. Just let me know. Take care, David Muse dav...@fi... On 09/08/2011 03:35 AM, Hagen Münch wrote: > > Hi, > > I haven't used SQLrelay yet and I'm wondering whether I could use it > for our requirements. > > There are different client applications (.Net web application, a unix > service written in C and some Script applications, e.g. written in > Perl) query and update an oracle database. One of the requirements is > that for each client UPDATE, INSERT or DELETE statement I have two > update two data bases simultaneously. Is there a way to configure the > SQLrelay to do that? > > The second question is, whether there is a documentation or definition > of the used protocol for SQLrelay clients? Since we would have to > connect some .Net client applications and there is no .Net client API > in SQLrelay I could write the .Net API myself. > > Thanks > > --Hagen > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |