Very good topic! I'm working on a RIA using Flex that deals with a similar situation for an online ticketing system. Imagine two or more folks selecting the same seat and wanting to purchase a ticket for it. Essentially this is collision bound, unless it is being handled carefully.
 
I see two solutions:
 
a) Use Flex Data Services and it's real-time features of updating clients with the latest status on a specific room (in your scenario). This will not completely eliminate the possibility that both customers want to book the room at the exact same time. However, it will cut it down quite significantly. Of course, there is some additional stuff going on that we would have to take into consideration.
 
b) Use flags in the database records for each room as to its availability and return a response to a customer when the booking is committed. If someone else has beat them to it, then an error would be returned, eventually halting the rest of the transaction based on the fact that the room now is no longer available.
 
This is a very birds-eye view of what would need to happen, at least in my mind. There may be other approaches and solutions to this problem and I would be interested to hear them!
 
Jurgen


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Andrews
Sent: Thursday, September 14, 2006 9:11 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Data synchronisation tip and tricks?

Most of the traffic conversation here seems to revolve around applications
that are essentially read-only or are behaving as though they are single
user.

Any tips and tricks to be found regarding the synchronisation of data in a
multi-user application involving a database.

For example (since hotel booking is a prominent example in the RIA world),
lets suppose I have two customers (Customer A and Cust B) trying to book the
same hotel room on the same day. Both see it as free in the RIA, Cust A
books it and now the other must know about it too, so effectively then
that's a straight refresh of Cust B display and the aborting of the booking
in progress.

Lets suppose my application allows Cust B to mark several days of room
bookings and (s)he has to hit 'book now' to commit to the booking. While
this is going on 'Cust A' has booked one of those days, so now I must merge
the updated database with the on-screen representation, so it's no longer a
straight replacement of the application display from the database, we're
having to merge.

Perhaps I'd best not even mention database locking and handling that in a
RIA.

Get the idea? I appreciate this isn't entirely Flex specific.

If there are tips and tricks/best practices in this area with regard to
Flex, I'd like to know about them before I re-invent the wheel!

Paul

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to