ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » 2 phase commit

Post new topic  Reply to topic
 2 phase commit « View previous topic :: View next topic » 
Author Message
bigdavem
PostPosted: Sun May 12, 2002 5:08 pm    Post subject: 2 phase commit Reply with quote

Acolyte

Joined: 16 Sep 2001
Posts: 69
Location: Sydney, Australia

I'm trying to design a solution for a new client system we're developing where all inter-application communication is restricted to MQSeries. I'm not sure if it's possible, but I'd appreciate any ideas. I've already ploughed through the relevant redbooks and manuals....

Anyway, here's the scenario:

We have an application running on HP-UX with MQ Server installed. This application accepts client address details, and sends them via MQ to a second application running on a second HP-UX box, also with MQ Server installed. The second application updates its local (Oracle) database and sends a reply. At this point the first application also updates its own local (Oracle) database. We need to guarantee both databases are in sync, so if for any reason either of the updates fails, we want to be able to roll back both databases.

So basically we're trying to implement a 2 phase commit on databases on separate machines using only MQ. I'm aware that we could use Oracle to do it, but that's been deemed unsatisfactory from a design point of view (I know it's standard practice, but standard practice is never as much fun....).

Any ideas?
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Sun May 12, 2002 6:53 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

My best advice is not to even start going down this road if you need true, real-time, consitency between the databases. MQSeries, like all message oriented middleware, agrees to reliably deliver the data from one machine to another. It does not assure when this will happen, only that it will. There is no two phase commit between separate queue managers. Don't even try going there.

If you need coordinated updates between different databases, then choose a transaction manager and perform the updates in the same application coordinated by the single transaction manager. This could be an EJB container, CICS, Tuxedo, Encina ... or a single MQ queue manager.
Back to top
View user's profile Send private message
bduncan
PostPosted: Sun May 12, 2002 9:19 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Kolban's right. I actually implemented such a system at a previous company. We had 20 application servers and 8 database servers. Any application server could cause an update on any of the databases. The other seven databases would then be kept in sync by sending MQSeries messages to each of them, via a third queue manager, an update controller, if you will.
Anyways, we ran into all sorts of complications, because if you can imagine, if the update succeeds on 7 of the 8 databases, but one fails, what do you do? Rollback all the updates? No, that's too inefficient. So we would then have the controller automatically take the misbehaving queue manager offline, so that messages would no longer be routed to it (we were using clustering). But then depending on why the update failed, bringing the database back online may require human intervention. Plus, we were doing so many updates through the system, that if any one of the databases remained offline for several hours, queues on the controller machine (flooded with updates destined for the offline database) would eventually fill up (to 640,000 messages) and then our whole system was in trouble.
In the end, we learned that it was better to just use the built in clustering support of Oracle. We had developed a working system with just MQSeries, but all too often, it would require human intervention when things went wrong.
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
bigdavem
PostPosted: Mon May 13, 2002 3:10 pm    Post subject: Reply with quote

Acolyte

Joined: 16 Sep 2001
Posts: 69
Location: Sydney, Australia

Thanks for that guys, that's what I suspected.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » 2 phase commit
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.