1 / 69

System Design: Architectures and Archetypes ( Shlaer-Mellor Method)

System Design: Architectures and Archetypes ( Shlaer-Mellor Method). by Steve Mellor. In general. Speaker Stephen J. Mellor (Project Technology inc.) worked at CERN (accelerator control systems) now Senior Vice President of Project Technology Presentation (very) interesting

Download Presentation

System Design: Architectures and Archetypes ( Shlaer-Mellor Method)

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. System Design: Architectures and Archetypes(Shlaer-Mellor Method) by Steve Mellor

  2. In general • Speaker • Stephen J. Mellor (Project Technology inc.) • worked at CERN (accelerator control systems) • now Senior Vice President of Project Technology • Presentation • (very) interesting • detailed theory • but few examples

  3. Presentation Overview Architectural Styles Shlaer-Mellor Method Subject matters Executable domain models Translation Software Architecture Executable domain models Translation Specifying the architecture System construction

  4. Architectural Styles Architectural Styles Shlaer-Mellor Method Subject matters Executable domain models Translation Software Architecture Executable domain models Translation Specifying the architecture System construction

  5. Architectural Styles Architectural style is the particular approach to building a software architecture Most common architectures in real-time and embedded systems: Monitor and Control Systems Transporter Systems Transactions Systems

  6. Monitor and Control Systems Definition: collection of interrelated control loops (control loop: reads in values, computes desired value, compares, writes values) example: chemical plant, car, airplane, ... characteristics: often hard deadlines data represents `real world` (or part of it) data must be up to date significant computation on data

  7. Transporter Systems definition: systems that move data from one place to another examples: telephony, telemetry, ... characteristics: generally little computation on data itself high throughput requirements generally reponse time requirements management of buffers have persistent application data describing routing

  8. Transaction Systems definition: systems that maintain a picture of a real or hypothetical world, accepting requests to query or update that picture examples: on-line banking, reservation systems, ... characteristics: considerable persistent application data variable response times significant throughput requirements

  9. Hybrids Of course ... ... most systems are hybrid

  10. Selecting an Architecture Christopher Alexander: form and context In terms of software: the form (= software architecture) is determined by its context (=properties of the `environment`)

  11. Context of a System The External World rate and volume of events in the external world normal rates burst rates its natural periodicities how frequently data values change

  12. Context of a System Non-Localized Requirements continuous operation? fault tolerance/recovery personnel and equipment safety Business Constraints number/location of processors upward compatability hardware/software platforms

  13. Context of a System The context of a system also shows performance requirements detect the `High Spots` Identify critical threads Identify worst case bursts Identify the required processing for each ... = quantitative requirements

  14. Shlaer-Mellor Method • Architectural Styles • Shlaer-Mellor Method • Subject matters • Executable domain models • Translation • Software Architecture • Executable domain models • Translation • Specifying the architecture • System construction

  15. Shlaer-Mellor Method Shlaer-Mellor method is based on separation of subject matters I/O, User Interaction, Application domain, Software Architecture specification of (executable) model for each subject matter translation of these models into code

  16. Subject Matters Shlaer-Mellor method is based on separation of subject matters I/O, User Interaction, Application domain, Software Architecture specification of (executable) model for each subject matter translation of these models into code

  17. Subject Matters • different categories of subject matters (domains) • application domain (visible to end user) • services domain (more general domains) • software architecture domain (data, control, structures and time) • implementation domain (OS and programming languages) • separate teams can work on separate domains

  18. Subject Matters • example: chemical plant Chemical Plant domain end user domain I/O User Interface services domain Alarm Service Software Architecture s.a. domain Unix C++ impl. domain

  19. Model Specification Shlaer-Mellor method is based on separation of subject matters I/O, User Interaction, Domain1, Software Architecture specification of (executable) model for each subject matter translation of these models into code

  20. Model Specification • Special focus on • end user domain: • specification of an executable model • software architecture domain • consists out of an execution engine • and a set of archetypes • both domains should be strictly separated

  21. Model Specification On Phone Hook Translation Off Hook Application Model public class A { ... } Architecture - execution engine - set of archetypes code

  22. Translation into Code • Shlaer-Mellor method is based on • separation of subject matters • I/O, User Interaction, Application domain, Software Architecture • specification of (executable) model for each subject matter • translation of these models into code

  23. Translation into code • The translation is done with archetypes • specify how model concepts are translated to code • In fact we get some form of a model compiler • a `standard` compiler generates assembler from source code • a `model` compiler generates source code from a model (for example in UML)

  24. Software Architecture • Architectural Styles • Shlaer-Mellor Method • Subject matters • Executable domain models • Translation • Software Architecture • Executable domain models • Translation • Specifying the architecture • System construction

  25. The Software Architecture • Software Architecture is • the abstract organization of the software • Proclaims and enforces system-wide rules for the organization of • data • control • structures • time

  26. Data • The software architect prescribes storage schemes • tables or arrays • trees, linked lists, ... • ... • And how to access them • direct access by name or by pointer? • indirect access (encapsulation)?

  27. Control • The software architect prescribes control • what causes a task to execute? • what causes a task to relinquish control? • what`s the next function to execute in a taks? • how to coordinate multiple tasks accessing common data to ensure consistency? • Strongly dependent on organization of data

  28. Structure • The software architect prescribes how to package code and data (= the application) in: • tasks • functions • shared data areas • classes • and the allocation criteria for allocating parts of the application to these structures

  29. Time • The software architect prescribes how to provide time-related services: • absolute time • relative time

  30. Executable domain models • Architectural Styles • Shlaer-Mellor Method • Subject matters • Executable domain models • Translation • Software Architecture • Executable domain models • Translation • Specifying the architecture • System construction

  31. Executable Domain Models • Notation chosen: UML • Purpose: define an executable model for each subject matter • Three kinds of models • Essential models: capture the complete scope and behavior of the system • Derived models: additional views of the essential models • Auxiliary Models: augment the essential models

  32. Executable Domain Models • Essential models: • Package Diagram • Class Diagram • State Diagram • Processing Spec • Example used: Chemical plant • Recipes: how can a substance be made • Batch: an amount of identical substances to make • Temperature Ramp: status for one substance in a batch

  33. Three steps • Create a class diagram • Create a state diagram for each class • Associate actions to states

  34. Class Diagram Example: chemical plant

  35. Lifecycles

  36. Actions Specifiy the logic for each state`s action Creating Do Temp. Ramp(Batch ID, End Time, End Temp) Entry/ BatchID, EndTime, EndTemp >> TempRamp; CurrentTime > Self.StartTime; Self -> [R4] CookingTank.ActualTemp > Self.StartTemp; Signal Start Controlling(Ramp ID); Creating Start Controlling (Ramp ID)

  37. An Executable Model

  38. How to capture the executable model? use a model repository The structure of this repository is defined by a metamodel Capturing the Models

  39. Metamodel

  40. Metamodel

  41. Metamodel

  42. Translation • Architectural Styles • Shlaer-Mellor Method • Subject matters • Executable domain models • Translation • Software Architecture • Executable domain models • Translation • Specifying the architecture • System construction

  43. Translation • To generate code • traverse the repository (= MetaModel Database) • and output text • using archetypes

  44. Archetype Language

  45. Archetype Language • Generation of code • text not preceded by `.` is copied as is • text preceded by `.` are commands • select • for • if • else • ...

  46. Archetype Language

  47. Archetype Language

  48. Archetype Language

  49. Archetype Language

  50. Archetype Language

More Related