Examples, Lecture 4 - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Examples, Lecture 4

Description:

... with a message is currently registered to chat in the room. ... There are multiple Chat Room components available, each devoted to a different chat topic. ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 12
Provided by: Hank67
Category:
Tags: chat | examples | lecture

less

Transcript and Presenter's Notes

Title: Examples, Lecture 4


1
Examples, Lecture 4
Lecturer H. Muccini http//www.ics.uci.edu/
muccini/ics123
2
Connector
  • A connector is a building block that enables
    interaction among components
  • A connector exists if there is connection between
    components
  • It coordinates the interaction between components
  • Its main purpose is to receive information, make
    some changes to the data, ship the data to the
    final component
  • Its main purpose is not doing computation but
    connect different components. Some computations
    can be done, but only to transfer information
    from one component to another
  • A component is (or should be) independent of the
    context in which it is used to provide
    functionality
  • A connector is (or should be) completely
    dependent on the context in which it is used to
    connect components

3
Connector
Comp 2
m1
m1
Comp 1
Connector
Comp 3
Comp 4
  • The Connector
  • can decide who is going to receive m1
  • based on a selected policy
  • More reliable component, closer component, faster
    component,
  • can compress the data
  • Using different algorithms
  • can encrypt the data
  • Using different encryption algorithms

4
Connectors and Styles
  • Pipe and filter
  • Pipe that receives and forward outputs
  • Layered
  • A protocol
  • Blackboard
  • Blackboard
  • Implicit invocation
  • Event broadcast and registration infrastructure

5
A C2 Chat
  • Chat Client
  • A Chat Client is used by users to chat with other
    users in a Chat Room.
  • A user must first register with a particular Chat
    Room before chatting with other users in that
    room.
  • A User may start different Chat Clients to chat
    in multiple Chat Rooms
  • Chat Room
  • It queries the Registration Database to ensure
    that the user associated with a message is
    currently registered to chat in the room.
  • If the user is registered, the message is
    delivered to all other users registered in the
    room, and a copy of the message is filed in a
    Chat Log associated with the Room.
  • There are multiple Chat Room components
    available, each devoted to a different chat
    topic.
  • Registration Database
  • The Registration Database stores the set of
    currently registered users for each Chat Room and
    is able to remember which users are registered
    with which Chat Room.
  • There is one Registration Database in the system.
  • Chat LogĀ 
  • The Chat Log stores a record of all messages sent
    in a Chat Room.
  • There is one Chat Log associated with each Chat
    Room.

6
Chat in C2
User Registration
User in Chat
Registration Dbase
Chat Log
Chat Log
Chat Client
7
First Example
F
G
D
C
E
B
D
B
F
A
  • There is a choice between using or not component D
  • A.B.D.F.B.A
  • A.B.F.B.A.

8
First Example
F
G
D
C
E
B
A
  • There could be a very direct computation
  • A.C.G.C.A
  • A.C.G.E

9
First Example
F
G
D
C
E
B
A
  • We may have two different clients
  • A and E

10
Second Example
H
D
G
F
B
C
A
E
  • Two subsystems
  • They can work independently

11
Second Example
H
D
G
F
B
C
A
E
  • Two subsystems
  • They can work together
  • If A requires a service, and B or C cannot
    provide that service, H may provide it
  • I A requires a service, if B or C cannot provide
    it, if G is the only component that can provide
    the service, what happen?
Write a Comment
User Comments (0)
About PowerShow.com