Distributed
    Shared
    Memory
       A labs.ericsson.com API
http://labs.ericsson.com/apis/distributed-shared-memory/
ericsson labs APIs
      Maps & positioning                             communication                                         security




      Mobile                  Mobile         SMS Send &      Mobile          Group Voice   Mobile Web Security           Oauth2
     Location                 Maps            Receive        Push               Mixer           Bootstrap      CAPTCHA Framework




                   Web                                        Async                        Identity Management             Key Management
                   Maps                                       Voice                             Framework                      Service


       Web technologies                               NFC & sensors                        User & network information



   Web                   Web Background                               Mobile Sensor               Mobile                         Network
                                                Tag Tool
Connectivity EventSource    Service
                                                                      Actuator Link            Identification                     Probe




 Web Device                                                                                                     Mobile Network
                Distributed Web Real-Time
                                Real-                 Sensor Networking
 Connectivity Shared Memory Communication             Application Platform                                        Look-up
                                                                                                                   Look-


                                                   Machine learning                               Media and graphics



                                                                                                 Face
                                              Cluster                                                                       Text-to-Speech
                                                                                                                            Text- to-
                                                                                                Detector
                                            Constructor

© Ericsson AB 2010 | Page 2
Distributed shared memory
›       Distributed Shared Memory enables a distributed in-
        memory database for JavaScript applications

      –       Get a replica of a DSM storage with a
              specified address from a DSM server
      –       Register a listener and be notified when
              data is changes by other users
      –       Modify data locally and synchronize
              changes in the background with
              other replicas


›       Merge conflicts are automatically
        resolved

© Ericsson AB 2010 | Page 3
Why distributed shared memory?
› Let web developers focus on developing highly interactive
  and responsive web-based collaboration software without
  having to deal with complicated issues such as
      – networking protocols
      – database management
      – concurrency control
› Also, using a local replica where data can be modified
  directly without a lock or blocking improves user
  experience
› Synchronizing application states among multiple clients
› Implement group-wares or collaborative web services
  supporting simultaneous real-time interactions


© Ericsson AB 2010 | Page 4
Main Features
› Makes it possible for multiple JavaScript clients to address and
  manipulate the same data at the same
› Plain JavaScript Lib (no browser plug-in required)
› High performance and low delay
› Optimistic replication to resolve merge conflicts
› Event-driven (register a listener and be notified when data change)
› Support for both ordered arrays/lists and unordered key-value hash
  tables
› Support for both persistent storage (disk) and transient data (RAM)
› Automatic garbage collection
› Time-to-live (specify how long time a value should be stored)
› Possibility to link DSM storages to build graph databases



© Ericsson AB 2010 | Page 5
Use cases
Examples of usage
› E-learning
› Tele-care, e.g. remote health care and specialist
 consultation, remote monitoring etc.
› Call center support
› Collaborative work, e.g. a shared whiteboard or other
 collaborative editing systems etc.




© Ericsson AB 2010 | Page 6
Merge conflicts are resolved
› All clients (and servers) DSM SW contains predefined rules
  how to resolve conflicts


“Adjust” or transform
incoming operation to
match local changes




© Ericsson AB 2010 | Page 7
JavaScript API
› Simple and easy to use to API
// get a replica of hash://simpleTest
var hash = memCtrl.get(“hash://simpleTest”);

// update the web page when the replica is cloned
hash.onReady = function () {
   document.getElementById(“myTextfield”).value = hash.get(“myKey”);
};

// handle changes to the replica
hash.onUpdate = function (op) {
   document.getElementById(“myTextfield”).value = op.value;
};

// update the local replica
hash.set(“myKey”, “myValue”);

// send the operation to all other replica clients in the background
hash.submit();
© Ericsson AB 2010 | Page 8
Example applications

Shared Whiteboards                                     Collaborative Workspaces




                              Shared JavaScript Apps, e.g. a Shared Map Widget
© Ericsson AB 2010 | Page 9
© Ericsson AB 2010 | Page 10

Distributed Shared Memory on Ericsson Labs

  • 1.
    Distributed Shared Memory A labs.ericsson.com API http://labs.ericsson.com/apis/distributed-shared-memory/
  • 2.
    ericsson labs APIs Maps & positioning communication security Mobile Mobile SMS Send & Mobile Group Voice Mobile Web Security Oauth2 Location Maps Receive Push Mixer Bootstrap CAPTCHA Framework Web Async Identity Management Key Management Maps Voice Framework Service Web technologies NFC & sensors User & network information Web Web Background Mobile Sensor Mobile Network Tag Tool Connectivity EventSource Service Actuator Link Identification Probe Web Device Mobile Network Distributed Web Real-Time Real- Sensor Networking Connectivity Shared Memory Communication Application Platform Look-up Look- Machine learning Media and graphics Face Cluster Text-to-Speech Text- to- Detector Constructor © Ericsson AB 2010 | Page 2
  • 3.
    Distributed shared memory › Distributed Shared Memory enables a distributed in- memory database for JavaScript applications – Get a replica of a DSM storage with a specified address from a DSM server – Register a listener and be notified when data is changes by other users – Modify data locally and synchronize changes in the background with other replicas › Merge conflicts are automatically resolved © Ericsson AB 2010 | Page 3
  • 4.
    Why distributed sharedmemory? › Let web developers focus on developing highly interactive and responsive web-based collaboration software without having to deal with complicated issues such as – networking protocols – database management – concurrency control › Also, using a local replica where data can be modified directly without a lock or blocking improves user experience › Synchronizing application states among multiple clients › Implement group-wares or collaborative web services supporting simultaneous real-time interactions © Ericsson AB 2010 | Page 4
  • 5.
    Main Features › Makesit possible for multiple JavaScript clients to address and manipulate the same data at the same › Plain JavaScript Lib (no browser plug-in required) › High performance and low delay › Optimistic replication to resolve merge conflicts › Event-driven (register a listener and be notified when data change) › Support for both ordered arrays/lists and unordered key-value hash tables › Support for both persistent storage (disk) and transient data (RAM) › Automatic garbage collection › Time-to-live (specify how long time a value should be stored) › Possibility to link DSM storages to build graph databases © Ericsson AB 2010 | Page 5
  • 6.
    Use cases Examples ofusage › E-learning › Tele-care, e.g. remote health care and specialist consultation, remote monitoring etc. › Call center support › Collaborative work, e.g. a shared whiteboard or other collaborative editing systems etc. © Ericsson AB 2010 | Page 6
  • 7.
    Merge conflicts areresolved › All clients (and servers) DSM SW contains predefined rules how to resolve conflicts “Adjust” or transform incoming operation to match local changes © Ericsson AB 2010 | Page 7
  • 8.
    JavaScript API › Simpleand easy to use to API // get a replica of hash://simpleTest var hash = memCtrl.get(“hash://simpleTest”); // update the web page when the replica is cloned hash.onReady = function () { document.getElementById(“myTextfield”).value = hash.get(“myKey”); }; // handle changes to the replica hash.onUpdate = function (op) { document.getElementById(“myTextfield”).value = op.value; }; // update the local replica hash.set(“myKey”, “myValue”); // send the operation to all other replica clients in the background hash.submit(); © Ericsson AB 2010 | Page 8
  • 9.
    Example applications Shared Whiteboards Collaborative Workspaces Shared JavaScript Apps, e.g. a Shared Map Widget © Ericsson AB 2010 | Page 9
  • 10.
    © Ericsson AB2010 | Page 10