0% found this document useful (0 votes)
29 views

Module 2

Uploaded by

sumanthpopuri67
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Module 2

Uploaded by

sumanthpopuri67
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 80

MODULE 2

COMMUNICATION IN DISTRIBUTED SYSTEM


System Model – Inter process Communication – the API for internet protocols –
External data representation and Multicast communication. Network
virtualization: Overlay networks. Indirect Communication: Group
communication – Publish-subscribe systems – Message queues – Shared
memory approaches.
SYSTEM MODELS
A system model describes the various models for the system to function efficiently that is used
for real world application.
System model is categorized into
• Architectural model
• Fundamental model
• Physical model
• An architectural model is concerned with the placement if its components and the
relationships between them.
• client-server systems
• peer-to-peer systems
SYSTEM MODELS
• Systems that are intended for use in real-world environments should be designed to function
correctly in the widest possible range of circumstances and in the face of many possible
difficulties and threats.
Difficulties and threats for distributed systems
• Widely varying modes of use: The component parts of the systems are subject to wide variation
in workload.
• Wide range of system environments: A distributed system must accommodate heterogeneity.
• Internal problems: Conflicting data updates, hardware and software failure.
• External threats: Attack on data integrity and secrecy, denial of service attacks.
SYSTEM MODELS
1.ARCHITECTURAL MODELS
Architectural models describe a system in terms of computational and communication tasks
performed by computational elements.
Two types of architectural models are client server model and peer to peer model.
An Architectural model of a distributed system simplifies and abstract the function of the
individual components of a distributed system and their interrelationships.
The overall goal is to ensure that the structure will meet present and likely future demands on
it.
Major concerns are to make the system reliable, manageable, adaptable and cost effective.
This model describes the structures of system in which the process identifies the
responsibilities and assesses their workloads. It also finds the reason for failures.
SYSTEM MODELS
Architectural Elements
• Objects
• Components
• Web services
Processes are the entities that are communicating in the distributed system.
OBJECTS-objects have been introduced to enable and encourage the use of object oriented
approaches in distributed system
Objects are the basic entities and components are needed for computations.
Objects are accessed via interfaces with an associated interface definition language(IDL)
providing a specification of the methods defined an object.
SYSTEM MODELS
Components
Number of significant problems have been identified with distributed objects and the use of
component technology has emerged as a direct response to such weaknesses.
Components resemble objects in that they offer problem oriented abstraction for building
distributed system and are also accessed through interfaces.
Component based middleware often provides additional support for key areas such as
deployment and support for server side programming.
Web Services:
Web services represent the third important paradigm for the development of distributed system.
Web services are closely related to objects and components.
Web services are intrinsically integrated into World wide web, using web standards to represent
and discover services.
SYSTEM MODELS
Placement:
Placement needs to take into account the patterns of communication between entities, the
reliability of given machines and their current loading the quality of communication between
different machines.
Placement strategies are
• Mapping of services to multiple servers;
• Caching;
• Mobile code- ability to run programs/code/objects from one machine to another.
• Mobile Code- Software programs or parts of programs obtained from remote systems,
transmitted across a network, and executed on a local system without explicit installation or
execution by the recipient.
• Mobile agents- migrate data from one environment to another by keeping the data intact.
SYSTEM MODELS
Layered Architecture
Platforms:
Lowest level layers which provide services to the above layers.These low level layers bring the
systems programming interface up to a level that facilitates communication and coordination
between process.
Eg:IntelX86/Windows,IntelX86/Solaris.
Middleware:
Middleware provides programming model and it is represented by processes or objects in a set of
computers which interact with each other.
Building blocks of software components are constructions.
Functions of middleware include group communication,event notification,data replication and
RPC.
Object oriented middleware standards are CORBA,Java RMI etc.,
SYSTEM MODELS
Client Server Model:
Client interact with the server processes in separate host computers to access shared resources
that they manage.
Ex:Web servers
Client server model is modified by
1. Partition or replication of data
2. Caching of data
3. Use of mobile code and mobile agents
4. Add/remove mobile devices
SYSTEM MODELS
Variants of client server model
The problem of client server model
• Placing a service in a server at a single address is complex
• Does not scale beyond the capacity of computer host and bandwidth of network connections.
Factors include
1. Proxy servers and caches
2. Mobile agents
3. Network computers
4. Thin clients
5. X-11 window system
6. Mobile devices
Peer to Peer Model

All processes in task play similar roles, interacting cooperatively as peers without any
distinction between client and server process.
It aims to exploit the resources in large number of participating computers for fulfillment of
task.
Each object is replicated in several computers to further distribute the load.
Eg: Music sharing system Napster.
SYSTEM MODELS
2.PHYSICAL MODEL:
Physical model deals with the types of computers and the devices which form a system with
their interconnectivity but the technology behind it is hided.
2.1 Baseline Physical Model
Hardware or software components located at networked computers communicate and
coordinate their actions only by passing messages.
This leads to a minimal physical model of a distributed system as an extensible set of
computer nodes interconnected by a computer network for the required passing of messages.
2.2 Early distributed systems
System emerged in the 1980’s with local area network around 10 to 100 nodes
interconnected with limited network connectivity and supported a small range of services
such as shared local printers and file servers as well as email and file transfer across the
Internet.
Advantages:
Homogenous
Openness
Disadvantages:
Qos
2.3 Internet-scale distributed systems

Emerged in 1990’s in response to the dramatic growth of internet during this time.
Ex:Google search Engine(1996)
Globally established the extensible set of nodes interconnected by networks for global
organization and across industries.
Advantages:
Heterogenity
QoS
Middleware technology like CORBA
2.4 Contemporary distributed systems

Above systems, nodes were typically desktop computers and therefore relatively static
(that is, remaining in one physical location for extended periods), discrete (not embedded
within other physical entities) and autonomous (to a large extent independent of other
computers in terms of their physical infrastructure)
In this contemporary distributed systems
• Emergence of Mobile computing
• Emergence of Ubiquitous and pervasive computing
• Emergence of Cloud computing
2.5 Distributed systems of systems

• The emergence of ultralarge- scale (ULS) distributed systems.


• Sensor networks deployed to monitor the state of various environmental parameters relating
to rivers, flood plains ,tidal effects and so on.
• A system of systems can be defined as a complex system consisting of a series of subsystems
that are systems in their own right and that come together to perform a particular task or
tasks.
Ex:Flood Prediction
3.FUNDAMENTAL MODELS:
Fundamental models are concerned with a more formal description of the properties that are
common in architectural models.
All Architectural models are composed of processes that communicate with each other by
sending messages over a computer network to achieve performance and reliability of process
and networks.
The purpose of fundamental model is
• To make assumption about the system that is modeled.
• Make generalization about the model whether the possible or not based on the assumptions.
3.1 Interaction model

• Computation occurs within processes; the processes interact by passing


messages, resulting in communication (information flow) and coordination
(synchronization and ordering of activities) between processes.
• Eg.Voice conferencing

Drawbacks:
• Communication performance is often a limiting characteristic.
• It is impossible to maintain a single global notion of time.
Performance of Communication Channels

• Latency :
The delay between the start of a message’s transmission from one process and the beginning of
its recipient by another.
The latency includes:
• The time taken for the first of a string of bits transmitted through a network to reach its
destination.
• The delay in accessing the network, which increases significantly when the network is
heavily loaded.
• The time taken by the operating system communication services at both the sending and the
receiving processes,
Bandwidth:

• The bandwidth of a computer network is the total amount of information that can be transmitted over it
in a given time. When a large number of communication channels are using the same network, they
have to share the available bandwidth.
• JITTER: variation in the time taken to deliver a series of messages. Jitter is relevant to multimedia data.
For example, if consecutive samples of audio data are played with differing time intervals, the sound
will be badly distorted.
Two variants of the interaction model

Synchronous Distributed system:


• The time to execute each step of a process has known lower and upper bounds.
• Each message transmitted over a channel is received within a known bounded time.
• Each process has a local clock whose drift rate from real time has a known bound.
Asynchronous distributed systems:
• Process execution speeds – for example, one process step may take only a picosecond and
another a century; all that can be said is that each step may take an arbitrarily long time.
• Message transmission delays – for example, one message from process A to process B may be
delivered in negligible time and another may take several years.
• Clock drift rates – again, the drift rate of a clock is arbitrary.
3.2 Failure Model
• Fault
• Failure
Omission Failure:
• The faults classified as omission failures refer to cases when a process or communication
channel fails to perform actions.
Process Omission failure:
• The chief omission failure of a process is to crash. When we say that a process has crashed
we mean that it has halted and will not execute any further steps of its program ever.
• A process crash is called fail-stop if other processes can detect certainly that the process
has crashed.
• Fail-stop behavior can be produced in a synchronous system if the processes use timeouts
to detect when other processes fail to respond and messages are guaranteed to be
delivered.
Communication Omission Failure
• Consider the communication primitives send and receive. A process p performs a send by
inserting the message m in its outgoing message buffer. The communication channel
transports m to q’s incoming message buffer.
• Process q performs a receive by taking m from its incoming message buffer and delivering it.
The outgoing and incoming message buffers are typically provided by the operating system.
• Send Omission Failure
• Receive Omission Failure
Arbitrary failures(Byzantine failure):
• An arbitrary failure of a process is one in which it arbitrarily omits intended processing steps
or takes unintended processing steps.
• It cannot be detected by seeing whether the process responds to invocations, because it
might arbitrarily omit to reply.
Ex: Message may be corrupted or received more than once.
Timing Failure
Masking Failure
• Class of failure Affects Description
• Fail-stop Process Process halts and remains halted. Other processes may detect this state.
• Crash Process Process halts and remains halted. Other processes may not be able to
detect this state.
• Omission Channel A message inserted in an outgoing message buffer never arrives at the
other end’s incoming message buffer.
• Send-omission Process A process completes a send operation but the message is not put in its
outgoing message buffer.
• Receive omission Process A message is put in a process’s incoming message buffer, but that process
does not receive it.
• Arbitrary(Byzantine)Process Process/channel exhibits arbitrary behaviour: it may send/transmit
arbitrary messages at arbitrary times or commit omissions; a process
may stop or take an incorrect step.
Reliability of one-to-one communication
• Reliable communication is defined in terms of validity and integrity as
follows:
• Validity: Any message in the outgoing message buffer is eventually
delivered to the incoming message buffer.
• Integrity: The message received is identical to one sent, and no
messages are delivered twice.
SYSTEM MODELS
3.1 Interaction model- interaction is taking place by means of message passing between processes.
It is helpful in analysis and design phases.
Multiple server processes may cooperate with one another to provide a service.
Eg.Voice conferencing
It is impossible to maintain a single notion of time.

3.2 Failure model-Failure occur if the system operation is disturbed which may be in individual system or network.
This model provides solution for analysis and design to rectify faults.
Failure occurs in processes and communication channel.
Omission Failure
Process and communication channel fail to perform actions which leads to crash and Timeouts helps to detect failure.
Class of Failure:
Fail stop, Crash, Omission, Send omission, receive omission , Arbitrary(BYZANTINE)
Send----- outgoing buffer--------incoming buffer------receiver
SYSTEM MODELS
3.3 Security Model
The security of distributed system can be achieved by securing the processes and chennels used for interaction
and by protecting the objects against unauthorized access.
System will get attacked by means of internal or external agents.
Security model provides solution for those attacks by means of defining and classifying the attacks to made the
system to resist such attacks.
Threats are classified as:
• Threats to processes
• Threats to communication channels
• Denial of service.
• Mobile code
Defeating security threats:
• Cryptography and shared secrets-
• Authentication.
A secure channel has the following properties:
A secure channel ensures the privacy and integrity of the data transmitted across it.
Each message includes a physical and logical time stamp to prevent messages from being
replayed or reordered.
Each of the process knows the identity of user.
Protecting objects
• The users can run client programs that send invocations to the server to perform operations
on the objects. The server carries out the operation specified in each invocation and sends
the result to the client.
• Objects are intended to be used in different ways by different users. For example, some
objects may hold a user’s private data, such as their mailbox, and other objects may hold
shared data such as web pages.
• To support this, access rights specify who is allowed to perform the operations of an object –
for example, who is allowed to read or to write its state.
• Authority is called as Principal either the user or the process or server.
ENEMY:
• Attacks can be made simply by using a computer connected to a network to run a program
that reads network messages addressed to other computers on the network, or a program
that generates messages that make false requests to services, purporting to come from
authorized users.
• The attack may come from a computer that is legitimately connected to the network or from
one that is connected in an unauthorized manner.
The threats from enemy include:
• Threats from processes
• Threats to communication channels.
Threats to processes:
• A process that is designed to handle incoming requests may receive a message from any
other process in the distributed system, and it cannot necessarily determine the identity of
the sender.
• Servers
• Clients
Threats to communication channels:
• An enemy can copy, alter or inject messages as they travel across the network and its
intervening gateways.
Drawbacks:
Privacy
Integrity
SYSTEM MODELS
World Wide Web consortium (W3C) defines a web service as: a software application identified
by a URI, whose interfaces and bindings are capable of being defined, described and discovered
as XML artifacts.
A web service supports direct interaction with other software agents using XML-based
message exchanges via internet based protocols.

Types of Communication Paradigm:


Interprocess communication
Remote invocation
Indirect communication
INTERPROCESS COMMUNICATION
Refers to low level support for communication between processes in distributed systems
including message passing primitives, direct access to the API offered by internet protocols and
support for multicast communication.
Client Server Communication:
The request messages and reply messages be the Basis for remote method invocation(RMI) or
Remote Procedure call(RPC).
Group Communication:
A message is forwarded to many groups than one processes is group communication.
Request reply protocols are designed to support client server communication in the form of
either RMI or RPC.
Group multicast is a form of IPC in which one process in a group of processes transmits the same
message to all members of the group.
IPC example:
P1 is the process which sends data to process p2 over the communication network.
Here if p1 and p2 are individual process where one process sends data to other process is
UNICAST.
If one process sends data to group of process –MULTICAST.
Primitive Operation of IPC:
SEND-send data to other process
RECEIVE-receive data from sending process.
CONNECT-Connection oriented transmission.
Logical transmission is established between sending and receiving process.
DISCONNECT- used to break the connection made by connect operation.
EVENT SYNCHRONIZATION:
This allows process to execute independently without knowing the process going on in other
end.
Blocking is used to achieve this event synchronization.
Blocking operation is called synchronization
Non blocking operation is called Asynchronous operation.
TIMEOUTS:
Timeouts is used to set time period for blocking i.e. how long the process can be blocked.
Program may spawn a child process i.e. threads to issue blocking operation.
Parent process will proceed further.
Indefinite blocking results in deadlock.
IPC Paradigms:
Remote procedure/method
Socket API
Data transmission
IPC protocols:
Request response protocol
Connection oriented vs connectionless communication- two process make connection establishment before
data transmission where as in connectionless data is exchanged independently.
Text based protocol- use character – strings form to exchange request response.
Eg.FTP,HTTP,SMTP.
Steps in data marshalling:
• Serializing the data structures
• Convert data values to an external or network data.
API for internet protocols
Two operations takes place in communication send and receive.
1.Synchronous and asynchronous communication.
Synchronous-both sender and receiver synchronize for every arrival.
Asynchronous-the use of send operation is non blocking and the receive operation can have both blocking and
non blocking variants.
2.Message Destination
A local port is a message destination within a computer, specified as a integer.
A port has an exactly one receiver but can have many senders.
3.Communication Reliability
Message service is reliable if messages are guaranteed to be delivered with few number of packets being
dropped or lost.
For integrity, messages must arrive uncorrupted and without duplication.
4.Ordering is needed for correct delivery-messages should be delivered in the same order in which we send.
SOCKETS:
Socket is an end point communication
Processes in OS can send and receive messages through a socket.
Sockets need to be bound to a port number and an internet address in order to send and
receive messages.
Each socket has a TCP or UDP protocol.
Messages sent to some internet address and port number can only be received by a process
using a socket that is bound to this address and port number.
TCP and UDP use the socket abstraction which provides endpoint for communication.
IPC perform transmission of a message between a socket in one process and a socket in
another process.
SOCKETS and PORTS
Steps to create UDP:
• Create a socket
• Binding port and local internet address socket
• Returns internet address and port of sender along with message.
UDP DATAGRAM COMMUNICATION:

ISSUES:
1.Message size:
IP allows messages upto 216 bytes.
Application requiring messages larger than the maximum it should fragment.
If arriving message is too big for array allocated to receive message, truncation occurs.

2.Timeouts
• The receive that blocks forever is suitable for use by a server that is waiting to receive requests from its
clients. But in some programs, it is not appropriate that a process that has invoked a receive operation
should wait indefinitely in situations where the sending process may have crashed or the expected
message may have been lost.
• Timeouts is used to set time period for blocking i.e. how long the process can be blocked.
• Program may spawn a child process i.e. threads to issue blocking operation.
• Parent process will proceed further.
• Indefinite blocking results in deadlock.
3.Blocking
Send: non blocking upon arrival message is placed in a queue for the socket that is bound to the destination port.
Receive: blocking preemption by timeout possible and if process wishes to continue while waiting for packet,use
separate thread.
UDP datagram suffer from following failures like omission failure,messages may be dropped occasionally and
ordering.
4.Receive from any
UDP Communication properties:
• No guarantee of order preservation.
• Message loss and duplications are possible.

FAILURES OF UDP:
Omission failure
Ordering
TCP stream communication:
Connection oriented protocol
Characteristics include:
• Size of message
• Lost message
• Flow control
• Message destinations
Services run over TCP connection are:
• HTTP, FTP ,Telnet, SMTP
Issues related to stream communication:
• Matching of data items
• Blocking
• Threads
Features of TCP connection:
Connection oriented
Reliability
Handles lost packets
Handles packet sequencing
Handles duplicated packets
Server socket- It is used to create a socket at server port to listen for connect request from
clients.
Socket- It is used by a pair of processes with a connection. The client uses a constructor to
create a socket and connect it to the remote host and port of a server.
It provides method for accessing input and output streams associated with a socket.
EXTERNAL DATA REPRESENTATION.
The information stored in running program is represented as data structures, whereas the information
in messages consists of sequence of bytes.
The data structure must be converted to a sequence of bytes before transmission and rebuilt on arrival.
Marshalling and Unmarshalling
Marshalling is the process of taking a collection of data items and assembling them into a form for
transmission of message.
Unmarshalling is the process of disassembling a collection of data on arrival to produce a equivalent
collection of data items at the destination.
Three approaches to external data representation and marshalling are:
• CORBA
• Java’s object serialization
• XML
• CORBA describes a messaging mechanism by which objects distributed
over a network can transfer messages with each other irrespective of the
platform or language used to create those objects.
• In Java remote method invocation (RMI), both objects and primitive data
values may be passed as arguments and results of method invocations.
• XML is used to enable clients to communicate with web services and for
defining the interfaces and other properties of web services.
• The marshalling and unmarshalling activities are intended to be carried
out by a middleware layer without any involvement on the part of the
application programmer.
• The information stored in running programs is represented as data structures.
• In a distributed system information in messages transferring between
components consists of sequences of bytes.
• To communicate any information these data structures must be converted to a
sequence of bytes before transmission. Also in the arrival of messages, the data
should be re-converted into its original data structure.
• To effectively communicate these different types of data between computers
there should be a way to convert every data to a common format.
• External data representation is the data type that act as the intermediate data
type in the transmission.
MULTICAST
Multicast is Communication of One-to-Group of devices, where group is created based on some
criteria.
Each process in a group can send and receive message.
A message sent by any process in the group can be received by each participating process in
the group.
Multicast operation is an operation that sends a single message from one process to each of the
members of a group of processes.
In an application or network service which makes use of multicasting, a set of processes form a
group, called a multicast group.
Provides no guarantees about message delivery or ordering.
IP Multicast

• IP multicast is built on top of the Internet Protocol (IP).


• IP multicast allows the sender to transmit a single IP packet to a set of computers that form a
multicast group.
• The sender is unaware of the identities of the individual recipients and of the size of the group.
• A multicast group is specified by a Class D Internet address– that is, an address whose first 4
bits are 1110 in IPv4.
• The membership of multicast groups is dynamic.
• It is possible to send datagrams to a multicast group without being a member.
• At the application programming level, IP multicast is available only via UDP.
Characteristics of Multicast:
• Fault tolerance based on replicated services
• Discovering services in spontaneous networking
A replicated service consists of a group of members.
Client requests are multicast to all the members of the group, each of which performs an identical operation.
Even if one fails the clients can be still served
Multicast messages can be used by servers and clients to locate available discovery services in order to
register their interfaces or to look up the interfaces of other services in the distributed system.
• Better performance through replicated data.
Data are replicated to increase the performance of a service.
• Propagation of event notifications.
Multicast to a group may be used to notify processes when something happens.
Multicast application examples:
• Financial services- Delivery of news, stock quotes, financial indices, etc
• Remote conferencing/e-learning - Streaming audio and video to many participants (clients,
students)
• Interactive communication between participants
• Data distribution
Network Virtualization
• An overlay network is a virtual network of nodes and logical links, which are built on top of an existing network.
• Using overlay networks, multiple layers of network abstraction can be created to run virtualized network layers, which are
supported by a physical infrastructure.
• Overlay network offers:
I. A service that is tailored towards the needs of a class of application or a particular higher level service. (eg: multimedia
content distribution).
II. More efficient operations in a given networked environment. (eg: routing in an adhoc network).
III. Additional features. (eg: multicast or secure communication)
Advantages:
They enable new network services to be defined without requiring changes to the underlying network.
Multiple overlays can be defined as more open and extensible network architecture.
Network Virtualization
Types of Overlay
Tailored for Application needs
• Distributed hash table
• Peer to peer file sharing
• Content distribution networks
Tailored network style
• Wireless adhoc network
• Disruption tolerant network
Additional features:
• Multicast
• Resilience
• Security
Network Virtualization
SKYPE :An example of overlay network
Skype is a peer to peer application offering voice over IP.
Advanced functionality can be provided in an application specific manner without modification
of the core architecture of the internet.
Skype is a virtual network in that it establishes connections between people.
It includes instant messaging, video conferencing and interfaces to the standard telephony
service through skype in and skype out.
Skype Architecture
User connection
Search for users
Voice connection
Network Virtualization
INDIRECT COMMUNICATION
Indirect communication is defined as a communication between entities in a distributed
system through an intermediary with no direct coupling between the sender and receiver.
Two key properties stemming from the use of an intermediary:
• Space uncoupling: in which sender does not know or need to know the identity of receiver
and vice versa.
• Time uncoupling: Sender does not need to know the identity of the receiver, sender and
receiver can have independent lifetimes.
INDIRECT COMMUNICATION
• Group communication
• Publish-Subscribe
• Message queues
• Shared memory
Direct Communication:
• Client Server Communication
• Space Coupling-Examples
• Message Passing
• Remote invocation
INDIRECT COMMUNICATION
GROUP COMMUNICATION
Group communication offers a service whereby a message is sent to a group and then this
message is delivered to all members of the group.
Sender is not aware of the identities of the receivers.
Possible implementation over IP multicast (or an equivalent overlay network), adding value in
terms of
• Managing group membership
• Detecting failures and providing reliability and ordering guarantees
Programming Model
• Group with associated group membership, whereby processes may
join or leave the group.
• Processes can then send a message to this group and have it
propagated to all members of the group with certain guarantees in
terms of reliability and ordering.
GROUP COMMUNICATION SERVICES:
• Closed group and Open group
• Overlapping and Non Overlapping
• Synchronous and asynchronous systems
INDIRECT COMMUNICATION
Implementation Issues:
Reliability and ordering in multicast:
• Validity,Integrity,Agreement
ORDERING:
FIFO ordering
Casual Ordering
Total Ordering
GROUP MEMBERSHIP MANAGEMENT: (4 Main Tasks)
• Providing an interface for group membership changes
• Failure detection
• Notifying members of group membership changes
• Performing group address expansion
INDIRECT COMMUNICATION
PUBLISH SUBSCRIBE SYSTEM
Publishers generate event data and publishes them.
Subscribers : Subscribers submit their subscriptions and process the events received.
P/S service: It’s the mediator/broker that filters and routes events from publishers to interested
subscribers.
Information has been referred to as Notifications.
Notification management system that maintains a database with all publishers and subscribers.
Deliver events efficiently to all subscribers that have filters that match the events
• –Security
• –Scalability
• –Failure handling
• –Quality of Service (QoS)
INDIRECT COMMUNICATION
Applications
• Financial information systems
• Live feeds of real-time data
–RSS feeds
• Cooperative working
–Events of shared interests
• Ubiquitous computing
–Location services
• Monitoring applications
–Network monitoring, internet of things
Dealing Room System
Programming model

F-filter
E-events
Characteristics of publish subscribe systems
• Heterogeneity
• Asynchronicity
Four Schemes:
• Topic based
• Channel Based
• Content based
• Type based
IMPLEMENTATION ISSUES:
Flooding
Filtering
Advertisement
Rendezvous
Message Queue
Message queue provide an asynchronous communication protocol in which the sender and receiver of
messages don’t need to interact at the same time-messages are held in queue until the recipient
retrieves them.
The basic architecture of a message queue is simple, there are client applications called producers that
create messages and deliver them to the message queue.
An other application, called consumer, connect to the queue and get the messages to be processed.
Messages placed onto the queue are stored until the consumer retrieves them.
Email is probably the best example of asynchronous messaging.
When an email is sent the sender continue processing other things without an immediate response
from the receiver.
This way of handling messages decouple the producer from the consumer.
The producer and the consumer of the message do not need to interact with the message queue at the
same time.
Producer(sender)--------queue---------consumer(receiver)
Message Queue
Three styles of receive are generally supported:
Blocking receive-which will block until an appropriate message is available.
Non blocking receive- (a polling operation)- which will check the status of the queue and
return a message if available, or not available indication will receive
Notify operation-which will issue an event notification when a message is available in the
associated queue.
Message queue follow FIFO normally, but most queue implementation support concept of
higher priority messages delivered first.
Distributed Shared Memory
Indirect communication establishes like only when processes share a common mailbox each pair of
processes sharing several communication links.
• Distributed shared memory (DSM) is an abstraction used for sharing data between
• computers that do not share physical memory. Processes access DSM by reads and
• updates to what appears to be ordinary memory within their address space
Shared memory is a memory shared between two or more processes that are established using
shared memory between all the processes.
In shared memory model, memory is shared by cooperating processes, which can exchange
information by reading and writing data but in message passing communication takes place by means
of messages exchanged between the cooperating processes.
Tuple space systems (generative communication)
• Processes place items of structure data (tuples) and other processes can read or remove the tuples by
specifying patterns of interest notan address. The tuple space is persistent, readers and writers do
not need to exist at the same time.
Shared Memory
Shared Memory

You might also like