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])

OOFwDPfBDIS

Embed Size (px)

DESCRIPTION

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]). Outline. Overview Goals & Definitions The Problems with Patterns - PowerPoint PPT Presentation

Citation preview

Page 1: OOFwDPfBDIS

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

Outline

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

Framework• Evaluation, Comments & Questions

Page 3: OOFwDPfBDIS

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

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

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

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

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

Service/Object/Agent Semantics

• Task service

• Resource manager

• Method servers(?)

• Project (meta) agents

• Weak vs. strong agency a la

Kendall

Page 9: OOFwDPfBDIS

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

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

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

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

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

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

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
Page 17: OOFwDPfBDIS

Distributed Processing Defined

• Multiple processors without shared memory(?)

• Communicate by sending messages via some network

• Focus on behavioral interfaces

Page 18: OOFwDPfBDIS

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

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

DPE Systems & Semantics

• Actors & Laws of Parallel Processing

• Concurrent OO Languages– ABCL/1– ConcurentSmalltalk

• DST/CORBA– Heavy-weight– Possibly transparent

Page 21: OOFwDPfBDIS

Required Services (BE)

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

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

Page 22: OOFwDPfBDIS

The Problems with Sharing

• Concurrency and threading

problems

• Session state and persistency

problems

• Distributed garbage collection

• Fault-tolerance

Page 23: OOFwDPfBDIS

The Goal of DPE

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

Page 24: OOFwDPfBDIS

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

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

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

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

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
Page 30: OOFwDPfBDIS

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

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

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

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

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

Extension patterns

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

• Aggregation with black box – COM composites, JavaBeans

Page 36: OOFwDPfBDIS

Migration patterns

• Proxy – adaptor? forwarder? wrapper?

• Adaptor for distribution – see above...

Page 37: OOFwDPfBDIS

Architectural Guidelines

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

• Are these patterns?

Page 38: OOFwDPfBDIS

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

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

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
Page 42: OOFwDPfBDIS

Integration

•Easy!

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

Page 43: OOFwDPfBDIS

MultiGossip: A DMIB

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

protocols)– Distributed instances– Syntax (ST80)

• Examples (p. 180 ff)

Page 44: OOFwDPfBDIS

Remote Message Objects

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

Page 45: OOFwDPfBDIS

Evaluation of MultiGossip

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

environment

Page 46: OOFwDPfBDIS

Assessment

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

Page 47: OOFwDPfBDIS

Evaluation Criteria

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

Page 48: OOFwDPfBDIS

Building tools

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

Page 49: OOFwDPfBDIS

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

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

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

If he started today…

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

Page 53: OOFwDPfBDIS

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