Download presentation
Presentation is loading. Please wait.
1
Objektorienteret netværkskommunikation Presentation: Architectures for Distributed Systems
2
Ingeniørhøjskolen i Århus Slide 2 Agenda Architectural models OOA/OOD and distributed system diff. Layering Interface Partioning & Granularity Adapting patterns for distributed usage A few words of warning: Assumed students are knowledgeable about OOA/OOD We will only look at some aspects of distributed architecture Not much literature available on this subject No textbook solutions to this problem This lecture is just for inspiration – not a dictate
3
Ingeniørhøjskolen i Århus Slide 3 Architectural models Architectural model: Description of the components of a system and the relationship between them. Describe the components of systems and their interaction; describe mapping of components to computers. Define useful patterns for the distribution of data and workload. Define the functional roles of components and the patterns of communication between them.
4
Ingeniørhøjskolen i Århus Slide 4 Basic architectural models Client-server: WWW, OO middleware, distributed systems in general Others: service, peer-to-peer, proxy, mobile code, spontaneous network Read more in Colourius et al.
5
Ingeniørhøjskolen i Århus Slide 5 Basic architectural models – multiple servers Partition set of objects or replicate set of objects
6
Ingeniørhøjskolen i Århus Slide 6 Basic architectural models – proxy server and caching Cache: Store of recently used data objects closer than the objects themselves Proxy servers increase performance and availability
7
Ingeniørhøjskolen i Århus Slide 7 Basic architectural models – peer processes
8
Ingeniørhøjskolen i Århus Slide 8 Other architectural models – mobile code, web applets a) client requests results in the downloading of applet code Web server Client Web server Applet Applet code Client b) client interacts with the applet
9
Ingeniørhøjskolen i Århus Slide 9 Other architectural models – spontaneous networking Internet gateway PDA service Music service Discovery Alarm Camera Guests devices Laptop TV/PC Hotel wireless network Easy connection and integration; limited connectivity; problems with security and privacy; discovery service with registration and lookup.
10
Ingeniørhøjskolen i Århus Slide 10 Designing Distributed Systems Use OOA/OOD (or other method) –Same procedure as with stand-alone system design –Use ”best-practices” aka ”design patterns” –BUT: beware of the pit-falls of distributed design –(Guerraoui & Fayad) Beware of “Gold Plating” –Do not use excessive amount of time on design
11
Ingeniørhøjskolen i Århus Slide 11 Basic OO Design – Use Case Driven Use Case N Actor 1 Use Case spec. “Models” the domain e.g. an Account or Sensor. System/Actor Interaction Use Case impl. Links Model & Boundry «control» «boundary» «entity» Domain Model for Use Case N Logic Domain Model from the Analysis OOA
12
Ingeniørhøjskolen i Århus Slide 12 Bruce Eckel’s ROPES Model Architecture design Scope: nodes, packages (sub systems), components (e.g. a driver DLL), tasks Mechanistic design Scope: Group of collaboratingclasses Class Node Package Component Active object Detailed design Scope: Class Class name Attributes Operations Bd. s193
13
Ingeniørhøjskolen i Århus Slide 13 Use Sub-systems for Structuring At least you should have two sub- systems: –a client –a server More sub-systems may be introduced as needed
14
Ingeniørhøjskolen i Århus Slide 14 Getting Distributed Until now – stand-alone & single process Distributed Systems are much more complex We focus only on OO systems How to make an optimal design? What belongs on the client side – and what on the server side? At least three things to consider: –Layering –Granularity issues –Adapting Design Patterns
15
Ingeniørhøjskolen i Århus Slide 15 Design by Layering Client Presentation tier –Provides a user interface to the end-users. –Thin/Rich. MVC. Server Side Presentation tier –Building a response to the Client Presentation tier. Server Side Business Logic tier –Use Case implementation. Control classes. Business logic. Server Side Domain Model tier –Domain Model. Entity classes. Enterprise Integration tier –Legacy system. Web services. Persistence tier / Resource layer –Relational Database. File-system.
16
Ingeniørhøjskolen i Århus Slide 16 Interface Partitioning & Granularity OOA/OOD teaches us to map real world model to domain model Granularity has always been an issue In stand-alone / single process systems –Should we have a fine-grained model – with one or more control classes pr use case and a detailed domain model? –Should we have a corse-grained model with only a few classes? –In distributed systems, this gets worse
17
Ingeniørhøjskolen i Århus Slide 17 Three Aspects of a Distributed Object System Granularity of Model Interface Design System Partitioning Three important aspects when producing a Distributed object Model which has impact on each other Anti-pattern: Round tripping vs. partition of resources vs. desired level of interface design resolution (some might want to map system objects 1-1 with real world objects, accounts and transactions
18
Ingeniørhøjskolen i Århus Slide 18 Using Design Patterns Provides guidelines, not actual implementation Proven track record Reusable Help you communicate your design ideas to other designers Anti-pattern: Gold Plating – spending excessive amount of time on design
19
Ingeniørhøjskolen i Århus Slide 19 Design Patterns Examples ”Classic Design Patterns”: –Singleton –Observer –Iterator –Facade –Proxy (you have already seen this) –Factory –Many others All may be used, but some must be adjusted Remember: patterns are only for inspiration –NOT dictate Lets look at a few
20
Ingeniørhøjskolen i Århus Slide 20 The Observer Pattern (GoF) Publisher Subscriber Generates a lot of network traffic even though the three subscribers resides in the same process space
21
Ingeniørhøjskolen i Århus Slide 21 Distributed version of Observer channel Subscriber Channel Publisher Only one notify message between the channel objects as opposed to the naive Observer pattern. channel Subscriber Channel Publisher Only one notify message between the channel objects
22
Ingeniørhøjskolen i Århus Slide 22 Iterator Pattern ClientIteratorCollection 1. Create iterator 2. Get next item 3. Get next item 4. ….. Generates a lot of network traffic
23
Ingeniørhøjskolen i Århus Slide 23 Distributed version of Iterator ClientIteratorCollec- tion 1. Create iterator 2. Query 3. Get next item 4. Get next item 5. ……. Result of 2. Only one call needed to transfer all objects
24
Ingeniørhøjskolen i Århus Slide 24 Façade Pattern (also GoF) Used for encapsulation and decoupling – usually one pr sub-system - Session Façade pattern, Façade at the Distribution Boundary Used for encapsulation and decoupling – usually one pr sub-system - Session Façade pattern, Façade at the Distribution Boundary The entire Client sub-system is decoupled from the server sub-system and a Client Proxy hides the complex network detail of a distributed system By using Façade pattern, only a few objects needs to be made Remote The entire Client sub-system is decoupled from the server sub-system and a Client Proxy hides the complex network detail of a distributed system By using Façade pattern, only a few objects needs to be made Remote
25
Ingeniørhøjskolen i Århus Slide 25 Factory Pattern How to create objects? Can not instantiate We need a staging point – a Factory object Distributed version: Object Factory –For creating, finding & managing both DTO and remote objects –Often seen in conjunction with façade, replicating objects & proxy
26
Ingeniørhøjskolen i Århus Slide 26 Other Many others available. Read more in e.g. CORBA Design Patterns (Mowbray & Malveau) –Replication –Agent –Naming –Trader –Object Request Broker –Profile J2EE Design Patterns (Kaplan & Crawford) –Singleton –Front Controller –Dispatcher
27
Ingeniørhøjskolen i Århus Slide 27 Remember You have been presented with some basic input for the design of distributed systems This is only for inspiration not a dictate Even though we have the ideals of transparency – one must remember the differences that does exist
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.