Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tzu-Han Wu15524883 Yi-Chi Chiang54641046 Han-Yang Ou59283702.

Similar presentations


Presentation on theme: "Tzu-Han Wu15524883 Yi-Chi Chiang54641046 Han-Yang Ou59283702."— Presentation transcript:

1 Tzu-Han Wu15524883 Yi-Chi Chiang54641046 Han-Yang Ou59283702

2  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 3 Client 2 Server 1 Server 2

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

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

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

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

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

9


Download ppt "Tzu-Han Wu15524883 Yi-Chi Chiang54641046 Han-Yang Ou59283702."

Similar presentations


Ads by Google