SlideShare une entreprise Scribd logo
1  sur  87
Télécharger pour lire hors ligne
The art of messaging
tuning
The NoJMS way
Vyacheslav Lapin
About me
Senior developer
10+ years experience in IT
 7+ Java-development experience
 5+ trainer experience
 3+ system analysis
Interests:
 Messaging
 Functional programming (Clojure, Scala)
2
Problems of traditional way
 Integration system
working is…
3
Problems of traditional way
 Integration system
working is…
4
Problems of traditional way
 Integration system
working is…
5
Problems of traditional way
 Integration system
working is…
6
Problems of traditional way
«There's no such thing as problems,
Mr. Green, only situations...»
Avi, «Revolver»
7
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
8
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
Another application
Server Cluster
9
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
10
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
11
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
12
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
13
Problems of traditional way - Architecture
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
14
Problems of traditional way - Architecture
«Actually, the cause of computer revolution
is not that calculator has become faster and
got a lot of memory, got possibility to show
us advanced graphics, and so on; but that
cause is that computer can connect to
another computer. So, computer is not, as
usually described, the result of calculator
evolution – it`s the result of telephone
evolution!»
Andrey Verbitsky,
«SoftwarePeople 2009»
15
Interaction - entities
16
Concepts
 Asynchronous vs Synchronous
 Convenient API:
 Apache Camel
 Spring Integration
 Meta-data minimizing
 Protocol level downshifting
 Message packing
 Transit node minimizing
 Loose vs strong coupling (stateful vs stateless)
 Back pressure with reactive streams (Erlang, Scala, Java)
17
Interaction core concepts
18
19
So, every act of interaction between systems contain such phases as:…
Interaction core concepts
20
So, every act of interaction between systems contain such phases as:
 Packing message
Interaction core concepts
21
So, every act of interaction between systems contain such phases as:
 Packing message
 Transporting message
Interaction core concepts
22
So, every act of interaction between systems contain such phases as:
 Packing message
 Transporting message
 Unpacking message
Interaction core concepts
23
So, every act of interaction between systems contain such phases as:
 Packing message
 Transporting message
 Unpacking message
… and main question is: where is the bottleneck?..
Interaction core concepts
Where is the bottleneck?..
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
24
Front-end – client interaction types
25
 Servlets /JSP
Modern
Legacy
Servlets 3.0 (Java EE 6) asynchronous processing support:
@WebServlet(urlPatterns="/async", asyncSupported=true)
public class MyAsyncServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) {
AsyncContext ac = request.startAsync();
ac.addListener(new AsyncListener() {
public void onComplete(AsyncEvent event) throws IOException {/*. . .*/}
public void onTimeout(AsyncEvent event) throws IOException {/*. . .*/}
});
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10);
executor.execute(new MyAsyncService(ac));
}
26
Front-end – client interaction types
class MyAsyncService implements Runnable {
AsyncContext ac;
public MyAsyncService(AsyncContext ac) {
this.ac = ac;
}
@Override
public void run() {
//. . .
ac.complete();
}
}
27
Servlets 3.0 (Java EE 6) asynchronous processing support:
Front-end – client interaction types
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
ServletInputStream input = request.getInputStream();
byte[] b = new byte[1024];
int len = -1;
while ((len = input.read(b)) != -1) {
//. . .
}
}
28
Servlets 3.1 (Java EE 7) asynchronous I-O support:
Before…
Front-end – client interaction types
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
AsyncContext context = request.startAsync();
ServletInputStream input = request.getInputStream();
input.setReadListener(new MyReadListener(input, context));
}
public interface ReadListener extends EventListener {
public void onDataAvailable() throws IOException;
public void onAllDataRead() throws IOException;
public void onError(Throwable t);
}
29
After…
Front-end – client interaction types
Servlets 3.1 (Java EE 7) asynchronous I-O support:
@Override
public void onDataAvailable() {
try {
StringBuilder sb = new StringBuilder();
int len = -1;
byte b[] = new byte[1024];
while (input.isReady() && (len = input.read(b)) != -1) {
String data = new String(b, 0, len);
}
} catch (IOException ex) {
//. . .
}
}
@Override
public void onAllDataRead() {
context.complete();
}
@Override
public void onError(Throwable t) {
t.printStackTrace();
context.complete();
}
30
After…
Front-end – client interaction types
Servlets 3.1 (Java EE 7) asynchronous I-O support:
Front-end – client interaction types
31
 Servlets /JSP
Modern
Legacy
Front-end – client interaction types
32
 Servlets /JSP
 IFrame
Modern
Legacy
Front-end – client interaction types
33
 Servlets /JSP
 IFrame
 AJAX / COMET
Modern
Legacy
Front-end – client interaction types
34
 Servlets /JSP
 IFrame
 AJAX / COMET
 WebSockets Modern
Legacy
Front-end – client interaction type:
WebSockets vs AJAX
35
WebSockets AJAX (HTTP-REST)
Bi-directional:
Server <-> Client
Uni-directional:
Client -> Server -> Client
Full-duplex At a given time, either client is talking
to server or server is talking to client.
Single TCP Connection:
the HTTP connection is upgraded using
standard HTTP Upgrade mechanism and
client and server communicate over
that same TCP connection
new TCP connection is initiated for a
HTTP request and terminated after the
response is received
Lean protocol… Chatty protocol…
Front-end – client interaction type:
WebSockets vs AJAX
36
 AJAX (HTTP-REST) Request:
POST /websocket-vs-rest-payload/webresources/rest HTTP/1.1rn
Host: localhost:8080rn
Connection: keep-alivern
Content-Length: 11rn
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/32.0.1700.107 Safari/537.36rn
Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloorn
Content-Type: text/plain rn
Accept: */*rn
Accept-Encoding: gzip,deflate,sdchrn
Accept-Language: en-US,en;q=0.8rn
rn
Front-end – client interaction type:
WebSockets vs AJAX
37
 AJAX (HTTP-REST) Response:
HTTP/1.1 200 OKrn
Connection: keep-alivern
X-Powered-By: Undertow 1rn
Server: Wildfly 8 rn
Content-Type: text/plainrn
Content-Length: 11 rn
Date: Fri, 21 Feb 2014 21:27:53 GMT rn
rn
Front-end – client interaction type:
WebSockets vs AJAX
38
 So, These are 663 characters exchanged for a trivial “Hello World” echo.
 For WebSocket, after the initial HTTP handshake, the data is minimally framed with 2
bytes.
 https://github.com/javaee-samples/javaee7-
samples/tree/master/websocket/websocket-vs-rest-payload
Front-end – client interaction type:
WebSockets vs AJAX
39
Front-end – client interaction type:
WebSockets vs AJAX
40
 Time taken to process a fixed number of messages by varying the payload size:
Front-end – client interaction type:
WebSockets vs AJAX
41
Where is the bottleneck?..
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
42
Modern alternatives
 File Transfer
43
Modern
Legacy
Modern alternatives
 File Transfer
44
Path path = Paths.get("C:TempUsers");
try (WatchService watchService = FileSystems.getDefault().newWatchService()) {
WatchKey watchKey = path.register(watchService,
ENTRY_CREATE, ENTRY_DELETE, NTRY_MODIFY);
while (true)
try {
System.out.print("Wating for event... ");
for (WatchEvent<?> event : watchService.take().pollEvents())
System.out.println(new Date().toString() + " " + event.kind() + " " +
event.context());
watchKey.reset();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
Modern alternatives
 File Transfer
45
Printed:
Wating for event... Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 1.txt
Wating for event... Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 1.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 2.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 2.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 3.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 3.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 4.txt
Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 4.txt
Wating for event... Wed Jun 25 21:06:24 MSK 2014 ENTRY_MODIFY 2.txt
Wating for event... Wed Jun 25 21:06:24 MSK 2014 ENTRY_MODIFY 2.txt
Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt
Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt
Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt
Wating for event...
}
}
2
3
Modern alternatives
 File Transfer
46
Integration styles
 File Transfer
 Shared Database
47
Modern
Legacy
Integration styles
 File Transfer
 Shared Database
 Remote Procedure Call
48
Modern
Legacy
Integration styles
 File Transfer
 Shared Database
 Remote Procedure Call
 Messaging
49
Modern
Legacy
Problems of traditional way
1. WSDL/SOAP web-services (XML)
50
Problems of traditional way
1. WSDL/SOAP web-services (XML)
2. RESTful web-services (JSON)
51
Problems of traditional way
1. WSDL/SOAP web-services (XML)
2. RESTful web-services (JSON)
3. JMS (Java standard Serialization)
52
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
53
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://www.w3.org/2001/12/soap-envelope”
SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<SOAP-ENV:Body xmlns:m="http://www.xyz.org/quotations">
<m:GetQuotation>
<m:QuotationsName>Hello, World!</m:QuotationsName>
</m:GetQuotation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
54
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
2. Validation via schema
55
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
2. Validation via schema
3. Synchronous model
56
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
2. Validation via schema
3. Synchronous model
57
Problems of traditional way - WSDL/SOAP
web-services
1. Messages size
2. Validation via schema
3. Synchronous model
4. HTTP(S)
58
Problems of traditional way –
RESTful/JSON web-services
1. Messages Size
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986"},
"GlossSee": "markup"}}}}
}
59
Problems of traditional way –
RESTful/MsgPack web-services
1. Messages Size
60
Problems of traditional way –
RESTful/MsgPack web-services
1. Messages Size
@POST
@Produces({“application/x-msgpack; qs=1”, “application/json; qs=0.75”})
public Order getOrder() {
// …
}
61
Modern alternatives – Messaging formats
Create:
data size = 100000
JSON.stringify = 97ms
JSON.parse = 86ms
JSON = 183ms
msgpack.pack = 154ms
msgpack.unpack = 216ms
msgpack = 370ms
Load:
data size = 100000
JSON.stringify = 228ms
JSON.parse = 144ms
JSON = 372ms
msgpack.pack = 248ms
msgpack.unpack = 196ms
msgpack = 444ms
62
http://uupaa-js-spinoff.googlecode.com/svn/trunk/msgpack.js/test/bench.htm
Problems of traditional way –
RESTful/* web-services
1. Messages Size
Another alternatives:
 CBOR
 ProtoBuf
 Cap`n Proto
 Thrift
 JSON+ZIP
63
Problems of traditional way –
RESTful/JSON web-services
1. Messages Size
2. Validation (+parsing)?
64
Problems of traditional way –
RESTful/JSON web-services
1. Messages Size
2. Validation?
3. Synchronous model
65
Problems of traditional way –
RESTful/JSON web-services
1. Messages Size
2. Validation?
3. Synchronous model
@Path("orders")
public class OrderResource {
@Inject
ManagedExecutorService executor;
@GET
public void getAll(@Suspended AsyncResponse ar) {
executor.submit(() –> {
List<Order> response = new ArrayList<>();
//. . .
ar.resume(response);
});
}
}
67
Problems of traditional way –
RESTful/JSON web-services
1. Messages Size
2. Validation?
3. Synchronous model
4. HTTP(S)
68
Problems of traditional way - JMS
1. Java only!
69
Problems of traditional way - JMS
1. Java only!
2. Messages size, (but high speed of
serialization/deserialization!)
70
Problems of traditional way - JMS
1. Java only!
2. Messages Size
3. Lots of code (except JMS 2.0 in JEE7)
71
Problems of traditional way - JMS
try {
ConnectionFactory connectionFactory = (ConnectionFactory)jmsServer.lookup("TPConnectionFactory");
Queue queue = (Queue)jmsServer.lookup("/queue/TPQueue");
try (Connection connection = connectionFactory.createConnection()) {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer(queue);
TextMessage message = session.createTextMessage("Hello, I'm from TutorialsPoint.");
producer.send(message);
MessageConsumer messageConsumer = session.createConsumer(queue);
connection.start();
TextMessage messageReceived = (TextMessage)messageConsumer.receive(1000);
System.out.println("Received message: " + messageReceived.getText());
}
} catch (Exception e) {
e.printStackTrace();
}
72
Problems of traditional way - JMS
@Stateless
@JMSDestinationDefinitions({@JMSDestinationDefinition(
name = "java:global/jms/myQueue",
interfaceName = "javax.jms.Queue")})
public class MessageSender {
@Inject
JMSContext context;
@Resource(mappedName="java:global/jms/myQueue")
Destination myQueue;
public void sendMessage(String message) {
context.createProducer().send(myQueue, message);
}
}
73
Problems of traditional way - JMS
1. Java only!
2. Messages Size
3. Lots of code (except JMS 2.0 in JEE7)
4. Lost messages
74
Problems of traditional way - JMS
1. Java only!
2. Messages Size
3. Lots of code (except JMS 2.0 in JEE7)
4. Lost messages
5. Duplicates
75
Modern alternatives
 http://queues.io (~26 solutions)
 Local BlockingQueue (“seda” in Apache Camel, JdbcChannelMessageStore in
Spring Integration)
 ZooKeeper
 JCache (Hazelcast)
 In-memory NoSQL DB (Redis, DertyDB,…)
 AMQP (ActiveMQ, RabbitMQ)
 ZeroMQ
 Amazon SQS
 Apache Kafka (ZooKeeper inside!)
76
Modern alternatives – Local BlockingQueue
BlockingQueue queue = new ArrayBlockingQueue(1024);
Producer producer = new Producer(queue);
Consumer consumer = new Consumer(queue);
new Thread(producer).start();
new Thread(consumer).start();
Thread.sleep(4000);
77
Modern alternatives – ZooKeeper
78
Modern alternatives – AMQP
79
Modern alternatives – ZeroMQ
80
Modern alternatives – Hazelcast
81
Modern alternatives – Amazon SQS
82
Modern alternatives – Apache Kafka
83
Modern alternatives – Apache Kafka
84
Modern alternatives – Apache Kafka
85
Where is the bottleneck?..
Internet/Intranet
Application Server
Cluster
Database Cluster
First another
application Server
Cluster
…
Second another
application Server
Cluster
86
Links
 Enterprise Integration Patterns (book)
 Arun Gupta “Java EE 7 Essentials” (book)
 Ilya Grigorik “High Performance Browser Networking” (book)
 http://blog.arungupta.me/rest-vs-websocket-comparison-benchmarks/
 Msgpack.org
 http://uupaa-js-
spinoff.googlecode.com/svn/trunk/msgpack.js/test/bench.htm
 http://www.maxondev.com/serialization-performance-comparison-c-net-
formats-frameworks-xmldatacontractserializer-xmlserializer-binaryformatter-
json-newtonsoft-servicestack-text/
87
Thank you!
 Questions?
88

Contenu connexe

Tendances

บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูลบทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
Priew Chakrit
 
4java Basic Syntax
4java Basic Syntax4java Basic Syntax
4java Basic Syntax
Adil Jafri
 

Tendances (13)

Distributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayDistributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevday
 
Advance Java Programming (CM5I)5.Interacting with-database
Advance Java Programming (CM5I)5.Interacting with-databaseAdvance Java Programming (CM5I)5.Interacting with-database
Advance Java Programming (CM5I)5.Interacting with-database
 
JDBC - JPA - Spring Data
JDBC - JPA - Spring DataJDBC - JPA - Spring Data
JDBC - JPA - Spring Data
 
Creating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat ApplicationCreating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat Application
 
Heuristic methods used in sqlmap
Heuristic methods used in sqlmapHeuristic methods used in sqlmap
Heuristic methods used in sqlmap
 
Avg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White PaperAvg Technologies Vawtrak Banking Trojan White Paper
Avg Technologies Vawtrak Banking Trojan White Paper
 
บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูลบทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
บทที่ 4 การเพิ่มข้อมูลลงฐานข้อมูล
 
Insert
InsertInsert
Insert
 
Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS
 
Advanced SQL injection to operating system full control (whitepaper)
Advanced SQL injection to operating system full control (whitepaper)Advanced SQL injection to operating system full control (whitepaper)
Advanced SQL injection to operating system full control (whitepaper)
 
EclipseCon - Building an IDE for Apache Cassandra
EclipseCon - Building an IDE for Apache CassandraEclipseCon - Building an IDE for Apache Cassandra
EclipseCon - Building an IDE for Apache Cassandra
 
4java Basic Syntax
4java Basic Syntax4java Basic Syntax
4java Basic Syntax
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 

Similaire à The art of messaging tune (Joker 2015 edition)

Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 

Similaire à The art of messaging tune (Joker 2015 edition) (20)

Comet with node.js and V8
Comet with node.js and V8Comet with node.js and V8
Comet with node.js and V8
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
FlinkForward Asia 2019 - Evolving Keystone to an Open Collaborative Real Time...
 
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
Engineering Wunderlist for Android - Ceasr Valiente, 6WunderkinderEngineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
Engineering Wunderlist for Android - Ceasr Valiente, 6Wunderkinder
 
.NET Vs J2EE
.NET Vs J2EE.NET Vs J2EE
.NET Vs J2EE
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
 
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
4Developers 2015: Programowanie synchroniczne i asynchroniczne - dwa światy k...
 
Meteor
MeteorMeteor
Meteor
 
Developing Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring toolsDeveloping Agile Java Applications using Spring tools
Developing Agile Java Applications using Spring tools
 
Embarrassingly parallel database calls with Python (PyData Paris 2015 )
Embarrassingly parallel database calls with Python (PyData Paris 2015 )Embarrassingly parallel database calls with Python (PyData Paris 2015 )
Embarrassingly parallel database calls with Python (PyData Paris 2015 )
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in Depth
 
Introduction to Apache Flink
Introduction to Apache FlinkIntroduction to Apache Flink
Introduction to Apache Flink
 
Node.js: A Guided Tour
Node.js: A Guided TourNode.js: A Guided Tour
Node.js: A Guided Tour
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
Stream-style messaging development with Rabbit, Active, ZeroMQ & Apache Kafka...
Stream-style messaging development with Rabbit, Active, ZeroMQ & Apache Kafka...Stream-style messaging development with Rabbit, Active, ZeroMQ & Apache Kafka...
Stream-style messaging development with Rabbit, Active, ZeroMQ & Apache Kafka...
 
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threadingMobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
 

Dernier

Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 

Dernier (20)

Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
^Clinic ^%[+27788225528*Abortion Pills For Sale In witbank
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with GraphGraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
GraphSummit Milan & Stockholm - Neo4j: The Art of the Possible with Graph
 
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
Abortion Clinic In Polokwane ](+27832195400*)[ 🏥 Safe Abortion Pills in Polok...
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 

The art of messaging tune (Joker 2015 edition)

  • 1. The art of messaging tuning The NoJMS way Vyacheslav Lapin
  • 2. About me Senior developer 10+ years experience in IT  7+ Java-development experience  5+ trainer experience  3+ system analysis Interests:  Messaging  Functional programming (Clojure, Scala) 2
  • 3. Problems of traditional way  Integration system working is… 3
  • 4. Problems of traditional way  Integration system working is… 4
  • 5. Problems of traditional way  Integration system working is… 5
  • 6. Problems of traditional way  Integration system working is… 6
  • 7. Problems of traditional way «There's no such thing as problems, Mr. Green, only situations...» Avi, «Revolver» 7
  • 8. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster 8
  • 9. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster Another application Server Cluster 9
  • 10. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 10
  • 11. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 11
  • 12. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 12
  • 13. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 13
  • 14. Problems of traditional way - Architecture Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 14
  • 15. Problems of traditional way - Architecture «Actually, the cause of computer revolution is not that calculator has become faster and got a lot of memory, got possibility to show us advanced graphics, and so on; but that cause is that computer can connect to another computer. So, computer is not, as usually described, the result of calculator evolution – it`s the result of telephone evolution!» Andrey Verbitsky, «SoftwarePeople 2009» 15
  • 17. Concepts  Asynchronous vs Synchronous  Convenient API:  Apache Camel  Spring Integration  Meta-data minimizing  Protocol level downshifting  Message packing  Transit node minimizing  Loose vs strong coupling (stateful vs stateless)  Back pressure with reactive streams (Erlang, Scala, Java) 17
  • 19. 19 So, every act of interaction between systems contain such phases as:… Interaction core concepts
  • 20. 20 So, every act of interaction between systems contain such phases as:  Packing message Interaction core concepts
  • 21. 21 So, every act of interaction between systems contain such phases as:  Packing message  Transporting message Interaction core concepts
  • 22. 22 So, every act of interaction between systems contain such phases as:  Packing message  Transporting message  Unpacking message Interaction core concepts
  • 23. 23 So, every act of interaction between systems contain such phases as:  Packing message  Transporting message  Unpacking message … and main question is: where is the bottleneck?.. Interaction core concepts
  • 24. Where is the bottleneck?.. Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 24
  • 25. Front-end – client interaction types 25  Servlets /JSP Modern Legacy
  • 26. Servlets 3.0 (Java EE 6) asynchronous processing support: @WebServlet(urlPatterns="/async", asyncSupported=true) public class MyAsyncServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) { AsyncContext ac = request.startAsync(); ac.addListener(new AsyncListener() { public void onComplete(AsyncEvent event) throws IOException {/*. . .*/} public void onTimeout(AsyncEvent event) throws IOException {/*. . .*/} }); ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10); executor.execute(new MyAsyncService(ac)); } 26 Front-end – client interaction types
  • 27. class MyAsyncService implements Runnable { AsyncContext ac; public MyAsyncService(AsyncContext ac) { this.ac = ac; } @Override public void run() { //. . . ac.complete(); } } 27 Servlets 3.0 (Java EE 6) asynchronous processing support: Front-end – client interaction types
  • 28. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ServletInputStream input = request.getInputStream(); byte[] b = new byte[1024]; int len = -1; while ((len = input.read(b)) != -1) { //. . . } } 28 Servlets 3.1 (Java EE 7) asynchronous I-O support: Before… Front-end – client interaction types
  • 29. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { AsyncContext context = request.startAsync(); ServletInputStream input = request.getInputStream(); input.setReadListener(new MyReadListener(input, context)); } public interface ReadListener extends EventListener { public void onDataAvailable() throws IOException; public void onAllDataRead() throws IOException; public void onError(Throwable t); } 29 After… Front-end – client interaction types Servlets 3.1 (Java EE 7) asynchronous I-O support:
  • 30. @Override public void onDataAvailable() { try { StringBuilder sb = new StringBuilder(); int len = -1; byte b[] = new byte[1024]; while (input.isReady() && (len = input.read(b)) != -1) { String data = new String(b, 0, len); } } catch (IOException ex) { //. . . } } @Override public void onAllDataRead() { context.complete(); } @Override public void onError(Throwable t) { t.printStackTrace(); context.complete(); } 30 After… Front-end – client interaction types Servlets 3.1 (Java EE 7) asynchronous I-O support:
  • 31. Front-end – client interaction types 31  Servlets /JSP Modern Legacy
  • 32. Front-end – client interaction types 32  Servlets /JSP  IFrame Modern Legacy
  • 33. Front-end – client interaction types 33  Servlets /JSP  IFrame  AJAX / COMET Modern Legacy
  • 34. Front-end – client interaction types 34  Servlets /JSP  IFrame  AJAX / COMET  WebSockets Modern Legacy
  • 35. Front-end – client interaction type: WebSockets vs AJAX 35 WebSockets AJAX (HTTP-REST) Bi-directional: Server <-> Client Uni-directional: Client -> Server -> Client Full-duplex At a given time, either client is talking to server or server is talking to client. Single TCP Connection: the HTTP connection is upgraded using standard HTTP Upgrade mechanism and client and server communicate over that same TCP connection new TCP connection is initiated for a HTTP request and terminated after the response is received Lean protocol… Chatty protocol…
  • 36. Front-end – client interaction type: WebSockets vs AJAX 36  AJAX (HTTP-REST) Request: POST /websocket-vs-rest-payload/webresources/rest HTTP/1.1rn Host: localhost:8080rn Connection: keep-alivern Content-Length: 11rn User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36rn Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloorn Content-Type: text/plain rn Accept: */*rn Accept-Encoding: gzip,deflate,sdchrn Accept-Language: en-US,en;q=0.8rn rn
  • 37. Front-end – client interaction type: WebSockets vs AJAX 37  AJAX (HTTP-REST) Response: HTTP/1.1 200 OKrn Connection: keep-alivern X-Powered-By: Undertow 1rn Server: Wildfly 8 rn Content-Type: text/plainrn Content-Length: 11 rn Date: Fri, 21 Feb 2014 21:27:53 GMT rn rn
  • 38. Front-end – client interaction type: WebSockets vs AJAX 38  So, These are 663 characters exchanged for a trivial “Hello World” echo.  For WebSocket, after the initial HTTP handshake, the data is minimally framed with 2 bytes.  https://github.com/javaee-samples/javaee7- samples/tree/master/websocket/websocket-vs-rest-payload
  • 39. Front-end – client interaction type: WebSockets vs AJAX 39
  • 40. Front-end – client interaction type: WebSockets vs AJAX 40  Time taken to process a fixed number of messages by varying the payload size:
  • 41. Front-end – client interaction type: WebSockets vs AJAX 41
  • 42. Where is the bottleneck?.. Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 42
  • 43. Modern alternatives  File Transfer 43 Modern Legacy
  • 44. Modern alternatives  File Transfer 44 Path path = Paths.get("C:TempUsers"); try (WatchService watchService = FileSystems.getDefault().newWatchService()) { WatchKey watchKey = path.register(watchService, ENTRY_CREATE, ENTRY_DELETE, NTRY_MODIFY); while (true) try { System.out.print("Wating for event... "); for (WatchEvent<?> event : watchService.take().pollEvents()) System.out.println(new Date().toString() + " " + event.kind() + " " + event.context()); watchKey.reset(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
  • 45. Modern alternatives  File Transfer 45 Printed: Wating for event... Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 1.txt Wating for event... Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 1.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 2.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 2.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 3.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 3.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_CREATE 4.txt Wed Jun 25 21:05:38 MSK 2014 ENTRY_MODIFY 4.txt Wating for event... Wed Jun 25 21:06:24 MSK 2014 ENTRY_MODIFY 2.txt Wating for event... Wed Jun 25 21:06:24 MSK 2014 ENTRY_MODIFY 2.txt Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt Wating for event... Wed Jun 25 21:08:53 MSK 2014 ENTRY_MODIFY 3.txt Wating for event... } } 2 3
  • 47. Integration styles  File Transfer  Shared Database 47 Modern Legacy
  • 48. Integration styles  File Transfer  Shared Database  Remote Procedure Call 48 Modern Legacy
  • 49. Integration styles  File Transfer  Shared Database  Remote Procedure Call  Messaging 49 Modern Legacy
  • 50. Problems of traditional way 1. WSDL/SOAP web-services (XML) 50
  • 51. Problems of traditional way 1. WSDL/SOAP web-services (XML) 2. RESTful web-services (JSON) 51
  • 52. Problems of traditional way 1. WSDL/SOAP web-services (XML) 2. RESTful web-services (JSON) 3. JMS (Java standard Serialization) 52
  • 53. Problems of traditional way - WSDL/SOAP web-services 1. Messages size 53
  • 54. Problems of traditional way - WSDL/SOAP web-services 1. Messages size <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://www.w3.org/2001/12/soap-envelope” SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <SOAP-ENV:Body xmlns:m="http://www.xyz.org/quotations"> <m:GetQuotation> <m:QuotationsName>Hello, World!</m:QuotationsName> </m:GetQuotation> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 54
  • 55. Problems of traditional way - WSDL/SOAP web-services 1. Messages size 2. Validation via schema 55
  • 56. Problems of traditional way - WSDL/SOAP web-services 1. Messages size 2. Validation via schema 3. Synchronous model 56
  • 57. Problems of traditional way - WSDL/SOAP web-services 1. Messages size 2. Validation via schema 3. Synchronous model 57
  • 58. Problems of traditional way - WSDL/SOAP web-services 1. Messages size 2. Validation via schema 3. Synchronous model 4. HTTP(S) 58
  • 59. Problems of traditional way – RESTful/JSON web-services 1. Messages Size { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986"}, "GlossSee": "markup"}}}} } 59
  • 60. Problems of traditional way – RESTful/MsgPack web-services 1. Messages Size 60
  • 61. Problems of traditional way – RESTful/MsgPack web-services 1. Messages Size @POST @Produces({“application/x-msgpack; qs=1”, “application/json; qs=0.75”}) public Order getOrder() { // … } 61
  • 62. Modern alternatives – Messaging formats Create: data size = 100000 JSON.stringify = 97ms JSON.parse = 86ms JSON = 183ms msgpack.pack = 154ms msgpack.unpack = 216ms msgpack = 370ms Load: data size = 100000 JSON.stringify = 228ms JSON.parse = 144ms JSON = 372ms msgpack.pack = 248ms msgpack.unpack = 196ms msgpack = 444ms 62 http://uupaa-js-spinoff.googlecode.com/svn/trunk/msgpack.js/test/bench.htm
  • 63. Problems of traditional way – RESTful/* web-services 1. Messages Size Another alternatives:  CBOR  ProtoBuf  Cap`n Proto  Thrift  JSON+ZIP 63
  • 64. Problems of traditional way – RESTful/JSON web-services 1. Messages Size 2. Validation (+parsing)? 64
  • 65. Problems of traditional way – RESTful/JSON web-services 1. Messages Size 2. Validation? 3. Synchronous model 65
  • 66. Problems of traditional way – RESTful/JSON web-services 1. Messages Size 2. Validation? 3. Synchronous model @Path("orders") public class OrderResource { @Inject ManagedExecutorService executor; @GET public void getAll(@Suspended AsyncResponse ar) { executor.submit(() –> { List<Order> response = new ArrayList<>(); //. . . ar.resume(response); }); } } 67
  • 67. Problems of traditional way – RESTful/JSON web-services 1. Messages Size 2. Validation? 3. Synchronous model 4. HTTP(S) 68
  • 68. Problems of traditional way - JMS 1. Java only! 69
  • 69. Problems of traditional way - JMS 1. Java only! 2. Messages size, (but high speed of serialization/deserialization!) 70
  • 70. Problems of traditional way - JMS 1. Java only! 2. Messages Size 3. Lots of code (except JMS 2.0 in JEE7) 71
  • 71. Problems of traditional way - JMS try { ConnectionFactory connectionFactory = (ConnectionFactory)jmsServer.lookup("TPConnectionFactory"); Queue queue = (Queue)jmsServer.lookup("/queue/TPQueue"); try (Connection connection = connectionFactory.createConnection()) { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(queue); TextMessage message = session.createTextMessage("Hello, I'm from TutorialsPoint."); producer.send(message); MessageConsumer messageConsumer = session.createConsumer(queue); connection.start(); TextMessage messageReceived = (TextMessage)messageConsumer.receive(1000); System.out.println("Received message: " + messageReceived.getText()); } } catch (Exception e) { e.printStackTrace(); } 72
  • 72. Problems of traditional way - JMS @Stateless @JMSDestinationDefinitions({@JMSDestinationDefinition( name = "java:global/jms/myQueue", interfaceName = "javax.jms.Queue")}) public class MessageSender { @Inject JMSContext context; @Resource(mappedName="java:global/jms/myQueue") Destination myQueue; public void sendMessage(String message) { context.createProducer().send(myQueue, message); } } 73
  • 73. Problems of traditional way - JMS 1. Java only! 2. Messages Size 3. Lots of code (except JMS 2.0 in JEE7) 4. Lost messages 74
  • 74. Problems of traditional way - JMS 1. Java only! 2. Messages Size 3. Lots of code (except JMS 2.0 in JEE7) 4. Lost messages 5. Duplicates 75
  • 75. Modern alternatives  http://queues.io (~26 solutions)  Local BlockingQueue (“seda” in Apache Camel, JdbcChannelMessageStore in Spring Integration)  ZooKeeper  JCache (Hazelcast)  In-memory NoSQL DB (Redis, DertyDB,…)  AMQP (ActiveMQ, RabbitMQ)  ZeroMQ  Amazon SQS  Apache Kafka (ZooKeeper inside!) 76
  • 76. Modern alternatives – Local BlockingQueue BlockingQueue queue = new ArrayBlockingQueue(1024); Producer producer = new Producer(queue); Consumer consumer = new Consumer(queue); new Thread(producer).start(); new Thread(consumer).start(); Thread.sleep(4000); 77
  • 77. Modern alternatives – ZooKeeper 78
  • 80. Modern alternatives – Hazelcast 81
  • 81. Modern alternatives – Amazon SQS 82
  • 82. Modern alternatives – Apache Kafka 83
  • 83. Modern alternatives – Apache Kafka 84
  • 84. Modern alternatives – Apache Kafka 85
  • 85. Where is the bottleneck?.. Internet/Intranet Application Server Cluster Database Cluster First another application Server Cluster … Second another application Server Cluster 86
  • 86. Links  Enterprise Integration Patterns (book)  Arun Gupta “Java EE 7 Essentials” (book)  Ilya Grigorik “High Performance Browser Networking” (book)  http://blog.arungupta.me/rest-vs-websocket-comparison-benchmarks/  Msgpack.org  http://uupaa-js- spinoff.googlecode.com/svn/trunk/msgpack.js/test/bench.htm  http://www.maxondev.com/serialization-performance-comparison-c-net- formats-frameworks-xmldatacontractserializer-xmlserializer-binaryformatter- json-newtonsoft-servicestack-text/ 87