1 / 16

CS551 UML for Distributed Objects (Chapter 2 of Engineering Distributed Objects)

CS551 UML for Distributed Objects (Chapter 2 of Engineering Distributed Objects). Yugi Lee STB #555 (816) 235-5932 yugi@cstp.umkc.edu www.cstp.umkc.edu/~yugi. Contents. Local versus Distributed Objects Method

pier
Download Presentation

CS551 UML for Distributed Objects (Chapter 2 of Engineering Distributed Objects)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS551 UML for Distributed Objects(Chapter 2 of Engineering Distributed Objects) Yugi Lee STB #555 (816) 235-5932 yugi@cstp.umkc.edu www.cstp.umkc.edu/~yugi CS551 - Lecture 5

  2. Contents Local versus Distributed Objects Method • Many will have experience with designing local objects that reside in the run-time environment of an OO programming lang. • Designing distributed objects is different! • Explain the differences. • Avoid some serious pitfalls CS551 - Lecture 5

  3. Local vs. Distributed Objects • References • Activation/Deactivation • Migration • Persistence • Latency of Requests • Concurrency • Communication • Security • Several Pitfalls are lurking here CS551 - Lecture 5

  4. Object Lifecycle • OOPL objects reside in one virtual machine. • Distributed objects might be created on a different machine. • Distributed objects might be copied or moved (migrated) from one machine to another. • Deletion by garbage collection does not work in a distributed setting. • Lifecycle needs attention during the design of distributed objects. CS551 - Lecture 5

  5. Object References • References to objects in OOPL are usually pointers to memory addresses • sometimes pointers can be turned into references (C++) • sometimes they cannot (Smalltalk,Java) • References to distributed objects are more complex • Location information • Security information • References to object types • References to distributed objects are bigger (e.g 40 bytes with Orbix). CS551 - Lecture 5

  6. Latency of Requests • Performing a local method call requires a couple of hundred nanoseconds. • An object request requires between 0.1 and 10 milliseconds. • Interfaces of distributed objects need to be designed in a way that • operations perform coarse-grained tasks • do not have to be requested frequently CS551 - Lecture 5

  7. Vector List +size():int +elementAt(i:int):Object ... +long list (in how_many:long, out l:sequence<object>, out bi:Iterator i) Iterator +next_one(out o:Object): boolean +next_n(in how_many:long, out l:sequence<object>):boolean Example: Iteration over a Sequence • Java • Distributed Objects CS551 - Lecture 5

  8. Activation/Deactivation • Objects in OOPL are in virtual memory between creation and destruction. • This might be inappropriate for distributed objects • sheer number of objects • objects might not be used for a long time • some hosts might have to be shut down without stopping all applications • Distributed object implementations are • brought into main memory (activation) • discarded from main memory (deactivation) CS551 - Lecture 5

  9. Activation/Deactivation (cont’d) Tony:Trainer BvB:Team bookGoalies object activated object deactivation CS551 - Lecture 5

  10. Activation/Deactivation (cont’d) • Several questions arise • Repository for implementations • Association between objects and processes • Explicit vs. implicit activation • When to deactivate objects • How to treat concurrent requests • Who decides answers to these questions? • Designer • Programmer • Administrator • How to document decisions? CS551 - Lecture 5

  11. Persistence • Stateless vs. statefull objects • Statefull objects have to save their state between • object deactivation and • object activation onto persistent storage • Can be achieved by • externalization into file system • mapping to relational database • object database • To be considered during object design CS551 - Lecture 5

  12. Parallelism • Execution of OOPL objects is often • sequential • concurrent (with multi-threading) • Distributed objects execute in parallel • Can be used to accelerate computations CS551 - Lecture 5

  13. Communication • Method invocations of OOPL objects are synchronous • Alternatives for distributed objects: • synchronous requests • oneway requests • deferred synchronous requests • asynchronous requests • Who decides on request • Designer of server? • Designer of client? • How documented? CS551 - Lecture 5

  14. Failures • Distributed object requests are more likely to fail than local method calls • Different request reliabilities are available for distributed objects • Clients have an obligation to validate that servers have executed request CS551 - Lecture 5

  15. Security • Security in OO applications can be dealt with at session level. • OOPL Objects do not have to be written in a particular way. • For distributed objects: • Who is requesting an operation execution? • How can we know that subject is who it claims to be? • How do we decide whether or not to grant that subject the right to execute the service? • How can we prove that we have delivered a service so as to make the requester pay CS551 - Lecture 5

  16. Key Points • Distributed objects evolved from research and development in object-oriented programming languages and distribution middleware • The Unified Modeling Language can be used to design distributed objects • Meta object models determine the characteristics of distributed objects • Designers need to be aware of differences between local and distributed objects CS551 - Lecture 5

More Related