SlideShare a Scribd company logo
1 of 21
Download to read offline
SOEN 423: Project Report
in fulfillment of SOEN 423 fall 2009 – Ver. 1.2


project ID : 3
12/11/2009

Team Members




               Date       Rev. Description     Author(s)   Contributor(s)

               10/12/2009 1.0   First Draft    Ali Ahmed The Team

               11/12/2009 1.2   Document Review Ali Ahmed The Team




                          Concordia University Montreal

                                      Winter 2009
Concordia University                                                 Project Report                                                                 SOEN 423
CS & SE                                                                                                                                              Fall 2009




Table of Contents
1.     Introduction ........................................................................................................................................... 3
2.     Problem Statement ................................................................................................................................ 3
3.     Design Description................................................................................................................................ 3
4.     Implementation Details ......................................................................................................................... 5
     4.1.     Corba ............................................................................................................................................. 5
     4.2.     Client ............................................................................................................................................. 5
     4.3.     Front End ...................................................................................................................................... 6
     4.4.     Replica Manager ........................................................................................................................... 7
     4.5.     Branch Servers / Replicas ............................................................................................................. 9
     4.6.     Byzantine Scenarios ...................................................................................................................... 9
     4.7.     Reliable FIFO communication via UDP ..................................................................................... 12
     4.8.     Synchronization .......................................................................................................................... 13
     4.9.     Asynchronous call back in Corba ............................................................................................... 14
5.     Test cases and overview...................................................................................................................... 15
6.     Team Organization and Contribution ................................................................................................. 21
7.     Conclusion .......................................................................................................................................... 21




                                                                                                                                                  2|Page
Concordia University                        Project Report                                     SOEN 423
CS & SE                                                                                         Fall 2009




   1. Introduction
         This report is in fulfillment of the requirements for Soen 423 Distributed System Programming
   Project for Fall 2009. It describes the problem specified, the design and implementation of our
   solution and the resulting output from the system and verification by test cases




   2. Problem Statement
       We were required to implement a Distributed Banking System ( DBS ) , extending the core idea
       of the individual assignments . Our project ( group of 3 ) was to have the following features

      A failure-free front end (FE) which receives requests from the clients as CORBA invocations,
       atomically broadcasts the requests to the server replicas, and sends a single correct result back
       to the client by properly combining the results received from the replicas. The FE should also
       keep track of the replica which produced the incorrect result (if any) and informs the replica
       manager (RM) to replace the failed replica. The FE should also be multi threaded so that it can
       handle multiple concurrent client requests using one thread per request.

      A replica manager (RM) which creates and initializes the actively replicated server subsystem.
       The RM also manages the server replica group information (which the FE uses for request
       forwarding) and replaces a failed replica with another one when requested by the FE.

      A reliable FIFO communication subsystem over the unreliable UDP layer for the communication
       between replicas.




   3. Design Description
    Based on the requirements we saw a possible bottleneck, the fact that the methods parameters in
our assignment code had return types which would result in blocking and hence low performance.
Additionally Branch Servers had to be destroyed and re-instantiated hence we reference them through a


                                                                                              3|Page
Concordia University                          Project Report                                     SOEN 423
CS & SE                                                                                           Fall 2009




    Branch Server Proxy Object. Transfer operations were delegated to FE's and they split them into
deposit and withdraw requests since then may need to contact other FE’s. Each FE and associated group
of replicas deals with a subset of accounts. If in an account transfer both accounts are to referenced to
the same FE the first account is referenced to the correct FE to do the withdraw , then a message is sent
to the same FE to do the deposit operation.




                    Fig . High Level design overview of the implementation and deployment




                                                                                               4|Page
Concordia University                         Project Report                                      SOEN 423
CS & SE                                                                                           Fall 2009

   4. Implementation Details

        4.1.     Corba
         All elements of the Corba were defined in our IDL file which is listed below. Things to be noted
       are the call back object and void method declarations.
         Our IDL File

       //---------------

       module dbs
       {
          module corba
          {
             interface CallBack
             {
             void responseMessage(in string message);
             };
                interface FailureFreeFE
                {
             string sayHello();
             void deposit(in long long accountNum,in float amount);
             void withdraw(in long long accountNum,in float amount);
             void balance(in long long accountNum);
             void transfer(in long long src_accountNum,in long long
       dest_accountNum,in float amount);
             void requestResponse(in CallBack cb);
                oneway void shutdown();
                };
          };
       };
       //---------------




        4.2.     Client
               The Client simply registers itself with the ORB daemon; it maps references of Front
       ends with the Branch ID of requested accounts (first two digits). It also registers the call back
       object with the FE when making the request, there is no blocking at any stage and the FE
       response is asynchronous so multiple requests can be sent and the responses arrive later.




                                                                                                5|Page
Concordia University                           Project Report                                  SOEN 423
CS & SE                                                                                         Fall 2009

        4.3.    Front End




                                  Fig . High-level view of frontend components.

         The frontend manages the communication between the clients and branch server replicas. It
       provides clients with a failure free interface to branch servers allowing them to perform the
       basic banking operations (deposit, withdraw, balance, transfer).

       Clients are only required to know the location of the server running the ORB. They then obtain a
       reference to the frontend hosting the account they wish to manipulate. Requests are sent via
       CORBA invocations to the frontend who then messages to the FIFO UDP to broadcast to each of
       its branch server replicas. Each replica does the requested operation on the account and returns
       a result in the form of an account balance. The results are all compared and response that
       reflects the correct result is sent back to the client.

         The CORBA middleware provides us with transparent threading and concurrency control. Also
       the UDP Server runs in its own thread and all its operations are hence asynchronous. Therefore
       spawn additional threads per request was no longer needed.




                                                                                             6|Page
Concordia University                         Project Report                                      SOEN 423
CS & SE                                                                                           Fall 2009

        4.4.    Replica Manager
       Why replication is needed

       Process failure should not imply the failure of the whole system

       A distributed system needs to implement techniques guaranteeing the availability and the
       correctness of the result provided to the client. We use active replication as per the specification
       so that the system may provide a collection of results, which represents a consensus that the
       client may rely on without the awareness of the inner process of replication.

       A replica is a server process that carries the execution of a client request with peers processing
       the request in its own memory space. This way we guarantee that a replicated process does not
       alter the state of another replica.

       But the replication comes at a cost. True or most up to date correct results must be maintained
       by proper message ordering or simply avoidance of byzantine failure (malicious or non
       malicious). In the best case all replicas hold the same correct value. In the worst case we expect
       the value to be returned be reached by a majority vote.

       We may expect the replicas to fail for arbitrary reasons. Hardware failure can be among the
       most dramatic. Replicas in the same host that fail will result in the total system failure unless
       you have a group that can take its place. In this project we do not make the assumption that
       “replica group replacement” can exist or that replicas are in different hosts but we keep in mind
       it can exist in some distributed systems.

       To prevent failure we implemented replicas has entities who relieve some of the work from the
       front end and insure that even if a replicated processes fails the front end can still manage a to
       send correct answer to the client.

       Inaccurate response should not be sent back to the client

       Now we need to discuss why replication in general provides good guarantee that no incorrect
       answer will be sent to the client. Suppose a single process is handling the request of a client.
       Suppose this answer is incorrect. First the front end cannot know the answer is incorrect and
       failure detection will be absent.


                                                                                                7|Page
Concordia University                            Project Report                                         SOEN 423
CS & SE                                                                                                 Fall 2009




       Now we suppose we replicate a server process. In some case we may expect the replicas to send
       a different answer to the front end. We assume that a consensus can be reached by a majority
       vote. Else the server (replicas and front end) cannot proceed further and a replica must be
       rebuilt or recovered to the last know good state.

       In the project we make the assumption that replies sent by the replicas always reach a
       consensus and that this consensus is truthful (not altered by some byzantine general).

       The place of the replica and the replica manager within the system

       Replica and branch server

       The BranchServerProxy is the instance that holds reference to the replica (BranchServerImpl). A
       replica is a copy of a branch server holding a private copy of the set of accounts within the
       branch server. According to our assumption we assume two replicas will return the correct
       result but a faulty replica will “lie“when it returns its result to the front end. For the sake of
       simplicity we will assume a replica is an instance of a branch server.

       Life of a replica

       A branch server is expected to return correct results unless otherwise instructed. To keep the
       implementation general a branch server can be created, killed and synched with a trusted
       replica. A replica is kept alive while it is not generating three errors. If it does it is signaled to
       stop and synched with a trusted replica data.

       Killing a replica means the reference to the implementation along with private accounts are
       removed for garbage collection. This is not a good way to proceed in a real distributed system
       but since the set of accounts is no more than ten at any time this factor does not alter the
       performance of the system in any way.

       Once the reference to the implementation is collected by garbage collection it is synched with a
       trusted branch server. We define synching as requesting a trusted replica account data set.




                                                                                                     8|Page
Concordia University                         Project Report                                      SOEN 423
CS & SE                                                                                           Fall 2009

       The replicas do not communicate directly. Messages must be sent through a UPD server
       contained in the front end and send the response back to the failed replica. Accounts in the
       faulty replica are updated one by one until all accounts are updated to the correct values.

       The replica manager

       A replica manager is an entity in the system that manages the life of replicas. We expect the
       replica manager to signal to a server holding replicated data to stop referencing incorrect
       key/value pairs (id ,amount) defining bank accounts. It's job is to simply send a UDP message to
       the failed branch server proxy to eliminate the reference to the old replicated data.

       The replica manager does not play a bigger role in the system other than initiating the
       replacement of replicated bank accounts. We have decided to integrate its functionality to other
       subsystems.



        4.5.    Branch Servers / Replicas


           Branch Servers exist with their own repository which is simulated by Synchronized hash
       table and have methods to conduct operations on them; they don't have a transfer operation,
       as they can't call methods from a replica server having a different group of accounts. They exist
       as a reference to a Branch Server Proxy Object which handles udp messaging via its udp server
       and passes respective messages to it. The proxy object also handles the replica failure scenario
       by reinitializing the object.



        4.6.    Byzantine Scenarios
          The requirement for the project states that our failure free frontend must also detect a single
       non-malicious Byzantine failure and correct it using active replication. To achieve this we first
       had to make one of the replicas return incorrect results, which we accomplished via a command
       line parameter flag that when activate gave the replica high probability of producing these
       incorrect results. The frontend must also keeps a hash table containing each replica and the
       numbers of times they have consecutively sent false data to determine if it’s time to actively
       replicate one.

                                                                                                9|Page
Concordia University                          Project Report                                       SOEN 423
CS & SE                                                                                             Fall 2009

       When the frontend examines each response from the replicas for a corresponding client request
       it is able to detect the single Byzantine failure by comparing two results that agree. The one that
       does not agree is obliviously the one that produced an incorrect result and must be dealt with.
       The replica error hash table entry for this replica is checked and if its error count is 3 it must be
       replicated and synced with clean data. The tasks of terminating the faulty replica, instantiating a
       new one and repopulating it with known good data from another replica are then delegated to
       the Replica Manager. Finally the frontend resets the error count of the new replica.




       How we simulate byzantine failure

         Under the conditions of the network where the software was tested no byzantine failure
       (malicious or not) was not expected to happen but in real conditions this has to be taken into
       account. Also if the network is reliable then we can expect byzantine failure due to message
       loss. To handle byzantine failure we had to simulate a replica sending inaccurate data.

       We were asked to implement a system were only one byzantine failure will occur at any time.
       Under this condition we assume only one replica will generate incorrect result. To implement
       this we have added an extra parameter to the replica indicating whether it will generate an
       incorrect result or not.

       This way we know only one byzantine replica will fail and we know we can determine which one
       it is. But this approach has the limitation of testing the system under unlikely circumstances but
       is sufficient for the scope of the assignment.




                                                                                                10 | P a g e
Concordia University                        Project Report                                   SOEN 423
CS & SE                                                                                       Fall 2009




    Fig . Sequence Diagram of the Fail Case Scenario and the respective action taken by the replica
                                   manage to handle the response.




                                                                                           11 | P a g e
Concordia University                        Project Report                                   SOEN 423
CS & SE                                                                                       Fall 2009




        4.7.    Reliable FIFO communication via UDP


        One of the requirements of the project was to have reliable Communication in a fifo order
       implemented over the unreliable UDP protocol. As per our design every entity requiring this
       network access has an object reference of a udp server. In our project those elements are the
       Branch Proxy and the Front End. The UDP server object runs in a thread and also maintains
       another concurrent Re transmit thread object which runs in parallel.

         To maintain FIFO ordering messages are held in queue and are numbered. Sequence number
       pairs are uniquely held for each destination and subsequently at the udp receiver object. One a
       packet is sent from the queue we await for a corresponding acknowledgment for that message.

         Once received the next message is acted upon. Message numbering allows us to discard
       messages arriving out of order and duplicate messages. The retransmit thread which runs a
       check method at a specified interval monitors whether the current message sent has had its
       Acknowledge returned if not he the same message is broadcast again. If the total retries exceeds
       a value a system exception is thrown.




                                                                                           12 | P a g e
Concordia University                        Project Report                                   SOEN 423
CS & SE                                                                                       Fall 2009




       Fig .Sequence diagram of a sample operation sequence for the FIFO UDP Subsystem.




        4.8.    Synchronization


               This is extension of the process implemented in the assignments. The Front End uses
       synchronized blocks to handle concurrency and also obtain fine grained control over the locking
       mechanism for maximum performance. Additionally Concurrent data structures are used were
       appropriate eg: Concurrent Queues in the UDP server, Hash tables for the account information.




                                                                                          13 | P a g e
Concordia University                        Project Report                                    SOEN 423
CS & SE                                                                                        Fall 2009




        4.9.    Asynchronous call back in Corba




                       Fig. A simple setup with return types specified in Corba methods




         To avoid the above scenario we use void methods in our interface definitions but for each
       operation we register a call back object, which can be used by the FE to respond asynchronously
       without blocking the client and also can keep processing additional requests from the client.




                                                                                            14 | P a g e
Concordia University                        Project Report                                    SOEN 423
CS & SE                                                                                        Fall 2009

   5. Test cases and overview




          Fig .Terminal Screens of the project being initialized normally , instance shows three front
                                    ends and associated 9 replica servers.




                                                                                            15 | P a g e
Concordia University            Project Report                       SOEN 423
CS & SE                                                               Fall 2009




                       Fig . Source tree overview of the project


                                                                   16 | P a g e
Concordia University                        Project Report                                     SOEN 423
CS & SE                                                                                         Fall 2009




   Fig. Output Consoles for the clients and replica serves running Driver Test1 ( Single thread test)




                                                                                            17 | P a g e
Concordia University               Project Report                   SOEN 423
CS & SE                                                              Fall 2009




                       Fig . Double threaded client (Branch 30)




                                                                  18 | P a g e
Concordia University               Project Report                   SOEN 423
CS & SE                                                              Fall 2009




                       Fig . Double threaded client (Branch 20)




                                                                  19 | P a g e
Concordia University      Project Report          SOEN 423
CS & SE                                            Fall 2009




                       Fig . Fifo UDP testing




                                                20 | P a g e
Concordia University                          Project Report                                    SOEN 423
CS & SE                                                                                          Fall 2009




   6. Team Organization and Contribution

       As per the Project document roles were already specified for the three team members . That is
   primarily how the team was organized there some overlap in areas in the later stages and the
   documentation was done together in team setting.




      Ali Ahmed - Primary responsibility to design and implement the FIFO UDP Message passing
          system. Asynchronous call back in Corba , Design of the front end and Replica servers




      *********** - Handling the Replication Manages and delegating responsibilities to the
             relevant classes for the appropriate actions




   7. Conclusion

      Our implementation correctly implements the specifications and results are as expected, changing
   variable values results in output variations in line with manual calculations. Hence we feel the
   solution satisfies all criteria required in the scope of the assignment.




                                                                                             21 | P a g e

More Related Content

What's hot

D3.3. LinkedTV User Interfaces Sketch
D3.3. LinkedTV User Interfaces SketchD3.3. LinkedTV User Interfaces Sketch
D3.3. LinkedTV User Interfaces SketchLinkedTV
 
D3.2. Specification of Presentation Interfaces for The Three Scenarios
D3.2. Specification of Presentation Interfaces for The Three ScenariosD3.2. Specification of Presentation Interfaces for The Three Scenarios
D3.2. Specification of Presentation Interfaces for The Three ScenariosLinkedTV
 
D2.2. Specification of lightweight metadata models for multimedia annotation
D2.2. Specification of lightweight metadata models for multimedia annotationD2.2. Specification of lightweight metadata models for multimedia annotation
D2.2. Specification of lightweight metadata models for multimedia annotationLinkedTV
 
Java Technical Design Document
Java Technical Design DocumentJava Technical Design Document
Java Technical Design DocumentDeborah Obasogie
 
Design patterns by example
Design patterns by exampleDesign patterns by example
Design patterns by exampleEric jack
 
D2.1. Specification of The Media Fragment URI Scheme
D2.1. Specification of The Media Fragment URI SchemeD2.1. Specification of The Media Fragment URI Scheme
D2.1. Specification of The Media Fragment URI SchemeLinkedTV
 
Cbc 2 d game arts development nc iii
Cbc 2 d game arts development nc iiiCbc 2 d game arts development nc iii
Cbc 2 d game arts development nc iiiMinda BGuardian
 
phd_thesis_PierreCHATEL_en
phd_thesis_PierreCHATEL_enphd_thesis_PierreCHATEL_en
phd_thesis_PierreCHATEL_enPierre CHATEL
 
D3.4. LinkedTV Interface and Presentation Engine Version 1
D3.4. LinkedTV Interface and Presentation Engine Version 1D3.4. LinkedTV Interface and Presentation Engine Version 1
D3.4. LinkedTV Interface and Presentation Engine Version 1LinkedTV
 
PROJECT OF ICT MEDIATED COMMUNICATION
PROJECT OF ICT MEDIATED COMMUNICATIONPROJECT OF ICT MEDIATED COMMUNICATION
PROJECT OF ICT MEDIATED COMMUNICATIONMJ Ferdous
 
Urd dioscuri kbna_v1_1_en_2
Urd dioscuri kbna_v1_1_en_2Urd dioscuri kbna_v1_1_en_2
Urd dioscuri kbna_v1_1_en_2seakquechchhan
 
Optical Character Recognition IIT BHU
Optical Character Recognition IIT BHUOptical Character Recognition IIT BHU
Optical Character Recognition IIT BHUNitin Vishwari
 
Software requirements specifications wp2
Software requirements specifications wp2Software requirements specifications wp2
Software requirements specifications wp2ambitlick
 
Mpkk 2012 ICT SPM
Mpkk 2012 ICT SPMMpkk 2012 ICT SPM
Mpkk 2012 ICT SPMaimarashid
 

What's hot (20)

Live chat srs
Live chat srsLive chat srs
Live chat srs
 
D3.3. LinkedTV User Interfaces Sketch
D3.3. LinkedTV User Interfaces SketchD3.3. LinkedTV User Interfaces Sketch
D3.3. LinkedTV User Interfaces Sketch
 
D3.2. Specification of Presentation Interfaces for The Three Scenarios
D3.2. Specification of Presentation Interfaces for The Three ScenariosD3.2. Specification of Presentation Interfaces for The Three Scenarios
D3.2. Specification of Presentation Interfaces for The Three Scenarios
 
D2.2. Specification of lightweight metadata models for multimedia annotation
D2.2. Specification of lightweight metadata models for multimedia annotationD2.2. Specification of lightweight metadata models for multimedia annotation
D2.2. Specification of lightweight metadata models for multimedia annotation
 
Java Technical Design Document
Java Technical Design DocumentJava Technical Design Document
Java Technical Design Document
 
Design patterns by example
Design patterns by exampleDesign patterns by example
Design patterns by example
 
Report climb-gui
Report climb-guiReport climb-gui
Report climb-gui
 
D2.1. Specification of The Media Fragment URI Scheme
D2.1. Specification of The Media Fragment URI SchemeD2.1. Specification of The Media Fragment URI Scheme
D2.1. Specification of The Media Fragment URI Scheme
 
Cbc 2 d game arts development nc iii
Cbc 2 d game arts development nc iiiCbc 2 d game arts development nc iii
Cbc 2 d game arts development nc iii
 
phd_thesis_PierreCHATEL_en
phd_thesis_PierreCHATEL_enphd_thesis_PierreCHATEL_en
phd_thesis_PierreCHATEL_en
 
D3.4. LinkedTV Interface and Presentation Engine Version 1
D3.4. LinkedTV Interface and Presentation Engine Version 1D3.4. LinkedTV Interface and Presentation Engine Version 1
D3.4. LinkedTV Interface and Presentation Engine Version 1
 
tutorialSCE
tutorialSCEtutorialSCE
tutorialSCE
 
PROJECT OF ICT MEDIATED COMMUNICATION
PROJECT OF ICT MEDIATED COMMUNICATIONPROJECT OF ICT MEDIATED COMMUNICATION
PROJECT OF ICT MEDIATED COMMUNICATION
 
Urd dioscuri kbna_v1_1_en_2
Urd dioscuri kbna_v1_1_en_2Urd dioscuri kbna_v1_1_en_2
Urd dioscuri kbna_v1_1_en_2
 
Final edu junction_ss (1)
Final edu junction_ss (1)Final edu junction_ss (1)
Final edu junction_ss (1)
 
Optical Character Recognition IIT BHU
Optical Character Recognition IIT BHUOptical Character Recognition IIT BHU
Optical Character Recognition IIT BHU
 
3 g m gw
3 g m gw3 g m gw
3 g m gw
 
Project final
Project finalProject final
Project final
 
Software requirements specifications wp2
Software requirements specifications wp2Software requirements specifications wp2
Software requirements specifications wp2
 
Mpkk 2012 ICT SPM
Mpkk 2012 ICT SPMMpkk 2012 ICT SPM
Mpkk 2012 ICT SPM
 

Viewers also liked

Droisys development process
Droisys development processDroisys development process
Droisys development processDroisys Inc
 
Transform your industry using the New Style of IT
Transform your industry using the New Style of ITTransform your industry using the New Style of IT
Transform your industry using the New Style of ITPierre-Marie Delpech
 
Droisys development process_v_1.1
Droisys development process_v_1.1Droisys development process_v_1.1
Droisys development process_v_1.1Droisys Inc
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure CallNadia Nahar
 
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...Pierre-Marie Delpech
 
Nuts and Bolts of Scrum Template (extended)
Nuts and Bolts of Scrum Template (extended)Nuts and Bolts of Scrum Template (extended)
Nuts and Bolts of Scrum Template (extended)Alexei Govorine
 
Référentiel Général d’Interopérabilité RGI version1 0
Référentiel Général d’Interopérabilité RGI version1 0Référentiel Général d’Interopérabilité RGI version1 0
Référentiel Général d’Interopérabilité RGI version1 0Pierre-Marie Delpech
 
Job Training Methods and Process
Job Training Methods and ProcessJob Training Methods and Process
Job Training Methods and ProcessNadia Nahar
 
Enterprise-architecture on purpose
Enterprise-architecture on purposeEnterprise-architecture on purpose
Enterprise-architecture on purposeTetradian Consulting
 
Scrum and the agile development process
Scrum and the agile development processScrum and the agile development process
Scrum and the agile development processjhericks
 
SOA for Enterprise Architecture
SOA for Enterprise ArchitectureSOA for Enterprise Architecture
SOA for Enterprise ArchitectureYan Zhao
 
Team Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project ManagementTeam Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project ManagementAaron Bjork
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detectionNadia Nahar
 
Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Om Prakash Bang
 
EA Intensive Course "Building Enterprise Architecture" by mr.danairat
EA Intensive Course "Building Enterprise Architecture" by mr.danairatEA Intensive Course "Building Enterprise Architecture" by mr.danairat
EA Intensive Course "Building Enterprise Architecture" by mr.danairatSoftware Park Thailand
 

Viewers also liked (20)

Droisys development process
Droisys development processDroisys development process
Droisys development process
 
Transform your industry using the New Style of IT
Transform your industry using the New Style of ITTransform your industry using the New Style of IT
Transform your industry using the New Style of IT
 
Droisys development process_v_1.1
Droisys development process_v_1.1Droisys development process_v_1.1
Droisys development process_v_1.1
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
Prise en compte de la dimension temporelle dans la modélisation des systèmes ...
 
EA Workshop 1
EA Workshop 1EA Workshop 1
EA Workshop 1
 
.Net template solution architecture
.Net template solution architecture.Net template solution architecture
.Net template solution architecture
 
Nuts and Bolts of Scrum Template (extended)
Nuts and Bolts of Scrum Template (extended)Nuts and Bolts of Scrum Template (extended)
Nuts and Bolts of Scrum Template (extended)
 
Référentiel Général d’Interopérabilité RGI version1 0
Référentiel Général d’Interopérabilité RGI version1 0Référentiel Général d’Interopérabilité RGI version1 0
Référentiel Général d’Interopérabilité RGI version1 0
 
Job Training Methods and Process
Job Training Methods and ProcessJob Training Methods and Process
Job Training Methods and Process
 
Enterprise-architecture on purpose
Enterprise-architecture on purposeEnterprise-architecture on purpose
Enterprise-architecture on purpose
 
Scrum with VS2010
Scrum with VS2010  Scrum with VS2010
Scrum with VS2010
 
Scrum and the agile development process
Scrum and the agile development processScrum and the agile development process
Scrum and the agile development process
 
Paper review
Paper reviewPaper review
Paper review
 
MAPPING TOGAF® ADM AND AGILE APPROACH
MAPPING TOGAF® ADM AND AGILE APPROACHMAPPING TOGAF® ADM AND AGILE APPROACH
MAPPING TOGAF® ADM AND AGILE APPROACH
 
SOA for Enterprise Architecture
SOA for Enterprise ArchitectureSOA for Enterprise Architecture
SOA for Enterprise Architecture
 
Team Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project ManagementTeam Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project Management
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detection
 
Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...Agile project management with visual studio tfs 2013 - My presentation at Reg...
Agile project management with visual studio tfs 2013 - My presentation at Reg...
 
EA Intensive Course "Building Enterprise Architecture" by mr.danairat
EA Intensive Course "Building Enterprise Architecture" by mr.danairatEA Intensive Course "Building Enterprise Architecture" by mr.danairat
EA Intensive Course "Building Enterprise Architecture" by mr.danairat
 

Similar to Soen 423 Project Report Revised

OMG CORBA Component Model tutorial
OMG CORBA Component Model tutorialOMG CORBA Component Model tutorial
OMG CORBA Component Model tutorialJohnny Willemsen
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Owen Muzi
 
Distributing computing.pptx
Distributing computing.pptxDistributing computing.pptx
Distributing computing.pptxKaviya452563
 
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...MongoDB
 
Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutionsArnon Rotem-Gal-Oz
 
Client server-architecture-1229147658096208-1
Client server-architecture-1229147658096208-1Client server-architecture-1229147658096208-1
Client server-architecture-1229147658096208-1jorge cabiao
 
Software Architecture Document Final
Software Architecture Document FinalSoftware Architecture Document Final
Software Architecture Document FinalAli Ahmed
 
Unstoppable Stateful PHP Web Services
Unstoppable Stateful PHP Web ServicesUnstoppable Stateful PHP Web Services
Unstoppable Stateful PHP Web ServicesGera Shegalov
 

Similar to Soen 423 Project Report Revised (20)

Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
Tc Management Srs
Tc Management SrsTc Management Srs
Tc Management Srs
 
OMG CORBA Component Model tutorial
OMG CORBA Component Model tutorialOMG CORBA Component Model tutorial
OMG CORBA Component Model tutorial
 
Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314Cw comp1640 211453_mo233_20131120_214054_1314
Cw comp1640 211453_mo233_20131120_214054_1314
 
MIDELWARE TECH
MIDELWARE TECHMIDELWARE TECH
MIDELWARE TECH
 
Distributing computing.pptx
Distributing computing.pptxDistributing computing.pptx
Distributing computing.pptx
 
005281271.pdf
005281271.pdf005281271.pdf
005281271.pdf
 
6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF
 
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...
MongoDB World 2019: Modern Data Backup and Recovery from On-premises to the P...
 
Things to think about while architecting azure solutions
Things to think about while architecting azure solutionsThings to think about while architecting azure solutions
Things to think about while architecting azure solutions
 
Client server-architecture-1229147658096208-1
Client server-architecture-1229147658096208-1Client server-architecture-1229147658096208-1
Client server-architecture-1229147658096208-1
 
Software Architecture Document Final
Software Architecture Document FinalSoftware Architecture Document Final
Software Architecture Document Final
 
Rfc3413
Rfc3413Rfc3413
Rfc3413
 
Corba 2
Corba 2Corba 2
Corba 2
 
Unstoppable Stateful PHP Web Services
Unstoppable Stateful PHP Web ServicesUnstoppable Stateful PHP Web Services
Unstoppable Stateful PHP Web Services
 
5. Distributed Operating Systems
5. Distributed Operating Systems5. Distributed Operating Systems
5. Distributed Operating Systems
 

Recently uploaded

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 

Recently uploaded (20)

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 

Soen 423 Project Report Revised

  • 1. SOEN 423: Project Report in fulfillment of SOEN 423 fall 2009 – Ver. 1.2 project ID : 3 12/11/2009 Team Members Date Rev. Description Author(s) Contributor(s) 10/12/2009 1.0 First Draft Ali Ahmed The Team 11/12/2009 1.2 Document Review Ali Ahmed The Team Concordia University Montreal Winter 2009
  • 2. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Table of Contents 1. Introduction ........................................................................................................................................... 3 2. Problem Statement ................................................................................................................................ 3 3. Design Description................................................................................................................................ 3 4. Implementation Details ......................................................................................................................... 5 4.1. Corba ............................................................................................................................................. 5 4.2. Client ............................................................................................................................................. 5 4.3. Front End ...................................................................................................................................... 6 4.4. Replica Manager ........................................................................................................................... 7 4.5. Branch Servers / Replicas ............................................................................................................. 9 4.6. Byzantine Scenarios ...................................................................................................................... 9 4.7. Reliable FIFO communication via UDP ..................................................................................... 12 4.8. Synchronization .......................................................................................................................... 13 4.9. Asynchronous call back in Corba ............................................................................................... 14 5. Test cases and overview...................................................................................................................... 15 6. Team Organization and Contribution ................................................................................................. 21 7. Conclusion .......................................................................................................................................... 21 2|Page
  • 3. Concordia University Project Report SOEN 423 CS & SE Fall 2009 1. Introduction This report is in fulfillment of the requirements for Soen 423 Distributed System Programming Project for Fall 2009. It describes the problem specified, the design and implementation of our solution and the resulting output from the system and verification by test cases 2. Problem Statement We were required to implement a Distributed Banking System ( DBS ) , extending the core idea of the individual assignments . Our project ( group of 3 ) was to have the following features  A failure-free front end (FE) which receives requests from the clients as CORBA invocations, atomically broadcasts the requests to the server replicas, and sends a single correct result back to the client by properly combining the results received from the replicas. The FE should also keep track of the replica which produced the incorrect result (if any) and informs the replica manager (RM) to replace the failed replica. The FE should also be multi threaded so that it can handle multiple concurrent client requests using one thread per request.  A replica manager (RM) which creates and initializes the actively replicated server subsystem. The RM also manages the server replica group information (which the FE uses for request forwarding) and replaces a failed replica with another one when requested by the FE.  A reliable FIFO communication subsystem over the unreliable UDP layer for the communication between replicas. 3. Design Description Based on the requirements we saw a possible bottleneck, the fact that the methods parameters in our assignment code had return types which would result in blocking and hence low performance. Additionally Branch Servers had to be destroyed and re-instantiated hence we reference them through a 3|Page
  • 4. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Branch Server Proxy Object. Transfer operations were delegated to FE's and they split them into deposit and withdraw requests since then may need to contact other FE’s. Each FE and associated group of replicas deals with a subset of accounts. If in an account transfer both accounts are to referenced to the same FE the first account is referenced to the correct FE to do the withdraw , then a message is sent to the same FE to do the deposit operation. Fig . High Level design overview of the implementation and deployment 4|Page
  • 5. Concordia University Project Report SOEN 423 CS & SE Fall 2009 4. Implementation Details 4.1. Corba All elements of the Corba were defined in our IDL file which is listed below. Things to be noted are the call back object and void method declarations. Our IDL File //--------------- module dbs { module corba { interface CallBack { void responseMessage(in string message); }; interface FailureFreeFE { string sayHello(); void deposit(in long long accountNum,in float amount); void withdraw(in long long accountNum,in float amount); void balance(in long long accountNum); void transfer(in long long src_accountNum,in long long dest_accountNum,in float amount); void requestResponse(in CallBack cb); oneway void shutdown(); }; }; }; //--------------- 4.2. Client The Client simply registers itself with the ORB daemon; it maps references of Front ends with the Branch ID of requested accounts (first two digits). It also registers the call back object with the FE when making the request, there is no blocking at any stage and the FE response is asynchronous so multiple requests can be sent and the responses arrive later. 5|Page
  • 6. Concordia University Project Report SOEN 423 CS & SE Fall 2009 4.3. Front End Fig . High-level view of frontend components. The frontend manages the communication between the clients and branch server replicas. It provides clients with a failure free interface to branch servers allowing them to perform the basic banking operations (deposit, withdraw, balance, transfer). Clients are only required to know the location of the server running the ORB. They then obtain a reference to the frontend hosting the account they wish to manipulate. Requests are sent via CORBA invocations to the frontend who then messages to the FIFO UDP to broadcast to each of its branch server replicas. Each replica does the requested operation on the account and returns a result in the form of an account balance. The results are all compared and response that reflects the correct result is sent back to the client. The CORBA middleware provides us with transparent threading and concurrency control. Also the UDP Server runs in its own thread and all its operations are hence asynchronous. Therefore spawn additional threads per request was no longer needed. 6|Page
  • 7. Concordia University Project Report SOEN 423 CS & SE Fall 2009 4.4. Replica Manager Why replication is needed Process failure should not imply the failure of the whole system A distributed system needs to implement techniques guaranteeing the availability and the correctness of the result provided to the client. We use active replication as per the specification so that the system may provide a collection of results, which represents a consensus that the client may rely on without the awareness of the inner process of replication. A replica is a server process that carries the execution of a client request with peers processing the request in its own memory space. This way we guarantee that a replicated process does not alter the state of another replica. But the replication comes at a cost. True or most up to date correct results must be maintained by proper message ordering or simply avoidance of byzantine failure (malicious or non malicious). In the best case all replicas hold the same correct value. In the worst case we expect the value to be returned be reached by a majority vote. We may expect the replicas to fail for arbitrary reasons. Hardware failure can be among the most dramatic. Replicas in the same host that fail will result in the total system failure unless you have a group that can take its place. In this project we do not make the assumption that “replica group replacement” can exist or that replicas are in different hosts but we keep in mind it can exist in some distributed systems. To prevent failure we implemented replicas has entities who relieve some of the work from the front end and insure that even if a replicated processes fails the front end can still manage a to send correct answer to the client. Inaccurate response should not be sent back to the client Now we need to discuss why replication in general provides good guarantee that no incorrect answer will be sent to the client. Suppose a single process is handling the request of a client. Suppose this answer is incorrect. First the front end cannot know the answer is incorrect and failure detection will be absent. 7|Page
  • 8. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Now we suppose we replicate a server process. In some case we may expect the replicas to send a different answer to the front end. We assume that a consensus can be reached by a majority vote. Else the server (replicas and front end) cannot proceed further and a replica must be rebuilt or recovered to the last know good state. In the project we make the assumption that replies sent by the replicas always reach a consensus and that this consensus is truthful (not altered by some byzantine general). The place of the replica and the replica manager within the system Replica and branch server The BranchServerProxy is the instance that holds reference to the replica (BranchServerImpl). A replica is a copy of a branch server holding a private copy of the set of accounts within the branch server. According to our assumption we assume two replicas will return the correct result but a faulty replica will “lie“when it returns its result to the front end. For the sake of simplicity we will assume a replica is an instance of a branch server. Life of a replica A branch server is expected to return correct results unless otherwise instructed. To keep the implementation general a branch server can be created, killed and synched with a trusted replica. A replica is kept alive while it is not generating three errors. If it does it is signaled to stop and synched with a trusted replica data. Killing a replica means the reference to the implementation along with private accounts are removed for garbage collection. This is not a good way to proceed in a real distributed system but since the set of accounts is no more than ten at any time this factor does not alter the performance of the system in any way. Once the reference to the implementation is collected by garbage collection it is synched with a trusted branch server. We define synching as requesting a trusted replica account data set. 8|Page
  • 9. Concordia University Project Report SOEN 423 CS & SE Fall 2009 The replicas do not communicate directly. Messages must be sent through a UPD server contained in the front end and send the response back to the failed replica. Accounts in the faulty replica are updated one by one until all accounts are updated to the correct values. The replica manager A replica manager is an entity in the system that manages the life of replicas. We expect the replica manager to signal to a server holding replicated data to stop referencing incorrect key/value pairs (id ,amount) defining bank accounts. It's job is to simply send a UDP message to the failed branch server proxy to eliminate the reference to the old replicated data. The replica manager does not play a bigger role in the system other than initiating the replacement of replicated bank accounts. We have decided to integrate its functionality to other subsystems. 4.5. Branch Servers / Replicas Branch Servers exist with their own repository which is simulated by Synchronized hash table and have methods to conduct operations on them; they don't have a transfer operation, as they can't call methods from a replica server having a different group of accounts. They exist as a reference to a Branch Server Proxy Object which handles udp messaging via its udp server and passes respective messages to it. The proxy object also handles the replica failure scenario by reinitializing the object. 4.6. Byzantine Scenarios The requirement for the project states that our failure free frontend must also detect a single non-malicious Byzantine failure and correct it using active replication. To achieve this we first had to make one of the replicas return incorrect results, which we accomplished via a command line parameter flag that when activate gave the replica high probability of producing these incorrect results. The frontend must also keeps a hash table containing each replica and the numbers of times they have consecutively sent false data to determine if it’s time to actively replicate one. 9|Page
  • 10. Concordia University Project Report SOEN 423 CS & SE Fall 2009 When the frontend examines each response from the replicas for a corresponding client request it is able to detect the single Byzantine failure by comparing two results that agree. The one that does not agree is obliviously the one that produced an incorrect result and must be dealt with. The replica error hash table entry for this replica is checked and if its error count is 3 it must be replicated and synced with clean data. The tasks of terminating the faulty replica, instantiating a new one and repopulating it with known good data from another replica are then delegated to the Replica Manager. Finally the frontend resets the error count of the new replica. How we simulate byzantine failure Under the conditions of the network where the software was tested no byzantine failure (malicious or not) was not expected to happen but in real conditions this has to be taken into account. Also if the network is reliable then we can expect byzantine failure due to message loss. To handle byzantine failure we had to simulate a replica sending inaccurate data. We were asked to implement a system were only one byzantine failure will occur at any time. Under this condition we assume only one replica will generate incorrect result. To implement this we have added an extra parameter to the replica indicating whether it will generate an incorrect result or not. This way we know only one byzantine replica will fail and we know we can determine which one it is. But this approach has the limitation of testing the system under unlikely circumstances but is sufficient for the scope of the assignment. 10 | P a g e
  • 11. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig . Sequence Diagram of the Fail Case Scenario and the respective action taken by the replica manage to handle the response. 11 | P a g e
  • 12. Concordia University Project Report SOEN 423 CS & SE Fall 2009 4.7. Reliable FIFO communication via UDP One of the requirements of the project was to have reliable Communication in a fifo order implemented over the unreliable UDP protocol. As per our design every entity requiring this network access has an object reference of a udp server. In our project those elements are the Branch Proxy and the Front End. The UDP server object runs in a thread and also maintains another concurrent Re transmit thread object which runs in parallel. To maintain FIFO ordering messages are held in queue and are numbered. Sequence number pairs are uniquely held for each destination and subsequently at the udp receiver object. One a packet is sent from the queue we await for a corresponding acknowledgment for that message. Once received the next message is acted upon. Message numbering allows us to discard messages arriving out of order and duplicate messages. The retransmit thread which runs a check method at a specified interval monitors whether the current message sent has had its Acknowledge returned if not he the same message is broadcast again. If the total retries exceeds a value a system exception is thrown. 12 | P a g e
  • 13. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig .Sequence diagram of a sample operation sequence for the FIFO UDP Subsystem. 4.8. Synchronization This is extension of the process implemented in the assignments. The Front End uses synchronized blocks to handle concurrency and also obtain fine grained control over the locking mechanism for maximum performance. Additionally Concurrent data structures are used were appropriate eg: Concurrent Queues in the UDP server, Hash tables for the account information. 13 | P a g e
  • 14. Concordia University Project Report SOEN 423 CS & SE Fall 2009 4.9. Asynchronous call back in Corba Fig. A simple setup with return types specified in Corba methods To avoid the above scenario we use void methods in our interface definitions but for each operation we register a call back object, which can be used by the FE to respond asynchronously without blocking the client and also can keep processing additional requests from the client. 14 | P a g e
  • 15. Concordia University Project Report SOEN 423 CS & SE Fall 2009 5. Test cases and overview Fig .Terminal Screens of the project being initialized normally , instance shows three front ends and associated 9 replica servers. 15 | P a g e
  • 16. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig . Source tree overview of the project 16 | P a g e
  • 17. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig. Output Consoles for the clients and replica serves running Driver Test1 ( Single thread test) 17 | P a g e
  • 18. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig . Double threaded client (Branch 30) 18 | P a g e
  • 19. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig . Double threaded client (Branch 20) 19 | P a g e
  • 20. Concordia University Project Report SOEN 423 CS & SE Fall 2009 Fig . Fifo UDP testing 20 | P a g e
  • 21. Concordia University Project Report SOEN 423 CS & SE Fall 2009 6. Team Organization and Contribution As per the Project document roles were already specified for the three team members . That is primarily how the team was organized there some overlap in areas in the later stages and the documentation was done together in team setting. Ali Ahmed - Primary responsibility to design and implement the FIFO UDP Message passing system. Asynchronous call back in Corba , Design of the front end and Replica servers *********** - Handling the Replication Manages and delegating responsibilities to the relevant classes for the appropriate actions 7. Conclusion Our implementation correctly implements the specifications and results are as expected, changing variable values results in output variations in line with manual calculations. Hence we feel the solution satisfies all criteria required in the scope of the assignment. 21 | P a g e