Docstoc

Dcs

Document Sample
Dcs Powered By Docstoc
					   DISTRIBUTED
  CACHE SYSTEM
EE SOFTWARE LAB, TECHNION
              By
         Shamil Nisimov
          Dror Bohrer
  Supervisor : Yaron Ben Shoshan
    Lab Engineer : David Ilana
Introduction

  Client wants a shared mean of storage on the
  network – A Server that will use as storage
  and maintenance of information.
  There is a need for performance and
  scalability qualities in a protocol that will
  allow duplicating and synchronizing servers in
  the network.



                Distributed Cache System      2
Introduction - cont

   The system will be protected from failure of
  servers and network links, will detect changes
  of information in the network and will do all
  the synchronization necessary.
  The System will enhance its performance and
  reduce the traffic by updating servers only
  on demand.


                Distributed Cache System      3
Key Terms
 Cell – exist in each server contains
  information, in this project – textual string,
  can be HTML page.
 Version – the sequence number of given
  data stored in a cell.
  Higher Version = Newer data


                 Distributed Cache System          4
iBus Middleware
  In this project we used iBus to connect
  between servers by group communication.
  iBus provides the following key qualities :
    Reliable – no need for resend.
    Ordering – between network packets.
    View Change – every server fall is detected
    by the bus and reported to other servers.

                 Distributed Cache System       5
Project Model

      iBus


             Server          Server                 Server       Server
               0               1                      2            3


    Client                                      Client       Client
                         Client
                Client

                                    Client
                                                                  Client



All servers has the same cells but each cell can
contain different local version In every server

                                  Distributed Cache System                 6
Distributed System Pros
 server holds data only on demand (optimizing
  traffic in the network).
 Service is faster, because clients can connects
  to their closest server
 Reliable – Due to iBus middleware.
 Scalable – A server can be added/removed
  (partition).

                 Distributed Cache System      7
Distributed System Cons
 Data is stored in many servers instead of in
  one permanent server.
 There is more traffic overhead when servers
  update each other.




                Distributed Cache System         8
Client Capabilities
 can connect to closest server
 Local request
 Global request
 Client Update Data




                   Distributed Cache System   9
1. Local Request
 the client requests from the server the local
  version exist in the server (if bigger then the
  version holds by the client).
 Advantage – faster service.
 Disadvantage – older information.



                 Distributed Cache System         10
2. Global Request
 the client requests the server the most up to
  date version exists in the network.
 Advantage – The most up to date data in the
  network.
 Disadvantage – slower service.



                Distributed Cache System     11
   Local/Global Request-example
                                                                  Issues global request
      iBus                                                              to all servers
                                                                   Server 1 responds –
                                                                       my 2 responds
                                                                   Serverversion is 1 –
             Server          Server                 Server      Server my version is 1
               0               1                      2           3
                                                                        Server 3 responds –
    Client
                                                Client
                                                              Client      my version is 3
                Client   Client
                                                                       Server 0 request
                                  Client                        server’s3 3 related data
                                                                  Server sends its data
                                                                   Client

                                                                  related to version 3
 Server updates the
     On has Version 1
 Servercell no. 0                                                       3
                                                 Server has VersionOn cell no.0
client with version 3
  client issue not valid
global versionglobal                                                  this
                                                 so he send clientclient issue local
  request not respond
so he can when his                                         version. request when his
      version is 2
        the client.                        Distributed Cache System    version is 2 12
3. Client Update Data


  the client updates his server and by that
  making its version the most up to date in the
  network.




                 Distributed Cache System     13
    Client update data - example
      iBus


             Server          Server            Server
                                                                Send phase1 packet
                                                             Server
               0               1                 2             on cell 0 to all servers
                                                               3


    Client
                         Client
                                           Client       Server sends phase2 packet
                                                            Client
                Client
                                                               on cell 0, Saying:
                                                           new global version - 4
                                  Client
                                                             Send back response to
                                                                 Client


Now All Server finds this                             client meaning:
packet on phases queue.                           update was successful,
This move them to phase                               new version - 4
                                                Server 3 -Global Version is
                                     Client updates his
 two state and locker is                          valid (version 3) server
                                      server on cell 0
        server 3.        Distributed Cache System    opens transaction14
Server Structure – External

  Contains cells each represent different
   subject (HTML page).
  For each cell holds to version related to data
   in server.
  Holds cell global version (if known to him).



                 Distributed Cache System         15
Server Structure - Internal
                  GUI                           All cell relevant information
                                                         is stored here
                  SERVER                              Here implemented
  SERVER
                                                    transaction algorithm
                   CELLS
                  (CLASS)




        TRANS-
        ACTIONS
                             REQUEST
                            HANDLING                   Here all version
       HANDLING
       THREADS
                            THREADS
                                                    calculation are made
                                                   Packets wait to send
   TRANSMIT                    RECEIVE
                                                   here in a fifo matter
     QUEUE
      FIFO
                                QUEUE
                                 FIFO             Here packet are sorted
                                                           Connection of
    THREAD                     THREAD
                                                according to packet opcode
                                                           server to iBus
                                                           through which
              BUS CONNECTION                             iBus middleware
IBus                                                     packets are sent
                               Distributed Cache System                 16
Project Simulation
In order to check system behaviour on cases
like partition and Server falls we created a
simulation stub.            iBus


                       Server                 Server       Server
      Simulation         0                      1            2
        Stub
                                          Client
                                                       Client
                   Client


                              Client
                                                            Client

The stub here can choose which server belong
to which group and by that create partition in
the network.
                            Distributed Cache System                 17
Possible future expansion
•Exchange of HTML pages
•Supporting of HTTP protocols.



•TO BE CONTINUED….



                 Distributed Cache System   18

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:11
posted:3/5/2010
language:English
pages:18