Download presentation
Presentation is loading. Please wait.
Published byBertha Ryan Modified over 9 years ago
1
HW2 INTRODUCTION CSCI-578 Spring 2013
2
2 Implicit Invocation Indirectly or implicitly calls to methods and interfaces in response to an event or a received message Publish/Subscribe Event-based
3
3 Publish/Subscribe Subscribers register/deregister to receive specific messages or specific content. Publishers broadcast messages to subscribers either synchronously or asynchronously.
4
4 Pub-Sub LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
5
5 Event-Based Style Independent components asynchronously emit and receive events communicated over event buses Components: Independent, concurrent event generators and/or consumers Connectors: Event buses (at least one) Data Elements: Events – data sent as a first-class entity over the event bus Topology: Components communicate with the event buses, not directly to each other. Variants: Component communication with the event bus may either be push or pull based. Highly scalable, easy to evolve, effective for highly distributed applications.
6
6 Event-based LL Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
7
DEB Systems Typically based on message-oriented middleware (MOM) Components via implicit invocation Producers and consumers Message interfaces Message sink Message source
8
Message Types Nominal Mapped to statically checkable PL types Subject-Based “/Weather/Germany/Berlin” Attribute-Based Key-Value Pairs
9
Attribute-based Messages Key-value pairs Key: Name, Value: PicUpdate Key: Sum, Value: 50 Attribute Reading Attribute Adding or Modifying
10
What Makes It Hard? Ambiguous Interfaces State-based dependencies void onMessage(Message msg) { String type = msg.getJMSType(); if (type.equals( “On/Off”) ) {... } else if (type.equals(“PicRequest”)) {... } } MessageMessage DispatchDispatch
11
Inter-Component Message Dependence Classifying Message Dependences
12
Inter-Component Message Dependence Intra-Component Dependence Control-Flow-Based
13
Inter-Component Message Dependence Intra-Component Dependence Control-Flow-Based Data-Flow-Based Classifying Message Dependences
14
HW2 Maintenance Tasks Description of changes Message-based dependencies Why The applications and MOM platforms Some tools
15
STOX in general Monitoring Stock changes and alerting customers Three Important part: Trigger List Absolute limit: Triggered if the price of the respective stock is either below or above a specified range Relative limit: Triggered if the price of a given stock has increased or decreased a given number of percentages within a given time interval. Portfolio depicts detailed information about the stocks that a user currently holds Charts visualize the price of a certain stock over time
16
STOX Architecture
17
17 KLAX Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
18
18 KLAX in C2 Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.
19
19 C2 Style An indirect invocation style in which independent components communicate exclusively through message routing connectors. Strict rules on connections between components and connectors induce layering.
20
20 C2 Style (cont’d) Components: Independent, potentially concurrent message generators and/or consumers Connectors: Message routers that may filter, translate, and broadcast messages of two kinds: notifications and requests. Data Elements: Messages – data sent as first-class entities over the connectors. Notification messages announce changes of state. Request messages request performance of an action. Topology: Layers of components and connectors, with a defined “top” and “bottom”, wherein notifications flow downwards and requests upwards.
21
c2.fw framework MOM platform that KLAX is built from Enforces C2 Style Includes C2 components C2 connectors Messages
22
SPECjms2009 JMS-based MOM TextMessages, ObjectMessages, StreamMessages or MapMessages Pub/sub (topics) vs. P2P messages (queues) Performance benchmarks Supply chain of a supermarket company Documentation provided
23
The Supply Chain Simulation
24
Use of Regular Expressions AbsLimitEvent*
25
Use of Regular Expressions(Cont.) publish(.*AbsLimitEvent.*)
26
Unix Commands find Finds files and directories xargs Reads from standard input Builds arguments Calls command grep Regular expressions
27
Example
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.