vortex cloud beyond cloud messaging

Post on 16-Jul-2015

367 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Angelo Corsaro, PhDChief Technology Officer

angelo.corsaro@prismtech.com

Beyond Cloud Messaging…Cloud

Cop

yrig

ht P

rism

Tech

, 201

4

Infrastructure as as Service (IaaS): Elastic compute fabric that you can “consume” as opposed to own and manage, e.g., Azure, Amazon EC2, Google Compute Engine, Linode, etc.

Platform as a Service (PaaS): Enhances IaaS with a series of managed middleware and storage services ready to be “consumed” by your application, e.g., Azure Service Bus, Amazon Dynamo, Vortex Cloud

Software as a Service (IaaS): A full application as a service available for you to be consumed, e.g., SalesForces

Cloud ComputingThe main idea behind cloud computing incrementally reduce the number of layers that you are required to own and manage in order to build applications

Cop

yrig

ht P

rism

Tech

, 201

4

“Traditional” Cloud messaging was designed to address the requirements of IT systems. As such its main focus is on highly reliable messaging and device-to-cloud interactions

The surge of the Internet of Things has posed a series of new requirements for Cloud Messaging, such as:

- Real-Time Data Delivery, i.e. freshness of data is more important than its reliability

- High Data Rates

- Last Value Reliability

- Support for Cloud and Fog Computing architectures

- Support for embedded and real-time platforms

- Network Efficiency

Beyond Traditional Cloud Messaging?

Vortex Cloud

Cop

yrig

ht P

rism

Tech

, 201

4VORTEX Cloud provides a universally accessible “Internet Service” for sharing data between DDS-enabled applications

VORTEX Cloud

Cop

yrig

ht P

rism

Tech

, 201

4

Elastic and Fault-Tolerant

Public/Private Clouds Deployments

Reliable and Best-Effort Data Sharing

Last value Reliability

Unicast and Multicast Communication

Support for enterprise, embedded, and mobile platforms

Source Filtering

Customisable Load-Balancing

VORTEX Cloud

Cop

yrig

ht P

rism

Tech

, 201

4

Efficient Binary Protocol (DDSI)

Multiple Transports:- UDP/IP- TCP/IP- WebSockets

C/C++, Java, Scala, JavaScript, CoffeScript, and C# API

Connectivity to MQTT, AMQP, etc., via VORTEX Gateway

VORTEX Cloud

Cop

yrig

ht P

rism

Tech

, 201

5

Performance

Device-2-Device

• Peer-to-Peer Intra-core latency as low as 8 µs

• Peer-to-Peer latency as low as 30 µs

• Point-to-Point throughput well over 2.5M msg/sec

Device-2-Cloud

• Routing latency as low as 4 µs

• Linear scale out

• 44K* msgs/sec with a single router, 4x times more the average Tweets per second in the world (~6000 tweets/sec)!

*2048 bytes message payload

Deployment Models

Vortex Platform

Cop

yrig

ht P

rism

Tech

, 201

5

Specialised device implementations optimally addressing requirements of OT and IT platforms

VORTEX can readily deal with data ingestion seamlessly integrating with other protocols, e.g. MQTT, CoAP, etc.

VORTEX leverages the DDS standard for interoperability and uniquely extends it with support for Internet Scale systems, mobility and Web 2.0 applications

The VORTEX Platform

PaaS/MaaS

Vortex Cloud Abstraction

Cop

yrig

ht P

rism

Tech

, 201

4

A Topic defines a domain-wide information’s classA Topic is defined by means of a (name, type, qos) tuple, where

• name: identifies the topic within the domain

• type: is the programming language type associated with the topic. Types are extensible and evolvable

• qos: is a collection of policies that express the non-functional properties of this topic, e.g. reliability, persistence, etc.

Topic

TopicTypeName

QoS

struct TemperatureSensor { @key long sid; float temp; float hum;}

Cop

yrig

ht P

rism

Tech

, 201

4

For data to flow from a DataWriter (DW) to one or many DataReader (DR) a few conditions have to apply:

The DR and DW domain participants have to be in the same domain

The partition expression of the DR’s Subscriber and the DW’s Publisher should match (in terms of regular expression match)

The QoS Policies offered by the DW should exceed or match those requested by the DR

Quality of ServiceDomain

Participant

DURABILITY

OWENERSHIP

DEADLINE

LATENCY BUDGET

LIVELINESS

RELIABILITY

DEST. ORDER

Publisher

DataWriter

PARTITION

DataReader

Subscriber

DomainParticipant

offered QoS

Topicwrites reads

Domain Idjoins joins

produces-in consumes-from

RxO QoS Policies

requested QoS

Building App with Vortex

Example1: Strong Typing and Extensibility

Cop

yrig

ht P

rism

Tech

, 201

5

The first step required to build a Vortex application is to define the kind of information associated with a Topic

This can be done using either IDL or Google Protocol Buffer

Topic Definition

Cop

yrig

ht P

rism

Tech

, 201

5

Temperature Sensor

message TempSensor { option (.omg.dds.type) = {name: "dds.TempSensor"}; required string sid = 1 [(.omg.dds.member).key = true]; required float temp = 2; }

struct TempSensor { string sid; float temp;}; #pragma keylist TempSensor sid

IDL Google Protocol Buffer

Cop

yrig

ht P

rism

Tech

, 201

5

Data Producerobject TempSensorPub { val builder = TempSensor.newBuilder() def main(args: Array[String]): Unit = { if (args.length > 1) { val sid = args(0) val period = args(1).toInt val topic = Topic[TempSensor]("TempSensor") val dw = DataWriter[TempSensor](topic) while (true) { val s = readTempSensor(sid) dw.write(s) println(show (s)) Thread.sleep(period) } } else { println("USAGE:\n\tTempSensorPub <sid> <period>") } }}

def readTempSensor(sid: String): TempSensor = { val minTemp = -20 val tdelta = 100; val minHum = 0.1F val hdelta = 9 val t = (tdelta*Math.random()).toInt + minTemp val h = (hdelta*Math.random()).toInt + minHum builder.setSid(sid) builder.setTemp(t) builder.setHum(h) builder.build() }

Cop

yrig

ht P

rism

Tech

, 201

5

Data Consumerobject TempSensorSub { def main(args: Array[String]): Unit = { val topic = Topic[TempSensor]("TempSensor") val dr = DataReader[TempSensor](topic) dr.listen { case DataAvailable(_) => dr.take() .filter(s => s.getData != null) .map(_.getData) .foreach(ts => println(show(ts))) } Thread.currentThread().join() }}

Cop

yrig

ht P

rism

Tech

, 201

5

Suppose that we want now to use a more advanced sensor that provides an estimate of the humidity in addition to the temperature

At the same time, while extending the type of our Temperature Sensor we want older application to continue to work seamlessly with the new sensor

Dealing with Type Evolution

Cop

yrig

ht P

rism

Tech

, 201

5

The humidity attribute is declared optional to allow older consumer to match this type

At the same time, new consumer will be able to detect that old temperature sensor are not providing humidity value

Extended Temperature Sensor Type

message TempSensor { option (.omg.dds.type) = {name: "dds.TempSensor"}; required string sid = 1 [(.omg.dds.member).key = true]; required float temp = 2; optional float hum = 3; }

Example2: Real-Time Web Applications

Cop

yrig

ht P

rism

Tech

, 201

5

Vortex Cloud provides a very effective way of sharing data between HTML5/JavaScript Applications

Additionally, Vortex Cloud can be used to seamlessly share data between Web and embedded applications

Real-Web Apps with Vortex Cloud

Cop

yrig

ht P

rism

Tech

, 201

4

The Chat CoffeeScript# Create useful alias for coffez and jQueryroot = thisz_ = coffez$ = jQuery

server = “ws://demo-eu.prismtech.com:9999"

# The post type used by the chat applicationclass Post constructor: (@name, @msg) ->

# Create the runtimeruntime = new dds.runtime.Runtime()

# Define the Post topic used to send and receive chat postspostTopic = new dds.Topic(0, "Post")

# Define the QoS for the DataReader/WriterdrQos = new dds.DataReaderQos(dds.Reliability.Reliable)dwQos = new dds.DataWriterQos(dds.Reliability.Reliable)

Cop

yrig

ht P

rism

Tech

, 201

4

The Chat CoffeeScriptpostReader = z_.NonepostWriter = z_.None

avatar = "avatar" + Math.floor((Math.random() * 10000) + 1);

# Add post to the chat and format it to show it is from mecreateMyPost = (post) -> ...

# Add post to the chat and format it to show it is from otherscreateOtherPost = (post) -> ...

# Add post to the chat and format it to show it is from othersprocessPost = () -> msg = $("#ChatMessage").val() post = new Post(avatar, msg) # Publish the post (notice that postWriter is an Option Monad) # Take a look at (http://en.wikibooks.org/wiki/Haskell/Understanding_monads/Maybe) # or (http://www.scala-lang.org/api/2.11.0/index.html#scala.Option) postWriter.map((dw) -> dw.write(post)) $("#ChatMessageList").append(createMyPost(post)) $("#ChatMessage").val("")

Cop

yrig

ht P

rism

Tech

, 201

4

The Chat CoffeeScript# Handle the runtime onconnect eventruntime.onconnect = () -> # Create DataReader and DataWriter for our posts dr = new dds.DataReader(runtime, postTopic, drQos) dw = new dds.DataWriter(runtime, postTopic, dwQos)

# Register a listener with the data reader to post messages # in our chat dr.addListener( (post) -> if (post.name isnt avatar) $("#ChatMessageList").append(createOtherPost(post))) postReader = z_.Some(dr) postWriter = z_.Some(dw)

connectRuntime = () -> $("#AvatarName").val(avatar) runtime.connect(server, "uid:pwd")

$(document).ready(() -> connectRuntime())

Putting it all Together

Cop

yrig

ht P

rism

Tech

, 201

5

top related