90 likes | 100 Views
GL Stream Server Module Notification Sequence Diagram December 12th, 2007. GLStream Module Notification Sequence Diagram. Server / Satellite. Module. constructor(). Loading. Module Instantiation. All available modules libraries are loaded. Queues and stubs can be created.
E N D
GL Stream Server Module Notification Sequence DiagramDecember 12th, 2007 GL TRADE Internal Use Only
GL TRADE Internal Use Only GLStream Module Notification Sequence Diagram Server / Satellite Module constructor() Loading Module Instantiation • All available modules libraries are loaded • Queues and stubs can be created • All module objects are instantiated hasBeenLoaded() Module Configuration Configuration • Module configuration file is available • All modules are configured • Queues and stubs are locally registered • All queues and stubs should have been created • If one of them fails, the host stops hasBeenRegistered() Module Initialisation Initialisation • All local queues and stubs have been properly registered • All modules are initialised • Module should get ready to be connected • If one of them fails, the host stops • Queues can be opened Connection • The satellite connects to the server • The server becomes master hasBeenConnected() Launch Module Launch • All modules are notified of the connection • Module is connected to the master GLStream Server • If one of them fails, the host stops • Recovery should be launched if needed Running • The GLStream Server / Satellite is running willShutdown() Shutdown Module Shutdown false • All modules are asked to stop • Module should tell when it is ready to be stopped willShutdown() • Messages can still be posted to queues • Until all modules are ok to stop false • Or until a timeout expires willShutdown() true willTerminate() Termination Module Termination • Timers are stopped • Messages cannot be posted • All modules are notified of the termination • Module should get ready to be destroyed destructor() Destruction • All modules are destroyed Module Destruction
GL Stream Server Backup Network ArchitectureFebruary 22nd, 2007 GL TRADE Internal Use Only
GL TRADE Internal Use Only Backup Architecture Master GLStream System Slave GLStream System MASTER SERVER SLAVE SERVER MODULE A MODULE A VIEW MODULE C MASTER SATELLITE #1 MASTER SATELLITE #2 MODULE B MODULE C SLAVE SATELLITE #1 VIEW VIEW MODULE B MODULE D MODULE D • When the Slave Satellite #1 connects to the Slave Server, it sends the list of its modules. • In its turn, the Slave Server sends to Master Server the physical locations of all of the slave modules. • The Master Server then creates a view with all the slave module locations. • The View is replicated on all hosts of the Master system. • With the view, Master Modules can then find out the physical location of their peer in the Slave system.
GL TRADE Internal Use Only File Backup Network Architecture Master GLStream System Slave GLStream System MASTER SERVER SLAVE SERVER MODULE A MODULE A VIEW MODULE C MASTER SATELLITE #1 MASTER SATELLITE #2 MODULE B MODULE C SLAVE SATELLITE #1 VIEW VIEW MODULE B MODULE D MODULE D • Module D opens a file to be backed up. • By using the view, the Master Satellite #2 then finds out that the slave module D is on Slave Satellite #1. • The Master Satellite #2 then opens a direct TCP connection to the Slave Satellite #1. • Over that connection, the Master Satellite #2 requests the Slave Satellite #1 to open the backup file. • The image of the master file is then replicated on the Slave Satellite #1. • Any update on the master file is sent to the Slave Satellite which applies them on the slave file.
GL Stream Server Backup Network Sequence DiagramFebruary 23rd, 2007 GL TRADE Internal Use Only
GL TRADE Internal Use Only File Backup Network Sequence Diagram Slave Host Master Host Open Open Backup File Rename Backup File OPENING Create New Backup File Unsynchronize File Open Successful Read Page #1 Page #1 Write Page #1 Read Page #2 Page #2 Page #1 Successful Read Page #3 Write Page #2 Page #3 SYNCHRONIZING Page #2 Successful Read Page #4 Write Page #3 Page #4 (last page) Page #3 Successful Write Page #4 Synchronize File Page #4 Successful Data Update Data Update Data Update Data Update Data Update UPDATING Data Update Data Update Data Update Data Update
GL TRADE Internal Use Only File Backup Logical Sequence Diagram - Opening STCDatabaseFile STCHost STCNet STCNetChannel STCNetChannel STCHost STCDatabaseFile open() getSlaveHostId() createChannel() new() configure() launch() connection send(OPEN BACKUP) OPEN BACKUP openBackup() openBackup() send(SUCCESS OPEN) SUCCESS OPEN slaveSucceeded() Entering into the Synchronization Procedure MASTER HOST SLAVE HOST Socket Writing Thread Socket Reading Thread Main Application Thread
GL TRADE Internal Use Only File Backup Logical Sequence Diagram - Synchronizing STCDatabaseFile STCNetChannel STCNetChannel STCHost STCDatabaseFile SUCCESS OPEN slaveSucceeded() send(PAGE #1) send(PAGE #2) PAGE #1 process(PAGE #1) writeData() PAGE #2 send(SUCCESS PAGE #1) SUCCESS PAGE #1 slaveSucceeded() process(PAGE #2) writeData() send(PAGE #3) send(SUCCESS PAGE #2) PAGE #3 SUCCESS PAGE #2 slaveSucceeded() process(PAGE #3) writeData() send(LAST PAGE #4) send(SUCCESS PAGE #3) LAST PAGE #4 SUCCESS PAGE #3 slaveSucceeded() process(LAST PAGE #4) writeData() setSynchronized() send(SUCCESS PAGE #4) SUCCESS PAGE #4 slaveSucceeded() MASTER HOST SLAVE HOST