SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Strategies Recording Modified VM Outlook




                    Sovereign:
             Migrating Java Threads
    to Improve Availability of Web Applications

              Johannes Eickhold, Technical University Munich
                    Markus Knauer, EclipseSource
           Dr. Thomas Fuhrmann, Technical University Munich



                                 March 22, 2011


                                                                     eclipsesource-lo


jeick@so.in.tum.de                       Sovereign       March 22, 2011     1 / 34
Strategies Recording Modified VM Outlook

What is high availability for web applications?




                                                        Load Balancer
                Cluster




                                        Servlet Container


  Every node can take over
  Only works if app is stateless
                                                                                    eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                   March 22, 2011     2 / 34
Strategies Recording Modified VM Outlook

What is RAP?




  RAP supports
       Reusing RCP’s UI thread → single sourcing
       Job framework                                               eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     3 / 34
Strategies Recording Modified VM Outlook

Challenge: Transfer Server Side State


                                                   Load Balancer
                                                                           sticky sessions!
                                                                           no-fail-over = true
 Cluster




                 S S                                                S

                                    Servlet Container
              UIThread

                         UIThread




                                                                UIThread


           Goal
           Enable failsave operation of all RAP features
                                                                                              eclipsesource-lo


           jeick@so.in.tum.de                           Sovereign                 March 22, 2011     4 / 34
Strategies Recording Modified VM Outlook

Overview


  1   Strategies

  2   Recording
        Strategy Explained
        Example
        Demo

  3   Modified VM
        Strategy Explained
        Demo

  4   Outlook

                                                                   eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     5 / 34
Strategies Recording Modified VM Outlook

Overview


  1   Strategies

  2   Recording
        Strategy Explained
        Example
        Demo

  3   Modified VM
        Strategy Explained
        Demo

  4   Outlook

                                                                   eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     6 / 34
Strategies Recording Modified VM Outlook

Two Strategies for Enabling Session Failover

    1   Recording Strategy
               Records the widget state to shared heap
               Operates on application level
    2   Modified VM Strategy
               Enables thread migration on the JVM level




                                                                       eclipsesource-lo


   jeick@so.in.tum.de                        Sovereign     March 22, 2011     7 / 34
Strategies Recording Modified VM Outlook

Recording Strategy




                                                                   eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     8 / 34
Strategies Recording Modified VM Outlook

Modified VM Strategy




                                          licate threads
                                      rep




                       primary VM                          secondary VM



  freeze thread + replicate state and data + continue thread =
  thread migration                                                                    eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                      March 22, 2011     9 / 34
Strategies Recording Modified VM Outlook

Recording Strategy vs. Modified VM Strategy




       UIThread                  UIThread




         record                   replay



      byte code weaving                         unmodified application
      unmodified Hot Spot VM                     enhanced Maxine VM
      Terracotta shared heap                    object and thread replication



                                                                                  eclipsesource-lo


  jeick@so.in.tum.de                        Sovereign                March 22, 2011     10 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Overview


  1   Strategies

  2   Recording
        Strategy Explained
        Example
        Demo

  3   Modified VM
        Strategy Explained
        Demo

  4   Outlook

                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     11 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Recording Strategy



  Modifications to existing RAP framework
   1   Record widget creation order on primary
   2   Replay recorded widgets during creation phase on
       secondary
   3   Cluster the session including widget tree
   4   Remove non-serializable UI thread from session

  Incrementally add failover support for additional RAP widgets



                                                                                            eclipsesource-lo


  jeick@so.in.tum.de                        Sovereign                          March 22, 2011     12 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Lifecycle of a RAP application

                    UI Thread                                         Shared Heap




        request

                        Client




  Initial request creates the UI thread
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     13 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Lifecycle of a RAP application

                    UI Thread                                         Shared Heap




        request

                        Client




  UI thread executes createUI() and creates widget graph
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     13 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Lifecycle of a RAP application

                    UI Thread                                         Shared Heap

                                                 record


        request

                        Client




  The widget graph is stored on the shared heap
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     13 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Lifecycle of a RAP application

                    UI Thread                                         Shared Heap




                                    response

                        Client




  Servlet responds with rendered UI to client.
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     13 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Hot Standby Takes Over

                   UI Thread                                         Shared Heap

                       FAILURE


       request

                        Client




  Primary servlet container fails and secondary jumps in
                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     14 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Hot Standby Takes Over

       UI Thread              UI Thread                              Shared Heap

       FAILURE


            request

                       Client




  Primary servlet container fails and secondary jumps in
                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     14 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Hot Standby Takes Over

       UI Thread              UI Thread                              Shared Heap

       FAILURE


            request

                       Client




  Skip widget creation in new UI thread!
                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     14 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Failover Situation

        UI Thread              UI Thread                              Shared Heap

        FAILURE                                         replay


             request

                        Client




  Widgets are restored from the shared heap
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     15 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Failover Situation

        UI Thread              UI Thread                              Shared Heap

        FAILURE


                                         response

                        Client




  We achieved transparent failover!
                                                                                            eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                          March 22, 2011     15 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Implementation


               You could implement this yourself
                              or
                 reuse existing technologies.

      AspectJ is used to:
                   Record order in which widgets are created
                   Track method calls to enable method skipping
   Terracotta provides a shared heap



                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     16 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Recap of Recording Strategy



        Share                                          Record
            TIMs: Equinox,                                Tracing widget
            Jetty                                         creation with
               Configure RAP                               AspectJ
               (tc-config.xml)                                 Skip methods
                                                              on secondary


  No silver bullet!
  RAP application has to be designed for failover

                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     17 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

Jump to the example



       Example RAP application: "swt layout"
       Aspects implementing the recording/replay




                                                                                           eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                          March 22, 2011     18 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo

SWT Layout Example

1    Label l = new Label (shell , SWT.NONE );
2    l. setText (" relocate me!");
3    ...
4    Button b = new Button (shell , SWT.PUSH );
5    b. setText ("left");
6    b. addSelectionListener (new SelectionAdapter () {
7         public void widgetSelected ( SelectionEvent e) {
8             localCounter ++;
9             globalCounter ++;
10            l. setText (" relocated "
11                  + localCounter + "/" + globalCounter
12                  + " times ");
13        }
14   });
                                                                                              eclipsesource-lo


     jeick@so.in.tum.de                       Sovereign                          March 22, 2011     19 / 34
Strategies Recording Modified VM Outlook       Strategy Explained Example Demo

Trace RAP Widget Creation and Method Calls



UIThread    Button              shared heap
                                                     UIThread     Button           shared heap

       new()
                                                             new()
                        store
                                                                      restore

    setText()
                                                             setText()
                        update



                                                                  On secondary
               On primary


                                                                                              eclipsesource-lo


   jeick@so.in.tum.de                         Sovereign                          March 22, 2011     20 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Example Demo




                 Recording Demo



                                                                                         eclipsesource-lo


jeick@so.in.tum.de                       Sovereign                          March 22, 2011     21 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo

Overview


  1   Strategies

  2   Recording
        Strategy Explained
        Example
        Demo

  3   Modified VM
        Strategy Explained
        Demo

  4   Outlook

                                                                                         eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                        March 22, 2011     22 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo

Modified VM Strategy



  Extensions to the Maxine research VM
      Object replication
       Thread replication



                  All VMs in web cluster execute:
            MigrationAgent + target application


                                                                                         eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                        March 22, 2011     23 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo

Maxine VM Internals

  Maxine VM is written in Java (metacircular)
  Threads
      Uses pthreads
       One-on-one mapping: Java ↔ pthread
       Safepoint operations inserted at backward branches
       Freezing of threads only via VmOperation

  Compilers
       Baseline: template JIT
       Optimizing: port of C1X from HotSpot or CPS

  Details in wiki: http://wikis.sun.com/display/MaxineVM
                                                                                         eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                        March 22, 2011     24 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo

Migration via Agents




  RAP clustering
        Agents run next to Equinox in same VM
        Replication only used for UI threads of RAP sessions

                    migrationAgent.migrate(uiThread);                                     eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                        March 22, 2011     25 / 34
Strategies Recording Modified VM Outlook          Strategy Explained Demo

Continuous Thread Replication

  On primary:

     Client           RequestThread             Replicator        UIThread                  Secondary


              HTTP request
                              handle(request)
                                        notify(request)
                                                                          handle(request)



                                            finished
                              replicate(UIThread)
                                                                 frames & objects


          HTTP response




                                                                                                  eclipsesource-lo


  jeick@so.in.tum.de                            Sovereign                           March 22, 2011      26 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:
                                                                      stack of ThreadStub
                                                                    nativeThreadCreate()
                                                                      VmThread.run()
                                                                     ThreadStub.run()
                                       receiving          prepare
                                       migration                             wait
               Thread                    agent
               receives
          replicated thread




                                                                                            eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                           March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:



                                                                         stack buffer
                                       receiving                  MigratedThread.run()
                                       migration        create
  frame n ... frame 2    frame 1         agent         & rewire         method1()
                                                                        method2()
              receives
          debug information




                                                                             ...
                                                                        methodN()




                                                                                                eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                               March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:
                                                                     stack of ThreadStub
                                                                   nativeThreadCreate()
                                                                     VmThread.run()
                                                                    ThreadStub.run()
                                       receiving
                                       migration          resize
  frame n ... frame 2    frame 1         agent
              receives
          debug information




                                                                                            eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                           March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:
                                                                     stack of ThreadStub
                                                                 nativeThreadCreate()
                                                                     VmThread.run()
                                                                    ThreadStub.run()
                                       receiving
                                       migration
  frame n ... frame 2    frame 1         agent         resize
              receives
          debug information




                                                                                            eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                           March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:
                                                                     stack of ThreadStub
                                                                 nativeThreadCreate()
                                                                     VmThread.run()
                                                                    ThreadStub.run()
                                       receiving                 MigratedThread.run()
                                       migration       insert
  frame n ... frame 2    frame 1         agent         buffer           method1()
                                                                        method2()
              receives
          debug information




                                                                             ...
                                                                        methodN()




                                                                                                eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                               March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook      Strategy Explained Demo

Replication of Stack Frames


  On secondary:
                                                                     stack of ThreadStub
                                                                 nativeThreadCreate()
                                                                     VmThread.run()
                                                                    ThreadStub.run()
                                       receiving                 MigratedThread.run()
                                       migration
  frame n ... frame 2    frame 1         agent         rewire           method1()
                                                                        method2()
              receives
          debug information




                                                                             ...
                                                                        methodN()
                                                                  ThreadStub.patch()




                                                                                                eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign                               March 22, 2011     27 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo

Inspecting the Migration Algorithm

  RCP based tooling:
  Inspect migrated entities at VM level




                                                                                          eclipsesource-lo


   jeick@so.in.tum.de                       Sovereign                        March 22, 2011     28 / 34
Strategies Recording Modified VM Outlook     Strategy Explained Demo




                     Migration Demo



                                                                                       eclipsesource-lo


jeick@so.in.tum.de                       Sovereign                        March 22, 2011     29 / 34
Strategies Recording Modified VM Outlook

Overview


  1   Strategies

  2   Recording
        Strategy Explained
        Example
        Demo

  3   Modified VM
        Strategy Explained
        Demo

  4   Outlook

                                                                    eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     30 / 34
Strategies Recording Modified VM Outlook

Conclusion




         Clustering RAP’s UIThreads is possible


                       Achieves transparent failover




                                                                    eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     31 / 34
Strategies Recording Modified VM Outlook

Future Work


   1   Future directions for clustered RAP:
              Support more SWT widgets
              JFace and Workbench
              Support alternatives to Terracotta
   2   Potential for Java VMs with thread migration:
              Distributed Equinox
              Dynamic scaling for the cloud
              Vertical scaling of running applications
   3   Improvements for migration agents:
              Migrate locked objects
              Migrate interlocked threads
              Migratable Resources: Sockets, Files

                                                                      eclipsesource-lo


  jeick@so.in.tum.de                        Sovereign    March 22, 2011     32 / 34
Strategies Recording Modified VM Outlook




                      Thank you for listening!

                          Questions?



                                                                  eclipsesource-lo


jeick@so.in.tum.de                       Sovereign   March 22, 2011     33 / 34
Strategies Recording Modified VM Outlook

References




       http://www.so.in.tum.de/sovereign
       http://www.terracotta.org
       http://www.eclipse.org/aspectj
       http://wikis.sun.com/display/MaxineVM
       Quitadamo, Mobile JikesRVM: A framework to support
       transparent Java thread migration, 2008




                                                                    eclipsesource-lo


  jeick@so.in.tum.de                       Sovereign   March 22, 2011     34 / 34
TraceRAPWidgetCreation.aspectj


1    Object around () : traceRAPWidgetCreation () {
2        if ( primary ) {
3             widget = proceed ();
4             // record object
5             recordObject ( widget );
6             return widget ;
7        } else {
8             // replay object
9             widget = replayObject ();
10            return widget ;
11       }
12   }

                                                         eclipsesource-lo


     jeick@so.in.tum.de    Sovereign          March 22, 2011     1/2
TraceRAPMethodCalls.aspectj



1   Object around () : traceRAPMethodCalls () {
2       if ( primary ) {
3            // normal operation
4            return proceed ();
5       } else {
6            // do nothing
7            return null;
8       }
9   }



                                                        eclipsesource-lo


    jeick@so.in.tum.de    Sovereign          March 22, 2011     2/2

Contenu connexe

Similaire à Sovereign: Migrating Java Threads to Improve Availability of Web Applications

A logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in EclipseA logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in EclipseCoen De Roover
 
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...Emulex Corporation
 
Unified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksUnified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksEric Verhulst
 
Mike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFMike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFukdpe
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesSamuel Dratwa
 
Why ReactJS Course Is a Must-Learn for Web Developers.pptx
Why ReactJS Course Is a Must-Learn for Web Developers.pptxWhy ReactJS Course Is a Must-Learn for Web Developers.pptx
Why ReactJS Course Is a Must-Learn for Web Developers.pptxSaniyaSharma28
 
Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...SoftServe
 
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01David Giard
 
Staying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debugStaying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debugmarckhouzam
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 
Eclipse Summit 2008 - Thales - SolFa
Eclipse Summit 2008 - Thales - SolFaEclipse Summit 2008 - Thales - SolFa
Eclipse Summit 2008 - Thales - SolFaBENOIT_LANGLOIS
 
北京大學計算機開題
北京大學計算機開題北京大學計算機開題
北京大學計算機開題Peter Cheung
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework EngineeringYoungSu Son
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryAnthony Gelibert
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.microbwullems
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architectureSubhasis Nayak
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Docker, Inc.
 
On the Composition and Reuse of Viewpoints
On the Composition and Reuse of ViewpointsOn the Composition and Reuse of Viewpoints
On the Composition and Reuse of ViewpointsHenry Muccini
 

Similaire à Sovereign: Migrating Java Threads to Improve Availability of Web Applications (20)

A logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in EclipseA logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in Eclipse
 
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...
OneCommand Vision 2.1 webcast: Cutting edge LUN SLAs, AIX on PowerPC and flex...
 
Unified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksUnified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorks
 
Managed Extensibility Framework
Managed Extensibility FrameworkManaged Extensibility Framework
Managed Extensibility Framework
 
Mike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEFMike Taulty DevDays 2010 Silverlight MEF
Mike Taulty DevDays 2010 Silverlight MEF
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Why ReactJS Course Is a Must-Learn for Web Developers.pptx
Why ReactJS Course Is a Must-Learn for Web Developers.pptxWhy ReactJS Course Is a Must-Learn for Web Developers.pptx
Why ReactJS Course Is a Must-Learn for Web Developers.pptx
 
Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...
 
Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01Managed Extensibility Framework 2010 01
Managed Extensibility Framework 2010 01
 
Staying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debugStaying ahead of the multi-core revolution with CDT debug
Staying ahead of the multi-core revolution with CDT debug
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 
Eclipse Summit 2008 - Thales - SolFa
Eclipse Summit 2008 - Thales - SolFaEclipse Summit 2008 - Thales - SolFa
Eclipse Summit 2008 - Thales - SolFa
 
北京大學計算機開題
北京大學計算機開題北京大學計算機開題
北京大學計算機開題
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
 
OSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared MemoryOSGi Applications Clustering using Distributed Shared Memory
OSGi Applications Clustering using Distributed Shared Memory
 
Caliburn.micro
Caliburn.microCaliburn.micro
Caliburn.micro
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architecture
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...Configuration Management and Transforming Legacy Applications in the Enterpri...
Configuration Management and Transforming Legacy Applications in the Enterpri...
 
On the Composition and Reuse of Viewpoints
On the Composition and Reuse of ViewpointsOn the Composition and Reuse of Viewpoints
On the Composition and Reuse of Viewpoints
 

Dernier

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Dernier (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Sovereign: Migrating Java Threads to Improve Availability of Web Applications

  • 1. Strategies Recording Modified VM Outlook Sovereign: Migrating Java Threads to Improve Availability of Web Applications Johannes Eickhold, Technical University Munich Markus Knauer, EclipseSource Dr. Thomas Fuhrmann, Technical University Munich March 22, 2011 eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 1 / 34
  • 2. Strategies Recording Modified VM Outlook What is high availability for web applications? Load Balancer Cluster Servlet Container Every node can take over Only works if app is stateless eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 2 / 34
  • 3. Strategies Recording Modified VM Outlook What is RAP? RAP supports Reusing RCP’s UI thread → single sourcing Job framework eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 3 / 34
  • 4. Strategies Recording Modified VM Outlook Challenge: Transfer Server Side State Load Balancer sticky sessions! no-fail-over = true Cluster S S S Servlet Container UIThread UIThread UIThread Goal Enable failsave operation of all RAP features eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 4 / 34
  • 5. Strategies Recording Modified VM Outlook Overview 1 Strategies 2 Recording Strategy Explained Example Demo 3 Modified VM Strategy Explained Demo 4 Outlook eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 5 / 34
  • 6. Strategies Recording Modified VM Outlook Overview 1 Strategies 2 Recording Strategy Explained Example Demo 3 Modified VM Strategy Explained Demo 4 Outlook eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 6 / 34
  • 7. Strategies Recording Modified VM Outlook Two Strategies for Enabling Session Failover 1 Recording Strategy Records the widget state to shared heap Operates on application level 2 Modified VM Strategy Enables thread migration on the JVM level eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 7 / 34
  • 8. Strategies Recording Modified VM Outlook Recording Strategy eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 8 / 34
  • 9. Strategies Recording Modified VM Outlook Modified VM Strategy licate threads rep primary VM secondary VM freeze thread + replicate state and data + continue thread = thread migration eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 9 / 34
  • 10. Strategies Recording Modified VM Outlook Recording Strategy vs. Modified VM Strategy UIThread UIThread record replay byte code weaving unmodified application unmodified Hot Spot VM enhanced Maxine VM Terracotta shared heap object and thread replication eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 10 / 34
  • 11. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Overview 1 Strategies 2 Recording Strategy Explained Example Demo 3 Modified VM Strategy Explained Demo 4 Outlook eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 11 / 34
  • 12. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Recording Strategy Modifications to existing RAP framework 1 Record widget creation order on primary 2 Replay recorded widgets during creation phase on secondary 3 Cluster the session including widget tree 4 Remove non-serializable UI thread from session Incrementally add failover support for additional RAP widgets eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 12 / 34
  • 13. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Lifecycle of a RAP application UI Thread Shared Heap request Client Initial request creates the UI thread eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 13 / 34
  • 14. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Lifecycle of a RAP application UI Thread Shared Heap request Client UI thread executes createUI() and creates widget graph eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 13 / 34
  • 15. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Lifecycle of a RAP application UI Thread Shared Heap record request Client The widget graph is stored on the shared heap eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 13 / 34
  • 16. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Lifecycle of a RAP application UI Thread Shared Heap response Client Servlet responds with rendered UI to client. eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 13 / 34
  • 17. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Hot Standby Takes Over UI Thread Shared Heap FAILURE request Client Primary servlet container fails and secondary jumps in eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 14 / 34
  • 18. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Hot Standby Takes Over UI Thread UI Thread Shared Heap FAILURE request Client Primary servlet container fails and secondary jumps in eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 14 / 34
  • 19. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Hot Standby Takes Over UI Thread UI Thread Shared Heap FAILURE request Client Skip widget creation in new UI thread! eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 14 / 34
  • 20. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Failover Situation UI Thread UI Thread Shared Heap FAILURE replay request Client Widgets are restored from the shared heap eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 15 / 34
  • 21. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Failover Situation UI Thread UI Thread Shared Heap FAILURE response Client We achieved transparent failover! eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 15 / 34
  • 22. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Implementation You could implement this yourself or reuse existing technologies. AspectJ is used to: Record order in which widgets are created Track method calls to enable method skipping Terracotta provides a shared heap eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 16 / 34
  • 23. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Recap of Recording Strategy Share Record TIMs: Equinox, Tracing widget Jetty creation with Configure RAP AspectJ (tc-config.xml) Skip methods on secondary No silver bullet! RAP application has to be designed for failover eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 17 / 34
  • 24. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Jump to the example Example RAP application: "swt layout" Aspects implementing the recording/replay eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 18 / 34
  • 25. Strategies Recording Modified VM Outlook Strategy Explained Example Demo SWT Layout Example 1 Label l = new Label (shell , SWT.NONE ); 2 l. setText (" relocate me!"); 3 ... 4 Button b = new Button (shell , SWT.PUSH ); 5 b. setText ("left"); 6 b. addSelectionListener (new SelectionAdapter () { 7 public void widgetSelected ( SelectionEvent e) { 8 localCounter ++; 9 globalCounter ++; 10 l. setText (" relocated " 11 + localCounter + "/" + globalCounter 12 + " times "); 13 } 14 }); eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 19 / 34
  • 26. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Trace RAP Widget Creation and Method Calls UIThread Button shared heap UIThread Button shared heap new() new() store restore setText() setText() update On secondary On primary eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 20 / 34
  • 27. Strategies Recording Modified VM Outlook Strategy Explained Example Demo Recording Demo eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 21 / 34
  • 28. Strategies Recording Modified VM Outlook Strategy Explained Demo Overview 1 Strategies 2 Recording Strategy Explained Example Demo 3 Modified VM Strategy Explained Demo 4 Outlook eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 22 / 34
  • 29. Strategies Recording Modified VM Outlook Strategy Explained Demo Modified VM Strategy Extensions to the Maxine research VM Object replication Thread replication All VMs in web cluster execute: MigrationAgent + target application eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 23 / 34
  • 30. Strategies Recording Modified VM Outlook Strategy Explained Demo Maxine VM Internals Maxine VM is written in Java (metacircular) Threads Uses pthreads One-on-one mapping: Java ↔ pthread Safepoint operations inserted at backward branches Freezing of threads only via VmOperation Compilers Baseline: template JIT Optimizing: port of C1X from HotSpot or CPS Details in wiki: http://wikis.sun.com/display/MaxineVM eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 24 / 34
  • 31. Strategies Recording Modified VM Outlook Strategy Explained Demo Migration via Agents RAP clustering Agents run next to Equinox in same VM Replication only used for UI threads of RAP sessions migrationAgent.migrate(uiThread); eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 25 / 34
  • 32. Strategies Recording Modified VM Outlook Strategy Explained Demo Continuous Thread Replication On primary: Client RequestThread Replicator UIThread Secondary HTTP request handle(request) notify(request) handle(request) finished replicate(UIThread) frames & objects HTTP response eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 26 / 34
  • 33. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack of ThreadStub nativeThreadCreate() VmThread.run() ThreadStub.run() receiving prepare migration wait Thread agent receives replicated thread eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 34. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack buffer receiving MigratedThread.run() migration create frame n ... frame 2 frame 1 agent & rewire method1() method2() receives debug information ... methodN() eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 35. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack of ThreadStub nativeThreadCreate() VmThread.run() ThreadStub.run() receiving migration resize frame n ... frame 2 frame 1 agent receives debug information eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 36. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack of ThreadStub nativeThreadCreate() VmThread.run() ThreadStub.run() receiving migration frame n ... frame 2 frame 1 agent resize receives debug information eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 37. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack of ThreadStub nativeThreadCreate() VmThread.run() ThreadStub.run() receiving MigratedThread.run() migration insert frame n ... frame 2 frame 1 agent buffer method1() method2() receives debug information ... methodN() eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 38. Strategies Recording Modified VM Outlook Strategy Explained Demo Replication of Stack Frames On secondary: stack of ThreadStub nativeThreadCreate() VmThread.run() ThreadStub.run() receiving MigratedThread.run() migration frame n ... frame 2 frame 1 agent rewire method1() method2() receives debug information ... methodN() ThreadStub.patch() eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 27 / 34
  • 39. Strategies Recording Modified VM Outlook Strategy Explained Demo Inspecting the Migration Algorithm RCP based tooling: Inspect migrated entities at VM level eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 28 / 34
  • 40. Strategies Recording Modified VM Outlook Strategy Explained Demo Migration Demo eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 29 / 34
  • 41. Strategies Recording Modified VM Outlook Overview 1 Strategies 2 Recording Strategy Explained Example Demo 3 Modified VM Strategy Explained Demo 4 Outlook eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 30 / 34
  • 42. Strategies Recording Modified VM Outlook Conclusion Clustering RAP’s UIThreads is possible Achieves transparent failover eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 31 / 34
  • 43. Strategies Recording Modified VM Outlook Future Work 1 Future directions for clustered RAP: Support more SWT widgets JFace and Workbench Support alternatives to Terracotta 2 Potential for Java VMs with thread migration: Distributed Equinox Dynamic scaling for the cloud Vertical scaling of running applications 3 Improvements for migration agents: Migrate locked objects Migrate interlocked threads Migratable Resources: Sockets, Files eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 32 / 34
  • 44. Strategies Recording Modified VM Outlook Thank you for listening! Questions? eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 33 / 34
  • 45. Strategies Recording Modified VM Outlook References http://www.so.in.tum.de/sovereign http://www.terracotta.org http://www.eclipse.org/aspectj http://wikis.sun.com/display/MaxineVM Quitadamo, Mobile JikesRVM: A framework to support transparent Java thread migration, 2008 eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 34 / 34
  • 46. TraceRAPWidgetCreation.aspectj 1 Object around () : traceRAPWidgetCreation () { 2 if ( primary ) { 3 widget = proceed (); 4 // record object 5 recordObject ( widget ); 6 return widget ; 7 } else { 8 // replay object 9 widget = replayObject (); 10 return widget ; 11 } 12 } eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 1/2
  • 47. TraceRAPMethodCalls.aspectj 1 Object around () : traceRAPMethodCalls () { 2 if ( primary ) { 3 // normal operation 4 return proceed (); 5 } else { 6 // do nothing 7 return null; 8 } 9 } eclipsesource-lo jeick@so.in.tum.de Sovereign March 22, 2011 2/2