Networked Embedded Systems Broadcast Applications Heinz Deinhart - - PowerPoint PPT Presentation

networked embedded systems broadcast applications
SMART_READER_LITE
LIVE PREVIEW

Networked Embedded Systems Broadcast Applications Heinz Deinhart - - PowerPoint PPT Presentation

1 Networked Embedded Systems Broadcast Applications Heinz Deinhart <heinz@ecs.tuwien.ac.at> Networked Embedded Systems Broadcast Applications 2 Overview This presentation consists of three parts: Short introduction


slide-1
SLIDE 1

1

Networked Embedded Systems Broadcast Applications

Heinz Deinhart <heinz@ecs.tuwien.ac.at>

Networked Embedded Systems Broadcast Applications

slide-2
SLIDE 2

2

Overview This presentation consists of three parts:

  • Short introduction
  • Classifications of protocol implementations
  • Real world examples

Networked Embedded Systems Broadcast Applications

slide-3
SLIDE 3

3

Part 1: Introduction

Networked Embedded Systems Broadcast Applications

slide-4
SLIDE 4

4

Conventional broadcast in the wild First, lets take a look where plain broadcast (no order, reliability, etc.) is used in LANs:

  • RARP: address resolving
  • BOOTP/DHCP: address and metainfo resolving
  • SMB: Server Message Block, windows fileserver
  • GAMES: fun on the LAN
  • NOVELL: a long time ago..

Basically where no info is available or a complex setup is not needed.

Networked Embedded Systems Broadcast Applications

slide-5
SLIDE 5

5

What does LAN mean?

  • Some years ago LANs were a usually on shared mediums (thinwire

ethernet, token ring) separated by routers.

  • Nearly all of them in production envionment are now replaced by

some kind of switched infrastructure

  • Some of them are even that smart and convert broadcast

communication into point of point where possible (with application layer sniffing)

  • That means: Broadcast is not what it used to be
  • But: recently shared medium celebrated comeback: wireless

communication

Networked Embedded Systems Broadcast Applications

slide-6
SLIDE 6

6

What about the Internet?

  • internet wide broadcast is a bit resource intensive
  • there is some feature called directed broadcast
  • but its disabled on nearly all routers out there for security (DoS)

reasons

  • applications that use broadcast like features can use multicast
  • ip multicast requires some setup (IGMP, ..)
  • or implement broadcast features at application level, but this is not the

direction we want to look further into

Networked Embedded Systems Broadcast Applications

slide-7
SLIDE 7

7

Back to our domain: Networked embedded systems

  • Embedded sytems are usually small or/and cheap
  • To connect some in a network its a good idea to use a simple

(=shared) medium

  • Imagine lots of ultra small sensors that are connected with switched

wired ethernet: not that clever

  • Its obvious that using are shared medium, maybe even air is the way

to go

  • Using shared medium makes “real” broadcast an important feature

again

Networked Embedded Systems Broadcast Applications

slide-8
SLIDE 8

8

Part 2: Classification of Protocol Implementations

Networked Embedded Systems Broadcast Applications

slide-9
SLIDE 9

9

Introduction

  • There are many implementations of different broadcast algorithms
  • To few time to look into implementation details
  • Real world examples in part 3
  • Here we take a look how implementations can be classified
  • What design decisions have to be made for a new protocol?
  • To save time we have to focus on the most important characteristics

Networked Embedded Systems Broadcast Applications

slide-10
SLIDE 10

10

Basic System Model: Synchrony Two important parameters:

  • relative speed of processes = speed ratio between slowest and fastest

process

  • communication delay

Only if both parameters have a known upper bound which always holds the system is called synchonous. Otherwise it is called an asynchronous system Hardly any implementation is 100% synchronous.

Networked Embedded Systems Broadcast Applications

slide-11
SLIDE 11

11

Basic System Model: Failure Mode The general class of failures are:

  • Crash faiures: When a process crashes it ceases functioning forever.
  • Omission failures: Process omits performing some actions such as

sending or receiving a message

  • Timing failures: Process violates one of the synchrony assumptions
  • Byzantine failures: Arbitrary fault

A correct process is one that never expresses any of the faulty behaviors.

Networked Embedded Systems Broadcast Applications

slide-12
SLIDE 12

12

Oracles Synchrony does not solve all Problems. Some are only solvable with an

  • rcale, which is a distributed component a process can query.

Oracles can be:

  • Physical Clocks: Gives information about physical time
  • Failure Detectors: Process can query status of other processes

(crashed or not)

  • Coin Flip: Generates random values. Not that trivial as it might seem.

Networked Embedded Systems Broadcast Applications

slide-13
SLIDE 13

13

Agreement Problems Processes have to reach some common decision.

  • Consensus
  • Byzantine Agreement
  • Reliable Broadcast
  • Atomic Broadcast

Networked Embedded Systems Broadcast Applications

slide-14
SLIDE 14

14

Process Controlled Crash

  • gives processes the ability to kill other processes
  • .. or to commit suicide
  • that allows the transformation of failures into less severe ones
  • e.g. detect a byzantine or omission fault and transform it into crash
  • has bad sides: reduces the fault tolerance of system

Networked Embedded Systems Broadcast Applications

slide-15
SLIDE 15

15

Group Membership Service .. is a distributed service that is responsible for managing groups of

  • processes. Groups are important for multicast.

It can support:

  • Join/Leave: way for a process to dynamically join/leave a group
  • Exclusion: when process crashed it is removed from group

Networked Embedded Systems Broadcast Applications

slide-16
SLIDE 16

16

More on Groups

  • There can be single or multiple destination groups
  • Though most implementations support only single
  • Closed vs. Open Groups
  • Open Groups allow process to send messages to groups that it does

not belong to

Networked Embedded Systems Broadcast Applications

slide-17
SLIDE 17

17

Ordering Mechanisms - Who builds the order?

  • Communication history: Order is included by the communication
  • Privilege-Based: senders send only if they are granted privilege to do

so

  • Moving/Fixed Sequencer: Sequencer is responsible for ordering

messages

  • Destination Agreement: order results from agreement

Orthogonal to this ordering class an algorithms ordering can be time free

  • r time based.

Networked Embedded Systems Broadcast Applications

slide-18
SLIDE 18

18

Part 3: Finally, some real world examples

Networked Embedded Systems Broadcast Applications

slide-19
SLIDE 19

19

Broadcast Applications - Whats that?

  • okay, sorry, still no examples yet, but on next slide (promise)
  • lets take a short break and think about the title of this presentation
  • a broadcast application is everything that somehow applicates

broadcasting

  • can be algorithms (you could even think of reliable broadcast as a

broadcast application)

  • can be implementations of algorithms
  • can be an application that uses such an implementation
  • can be an invocation of an application by some user (who may or may

not know what he is really doing)

  • okay, lets proceed in this order..

Networked Embedded Systems Broadcast Applications

slide-20
SLIDE 20

20

Using Broadcast Primitives in Replicated Databases [3]

  • databases are a perfect example
  • everyone (except the very lucky ones) know about it
  • access is done using transactions
  • broadcasting can be helpful for replication
  • database replicas should stay in sync
  • it is obvious that best effort broadcast is not sufficient
  • operations can be performed on a higher layer

Networked Embedded Systems Broadcast Applications

slide-21
SLIDE 21

21

Replicated databases with reliable broadcast

  • reliable broadcast is simple and straight forward to implement
  • since it guarantees eventual delivery it removes need for explicit ack
  • since transaction are not blocked for global synchronisation there are

no deadlocks

  • remaining problem: because order is not guaranteed write operations

may arrive in different orders

  • solution: two phase locking must be used to circumvent this problem
  • interesting property: read only transactions are never aborted

Networked Embedded Systems Broadcast Applications

slide-22
SLIDE 22

22

Replicated databases with causal broadcast

  • causal broadcast is a more expensive primitive than reliable broadcast
  • it imposes more ordering restrictions on message delivery
  • that avoids the need for two phase commits
  • it uses the causal delivery properties to implicitly collect the

information used in a two phase commit

Networked Embedded Systems Broadcast Applications

slide-23
SLIDE 23

23

Replicated databases with atomic broadcast

  • using atomic (and causal) broadcast is even more expensive
  • ensures total order of commit requests
  • benefit: eliminates need for acks during commits
  • drawback: to work, the protocol needs versioning with numbers

Networked Embedded Systems Broadcast Applications

slide-24
SLIDE 24

24

Replicated databases conclusion

  • conclusion: choosing proper broadcast primitive is important
  • it changes the logical layer on which things are done
  • choosing the proper primitives regarding to the used medium is a

good idea

Networked Embedded Systems Broadcast Applications

slide-25
SLIDE 25

25

Transis [1] Overview

  • Transis project currently under development at the Hebrew University
  • f Jerusalem
  • it was designed to supply reliable and efficient transport layer services

for distributes services

  • it provides fast and reliable message multicast between all currently

connected processors (despite an unreliable network)

  • it recovers msgs that were lost due to ommission failures
  • handles processor crashes and dynamic partitions of the network
  • it achieves good performance by using the underlying networks

unreliable broadcast service

Networked Embedded Systems Broadcast Applications

slide-26
SLIDE 26

26

Transis Services Transis offers the following set of services:

  • Membership: maintains the membership of processors
  • Basic multicast: guarantees deilvery of the message at all active sites.

Delivers messages immediatly to upper level

  • Causal multicast: guarantees that delivery order preserves causality
  • Agreed multicast: delivers messages in the same order at all sites.

Various protocols are supported for achieving agreed order.

  • Safe multicast: delivers a message after all active processors have

acknowledged its reception

Networked Embedded Systems Broadcast Applications

slide-27
SLIDE 27

27

Transis Mempership Protocol

  • automatically maintains membership of connected processors
  • this is necessary for constructing fault-tolerant distributed applications
  • it guarantees virtual synchrony,
  • it is symmetric and does not disturb the regular flow of messages
  • it does not allow indefinite blocking of processors and may (rarely)

remove live but inactive processors unjustly

  • inadvertently removed processors can rejoin immediatley

Networked Embedded Systems Broadcast Applications

slide-28
SLIDE 28

28

Transis Partitining and Merging

  • environment is dynamic: processors can crash and restart
  • whole (sub)network can partition and reconnect
  • partitioning and merging is the greatest challenge transis has to handle
  • they can be handled becuase of the symmetric design
  • all previous systems deal only with join of single processors
  • or even stop execution during network partition
  • transis can do better - how, thats beyond our scope today

Networked Embedded Systems Broadcast Applications

slide-29
SLIDE 29

29

Transis LAN Performance

  • original prototype of transis was testet on 10Mbit Ethernet
  • using UDP in most requiring conditions it achives throughput of 160

1k messages per second

  • in comparision: TCP peer to peer transfare rate is about 350k/s
  • warning: those numbers are from last centory, probaly about 1991

Networked Embedded Systems Broadcast Applications

slide-30
SLIDE 30

30

A replicated mail server using transis [?]

  • a typical replicated application in a distributed system
  • was a final example in university course
  • domain: a mail service that is replicated among several mail servers
  • each client can send read or delete mail when connected to any server

Networked Embedded Systems Broadcast Applications

slide-31
SLIDE 31

31

Replicated Mail Service using Transis [?]

  • a typical replicated application in a distributed system
  • was a final example in university course
  • domain: a mail service that is replicated among several mail servers
  • each client can send read or delete mail when connected to any server
  • makes use of safe messages provided by transis
  • so no need to manually care about acks, omissions or processor faults

Networked Embedded Systems Broadcast Applications

slide-32
SLIDE 32

32

Replicated Mail Service Architecture

Networked Embedded Systems Broadcast Applications

slide-33
SLIDE 33

33

The algorithm

  • mail service implements own algorithm on top of transis environment
  • all transaction are divided into white, green and red
  • white are stable and ordered
  • green are ordered but not locally stable
  • red are neither ordered nor stable (yet)
  • stable at p is when p knows that alles targets received transaction and

stored it to disk

  • you can see that transis needs more than just a “configuration”, it

needs some logic on top of it

Networked Embedded Systems Broadcast Applications

slide-34
SLIDE 34

34

Mail service: Transis compared to other scenarios

  • Centralized Server: easy to implement but no fault tolerance
  • One Server with Several NFS Copies: Lots of overhead since

transaction must be simulated, inconsistences if network partitiones

  • Replicated Servers with DB using two phase commit: Does not fit the

mail concept very vell, won’t perform very well

  • Conclusio: ransis provides three major properties that are important

for mail service: multicasting, message ordering and membership management

  • If your base system lack some of them they are hard to emulate.

Networked Embedded Systems Broadcast Applications

slide-35
SLIDE 35

35

BMW: Broadcast Medium Window [4]

  • reliable broadcast in ad hoc networks (802.11)?
  • 802.11 use collision avoidance along with RTS/CTS/ACK control

frames to tramsmit unicast packages

  • for broadcast no control frames are used
  • that means broadcast packats are sent blindly without consideration of

hidden terminals and channel noise

  • BWM is a new protocol to support reliable multicast in ad hoc

networks

  • fundamental idea: transmit each package to each neighbor in a round

robin fashion

Networked Embedded Systems Broadcast Applications

slide-36
SLIDE 36

36

BMW: How it works

  • each node is required to maintain three lists: neighbors, send buffer

and receive buffer

  • nodes in neighbors list are touched when node hears from them
  • nodes are removed from it when time out since last touch occurs
  • the send buffer contains copies of frames that might be needed for

resend later

  • a copy is removed when all neighbours got it
  • thus the size of send buffer must be at least the max number of

neighbours

  • internal a queue of frames that weren’t sent at all is maintained
  • when a node receives a new node then its seq-nr added to the receive

buffer so it can be compared later

Networked Embedded Systems Broadcast Applications

slide-37
SLIDE 37

37

BMW: How it works 2

  • of course the whole algorithm is a bit more complex and implements a

kind of state machine

  • the key point is that the broadcasting handshake is done at mac layer
  • when a node wants to send it goes to a CSMD/CA phase similar to

802.11

  • then it RTS to one of its neighbours which becomes the receiver for

this send and declares what seq nrs are missing

  • the sending node then broadcasts new and missing frames
  • all other neighbours can use the frames as well, if they need it
  • of course the receiver neighbour is rotated

Networked Embedded Systems Broadcast Applications

slide-38
SLIDE 38

38

BWM Conclusio

  • a concept like this could be implemented on a highler layer
  • the performance will not be that good
  • especially if there is high traffic which means lots of advoided

collision

  • lets take a look at the results of a simulated experiment
  • compared is the performance of ODMRP with and without BMW
  • ODMRP is the On-Demand Multicast Routing Protocol

Networked Embedded Systems Broadcast Applications

slide-39
SLIDE 39

39 Networked Embedded Systems Broadcast Applications

slide-40
SLIDE 40

40

Thanks!

Networked Embedded Systems Broadcast Applications

slide-41
SLIDE 41

41

Bibiliography

References

[1] Y. Amir, D. Dolev, S. Kramer, and D. Malki. Transis: A communication subsystem for high

  • availability. In FTCS-22: 22nd International Symposium on Fault Tolerant Computing, pages

76–84, Boston, Massachusetts, 1992. IEEE Computer Society Press. [2] X. Defago, A. Schiper, and P. Urban. Totally ordered broadcast and multicast algorithms: a comprehensive survey, 2000. [3] Ioana Stanoi, Divyakant Agrawal, and Amr El Abbadi. Using broadcast primitives in replicated databases. In International Conference on Distributed Computing Systems, pages 148–155, 1998. [4] K. Tang and M. Gerla. Mac reliable broadcast in ad hoc networks. In Communications for Network-Centric Operations: Creating the Information Force. IEEE Military Communications Conference, volume 2, pages 1008–1013 vol.2, 2001.

Networked Embedded Systems Broadcast Applications