SlideShare a Scribd company logo
1 of 28
Wiring Hacker Synapses
               Mustafa K. Isik      Scott Lewis
            codesurgeonblog.com   composent.com



Eclipse Communication Framework
EclipseDay at the Googleplex
June 24th, 2008
Mountain View, CA
Who has seen the
         screencast?




http://www.vimeo.com/1195398
Live Demo
Collaborative Coding and
 Team Tooling in Eclipse
Collaborative Coding
‣ Real-Time Shared Editing with Cola
 ‣ Motivation
 ‣ Conceptual Overview
 ‣ Challenges
 ‣ Solutions
 ‣ The Future
Motivation
‣ Enable Pair Programming
‣ Live Code Review
‣ Help, Tutor, Mentor
 ‣ Tap into Domain/API Knowledge
‣ Independent of Geographic Restrictions
‣ Resilient to Location Limitations
Make Coding More Social,
    Effective & Fun
Conceptual Overview
‣ 2 Participants working on the same
  document

 ‣ text file, java source code, etc.
‣ On different machines
 ‣ changes sent over the network
‣ Consistent document state
‣ No unintended changes
time
                          Conflict Free Ideal
                      Anna                                    Zoë
            initial consistent doc                    initial consistent doc

                      ins(a)

                      ins(a)
                                                              ins(a)
                index a
                                                       index a
                                                             ins(0)


                                             ins(0)               ins(a)

       ins(0)                  ins(a)   index 0

 index 0
time
                                Review
              Anna                                      Zoë
       initial consistent doc                   initial consistent doc




                                 Some Editing




          Consistent Documents
       Intention Preserving Changes
Review (cont.)
‣ No conflicts because
 ‣ Anna generates change on common document
     state, sends to Zoë

  ‣ Zoë updates unmodified local doc with
    incoming change

  ‣ Zoë generates change on updated document,
    sends to Anna

  ‣ Anna updates common doc state with incoming
    change

‣ Strictly Sequential Execution ➭ ideal, but unrealistic
Challenge
                ‣ Out of Order sending/receptionZoë
                    Anna
time             initial consistent doc                    initial consistent doc

                        ins(a)

                        ins(a)

                 index a
                       ins(0)

       ins(0)                    ins(a)           ins(0)

 index 0                                       index 0      index a
                                                  ins(0)       ins(a)

                                               index 0      index a
Solution
‣ In-order Message sending/reception
 ‣ network protocols to the rescue
 ‣ build on TCP
 ‣ build on application level protocol relying
    on TCP, e.g. XMPP

  ‣ ECF provides for abstraction from
    underlying protocol, XMPPS, Skype, etc.
Challenge
‣ Text Editor Responsiveness
 ‣ Local changes need to be applied
    immediately

‣ Network Latency
 ‣ Messages crossing “on the wire”
‣ Immediate application of local changes and
  Network Latency ➭ High Probability for
  Conflicts
time
          Cross-on-Wire Conflict
                   Anna                                         Zoë
            initial consistent doc                   initial consistent doc

                   ins(a)                                     ins(0)

                   ins(a)                  ins(0)

            index a                     index 0


       ins(0)                  ins(a)      ins(0)      ins(a)

  index 0                               index 0     index a
Solution
‣ Resolution mechanism for conflicting,
  mutually directed changes ➭ operational
  transformations

 ‣ precondition: locally applied operation
    and incoming remote operation originate
    from same document state

 ‣ postcondition: transformed remote
    operation ready for intention-preserving
    application to local document
Operational
      Transformations
‣ How to determine origination state/
  compatibility?

 ‣ stamp each locally generated operation
    with counters

 ‣ local operation count
 ‣ remote operation count
Operational
Transformations (cont.)
‣ compare counters on incoming remote
  operation & conflicting, already applied
  local operation

‣ cola operational transformation
 ‣ input: conflicting incoming remote op &
    already applied local op

 ‣ output: updated remote op, ready for
    local application, e.g. index update
Operational Transformation for Cross-
time                  on-Wire Conflict Resolution
                          Anna                                                           Zoë
                initial consistent doc                                           initial consistent doc

                          ins(a)                                                        ins(0)

                       ins(a)                                         ins(0)

                index a                                            index 0

 coopt(          ins(0)         ins(a)     )➭     ins(0)        coopt(       ins(a)     ins(0)     )➭     ins(a+L)



                                         no update necessary!                                    updated index!

       ins(0)                        ins(a)                        ins(0)                   ins(a+L)


  index 0                                                       index 0               index a + L
Pseudocode:
 Resolving Cross-On-Wire
//assert operation compatibility, i.e. same
origination state
Assert.isTrue(
    localOp.sentCount == remoteOp.receivedCount );
if ( localOp.isIns && remoteOp.isIns ) {
    if( localOp.index < remoteOp.index){
       //move remoteOp.index right by length of
       localOp
    } else if (localOp.index == remoteOp.index) {
       //notion of docOwner, consistently clarify
       preference
    } else if (localOp.index > remoteOp.index) {
       //do nothing to remote op, apply without
       modification
    }
}
Combinatorial
        Explosion
‣ Determine atomic operations, e.g. del, ins
 ‣ to be transformed against each other
‣ The fewer the better
 ‣ model compound operations from simple
    ones (e.g. replacement as deletion and
    insertion)
Combinatorial
     Explosion (cont.)
‣ |cases| ≡ |atomic operations| ^ 2 ∈ O(n^2)
 ‣ |cases| * |index_checks = 3|
    ‣ still ∈ O(n^2) though
 ‣ Not runtime problem, but
    implementation complexity

  ‣ The fewer atomic operations the better!
Divergence by More
  than one Operation
‣ Generation of multiple local changes while
  remote operation is traveling

  ‣ that is: upon arrival of remote operation,
    local doc changed by more than locally
    applied operation

  ‣ precondition for operational
    transformation not met
Divergence by More than One
time
             Anna
                    Op. (cont.)   Zoë
           initial consistent doc                         initial consistent doc

                       ins(a)                                         ins(z)


                   ins(a)                                                                  ins(z)

                       ins(v)


                   ins(a)           ins(v)       coopt(      ins(a)        ins(z)    )➭       ins(a)

                                                                                 no update necessary!

                                                               ins(a)                               ins(z)



  coopt(      ins(z)            ?   )➭       ?    coopt(     ins(v)    ins(z)    )➭      ins(v)

                                                                                 no update necessary!

                                                      ins(a)                    ins(v)            ins(z)
time
                Anna
                                       Resolution                        Zoë
         initial consistent doc                              initial consistent doc

                ins(a)                                                   ins(z)


                ins(a)                                                                        ins(z)

                 ins(v)


                ins(a)            ins(v)            coopt(      ins(a)        ins(z)    )➭       ins(a)

                                                                                    no update necessary!
 coopt( ins(z) ins(a) ) ➭ ins(x)
                                                                  ins(a)                               ins(z)
 where x = z + Length of ins(a)
                                                     coopt(     ins(v)    ins(z)    )➭      ins(v)


 coopt( ins(x) ins(v) ) ➭ ins(y)                                                    no update necessary!

 where y = x + Length of ins(v)                          ins(a)                    ins(v)            ins(z)


                ins(a)            ins(v)   ins(y)
Additional Details
‣ Manage local queue of unacknowledged
  operations

 ‣ add local operations as executed
 ‣ remove local operations as implicitly
    acknowledged by remote operations
    appropriate counter

 ‣ “virtual” update of queued up, applied
    local ops’ properties ➮ not in this talk

‣ Helps to introduce notion of state-space
  which is being traversed ➮ not in this talk
The Future
‣ More than 2 session participants
‣ Project Sharing
‣ API for Cola and its Model for Optimistic
  Concurrency Control

  ‣ Diagrams, anyone?
‣ Deeper Integration
 ‣ Multiple Cursors
 ‣ Highlighted Areas
‣ More on this from Scott ... time left?
Resources
Mustafa’s blog http://codesurgeonblog.com
Scott’s ECF blog http://eclipseecf.blogspot.com/
ECF Eclipse Wiki http://wiki.eclipse.org/
Eclipse_Communication_Framework_Project
ECF Project Home http://www.eclipse.org/ecf/
Cola Screencast
http://www.vimeo.com/1195398
6000+ views in 6 days

More Related Content

Viewers also liked

Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...
Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...
Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...EUscreen
 
Traditional instruments Spain
Traditional instruments SpainTraditional instruments Spain
Traditional instruments Spainbeatusest2
 
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015BBC Developing Communities of Innovation - Thinking Digital Manchester 2015
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015BBC
 
陰陽編 ウルトラマン
陰陽編 ウルトラマン陰陽編 ウルトラマン
陰陽編 ウルトラマンreigan_s
 
追試H28.3.3 神と人
追試H28.3.3 神と人追試H28.3.3 神と人
追試H28.3.3 神と人reigan_s
 
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...EY
 
1-Oportunidades de Creación de Nuevos Negocios
1-Oportunidades de Creación de Nuevos Negocios1-Oportunidades de Creación de Nuevos Negocios
1-Oportunidades de Creación de Nuevos NegociosJontxu Pardo
 
Programa de limpieza y desinfección
Programa de limpieza y desinfección Programa de limpieza y desinfección
Programa de limpieza y desinfección nathaly
 
Obsolescencia del conocimiento
Obsolescencia del conocimientoObsolescencia del conocimiento
Obsolescencia del conocimientofabioapolomithos
 

Viewers also liked (10)

Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...
Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...
Jean Christophe Meyer: Histoire Parallèle/Die Woche vor 50 Jahren – Lieu de m...
 
Traditional instruments Spain
Traditional instruments SpainTraditional instruments Spain
Traditional instruments Spain
 
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015BBC Developing Communities of Innovation - Thinking Digital Manchester 2015
BBC Developing Communities of Innovation - Thinking Digital Manchester 2015
 
Home work
Home workHome work
Home work
 
陰陽編 ウルトラマン
陰陽編 ウルトラマン陰陽編 ウルトラマン
陰陽編 ウルトラマン
 
追試H28.3.3 神と人
追試H28.3.3 神と人追試H28.3.3 神と人
追試H28.3.3 神と人
 
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...
EY India Attractiveness Survey 2015 – Reasons to Invest in India & Key Factor...
 
1-Oportunidades de Creación de Nuevos Negocios
1-Oportunidades de Creación de Nuevos Negocios1-Oportunidades de Creación de Nuevos Negocios
1-Oportunidades de Creación de Nuevos Negocios
 
Programa de limpieza y desinfección
Programa de limpieza y desinfección Programa de limpieza y desinfección
Programa de limpieza y desinfección
 
Obsolescencia del conocimiento
Obsolescencia del conocimientoObsolescencia del conocimiento
Obsolescencia del conocimiento
 

More from Mustafa Isik

SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-Simulationsdaten
SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-SimulationsdatenSumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-Simulationsdaten
SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-SimulationsdatenMustafa Isik
 
Game Development: The Golden Age of Indie
Game Development: The Golden Age of IndieGame Development: The Golden Age of Indie
Game Development: The Golden Age of IndieMustafa Isik
 
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurbo
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurboIndie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurbo
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurboMustafa Isik
 
Ein Rechner, ein Chip: MOS Technology 6502
Ein Rechner, ein Chip: MOS Technology 6502Ein Rechner, ein Chip: MOS Technology 6502
Ein Rechner, ein Chip: MOS Technology 6502Mustafa Isik
 
Tanning for Open Source Projects - The Google Summer of Code & You
Tanning for Open Source Projects - The Google Summer of Code & YouTanning for Open Source Projects - The Google Summer of Code & You
Tanning for Open Source Projects - The Google Summer of Code & YouMustafa Isik
 
ISTNW Alpha at GTUG Munich
ISTNW Alpha at GTUG MunichISTNW Alpha at GTUG Munich
ISTNW Alpha at GTUG MunichMustafa Isik
 
Anybody can be a great mentor ... maybe
Anybody can be a great mentor ... maybeAnybody can be a great mentor ... maybe
Anybody can be a great mentor ... maybeMustafa Isik
 
Cloud Computing Is Not Cotton Candy ... Or Is It?
Cloud Computing Is Not Cotton Candy ... Or Is It?Cloud Computing Is Not Cotton Candy ... Or Is It?
Cloud Computing Is Not Cotton Candy ... Or Is It?Mustafa Isik
 
2² C# 4.0 and .NET 4 Selected Features
2² C# 4.0 and .NET 4 Selected Features2² C# 4.0 and .NET 4 Selected Features
2² C# 4.0 and .NET 4 Selected FeaturesMustafa Isik
 
Modeling Scenarios with Sequence Diagrams
Modeling Scenarios with Sequence DiagramsModeling Scenarios with Sequence Diagrams
Modeling Scenarios with Sequence DiagramsMustafa Isik
 
Striding towards the Future Multiple Edits at a Time
Striding towards the Future Multiple Edits at a TimeStriding towards the Future Multiple Edits at a Time
Striding towards the Future Multiple Edits at a TimeMustafa Isik
 

More from Mustafa Isik (11)

SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-Simulationsdaten
SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-SimulationsdatenSumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-Simulationsdaten
SumoViz v1.0: HTML5-basierte Visualisierung von Fußgänger-Simulationsdaten
 
Game Development: The Golden Age of Indie
Game Development: The Golden Age of IndieGame Development: The Golden Age of Indie
Game Development: The Golden Age of Indie
 
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurbo
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurboIndie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurbo
Indie, Indie, Überall: Erfahrungen aus einem Jahr SuperHyperTurbo
 
Ein Rechner, ein Chip: MOS Technology 6502
Ein Rechner, ein Chip: MOS Technology 6502Ein Rechner, ein Chip: MOS Technology 6502
Ein Rechner, ein Chip: MOS Technology 6502
 
Tanning for Open Source Projects - The Google Summer of Code & You
Tanning for Open Source Projects - The Google Summer of Code & YouTanning for Open Source Projects - The Google Summer of Code & You
Tanning for Open Source Projects - The Google Summer of Code & You
 
ISTNW Alpha at GTUG Munich
ISTNW Alpha at GTUG MunichISTNW Alpha at GTUG Munich
ISTNW Alpha at GTUG Munich
 
Anybody can be a great mentor ... maybe
Anybody can be a great mentor ... maybeAnybody can be a great mentor ... maybe
Anybody can be a great mentor ... maybe
 
Cloud Computing Is Not Cotton Candy ... Or Is It?
Cloud Computing Is Not Cotton Candy ... Or Is It?Cloud Computing Is Not Cotton Candy ... Or Is It?
Cloud Computing Is Not Cotton Candy ... Or Is It?
 
2² C# 4.0 and .NET 4 Selected Features
2² C# 4.0 and .NET 4 Selected Features2² C# 4.0 and .NET 4 Selected Features
2² C# 4.0 and .NET 4 Selected Features
 
Modeling Scenarios with Sequence Diagrams
Modeling Scenarios with Sequence DiagramsModeling Scenarios with Sequence Diagrams
Modeling Scenarios with Sequence Diagrams
 
Striding towards the Future Multiple Edits at a Time
Striding towards the Future Multiple Edits at a TimeStriding towards the Future Multiple Edits at a Time
Striding towards the Future Multiple Edits at a Time
 

Recently uploaded

"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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Recently uploaded (20)

"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...
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Wiring Hacker Synapses - Cola: Real-Time Shared Editing

  • 1. Wiring Hacker Synapses Mustafa K. Isik Scott Lewis codesurgeonblog.com composent.com Eclipse Communication Framework EclipseDay at the Googleplex June 24th, 2008 Mountain View, CA
  • 2. Who has seen the screencast? http://www.vimeo.com/1195398
  • 4. Collaborative Coding and Team Tooling in Eclipse
  • 5. Collaborative Coding ‣ Real-Time Shared Editing with Cola ‣ Motivation ‣ Conceptual Overview ‣ Challenges ‣ Solutions ‣ The Future
  • 6. Motivation ‣ Enable Pair Programming ‣ Live Code Review ‣ Help, Tutor, Mentor ‣ Tap into Domain/API Knowledge ‣ Independent of Geographic Restrictions ‣ Resilient to Location Limitations
  • 7. Make Coding More Social, Effective & Fun
  • 8. Conceptual Overview ‣ 2 Participants working on the same document ‣ text file, java source code, etc. ‣ On different machines ‣ changes sent over the network ‣ Consistent document state ‣ No unintended changes
  • 9. time Conflict Free Ideal Anna Zoë initial consistent doc initial consistent doc ins(a) ins(a) ins(a) index a index a ins(0) ins(0) ins(a) ins(0) ins(a) index 0 index 0
  • 10. time Review Anna Zoë initial consistent doc initial consistent doc Some Editing Consistent Documents Intention Preserving Changes
  • 11. Review (cont.) ‣ No conflicts because ‣ Anna generates change on common document state, sends to Zoë ‣ Zoë updates unmodified local doc with incoming change ‣ Zoë generates change on updated document, sends to Anna ‣ Anna updates common doc state with incoming change ‣ Strictly Sequential Execution ➭ ideal, but unrealistic
  • 12. Challenge ‣ Out of Order sending/receptionZoë Anna time initial consistent doc initial consistent doc ins(a) ins(a) index a ins(0) ins(0) ins(a) ins(0) index 0 index 0 index a ins(0) ins(a) index 0 index a
  • 13. Solution ‣ In-order Message sending/reception ‣ network protocols to the rescue ‣ build on TCP ‣ build on application level protocol relying on TCP, e.g. XMPP ‣ ECF provides for abstraction from underlying protocol, XMPPS, Skype, etc.
  • 14. Challenge ‣ Text Editor Responsiveness ‣ Local changes need to be applied immediately ‣ Network Latency ‣ Messages crossing “on the wire” ‣ Immediate application of local changes and Network Latency ➭ High Probability for Conflicts
  • 15. time Cross-on-Wire Conflict Anna Zoë initial consistent doc initial consistent doc ins(a) ins(0) ins(a) ins(0) index a index 0 ins(0) ins(a) ins(0) ins(a) index 0 index 0 index a
  • 16. Solution ‣ Resolution mechanism for conflicting, mutually directed changes ➭ operational transformations ‣ precondition: locally applied operation and incoming remote operation originate from same document state ‣ postcondition: transformed remote operation ready for intention-preserving application to local document
  • 17. Operational Transformations ‣ How to determine origination state/ compatibility? ‣ stamp each locally generated operation with counters ‣ local operation count ‣ remote operation count
  • 18. Operational Transformations (cont.) ‣ compare counters on incoming remote operation & conflicting, already applied local operation ‣ cola operational transformation ‣ input: conflicting incoming remote op & already applied local op ‣ output: updated remote op, ready for local application, e.g. index update
  • 19. Operational Transformation for Cross- time on-Wire Conflict Resolution Anna Zoë initial consistent doc initial consistent doc ins(a) ins(0) ins(a) ins(0) index a index 0 coopt( ins(0) ins(a) )➭ ins(0) coopt( ins(a) ins(0) )➭ ins(a+L) no update necessary! updated index! ins(0) ins(a) ins(0) ins(a+L) index 0 index 0 index a + L
  • 20. Pseudocode: Resolving Cross-On-Wire //assert operation compatibility, i.e. same origination state Assert.isTrue( localOp.sentCount == remoteOp.receivedCount ); if ( localOp.isIns && remoteOp.isIns ) { if( localOp.index < remoteOp.index){ //move remoteOp.index right by length of localOp } else if (localOp.index == remoteOp.index) { //notion of docOwner, consistently clarify preference } else if (localOp.index > remoteOp.index) { //do nothing to remote op, apply without modification } }
  • 21. Combinatorial Explosion ‣ Determine atomic operations, e.g. del, ins ‣ to be transformed against each other ‣ The fewer the better ‣ model compound operations from simple ones (e.g. replacement as deletion and insertion)
  • 22. Combinatorial Explosion (cont.) ‣ |cases| ≡ |atomic operations| ^ 2 ∈ O(n^2) ‣ |cases| * |index_checks = 3| ‣ still ∈ O(n^2) though ‣ Not runtime problem, but implementation complexity ‣ The fewer atomic operations the better!
  • 23. Divergence by More than one Operation ‣ Generation of multiple local changes while remote operation is traveling ‣ that is: upon arrival of remote operation, local doc changed by more than locally applied operation ‣ precondition for operational transformation not met
  • 24. Divergence by More than One time Anna Op. (cont.) Zoë initial consistent doc initial consistent doc ins(a) ins(z) ins(a) ins(z) ins(v) ins(a) ins(v) coopt( ins(a) ins(z) )➭ ins(a) no update necessary! ins(a) ins(z) coopt( ins(z) ? )➭ ? coopt( ins(v) ins(z) )➭ ins(v) no update necessary! ins(a) ins(v) ins(z)
  • 25. time Anna Resolution Zoë initial consistent doc initial consistent doc ins(a) ins(z) ins(a) ins(z) ins(v) ins(a) ins(v) coopt( ins(a) ins(z) )➭ ins(a) no update necessary! coopt( ins(z) ins(a) ) ➭ ins(x) ins(a) ins(z) where x = z + Length of ins(a) coopt( ins(v) ins(z) )➭ ins(v) coopt( ins(x) ins(v) ) ➭ ins(y) no update necessary! where y = x + Length of ins(v) ins(a) ins(v) ins(z) ins(a) ins(v) ins(y)
  • 26. Additional Details ‣ Manage local queue of unacknowledged operations ‣ add local operations as executed ‣ remove local operations as implicitly acknowledged by remote operations appropriate counter ‣ “virtual” update of queued up, applied local ops’ properties ➮ not in this talk ‣ Helps to introduce notion of state-space which is being traversed ➮ not in this talk
  • 27. The Future ‣ More than 2 session participants ‣ Project Sharing ‣ API for Cola and its Model for Optimistic Concurrency Control ‣ Diagrams, anyone? ‣ Deeper Integration ‣ Multiple Cursors ‣ Highlighted Areas ‣ More on this from Scott ... time left?
  • 28. Resources Mustafa’s blog http://codesurgeonblog.com Scott’s ECF blog http://eclipseecf.blogspot.com/ ECF Eclipse Wiki http://wiki.eclipse.org/ Eclipse_Communication_Framework_Project ECF Project Home http://www.eclipse.org/ecf/ Cola Screencast http://www.vimeo.com/1195398 6000+ views in 6 days