Top Banner
NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015
19

NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Dec 15, 2015

Download

Documents

Shakira Laswell
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

NODESNETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES

COMP 410, SPRING 2015

Page 2: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

So What’s Going on Here?Goal: Type-safe network that supports arbitrary functionality and message typeso Nodes can send, receive, or do both. o Node operation is completely undefinedo Receivers make sure they are able to receive all of the sender’s data types

Potential uses for this kind of network:o Data Pipelineo Multiplexing/Demultiplexingo Parallel Computation Engineo And so much more!

Page 3: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Example Use Case

Temperature Sensor

Is the temperature

too high?> 100 °F

If yes, SOUND THE

ALARM!

Page 4: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Example Use Case

Temperature Sensor

Is the temperature

too low?< -10 °F

If yes, SOUND THE

ALARM!

Page 5: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

How is the System Used?

Page 6: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Design Phase◦The Network Team

◦ Developed underlying technology for node connection

◦The Node API Team ◦ Decided what a node could access within the network

◦The Message Team◦ Created messages to send data and commands over the network ◦ Focus was implementation specific to demonstrate our technology

Page 7: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Implementation Phase◦The Shared Library Team

◦ Coded the API + network backbone◦The Message Library Team

◦ Standardized serialization/deserialization mechanism◦The Expert Implementation Team

◦ Implemented more complicated node behaviors for the demo◦The Demo & Presentation Team

◦ Planned the demo network◦ Created the presentation of network capabilities

Page 8: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

How the Components Fit Together

Page 9: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

The Three Types of Nodes

Temperature Sensor

Is the temperature

too high?

If yes, SOUND THE

ALARM!

Source Relay Display

Page 10: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

The Three Types of Nodes

SenderIs the

temperature too high?

Receiver

Source Relay Display

SenderReceiver

Page 11: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Sender

Sender(Set<String> outgoingTypes)

void Sender#connectTo(String host, int port)

void Sender#send(String type, Byte[] serializedMessageBody)

void Sender#disconnectFromAll()

Page 12: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Receiver

Receiver(Map<String, Action<Byte[]>> handlers)

void Receiver#listen(int port)

void Receiver#stopListening()

Page 13: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Motivation for the Network Library

Our Goal:◦ Provide reliable and convenient data transfer mechanism

Our Solution◦ Used tcp/ip C# socket ◦ Alternatives: WCF. Added unneeded complexity◦ Network library is decoupled

Page 14: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Create Sender

CreateReceiver

Connect Check Types

Kill

Keep Alive

Send Messages

Receive Messages

Sender Receiver

Page 15: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Motivation for the Message Library

Our Goal:◦ Handle new, arbitrary data types in both information and commands

Our Solution◦ Shared Message Library with packaging/serialization tools that can

be expanded for any information type/command.

Page 16: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

A Shared Extendable Message Library

Commands, information types, all treated similarly◦ Information/command stored in a message object◦ Message is JSON-serialized and then sent.

The string is arbitrary, so the message types can be extended arbitrarily

Page 17: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Actor A

Type of Data

DataPrepares

Prepares

Packet

Actor BType of Data

Data

System A

System B

Merged and sent

Handlers

Used to make descisions

Feeds into

Event

Prepares

Handles Data based on Type to produce

Network

Page 18: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.

Data Types Data types/commands we implemented:◦IntDataCmd, FloatDataCmd, StringDataCmd, ArrayDataCmd, FileDataCmd

◦ShutdownCmd, ConnectToChildCmd, BroadcastCmd, JavaScriptCmd, ResetStateCmd

Page 19: NODES NETWORK OVERLAY: DISTRIBUTED & EXTENSIBLE SERVICES COMP 410, SPRING 2015.