webcamp:back-end developers day Максим Сохацкий "Тестирование и...

26
IoT and IoT and WebSocket WebSocket Protocols Protocols Maxim Sokhatsky

Upload: geekslab

Post on 12-Aug-2015

42 views

Category:

Technology


0 download

TRANSCRIPT

IoT andIoT andWebSocketWebSocket

ProtocolsProtocols

Maxim Sokhatsky

ProtocolsProtocolsHistory andHistory and

EvolutionEvolutionOSI APPLICATIONSOSI APPLICATIONS

5050billionsbillions

devicesdevices

IPv6IPv6HTTP/2HTTP/2

OSIOSI

PayloadPayload

FormatterFormatter

SessionSession

HTTP2HTTP2 DNSDNS

TEXT TEXT BINARY BINARY

TCP RTP TLSTCP RTP TLS

<xs:element name="BinarySecurityToken"><xs:complexType><xs:simpleContent>

<xs:extension base="xs:string">

<xs:attribute name="Id" type="xs:ID" />

<xs:attribute name="ValueType" type="xs:QName" />

<xs:attribute name="EncodingType" type="xs:QName" />

<xs:anyAttribute namespace="##other" processContents="strict" />

</xs:extension></xs:simpleContent></xs:complexType></xs:element>

CORBA BINARY 1991CORBA BINARY 1991SOAP XML 1998SOAP XML 1998

> term_to_binary({broadcast,"Message"}).

<<131,104,2,100,0,9,98,114,111,97,100,99,97,115,116,107,0,7,77,101,115,115,97,103,101>>

ASN.1 1984ASN.1 1984

BT WIFI LDAP DNS SS7 GSM BT WIFI LDAP DNS SS7 GSM UMTS SMPP BGP AMQP UMTS SMPP BGP AMQP

{ "firstName": "Микола", "lastName": "Василів", "address": { "phone": "+380007880012", "city": "Київ", "postalCode": 21000 },}

Thrift Protobuf BERT 2015Thrift Protobuf BERT 2015

JVM CLRJVM CLRHTML5HTML5

$/user — ARPU$/user — ARPUKB/usersKB/users

PhoneTabletServer

BillionsMillions

BIN

JSONXML

XMPPXMPPMQTTMQTT

STOMPSTOMP

SOAPSOAP

ZMQZMQRESTREST

AJAXAJAX protobufprotobuf

G-RPCG-RPC

D-BusD-BusCOM/CORBACOM/CORBA

ThriftThrift

AMQPAMQP

JSONJSON

> online_count().> online_count().

237610237610

REAL-TIMEREAL-TIMEvideo audio streamingvideo audio streaming

WebSocketsWebSockets

RTPRTPEvent StreamingEvent Streaming

Mobile AppsMobile Apps

Bidirectional TCPBidirectional TCPHeaders EliminationHeaders Elimination

GamesGames

IoT protocolsIoT protocols

AllseenAllseen WAMPWAMPIoTivityIoTivityN2ON2O

AutobahnAutobahn

XMPPXMPP

yesyes

yesyes

nono

yesyes

yesyes

WAMPWAMP

yesyes

nono

nono

yesyes

nono

CORBACORBA

yesyes

yesyes

yesyes

yesyes

yesyes

PROTOPROTO

mqmq

rosterroster

bpebpe

rpcrpc

restrest

N2ON2O

yesyes

yesyes

yesyes

yesyes

yesyes

TestingTesting

jmeterjmeter

ab httperf siegeab httperf siege

tsungtsung

??

$ tcpkali -T10s -r 10000 -c 50 --first-message "N2O," \ -m PING --ws 54.171.70.13:8877/ws/static/app/open.htmDestination: [54.171.70.13]:8877Ramped up to 50 connections.Total data sent: 20.4 MiB (21390904 bytes)Total data received: 3.4 MiB (3602222 bytes)Bandwidth per channel: 0.399 Mbps, 49.9 kBpsAggregate bandwidth: 2.878-, 17.093↑ MbpsTest duration: 10.0116 s.

PROTOCOL v2.3N2ON2O

> boot 50ms

8MB Image8MB Imagexen unikernel

windows linux mac

BERTJSON

Custom

MessagePack

CRCR#operation#log

BPEBPE#process #sequenceFlow#task#history#amend#complete#event

XAXA#prepare#commit#rollback

KVSKVS#iterator#container#subscription#user#client#config

N2ON2O#element#action#bin#server#client#io#ev#cx

DBDB#account#customer#program#card#transaction#cashback#currency