1 / 9

Booking System

Booking System. Tzu-Han Wu 15524883 Yi-Chi Chiang 54641046 Han-Yang Ou 59283702. Introduction – Booking System. Motivation Avoid over-booking Features Show seats status in real-time Multi-server processing in distributed environment Fully replication Load balancing

Download Presentation

Booking System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Booking System Tzu-Han Wu 15524883 Yi-Chi Chiang 54641046 Han-Yang Ou 59283702

  2. Introduction – Booking System • Motivation • Avoid over-booking • Features • Show seats status in real-time • Multi-server processing in distributed environment • Fully replication • Load balancing • Add servers dynamically • Implementation • JAVA RMI • Mutual exclusion: altered Ricart-Agrawala algorithm

  3. Client 1 Client 2 Server 2 Server 1 Client 3

  4. New Server M N S1 S2 S3 Notify new server Send other servers info and status of seats Notify other servers new server coming The new server should compare the version and decide to update or ignore the messages At the same time, the other server may send seat status update messages

  5. New Client Reply address of S1 Ask appropriate server Connection Request Client address Ask status of seats Reply status of seats M ID: 103 S2 S1 S3 N C005 C001 C003 C301 C101 C205 C202 C102 C103 C306 C204

  6. Request S2 set flag 5 to true C204 send seat 5 request message to S2 The other servers send OK to S2 Assume seat 5 is available S2 sends update notification to other servers The other server set flag 5 to true Servers sends update notification to clients S2 send seat request to other server M S2 S3 S1 C003 C202 C102 C101 C205 C301 C001 C306 C005 C204 Flag 5: true Flag 5: false Flag 5: false Flag 5: true Flag 5: True Flag 5: true Flag 5: false Flag 5: false

  7. Release Servers send update notifications to clients S2 sends update notification to other servers S2 sets flag 7 to false C202 sends release message to S2 Assume seat 7 is occupied by C202 Other servers set their flag 7 to false M S1 S2 S3 C204 C205 C306 C301 C003 C005 C101 C102 C202 C001 Flag 7: true Flag 7: false Flag 7: true Flag 7: false Flag 7: false Flag 7: true Flag 7: true Flag 7: false

  8. Commitment C205 sends commit message to S2 Servers send seat 2 update notifications to clients Servers send seat 3 update notifications to clients S2 sends seat 3 update notifications messages to other servers S2 sends seat 2 update notifications messages to other servers Assume C205 has requested seat 2 and 3 M S1 S2 S3 C301 C306 C101 C102 C202 C205 C001 C003 C005 C204 Flag 2: true Flag 3: true Flag 2: true Flag 3: true Flag 2: true Flag 3: true Flag 2: true Flag 3: true

  9. Performance Measurement

More Related