Replicated Service Objects -- A Strategy for Distributed Applications

57
Martin is geing the projector to work with his laptop.

Transcript of Replicated Service Objects -- A Strategy for Distributed Applications

Page 1: Replicated Service Objects -- A Strategy for Distributed Applications

Martin is getting the projectorto workwith hislaptop.

Page 2: Replicated Service Objects -- A Strategy for Distributed Applications

Replicated Service Objects

A Strategy for Distributed Applications

Martin McClure

Page 3: Replicated Service Objects -- A Strategy for Distributed Applications

Background:GemStone/S

Page 4: Replicated Service Objects -- A Strategy for Distributed Applications

30 Years!

Page 5: Replicated Service Objects -- A Strategy for Distributed Applications
Page 6: Replicated Service Objects -- A Strategy for Distributed Applications

GemStone/S•Server-side Smalltalk•Object Database

Page 7: Replicated Service Objects -- A Strategy for Distributed Applications

Server-sideSmalltalk•Headless•Multi-User•Scalable

Page 8: Replicated Service Objects -- A Strategy for Distributed Applications

ObjectDatabase•One persistent “image”•Shared transactionally• Merged at commit• Conflicts are detected

Page 9: Replicated Service Objects -- A Strategy for Distributed Applications

GemBuilder for Smalltalk (GBS)•Interfaces VW or VA Smalltalk to GemStone

Page 10: Replicated Service Objects -- A Strategy for Distributed Applications
Page 11: Replicated Service Objects -- A Strategy for Distributed Applications
Page 12: Replicated Service Objects -- A Strategy for Distributed Applications

GemBuilder for Smalltalk (GBS)•Interfaces VW or VA Smalltalk to GemStone

Page 13: Replicated Service Objects -- A Strategy for Distributed Applications

GBS Main Features•Forwarders

• Remote messaging•Replicates

• Synchronized copy• (new) Remote

messaging

Page 14: Replicated Service Objects -- A Strategy for Distributed Applications

Forwarder

ServerClient

Page 15: Replicated Service Objects -- A Strategy for Distributed Applications

Forwarder

ServerClient

Page 16: Replicated Service Objects -- A Strategy for Distributed Applications

Forwarder

ServerClient

Page 17: Replicated Service Objects -- A Strategy for Distributed Applications

Forwarder

ServerClient

Page 18: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 19: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 20: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 21: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 22: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 23: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 24: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 25: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 26: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 27: Replicated Service Objects -- A Strategy for Distributed Applications

Replicate

ServerClient

Page 28: Replicated Service Objects -- A Strategy for Distributed Applications

TransparentDistribution

Page 29: Replicated Service Objects -- A Strategy for Distributed Applications

TransparentDistribution

Good Idea

Page 30: Replicated Service Objects -- A Strategy for Distributed Applications

TransparentDistribution

Good IdeaBAD

Page 31: Replicated Service Objects -- A Strategy for Distributed Applications

DistributionConcerns•Correctness•Reliability•Performance

Page 32: Replicated Service Objects -- A Strategy for Distributed Applications

DistributionConcerns•Correctness•Reliability•Performance

Page 33: Replicated Service Objects -- A Strategy for Distributed Applications

DistributionConcerns•Correctness•Reliability•Performance

Page 34: Replicated Service Objects -- A Strategy for Distributed Applications

DistributionConcerns•Correctness•Reliability•Performance

Page 35: Replicated Service Objects -- A Strategy for Distributed Applications

An Embarrassing

Story

Page 36: Replicated Service Objects -- A Strategy for Distributed Applications

n2

Page 37: Replicated Service Objects -- A Strategy for Distributed Applications

One Month

Page 38: Replicated Service Objects -- A Strategy for Distributed Applications

Tools used Forwarders

Page 39: Replicated Service Objects -- A Strategy for Distributed Applications

Lessons•Test scaling•Test with latency•Need better design pattern

Page 40: Replicated Service Objects -- A Strategy for Distributed Applications

ReplicatedServiceObjects

Page 41: Replicated Service Objects -- A Strategy for Distributed Applications

Example:InspectorService

Page 42: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Page 43: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

Page 44: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Page 45: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> '0' 'y' -> '0'

Dictionary

Page 46: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> '0' 'y' -> '0'

Dictionary

Page 47: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> '0' 'y' -> '0'

Dictionary

Page 48: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> '0' 'y' -> '0'

Dictionary

Page 49: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> ' 42 '

'y' -> '0'

Dictionary

Page 50: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

'self' -> '0@0' 'class' -> 'Point'

'x' -> '0' 'y' -> '0'

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> ' 42 '

'y' -> '0'

Dictionary

Page 51: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> ' 42 '

'y' -> '0'

Dictionary

'self' -> '0@0' 'class' -> 'Point'

'x' -> ' 42 ' 'y' -> '0'

Page 52: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> ' 42 '

'y' -> '0'

Dictionary

'self' -> '0@0' 'class' -> 'Point'

'x' -> ' 42 ' 'y' -> '0'

Page 53: Replicated Service Objects -- A Strategy for Distributed Applications

ServerClient

Inspector Service

theObjectproperties

Dictionary

Inspector Service

properties'self' -> '0@0'

'class' -> 'Point' 'x' -> ' 42 '

'y' -> '0'

Dictionary

'self' -> '0@0' 'class' -> 'Point'

'x' -> ' 42 ' 'y' -> '0'

Page 54: Replicated Service Objects -- A Strategy for Distributed Applications

Principles•Replicate everything you'll need frequently

Page 55: Replicated Service Objects -- A Strategy for Distributed Applications

Principles•Represent information as basic objects when necessary.

Page 56: Replicated Service Objects -- A Strategy for Distributed Applications

Principles•Do everything you can predict in a single round trip.

Page 57: Replicated Service Objects -- A Strategy for Distributed Applications

Replicated Service Objects

A Strategy for Distributed Applications

Martin McClure