oofwdpfbdis o-o frameworks with design patterns for building distributed information sharing...

54
OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing – Dissertation by Björn Eiderbäck – NADA/KTH, 3/2001 – Presentation by Stephen Travis Pope ([email protected])

Upload: steven-manson

Post on 14-Dec-2015

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

OOFwDPfBDIS

• O-O Frameworks with Design Patterns for Building Distributed Information Sharing

– Dissertation by Björn Eiderbäck– NADA/KTH, 3/2001

– Presentation by Stephen Travis Pope ([email protected])

Page 2: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Outline

• Overview• Goals & Definitions• The Problems with Patterns• Distributed Processing Systems• UI Builders• The MultiGossip Patterns &

Framework• Evaluation, Comments & Questions

Page 3: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Overview of the Work

• Background of the team and project• IPLab, MultiG• COMIC: Shared Obj. Svc, Interface Svc.• MMProg Project (DMIB?)• OOP & OOD Patterns• Distributed Processing for CSCW (a

natural combination)• The MultiGossip Framework

Page 4: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

The Thesis

• Three components:– Survey and R&D questions (70 p)– Solutions and implementations (100 p)– Evaluation and conclusions (24 p)

• Topical focus:– OOP, CSCW, design patterns, GUI

Frameworks, DPE, UIBs

Page 5: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Goals of this Work

• Integrated framework for information sharing

• Distribution and cooperation via agents

• Reflexive environment• Information sharing techniques• New design patterns• Use of OO techniques

Page 6: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

My Comments

• Pick fights with Björn’s quotes and abuse of basic definitions

• Complain about the state of the current “pattern frenzy”

• Sell you all CORBA ORBs• Evangelize for Smalltalk• Generally know it all better...

Page 7: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Basic Definitions

• Problems: Object, Actor, and Agent• Object: encapsulated state and behavior

– Has: identity, well-known behavioral interface, possible class relationship

• Agent: Object with a “thread”– Implies self-directed action, dependency– E.g., Observer, blackboard, Cellular

Automaton

Page 8: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Service/Object/Agent Semantics

• Task service

• Resource manager

• Method servers(?)

• Project (meta) agents

• Weak vs. strong agency a la

Kendall

Page 9: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Design Patterns

• Pattern history– Architecture, Eiffel/Smalltalk OOD (reverse

architecture or pattern mining)

• “Pattern describes an abstract problem and the basic structure of a solution”

• Ways of describing OO design patterns (formally)

• Wegner: “Objects, components, and frameworks cannot be specified by algorithms.” (hogwash!)

Page 10: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

The GO4 Pattern Template

• Several formats:– Name– Intent– AKA– Problem/Motivation– Solution/Applicability– Structure/Participants– Known Uses– Consequences– See also (relatives)

• Augmented by:– Free text– UML Diagrams

• Class relationships• Action sequences• E/R diagrams

– Code examples

Page 11: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Example: Dependency

• Name/AKA: Observer, constraint, publish/subscribe, data-flow

• Context/Intent: dist. systems• Motivation : indep. objects + constraint• Forces: loose coupling• Solution/Structure/Applicability:

dependency mechanism• Known Uses: MVC, Observer/-able

Page 12: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

GO4 Pattern Relationships

PurposeCreational Structural Behavioral

Class Factory Method Adapter Interpreter

Scope Template Method

Object Abstract Factory Adapter Resp. Chain

Scope Builder Bridge CommandPrototype Composite IteratorSingleton Decorator Mediator

Façade MementoFlyweight Publish/SubscribeGlue StateProxy StrategyVisitor

Page 13: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Structure of Patterns & Pattern Decomposition

• Dependency/Observer/P-S/Constraint– Model is-a observable (has-a dependents)– View implements updating– Transparent forwarding between Model and (0-n) (1-n)

Views

• Adaptor/Holder/DynamicValue/Wrapper/ Proxy/Bridge– Holder implements external protocol (has-a value)– Value does something else– Transparent forwarding between Holder and (0-n) (1)

Values

• Does this help to differentiate them?

Page 14: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Pattern Issues

• Q: Is call-back a pattern? What about dependency or adaptation?

• Q: What’s the (formal) difference between tool kits, libraries, and frameworks?

• Q: Is MVC a pattern or a framework? (p. 75)

• Q: Are all frameworks architectural?

Page 15: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Pattern Hierarchies and Primitives

• Are there primitives and notations that we could use to formally describe the construction and composition of patterns and the relationships between them?

• Well, are there?

Page 16: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation
Page 17: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Distributed Processing Defined

• Multiple processors without shared memory(?)

• Communicate by sending messages via some network

• Focus on behavioral interfaces

Page 18: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Distributed Processing “Light”

• Managing concurrency, multi-processing, and physical distribution

• Requirements– Network, low-level protocols (assumed)– XDR: external data representation– RPC/RMI: remote method invocation

• These may be described in an IDL

– A few basic services (naming, 1:n events)

Page 19: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Distributed Processing Issues

• XDR and marshalling (pass-by-reference supported?)

• RMI modes: sync, blocking, 1:n, call-back, etc.

• IDL: fcn. prototypes, exceptions, interface class hierarchy, QoS

• Run-time configuration and management

Page 20: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

DPE Systems & Semantics

• Actors & Laws of Parallel Processing

• Concurrent OO Languages– ABCL/1– ConcurentSmalltalk

• DST/CORBA– Heavy-weight– Possibly transparent

Page 21: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Required Services (BE)

• Required– Naming– Messaging (RMI)– Life-cycle

• Optional– User registration– Trading– Transactions/concurrency– Events– Persistency

Page 22: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

The Problems with Sharing

• Concurrency and threading

problems

• Session state and persistency

problems

• Distributed garbage collection

• Fault-tolerance

Page 23: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

The Goal of DPE

• Transparency across– Access– Location– Concurrency*– Replication*– Faults– Migration*– Performance– Scaling

Page 24: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Architectural Style in DPE

• Information issues– Centralized vs. replicated

• Communication Issues– Host-terminal– Client-server– Broadcast data– Batch communication– Peer-to-peer?– Others?

Page 25: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

OOP and DPE

• Natural mix– Data-hiding and encapsulation– Behavior via message-passing– Focus on interfaces and shared behavior– Various “transparencies”

• But:– No explicit call-by-reference– No answers for concurrency,

distribution, 1:n events, etc.

Page 26: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

GUIs and Frameworks

• GUI Architecture and OO patterns• Impact on the design of widget sets• UI Builders and GUI construction• VisualWorks:

– Merge of display list graphics and view layout

– All connections via adaptors– All “adornment” via wrappers– Run-time GUI construction

Page 27: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

UI Builder Semantics

• Graphical configuration• “Wiring”• Complexity and scaling• VisualWorks:

– Layout and graphical constraints– Dialogs for complex connections,

pre/post-conditions, etc.– Too complex for simple tasks, but

scales well to very complex GUIs

Page 28: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

CSCW

• Collaboration across place (physical/geographical distribution)

• Collaboration across time (off-line partnering)

• Many terms: messaging, conferencing, co-authoring, etc.

• Special vs. custom tools

Page 29: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation
Page 30: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Information Sharing Patterns• Viewing patterns• Shared access patterns• Transport patterns• Extension patterns• Migration patterns• Distribution patterns

Issues: location, access, replication, consistency, views and interfaces, etc.

Page 31: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Viewing patterns

• Multiviewing – separate semantics and presentation (MVC, etc.)

• Shared view – identify shared state as semantic (tight coupling, WYSIWIS)

• Partly-shared view – divide semantics and presentation, I and O (WYSIWIMS)

• Different outfits – configurable presentations (medium coupling)

• Sharing through objects – shared state as separate object (loose coupling)

(Fig p. 87)

Page 32: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Shared access techniques

• Transparent distribution (the goal)• Transparent object locations (using a

mediator/adaptor)• Two-tier architecture (but no implied

hierarchy, may be P2P)• Three-tier architecture (“shared

business objects”)• Splitting semantics from presentation

(many options)

Page 33: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Transport patterns

• Communicating changes to replicates – several approaches, standard fare

• Message-passing – loose coupling• State-poking – abstract/composite

setters• Meta-model – just an object! (or a

component)

(Fig p. 95)

Page 34: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Distribution patterns

• Marshalling – serialization, streaming• Messenger – proxy, forwarder• Low-level connection – ORB + IIOP• High-level connection – API based on LLC• Arriving back at the origin – blocking calls• Mother – DPE Manager

• Coping with errors – exception propagation• Providing undoable actions – no solution!

Page 35: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Extension patterns

• Template method – pluggable (or parameterized) behavior, see pluggable MVC

• Aggregation with black box – COM composites, JavaBeans

Page 36: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Migration patterns

• Proxy – adaptor? forwarder? wrapper?

• Adaptor for distribution – see above...

Page 37: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Architectural Guidelines

• Dynamic architecture• Indirect• Use metaclasses• Events and notifications• Use adaptors• Encapsulate• Migration and agents

• Are these patterns?

Page 38: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Architecture for Information-Sharing Applications• Technical/Design requirements

– OO aesthetics– Structured design rules

• Required services– Naming, trading, transaction, life-cycle– History, versioning, locking, persistency

• Applied patterns• Proposed architecture

Page 39: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Conceptual Components (p. 144)

• Comm. Infrastructure (L/HLC, RMI)

• Messaging system (sync)• Server & clients• Services (required services)• Agents, mobile objects• Client application

Page 40: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Architectural Guidelines

• Structural advice (malleable)• Recommended patterns (factory,

metaclass, adaptors, etc.)• Recommended design techniques

(transparency, mobility)• Central components (communication,

RMI, obj. manager, naming svc., transaction/migration, etc.)

Page 41: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation
Page 42: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Integration

•Easy!

(given a sophisticated enough OO development platform...)

Page 43: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

MultiGossip: A DMIB

• Implementation Issues– Naming and identifiers– RMI mechanisms (Marshalling and

protocols)– Distributed instances– Syntax (ST80)

• Examples (p. 180 ff)

Page 44: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Remote Message Objects

• Message• ID• Receiver• Do reply• Acknowledge• Timestamp

Page 45: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Evaluation of MultiGossip

• Controllability• Support for Experimentation• Extensibility/Flexibility• Active services• Malleability• Support for various media• Smooth integration into programming

environment

Page 46: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Assessment

• Useful for prototyping• Scalable• Transparent• Controllable• Safe and reliable• Development speed• Performance and latency• Coverage• Expressive• Useable

Page 47: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Evaluation Criteria

• Object sharing• Distributed error handling• Extension• Port to new version of platform• IB adaptation• Core extension

Page 48: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Building tools

• Chat• Browsers• Paint• Pong• IP (video) phone• Window copying• Async. Tools

Page 49: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Discussion

• Server vs. loose-coupling• Homogeneous protocols• Casual vs. server-based connections• Persistency• Integration with environment• MM object integration• Extending ST interaction techniques

Page 50: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Who Cares?• Who needs this? (We do!)

– Internet since 1980, WWW since 1992…– Still depressing scarcity of new applications.– CORBA, COM, etc. are still hard to use for

building truly novel (MM) applications (see, e.g., our work at CREATE)

• What’s the contribution of this work?– Important new patterns and their impact on

architecture analyzed– Design and implementation alternatives assessed

and MG decisions justified

Page 51: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Goals of this Work

• Integrated framework for information sharing

• Distribution and cooperation via agents

• Reflexive environment• Information sharing techniques• New design patterns• Use of OO techniques

Page 52: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

If he started today…

• CORBA (??)• Java?• Squeak/Nebraska• VR frameworks• HPDM/DPE/VRUT framework• Other relevant technologies

Page 53: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation

Conclusions

• This work is relevant.• It makes significant contributions to

the field.• I suggest a series of articles based

on the pattern formalisms, concrete patterns, architectural comments, and system overview.

• Bravo, Björn!

Page 54: OOFwDPfBDIS O-O Frameworks with Design Patterns for Building Distributed Information Sharing –Dissertation by Björn Eiderbäck –NADA/KTH, 3/2001 –Presentation