JWebSocket as Enterprise Middleware jWebSocket – The Real-time Communication and Messaging...
-
Upload
curtis-wiggans -
Category
Documents
-
view
220 -
download
1
Transcript of JWebSocket as Enterprise Middleware jWebSocket – The Real-time Communication and Messaging...
jWebSocketas Enterprise Middleware
jWebSocket – The Real-time Communication and Messaging Framework
DWX Developer WeekJune, 25th 2013
NCC Ost, Nürnberg
Alexander SchulzeFounder jWebSocketCEO Innotrade GmbHHerzogenrath, Germany
jWebSocket as Enterprise Middleware 225.06.2013
Agenda
• jWebSocket as Middleware,Communication and Messaging
• Architectures and Integration
• Security and Performance
• Demos (ExtJS, jQuery Mobile)
• Discussion, Questions and Answers
Today‘s Session
Middleware
Message Oriented Middleware (MOM)• Separate Software-Level,
Decoupling of Apps and Services
• Intermediate and Support forDistributed Applications
• Service Oriented Architectures
• Message Queue, Transactions,Persistence and Durability
jWebSocket as Enterprise Middleware 325.06.2013
Message Broker ( ActiveMQ )Message Broker ( ActiveMQ )
Communication & Messaging
jWebSocket as Enterprise Middleware
MessagePersistence DB
AMQPAMQPJMSJMS STOMPSTOMP WebSocket
WebSocket
MailServer
DatabaseServer
FileServer
Filesys.Filesys. JDBCJDBC SMTPSMTP ApplicationApplication
STOMPSTOMP AMQPAMQP WebSocketWebSocket
WebSocket
WebSocket
WebSocket
WebSocket
WebSocket
WebSocket
WebSocket
WebSocket
OpenWireOpenWire
JavaJava .NET.NET Browser
BrowserPerlPerl Brows
erBrows
erAndroi
dAndroi
d iOSiOS JavaJava
425.06.2013
jWebSocket ServerjWebSocket Server
ERPSystem
ServiceHost
Status of Web Communication
jWebSocket as Enterprise Middleware 525.06.2013
HTTP Protocol
• Designed for document transmission
• Cumbersome, nearly real-time tricks• Polling, Long-Polling• Reverse-AJAX, Comet etc.
• Ultimately non-standardized hacks
• Remains a Request/Response mechanism
jWebSocket as Enterprise Middleware 625.06.2013
WebSockets - Technology
WebSocket Protocol
• Permanent TCP connections, bidirectional, full-duplex 4oo times less overhead ⅓ of latency
• Standardized in HTML5 by W3C and IETF protects investments
• Single TCP Port saves 50% server resources
jWebSocket as Enterprise Middleware 725.06.2013
WebSockets - Technology
WebSocket Protocol
• No Rules for Content Text/Binary Frames, Chunking/Compression Encryption (SSL/TLS)
• No Limits for Formats/Sub-Protocols JSON, XML, CSV, Map, Object…
• No Restrictions for Processing Responsible for Logic, Security
Compared with HTTP
quickercheapermore portable
jWebSocket as Enterprise Middleware 825.06.2013
WebSockets - Technology
jWebSocket - Online Collaboration
Experience the Experience the Performance!Performance!Share a WhiteboardShare a Whiteboardlive in this Session!live in this Session!
Click our DemoClick our Demo
925.06.2013 jWebSocket as Enterprise Middleware
http://jwebsocket.org/dwx_swhttp://jwebsocket.org/dwx_sw
Technology-State?• Available on all
Browsers (RFC 6455),Fallbacks for older ones
• Available on all Platforms,continuously extended
• Java, C# and Python
• New: STOMP over WebSockets & jWebSocket JMS Gateway
jWebSocket as Enterprise Middleware 1025.06.2013
WebSockets - Technology
Tool-Support?Closed Integration into existing Frameworks
11
jWebSocket - Integration
25.06.2013 jWebSocket as Enterprise Middleware
jWebSocket - Integration
Integration ofIntegration ofRealtime-Comm. Realtime-Comm.
into Sencha into Sencha ExtJSExtJS
Check Check outout our our DemoDemo
1225.06.2013
http://jwebsocket.org/dwx_ejhttp://jwebsocket.org/dwx_ej
jWebSocket as Enterprise Middleware
Sencha/ExtJS Integration•Integration of WebSockets intoexisting Sencha/ExtJS-Applications
•Replaces AJAX/XHR-Proxy by jWebSocket-Proxy
•Worldwide Data Synchronization in Realtime
•jWebSocket and Sencha/ExtJS as Basisfor Online-Collaboration
13
jWebSocket - Integration
25.06.2013 jWebSocket as Enterprise Middleware
jWebSocket as Enterprise Middleware 1425.06.2013
jWebSocket Plug-ins (Open Source, Apache 2 Licence)
• Models: Channels, Events, JMS, MQ with STOMP, AMQP
• Interfaces: JDBC, SMTP, SMS, CGI, Scripting (JavaScript)
• Security: Quota, Captcha, Filters, Spring Auth, SSO, SSL/TLS
• Remote Procedure Calls: C2S-, S2C- and C2C-RPCs
• Sharing: Data Persistence/Synchronization and Filesharing
• Social: Chat, Twitter, Instant Messaging (XMPP)
• Administration: JMX, Logging, Statistics, Monitoring, Reporting, Clustering
jWebSocket - Plug-ins
jWebSocket as Enterprise Middleware 1525.06.2013
WebSockets - Technology
WebSocket Summary
• Designed for highly interactiveWeb Applications, high level of freedom
• Supports stationary & mobile,browser based & native apps
• Not just a protocol, but a new paradigmRequest/Response Real-Time Comm.
• Perfect Basis for Low-LatencyCommunity and Enterprise Middleware
Demand from Developers, Providers and Users
• CompatibilityInteroperability
• IndependencyIntegratability
• ReliabilitySecurity
jWebSocket as Enterprise Middleware 1625.06.2013
Middleware - Goals
Demand from Developers, Providers and Users
• AvailabilityScalability
• ExtendabilityFlexability
• SimplicityMaintainability
jWebSocket as Enterprise Middleware 1725.06.2013
Middleware - Goals
jWebSocket as Enterprise Middleware 1825.06.2013
jWebSocket - Middleware
jWebSocket Middleware
• Combining Real-Time Communicationwith Message Queuing
• Integration: Web Frameworks, Devices, Clients, Servers, Services
• Abstraction: Tokens, Plug-Ins, Apps
• Decoupling: Interfaces
• Security: Roles, Filters, Quotas, Encryption
jWebSocket as Enterprise Middleware 1925.06.2013
Queues and Topics
• Queues forPoint-2-PointConnections
• Topics for Publish/SubscribeEnvironments
Middleware - Queues/Topics
QueueQueue
TopicTopic
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ConsumerConsumer
ProducerProducer
ProducerProducer
ProducerProducer
ProducerProducer
ProducerProducer
ProducerProducer
ProducerProducer
ProducerProducer
jWebSocket as Enterprise Middleware 2025.06.2013
Message Selectors
• Source-Id und Target-Id(z.B. targetId = “JDBCService“)
Advisory Topics• Connect / Disconnect
(Service Availability)• Message Expiration• No Cosumer Listening• Further Destination Policies
Middleware - Selectors/Advisory
TopicTopic
ConsumertargetId = 1Consumer
targetId = 1
ConsumertargetId = 2Consumer
targetId = 2
ConsumertargetId = 3Consumer
targetId = 3
ConsumertargetId = 4Consumer
targetId = 4
ProducersourceId = 1
ProducersourceId = 1
ProducersourceId = 2
ProducersourceId = 2
ProducersourceId = 3
ProducersourceId = 3
ProducersourceId = 4
ProducersourceId = 4
Messagewith sourceId = 3and targetId = 2
EndPointendPointId
= 1
EndPointendPointId
= 1EndPoint
endPointId = 2
EndPointendPointId
= 2
EndPointendPointd =
3
EndPointendPointd =
3EndPoint
endPointId = 4
EndPointendPointId
= 4
TopicTopic
PP
CC
PP
CC
PP
CC
PP
CC
jWebSocket as Enterprise Middleware 2125.06.2013
Message Persistence & Durability
• Acknowledge & Auto Acknowledge
• ExpirationOption Notification via Advisory-Topic
• Persistence:„Survive a Broker Restart“
• Durable Subscriptions„Survive a Endpoint Restart“
Middleware - Persistence/Durability
jWebSocket as Enterprise Middleware 2225.06.2013
Message Persistence & Durability
• Acknowledge & Auto Acknowledge
• ExpirationOption Notification via Advisory-Topic
• Persistence:„Survive a Broker Restart“
• Durable Subscriptions„Survive a Endpoint Restart“
Middleware - Persistence/Durability
jWebSocket as Enterprise Middleware 2325.06.2013
Live Slideshow
• A typical Topic Messaging Application
• One or multiple Producers:„The Presenters“
• Many Consumers:„The Audience“
http://jwebsocket.org/dwx_aw
Middleware - Messaging Demo
jWebSocket - JMS Gateway
jWebSocket as Enterprise Middleware25.06.2013
Message Broker (Active MQ)Message Broker (Active MQ)
AMQPAMQPJMSJMS STOMPSTOMP JavaScriptJavaScript
MailServer
DatabaseServer
FileServer
JMS GatewayJMS Gateway
jWebSocket ServerjWebSocket Server
Filesys.Filesys. JDBCJDBC SMTPSMTP ......
JavaScriptJavaScript
WebSocketws://host:8787
OpenWiretcp://host:61616
STOMPstomp://host:61613
AMQPstomp://host:5672
STOMP over WebSockets
ws://host:61614
JavaJava .NET App.NET App Web-BrowserWeb-BrowserPerl/Ruby/..Perl/Ruby/..Web-BrowserWeb-Browser
24
AppApp AppApp AppApp Plug-inPlug-in Plug-inPlug-inPlug-inPlug-in
XMLJSONJSONCSV
XMLJSONJSONCSV
jWebSocket as Enterprise Middleware 2525.06.2013
jWebSocket - Abstraction
Tokens (Abstraction)
• Endpoints are stupid
• Common languageto understand messages
• DataformatsJSON, XML or CSV
• Solution:Abstract Data Objects, in jWebSocket Token
jWebSocket CorejWebSocket Core
Message Abstraction Layer( Token-Processors, extendable )
Message Abstraction Layer( Token-Processors, extendable )
STOMPSTOMPEndpointEndpoint
JMSJMSEndpointEndpoint
WebSocketWebSocketBrowserBrowser
WebSocketWebSocket
Native ClientNative Client
jWebSocket EnginesjWebSocket EnginesJMS GatewayJMS Gateway
Message Security Layer( Token-Filters, extendable )
Message Security Layer( Token-Filters, extendable )
Token
STOMP over WebSockets
• Simple Text Oriented Messaging Protocol
• Clients for...Ruby, Perl, C, C++, C#, .Net, Flash, Delphi, Java, Objective C,Python, PHP, JavaScript
• STOMP over WebSocketsThanks to Jeff Mesnil and Jeff Lindsayhttp://jmesnil.net/stomp-websocket/doc/
jWebSocket as Enterprise Middleware 2625.06.2013
MessagePersistence DB
BrowserBrowser
WebSocketWebSocket
STOMP over WebSocketsws://host:61614
PerlPerl
STOMPSTOMP
STOMP stomp://host:61613
jWebSocket
jWebSocket
JMS GatewayJMS Gateway
OpenWire/JMStcp://host:61616
Active MQActive MQ
JMSJMS AMQPAMQP STOMPSTOMP WebSocketWebSocket
jWebSocket as Enterprise Middleware 2725.06.2013
Security Instances
• EncryptionTransport encryption via SSL/TLS
• AuthenticationAgainst the Broker, many sources (LDAP, JAAS, JDBC, XML … )
• Authorization for QueueRoles for Read, Write and Administration
• Message Level AuthorizationRouting Permissons, Validation of ContentMessageAuthorizationPolicy, isAllowedToConsume
• More sophisticated mechanims via plug-insSecurity Instances decoupled from Applications
Middleware - Security
jWebSocket Security
• Encryption SSL/TLS
• ws:// and wss://
• Inbound/Outbound Filter
• Role based Authenticationand Authorization with Spring Security
• Quotas and Captchas
jWebSocket as Enterprise Middleware 2825.06.2013
jWebSocket - Security
jWebSocket ServerjWebSocket Server
In System-Filter Out
In System-Filter Out
WebSocket Client / JMS Endpoint
WebSocket Client / JMS Endpoint
In Custom-/Admin Filter Out
In Custom-/Admin Filter Out
Plug-ins (Chain)Plug-ins (Chain)
Token
Administrator
Authentication& Authorization
Middleware Scaling
jWebSocket as Enterprise Middleware 2925.06.2013
Middleware - Scaling
DatabaseServer/Cluster
Message Persistence Database Cluster
Active MQActive MQ Active MQActive MQ
ClusterCluster GatewayGateway
Web ClientWeb Client
JMS ClientJMS Clientfailover
(tcp:host1,tcp:host2)
jWebSocket
jWebSocket
jWebSocket
jWebSocket
JMS Service
JMS Service
failover (tcp:host1,tcp:host2)
MailServer
FileServer
JMS Queues/Topics
jWebSocket as Enterprise Middleware 3025.06.2013
jWebSocket as Middleware
Summary
• WebSocket replaces HTTP Higher Speed & User Experience
• jWebSocket integrates Web Frameworks Simple & Rapid Implementation
• Messaging for Reliability & Scalability Higher Availability & Security for Services
Middleware Solution for Community & Enterprises
Questions & AnswersAlexander Schulze
Forum & Download: http://jwebsocket.org, @jWebSocket
jWebSocket as Enterprise Middleware 3125.06.2013
Thank you for your attention!