SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
주식회사 오픈소스컨설팅
Messaging Test
- Ø MQ, RabbitMQ, SQS, Kafka, etc -
2
- Internal Use Only -
Basic Process
Database/NoSQL
Gateway ModuleAPI Module
Web AppsFunction
Component 1
Service Layer
Business Layer
Data Access Layer
Component 2
Service Layer
Business Layer
Data Access Layer
API Access
2. Put
1. API call
(Servlet Param)
…
Messaging or Task
3. Reply(JSON)
4. Deliver Msg to Component
Client, CP/SP
Queue
DescriptionComponent
API Module
• Polling data, data parsing
• Send parsed data to message queue
Gateway Module
• Subscribe from message queue, retrieve room data from data stores
• Send data to Push Server
• Consumer pool
3
- Internal Use Only -
Kafka Performance Test – 2.8 Ghz, 4core, 8GB memory
Producer Batch-size 200
[jboss@localhost kafka-0.7.0]$ ./bin/kafka-producer-perf-test.sh --brokerinfo broker.list=0:localhost:9092 --messages 100000 --topic test --threads 1 --message-size 2048
[2012-05-28 09:02:31,236] INFO Creating sync producer for broker id = 0 at localhost:9092 (kafka.producer.ProducerPool)
[2012-05-28 09:02:37,730] INFO Disconnecting from localhost:9092 (kafka.producer.SyncProducer)
[2012-05-28 09:02:37,733] INFO Total Num Messages: 100000 bytes: 204800000 in 6.567 secs (kafka.tools.ProducerPerformance$)
[2012-05-28 09:02:37,742] INFO Messages/sec: 15227.6534 (kafka.tools.ProducerPerformance$)
[2012-05-28 09:02:37,742] INFO MB/sec: 29.7415 (kafka.tools.ProducerPerformance$)
[jboss@localhost kafka-0.7.0]$
Consumer
[2012-05-28 09:02:49,552] INFO Consumer test-consumer-group_localhost.localdomain-1338210169298-69d7d792 selected partitions : test:0-0: fetched offset = 2102058861: consumed offset
= 2102058861 (kafka.consumer.ZookeeperConsumerConnector)
[2012-05-28 09:02:49,558] INFO end rebalancing consumer test-consumer-group_localhost.localdomain-1338210169298-69d7d792 try #0 (kafka.consumer.ZookeeperConsumerConnector)
[2012-05-28 09:02:49,560] INFO Sleeping for 5 seconds. (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:02:49,561] INFO FetchRunnable-0 start fetching topic: test part: 0 offset: 2102058861 from 127.0.0.1:9092 (kafka.consumer.FetcherRunnable)
[2012-05-28 09:02:54,561] INFO starting threads (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:20,065] INFO thread[7], nMsgs:100000 bytes:204800000 nMsgs/sec:3923.57 MB/sec:7.66 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,065] INFO thread[9], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,067] INFO thread[8], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,070] INFO thread[7], nMsgs:100000 bytes:204800000 nMsgs/sec:2597.47 MB/sec:5.07 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,073] INFO thread[6], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,075] INFO thread[5], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,077] INFO thread[4], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
[2012-05-28 09:03:33,078] INFO thread[3], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$)
DescriptionLocation
Producer
• Batch-size가 1일 경우 상당한 퍼포먼스 문제
• 위의 테스트는 batch-size 200으로 처리(200개 메시지 들어올 경우 flush)
Consumer
• Multi consumer 일 경우라 하더라도 하나의 파티션에 대해 하나의 consumer만 처리
• Consumer pool이 하나의 디스크로 인하여 의미가 없음
• Consumer pool
Producer Batch-size 1
[jboss@localhost kafka-0.7.0]$ ./bin/kafka-producer-perf-test.sh --brokerinfo broker.list=0:localhost:9092 --messages 100000 --topic test --threads 1 --message-size 2048 --batch-size 1
[2012-05-28 09:25:10,494] INFO Closing all sync producers (kafka.producer.ProducerPool)
[2012-05-28 09:25:10,494] INFO Disconnecting from 127.0.0.1:9092 (kafka.producer.SyncProducer)
[2012-05-28 09:25:10,510] INFO thread 2: 10000 messages sent 1682.3688 nMsg/sec 0.1604 MBs/sec (kafka.tools.ProducerPerfor mance$SyncProducerThread)
[2012-05-28 09:25:10,510] INFO Closing all sync producers (kafka.producer.ProducerPool)
[2012-05-28 09:25:10,510] INFO Disconnecting from 127.0.0.1:9092 (kafka.producer.SyncProducer)
[2012-05-28 09:25:10,512] INFO thread 3: 10000 messages sent 1769.9115 nMsg/sec 0.1688 MBs/sec (kafka.tools.ProducerPerfor mance$SyncProducerThread)
http://www.mail-archive.com/kafka-users@incubator.apache.org/msg01016.html
4
- Internal Use Only -
Rabbit MQ, HornetQ – 4core, 8GB Memory
Producer /Consumer Simultaneously
[jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 2048
starting consumer #0
starting producer #0
time: 6.000s, sent: 7198 msg/s, received: 7190 msg/s, min/avg/max latency: 1463/3982/23183 microseconds
time: 7.000s, sent: 7335 msg/s, received: 7341 msg/s, min/avg/max latency: 1508/2892/6231 microseconds
time: 8.000s, sent: 7386 msg/s, received: 7370 msg/s, min/avg/max latency: 1358/3691/15787 microseconds
time: 9.000s, sent: 7262 msg/s, received: 7270 msg/s, min/avg/max latency: 1306/3091/7463 microseconds
time: 10.000s, sent: 7283 msg/s, received: 7287 msg/s, min/avg/max latency: 1551/2924/7089 microseconds
time: 11.000s, sent: 7164 msg/s, received: 7170 msg/s, min/avg/max latency: 1565/3522/11979 microseconds
time: 12.000s, sent: 6043 msg/s, received: 6034 msg/s, min/avg/max latency: 1097/8846/41617 microseconds
time: 13.000s, sent: 6040 msg/s, received: 6051 msg/s, min/avg/max latency: 943/11451/58797 microseconds
[jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 10240
starting consumer #0
starting producer #0
ime: 5.000s, sent: 2447 msg/s, received: 2447 msg/s, min/avg/max latency: 550/1344/17682 microseconds
ime: 6.000s, sent: 2701 msg/s, received: 2702 msg/s, min/avg/max latency: 569/1134/4756 microseconds
ime: 7.000s, sent: 2732 msg/s, received: 2731 msg/s, min/avg/max latency: 534/1122/3344 microseconds
ime: 8.000s, sent: 2728 msg/s, received: 2730 msg/s, min/avg/max latency: 551/1121/2082 microseconds
ime: 9.000s, sent: 2798 msg/s, received: 2798 msg/s, min/avg/max latency: 606/1116/2105 microseconds
[Rabbit MQ] [HornetQ, ActiveMQ]
DescriptionSolution
RabbitMQ
• Stable send/receive process
• Can use AMQP(High performance)
• Support runtime queue create/delete(very flexible)
HornetQ
• High performance if message size is large
• Support Linux AIO, JMS Bridge
• Embedded code 가능
5
- Internal Use Only -
Amazon SNS, SQS
Message send cost : avg 0.125 sec per message
Sender 1
Sender 2
Receiver 1
Receiver 2
[SQS Architecture]
Sender 1
Sender 2
Receiver 1
Receiver 2
Web Application Server
Endpoint URL
Queue
[SNS Architecture]
DescriptionLocation
Producer
• Sending part is HTTP client method call
• Sending speed is very slow
• Call public DNS
Consumer
• Processing time on receiver depends on web application server performance
• Consumer is processed by web application server thread
• HTTP Thread
6
- Internal Use Only -
Comparison
Criteria Netty Kafka SNS
Short Response
Time
Short Messaging Routes Short Short Long
Connection Handshake Cost
Low
(Connection Pooling Supported)
Middle
(Handshakes on
producers/consumers)
High
(HTTP Connectionless Only)
Asynchronous Processing
Async / Sync Supported Async Supported Async Supported
(HTTP Long Pooling)
Light-weight Software Stacks
Light Light Heavy
High Availability
No Single Point of Failures
SPF exists
(Zookeeper Required)
HA Supported
(Zookeeper Embedded by default)
HA Supported
References
Twitter, Plurk, Eucalyptus,
Siemens
Linked-in, Tumblr (used for
message store, NOT pub/sub)
AWS customers
Minimum System
Complexity
Supported Data Formats
Web Socket, Protobuf, POJO,
Text, Avro, Thrift, Byte Array
Byte Array only Text only
Simple Object Model
Simple Complex
(Kafka’s topic object model does
not fit into the event model)
Simple
Minimum System
Complexity
Easy Configuration /
Hot-deployable /
Auto-scalable
Yes Yes Yes
Remarks
Zookeeper required High-speed disk I/O required Callback web app required
Ø MQ Test Report
8
- Internal Use Only -
ØMQ Overview
Features
Intelligent socket library for messaging
Many kinds of connection patterns
Multiplatform, multi-language (30+)
Fast (8M msg/sec, 30usec latency)
Small (20K lines of C++ code)
Open source LGPL (large community)
[Basic] [Forwarding]
[Pub/Sub] [Broadcast]
9
- Internal Use Only -
ØMQ Throughput – 4 core, 8GB Memory
[root@localhost perf]# ./local_thr.sh
tcp://eth0:5555 1024 100000
message size: 1024 [B]
message count: 100000
mean throughput: 39968[msg/s]
mean throughput: 327.417856[Mb/s]
1Kb Message
[root@localhost perf]# ./remote_thr.sh
tcp://192.168.56.101:5555 1024 100000
Sent elapsed time : 2.339 sec
Sender Receiver
[root@localhost perf]# ./local_thr.sh
tcp://eth0:5555 2048 100000
message size: 2048 [B]
message count: 100000
mean throughput: 49504[msg/s]
mean throughput: 811.073536[Mb/s]
2Kb Message
[root@localhost perf]# ./remote_thr.sh
tcp://192.168.56.101:5555 2048 100000
Sent elapsed time : 1.499 sec
4Kb Message
[root@localhost perf]# ./local_thr.sh
tcp://eth0:5555 4096 100000
message size: 4096 [B]
message count: 100000
mean throughput: 29446[msg/s]
mean throughput: 964.886528[Mb/s]
[root@localhost perf]# ./remote_thr.sh
tcp://192.168.56.101:5555 4096 100000
Sent elapsed time : 2.137 sec
10Kb Message
[root@localhost perf]# ./local_thr.sh
tcp://eth0:5555 10240 100000
message size: 10240 [B]
message count: 100000
mean throughput: 13048[msg/s]
mean throughput: 1068.89216[Mb/s]
[root@localhost perf]# ./remote_thr.sh
tcp://192.168.56.101:5555 10240 100000
Sent elapsed time : 3.091 sec
10
- Internal Use Only -
Rabbit MQ Throughput – 4 core, 8GB Memory
[jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 2048
starting consumer #0
starting producer #0
time: 6.000s, sent: 7198 msg/s, received: 7190 msg/s, min/avg/max latency: 1463/3982/23183 microseconds
time: 7.000s, sent: 7335 msg/s, received: 7341 msg/s, min/avg/max latency: 1508/2892/6231 microseconds
time: 8.000s, sent: 7386 msg/s, received: 7370 msg/s, min/avg/max latency: 1358/3691/15787 microseconds
time: 9.000s, sent: 7262 msg/s, received: 7270 msg/s, min/avg/max latency: 1306/3091/7463 microseconds
time: 10.000s, sent: 7283 msg/s, received: 7287 msg/s, min/avg/max latency: 1551/2924/7089 microseconds
time: 11.000s, sent: 7164 msg/s, received: 7170 msg/s, min/avg/max latency: 1565/3522/11979 microseconds
time: 12.000s, sent: 6043 msg/s, received: 6034 msg/s, min/avg/max latency: 1097/8846/41617 microseconds
time: 13.000s, sent: 6040 msg/s, received: 6051 msg/s, min/avg/max latency: 943/11451/58797 microseconds
[jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 10240
starting consumer #0
starting producer #0
ime: 5.000s, sent: 2447 msg/s, received: 2447 msg/s, min/avg/max latency: 550/1344/17682 microseconds
ime: 6.000s, sent: 2701 msg/s, received: 2702 msg/s, min/avg/max latency: 569/1134/4756 microseconds
ime: 7.000s, sent: 2732 msg/s, received: 2731 msg/s, min/avg/max latency: 534/1122/3344 microseconds
ime: 8.000s, sent: 2728 msg/s, received: 2730 msg/s, min/avg/max latency: 551/1121/2082 microseconds
ime: 9.000s, sent: 2798 msg/s, received: 2798 msg/s, min/avg/max latency: 606/1116/2105 microseconds
[Rabbit MQ Result]
DescriptionSolution
RabbitMQ
• Stable send/receive process
• Can use AMQP(High performance)
• Similar producer/consumer speed
• Support runtime queue create/delete(very flexible)
Producer/Consumer Simultaneously; 2K and 10K message
Producer/Consumer
11
- Internal Use Only -
Comparison – RabbitMQ vs. ØMQ
Criteria RabbitMQ Ø MQ
Short Response
Time
Short Messaging Routes Short Short
Performance
(Based on 10Kb)
2798 msg/sec
4.66 times faster than RabbitMQ – 13048
msg/sec
Asynchronous
Processing
Sync, Async Supported Async based event processing
Light-weight Software
Stacks
Light More Light
High Availability
No Single Point of
Failures
HA Cluster Support No Broker Architecture
Flexibility
Supported Data Formats Various(JSON, POJO, etc.) Various(JSON, Thrift, Google ProtoBuf, etc.)
Easy Configuration GUI Based Configuration Implementation needed
Runtime Configuration Runtime deploy for queue, topic Implementation needed
Commercial Support SpringSource(VMWare) iMatrix
Monitoring Many plugin for monitoring, web based GUI Implementation needed
Remarks
• Powerful web based monitoring
• AMQP1) Support
• Dynamic topic management
• Easy of Development
• High throughput/Low latency
• Auto reconnect among peer
• Run on arbitrary platforms (Windows,
Android)
1) AMQP(Asynchronous Message Queuing Protocol) : Supported by Microsoft, Red Hat, VMware, Cisco, Novell, SoftwareAG, etc.
Ø MQ is very lightweight and fast, but we’ll have to implement most of features ourselves
Flexibility, reliability, and easy to use are important in this project, not performance
Appendix A. Ø MQ
- Implementation Model -
13
- Internal Use Only -
Install
Ø MQ core is built using C language
Prerequisites : autoconf, automake, gcc, gcc-g++, make, git, java, libtool
[Documents]
ZeroMQ : http://www.zeromq.org/
ZeroMQ Java : http://www.zeromq.org/bindings:java
Guide : http://zguide.zeromq.org/page:all
Korean : http://kr.zeromq.org/
[ZeroMQ Core Install]
wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
tar -zxvf zeromq-2.2.0.tar.gz
cd zeromq-2.2.0
./configure --with-pgm  Multicast support
make
sudo make install
[ZeroMQ Java Install]
git clone https://github.com/zeromq/jzmq.git
cd jzmq
./autogen.sh
./configure
make
sudo make install
14
- Internal Use Only -
Client/Server
import org.zeromq.ZMQ;
public class hwclient {
public static void main (String[] args){
ZMQ.Context context = ZMQ.context (1);
ZMQ.Socket socket = context.socket (ZMQ.REQ);
socket.connect ("tcp://localhost:5555");
socket.send ("Hello", 0);
System.out.println (socket.recv(0));
}
}
import org.zeromq.ZMQ;
public class hwserver {
public static void main (String[] args) {
ZMQ.Context context = ZMQ.context(1);
ZMQ.Socket socket = context.socket(ZMQ.REP);
socket.bind ("tcp://*:5555");
while (true) {
byte [] request = socket.recv (0);
socket.send("World", 0);
}
}
}
15
- Internal Use Only -
Queue Load Balancing
import zmq
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://127.0.0.1:5000")
socket.connect("tcp://127.0.0.1:6000")
for i in range(10):
msg = "msg %s" % i
socket.send(msg)
print "Sending", msg
msg_in = socket.recv()
import zmq
context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://127.0.0.1:5000")
while True:
msg = socket.recv()
print "Got", msg
socket.send(msg)
import zmq
context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://127.0.0.1:6000")
while True:
msg = socket.recv()
print "Got", msg
socket.send(msg)
Each server will be received five messages equivalently
16
- Internal Use Only -
Broadcast - Pub/Sub
import zmq
from random import choice
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://127.0.0.1:5000")
countries = ['netherlands','brazil','germany','portugal']
events = ['yellow card', 'red card', 'goal', 'corner', 'foul']
while True:
msg = choice( countries ) +" "+ choice( events )
print "->",msg
socket.send( msg )
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("tcp://127.0.0.1:5000")
socket.setsockopt(zmq.SUBSCRIBE, "netherlands")
socket.setsockopt(zmq.SUBSCRIBE, "germany")
while True:
print socket.recv()
Subscriber will be received only “netherlands” and “germany”
17
- Internal Use Only -
OPEN
SHARE
CONTRIBUTE
ADOPT
REUSE
18
- Internal Use Only -

Contenu connexe

En vedette

En vedette (11)

[오픈소스컨설팅]Data Source Password Encryption on JBoss EAP 6
[오픈소스컨설팅]Data Source Password Encryption on JBoss EAP 6[오픈소스컨설팅]Data Source Password Encryption on JBoss EAP 6
[오픈소스컨설팅]Data Source Password Encryption on JBoss EAP 6
 
The Archived Canadian Patent Competitive Intelligence (2013/10/1)
The Archived Canadian Patent Competitive Intelligence (2013/10/1) The Archived Canadian Patent Competitive Intelligence (2013/10/1)
The Archived Canadian Patent Competitive Intelligence (2013/10/1)
 
The archived Canadian US Patent Competitive Intelligence Database (2016/6/28)
The archived Canadian US Patent Competitive Intelligence Database (2016/6/28) The archived Canadian US Patent Competitive Intelligence Database (2016/6/28)
The archived Canadian US Patent Competitive Intelligence Database (2016/6/28)
 
The archived Canadian US Patent Competitive Intelligence Database (2016/4/19)
The archived Canadian US Patent Competitive Intelligence Database (2016/4/19) The archived Canadian US Patent Competitive Intelligence Database (2016/4/19)
The archived Canadian US Patent Competitive Intelligence Database (2016/4/19)
 
中国儒家思想在知识经济时代的价值 The Value of Chinese Confucius' Philosophy in the Modern Kno...
中国儒家思想在知识经济时代的价值 The Value of Chinese Confucius' Philosophy in the Modern Kno...中国儒家思想在知识经济时代的价值 The Value of Chinese Confucius' Philosophy in the Modern Kno...
中国儒家思想在知识经济时代的价值 The Value of Chinese Confucius' Philosophy in the Modern Kno...
 
The archived Canadian US Patent Competitive Intelligence Database (2015/2/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/2/3) The archived Canadian US Patent Competitive Intelligence Database (2015/2/3)
The archived Canadian US Patent Competitive Intelligence Database (2015/2/3)
 
The archived Canadian US Patent Competitive Intelligence Database (2015/11/17)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/17) The archived Canadian US Patent Competitive Intelligence Database (2015/11/17)
The archived Canadian US Patent Competitive Intelligence Database (2015/11/17)
 
TAH Grant Summer 2012: Clark and baker
TAH Grant Summer 2012: Clark and bakerTAH Grant Summer 2012: Clark and baker
TAH Grant Summer 2012: Clark and baker
 
The Archived Canadian Patent Competitive Intelligence (May 3, 2011)
The Archived Canadian Patent Competitive Intelligence (May 3, 2011)The Archived Canadian Patent Competitive Intelligence (May 3, 2011)
The Archived Canadian Patent Competitive Intelligence (May 3, 2011)
 
The archived Canadian US Patent Competitive Intelligence Database (2015/3/24)
The archived Canadian US Patent Competitive Intelligence Database (2015/3/24) The archived Canadian US Patent Competitive Intelligence Database (2015/3/24)
The archived Canadian US Patent Competitive Intelligence Database (2015/3/24)
 
The archived Canadian US Patent Competitive Intelligence Database (2016/1/5)
The archived Canadian US Patent Competitive Intelligence Database (2016/1/5) The archived Canadian US Patent Competitive Intelligence Database (2016/1/5)
The archived Canadian US Patent Competitive Intelligence Database (2016/1/5)
 

Plus de Ji-Woong Choi

Plus de Ji-Woong Choi (20)

[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
 
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
 
[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략
 
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
 
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
 
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
 
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
 
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
 
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
 
OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기
 
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
 
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
Docker Setting for Static IP allocation
Docker Setting for Static IP allocationDocker Setting for Static IP allocation
Docker Setting for Static IP allocation
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드
 
[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick Guide[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick Guide
 
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

[오픈소스컨설팅] Messaging Benchmark

  • 1. 주식회사 오픈소스컨설팅 Messaging Test - Ø MQ, RabbitMQ, SQS, Kafka, etc -
  • 2. 2 - Internal Use Only - Basic Process Database/NoSQL Gateway ModuleAPI Module Web AppsFunction Component 1 Service Layer Business Layer Data Access Layer Component 2 Service Layer Business Layer Data Access Layer API Access 2. Put 1. API call (Servlet Param) … Messaging or Task 3. Reply(JSON) 4. Deliver Msg to Component Client, CP/SP Queue DescriptionComponent API Module • Polling data, data parsing • Send parsed data to message queue Gateway Module • Subscribe from message queue, retrieve room data from data stores • Send data to Push Server • Consumer pool
  • 3. 3 - Internal Use Only - Kafka Performance Test – 2.8 Ghz, 4core, 8GB memory Producer Batch-size 200 [jboss@localhost kafka-0.7.0]$ ./bin/kafka-producer-perf-test.sh --brokerinfo broker.list=0:localhost:9092 --messages 100000 --topic test --threads 1 --message-size 2048 [2012-05-28 09:02:31,236] INFO Creating sync producer for broker id = 0 at localhost:9092 (kafka.producer.ProducerPool) [2012-05-28 09:02:37,730] INFO Disconnecting from localhost:9092 (kafka.producer.SyncProducer) [2012-05-28 09:02:37,733] INFO Total Num Messages: 100000 bytes: 204800000 in 6.567 secs (kafka.tools.ProducerPerformance$) [2012-05-28 09:02:37,742] INFO Messages/sec: 15227.6534 (kafka.tools.ProducerPerformance$) [2012-05-28 09:02:37,742] INFO MB/sec: 29.7415 (kafka.tools.ProducerPerformance$) [jboss@localhost kafka-0.7.0]$ Consumer [2012-05-28 09:02:49,552] INFO Consumer test-consumer-group_localhost.localdomain-1338210169298-69d7d792 selected partitions : test:0-0: fetched offset = 2102058861: consumed offset = 2102058861 (kafka.consumer.ZookeeperConsumerConnector) [2012-05-28 09:02:49,558] INFO end rebalancing consumer test-consumer-group_localhost.localdomain-1338210169298-69d7d792 try #0 (kafka.consumer.ZookeeperConsumerConnector) [2012-05-28 09:02:49,560] INFO Sleeping for 5 seconds. (kafka.tools.ConsumerPerformance$) [2012-05-28 09:02:49,561] INFO FetchRunnable-0 start fetching topic: test part: 0 offset: 2102058861 from 127.0.0.1:9092 (kafka.consumer.FetcherRunnable) [2012-05-28 09:02:54,561] INFO starting threads (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:20,065] INFO thread[7], nMsgs:100000 bytes:204800000 nMsgs/sec:3923.57 MB/sec:7.66 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,065] INFO thread[9], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,067] INFO thread[8], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,070] INFO thread[7], nMsgs:100000 bytes:204800000 nMsgs/sec:2597.47 MB/sec:5.07 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,073] INFO thread[6], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,075] INFO thread[5], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,077] INFO thread[4], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) [2012-05-28 09:03:33,078] INFO thread[3], nMsgs:0 bytes:0 nMsgs/sec:0.00 MB/sec:0.00 (kafka.tools.ConsumerPerformance$) DescriptionLocation Producer • Batch-size가 1일 경우 상당한 퍼포먼스 문제 • 위의 테스트는 batch-size 200으로 처리(200개 메시지 들어올 경우 flush) Consumer • Multi consumer 일 경우라 하더라도 하나의 파티션에 대해 하나의 consumer만 처리 • Consumer pool이 하나의 디스크로 인하여 의미가 없음 • Consumer pool Producer Batch-size 1 [jboss@localhost kafka-0.7.0]$ ./bin/kafka-producer-perf-test.sh --brokerinfo broker.list=0:localhost:9092 --messages 100000 --topic test --threads 1 --message-size 2048 --batch-size 1 [2012-05-28 09:25:10,494] INFO Closing all sync producers (kafka.producer.ProducerPool) [2012-05-28 09:25:10,494] INFO Disconnecting from 127.0.0.1:9092 (kafka.producer.SyncProducer) [2012-05-28 09:25:10,510] INFO thread 2: 10000 messages sent 1682.3688 nMsg/sec 0.1604 MBs/sec (kafka.tools.ProducerPerfor mance$SyncProducerThread) [2012-05-28 09:25:10,510] INFO Closing all sync producers (kafka.producer.ProducerPool) [2012-05-28 09:25:10,510] INFO Disconnecting from 127.0.0.1:9092 (kafka.producer.SyncProducer) [2012-05-28 09:25:10,512] INFO thread 3: 10000 messages sent 1769.9115 nMsg/sec 0.1688 MBs/sec (kafka.tools.ProducerPerfor mance$SyncProducerThread) http://www.mail-archive.com/kafka-users@incubator.apache.org/msg01016.html
  • 4. 4 - Internal Use Only - Rabbit MQ, HornetQ – 4core, 8GB Memory Producer /Consumer Simultaneously [jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 2048 starting consumer #0 starting producer #0 time: 6.000s, sent: 7198 msg/s, received: 7190 msg/s, min/avg/max latency: 1463/3982/23183 microseconds time: 7.000s, sent: 7335 msg/s, received: 7341 msg/s, min/avg/max latency: 1508/2892/6231 microseconds time: 8.000s, sent: 7386 msg/s, received: 7370 msg/s, min/avg/max latency: 1358/3691/15787 microseconds time: 9.000s, sent: 7262 msg/s, received: 7270 msg/s, min/avg/max latency: 1306/3091/7463 microseconds time: 10.000s, sent: 7283 msg/s, received: 7287 msg/s, min/avg/max latency: 1551/2924/7089 microseconds time: 11.000s, sent: 7164 msg/s, received: 7170 msg/s, min/avg/max latency: 1565/3522/11979 microseconds time: 12.000s, sent: 6043 msg/s, received: 6034 msg/s, min/avg/max latency: 1097/8846/41617 microseconds time: 13.000s, sent: 6040 msg/s, received: 6051 msg/s, min/avg/max latency: 943/11451/58797 microseconds [jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 10240 starting consumer #0 starting producer #0 ime: 5.000s, sent: 2447 msg/s, received: 2447 msg/s, min/avg/max latency: 550/1344/17682 microseconds ime: 6.000s, sent: 2701 msg/s, received: 2702 msg/s, min/avg/max latency: 569/1134/4756 microseconds ime: 7.000s, sent: 2732 msg/s, received: 2731 msg/s, min/avg/max latency: 534/1122/3344 microseconds ime: 8.000s, sent: 2728 msg/s, received: 2730 msg/s, min/avg/max latency: 551/1121/2082 microseconds ime: 9.000s, sent: 2798 msg/s, received: 2798 msg/s, min/avg/max latency: 606/1116/2105 microseconds [Rabbit MQ] [HornetQ, ActiveMQ] DescriptionSolution RabbitMQ • Stable send/receive process • Can use AMQP(High performance) • Support runtime queue create/delete(very flexible) HornetQ • High performance if message size is large • Support Linux AIO, JMS Bridge • Embedded code 가능
  • 5. 5 - Internal Use Only - Amazon SNS, SQS Message send cost : avg 0.125 sec per message Sender 1 Sender 2 Receiver 1 Receiver 2 [SQS Architecture] Sender 1 Sender 2 Receiver 1 Receiver 2 Web Application Server Endpoint URL Queue [SNS Architecture] DescriptionLocation Producer • Sending part is HTTP client method call • Sending speed is very slow • Call public DNS Consumer • Processing time on receiver depends on web application server performance • Consumer is processed by web application server thread • HTTP Thread
  • 6. 6 - Internal Use Only - Comparison Criteria Netty Kafka SNS Short Response Time Short Messaging Routes Short Short Long Connection Handshake Cost Low (Connection Pooling Supported) Middle (Handshakes on producers/consumers) High (HTTP Connectionless Only) Asynchronous Processing Async / Sync Supported Async Supported Async Supported (HTTP Long Pooling) Light-weight Software Stacks Light Light Heavy High Availability No Single Point of Failures SPF exists (Zookeeper Required) HA Supported (Zookeeper Embedded by default) HA Supported References Twitter, Plurk, Eucalyptus, Siemens Linked-in, Tumblr (used for message store, NOT pub/sub) AWS customers Minimum System Complexity Supported Data Formats Web Socket, Protobuf, POJO, Text, Avro, Thrift, Byte Array Byte Array only Text only Simple Object Model Simple Complex (Kafka’s topic object model does not fit into the event model) Simple Minimum System Complexity Easy Configuration / Hot-deployable / Auto-scalable Yes Yes Yes Remarks Zookeeper required High-speed disk I/O required Callback web app required
  • 7. Ø MQ Test Report
  • 8. 8 - Internal Use Only - ØMQ Overview Features Intelligent socket library for messaging Many kinds of connection patterns Multiplatform, multi-language (30+) Fast (8M msg/sec, 30usec latency) Small (20K lines of C++ code) Open source LGPL (large community) [Basic] [Forwarding] [Pub/Sub] [Broadcast]
  • 9. 9 - Internal Use Only - ØMQ Throughput – 4 core, 8GB Memory [root@localhost perf]# ./local_thr.sh tcp://eth0:5555 1024 100000 message size: 1024 [B] message count: 100000 mean throughput: 39968[msg/s] mean throughput: 327.417856[Mb/s] 1Kb Message [root@localhost perf]# ./remote_thr.sh tcp://192.168.56.101:5555 1024 100000 Sent elapsed time : 2.339 sec Sender Receiver [root@localhost perf]# ./local_thr.sh tcp://eth0:5555 2048 100000 message size: 2048 [B] message count: 100000 mean throughput: 49504[msg/s] mean throughput: 811.073536[Mb/s] 2Kb Message [root@localhost perf]# ./remote_thr.sh tcp://192.168.56.101:5555 2048 100000 Sent elapsed time : 1.499 sec 4Kb Message [root@localhost perf]# ./local_thr.sh tcp://eth0:5555 4096 100000 message size: 4096 [B] message count: 100000 mean throughput: 29446[msg/s] mean throughput: 964.886528[Mb/s] [root@localhost perf]# ./remote_thr.sh tcp://192.168.56.101:5555 4096 100000 Sent elapsed time : 2.137 sec 10Kb Message [root@localhost perf]# ./local_thr.sh tcp://eth0:5555 10240 100000 message size: 10240 [B] message count: 100000 mean throughput: 13048[msg/s] mean throughput: 1068.89216[Mb/s] [root@localhost perf]# ./remote_thr.sh tcp://192.168.56.101:5555 10240 100000 Sent elapsed time : 3.091 sec
  • 10. 10 - Internal Use Only - Rabbit MQ Throughput – 4 core, 8GB Memory [jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 2048 starting consumer #0 starting producer #0 time: 6.000s, sent: 7198 msg/s, received: 7190 msg/s, min/avg/max latency: 1463/3982/23183 microseconds time: 7.000s, sent: 7335 msg/s, received: 7341 msg/s, min/avg/max latency: 1508/2892/6231 microseconds time: 8.000s, sent: 7386 msg/s, received: 7370 msg/s, min/avg/max latency: 1358/3691/15787 microseconds time: 9.000s, sent: 7262 msg/s, received: 7270 msg/s, min/avg/max latency: 1306/3091/7463 microseconds time: 10.000s, sent: 7283 msg/s, received: 7287 msg/s, min/avg/max latency: 1551/2924/7089 microseconds time: 11.000s, sent: 7164 msg/s, received: 7170 msg/s, min/avg/max latency: 1565/3522/11979 microseconds time: 12.000s, sent: 6043 msg/s, received: 6034 msg/s, min/avg/max latency: 1097/8846/41617 microseconds time: 13.000s, sent: 6040 msg/s, received: 6051 msg/s, min/avg/max latency: 943/11451/58797 microseconds [jboss@localhost rabbitmq-java-client-bin-2.8.2] ./runjava.sh com.rabbitmq.examples.MulticastMain --size 10240 starting consumer #0 starting producer #0 ime: 5.000s, sent: 2447 msg/s, received: 2447 msg/s, min/avg/max latency: 550/1344/17682 microseconds ime: 6.000s, sent: 2701 msg/s, received: 2702 msg/s, min/avg/max latency: 569/1134/4756 microseconds ime: 7.000s, sent: 2732 msg/s, received: 2731 msg/s, min/avg/max latency: 534/1122/3344 microseconds ime: 8.000s, sent: 2728 msg/s, received: 2730 msg/s, min/avg/max latency: 551/1121/2082 microseconds ime: 9.000s, sent: 2798 msg/s, received: 2798 msg/s, min/avg/max latency: 606/1116/2105 microseconds [Rabbit MQ Result] DescriptionSolution RabbitMQ • Stable send/receive process • Can use AMQP(High performance) • Similar producer/consumer speed • Support runtime queue create/delete(very flexible) Producer/Consumer Simultaneously; 2K and 10K message Producer/Consumer
  • 11. 11 - Internal Use Only - Comparison – RabbitMQ vs. ØMQ Criteria RabbitMQ Ø MQ Short Response Time Short Messaging Routes Short Short Performance (Based on 10Kb) 2798 msg/sec 4.66 times faster than RabbitMQ – 13048 msg/sec Asynchronous Processing Sync, Async Supported Async based event processing Light-weight Software Stacks Light More Light High Availability No Single Point of Failures HA Cluster Support No Broker Architecture Flexibility Supported Data Formats Various(JSON, POJO, etc.) Various(JSON, Thrift, Google ProtoBuf, etc.) Easy Configuration GUI Based Configuration Implementation needed Runtime Configuration Runtime deploy for queue, topic Implementation needed Commercial Support SpringSource(VMWare) iMatrix Monitoring Many plugin for monitoring, web based GUI Implementation needed Remarks • Powerful web based monitoring • AMQP1) Support • Dynamic topic management • Easy of Development • High throughput/Low latency • Auto reconnect among peer • Run on arbitrary platforms (Windows, Android) 1) AMQP(Asynchronous Message Queuing Protocol) : Supported by Microsoft, Red Hat, VMware, Cisco, Novell, SoftwareAG, etc. Ø MQ is very lightweight and fast, but we’ll have to implement most of features ourselves Flexibility, reliability, and easy to use are important in this project, not performance
  • 12. Appendix A. Ø MQ - Implementation Model -
  • 13. 13 - Internal Use Only - Install Ø MQ core is built using C language Prerequisites : autoconf, automake, gcc, gcc-g++, make, git, java, libtool [Documents] ZeroMQ : http://www.zeromq.org/ ZeroMQ Java : http://www.zeromq.org/bindings:java Guide : http://zguide.zeromq.org/page:all Korean : http://kr.zeromq.org/ [ZeroMQ Core Install] wget http://download.zeromq.org/zeromq-2.2.0.tar.gz tar -zxvf zeromq-2.2.0.tar.gz cd zeromq-2.2.0 ./configure --with-pgm  Multicast support make sudo make install [ZeroMQ Java Install] git clone https://github.com/zeromq/jzmq.git cd jzmq ./autogen.sh ./configure make sudo make install
  • 14. 14 - Internal Use Only - Client/Server import org.zeromq.ZMQ; public class hwclient { public static void main (String[] args){ ZMQ.Context context = ZMQ.context (1); ZMQ.Socket socket = context.socket (ZMQ.REQ); socket.connect ("tcp://localhost:5555"); socket.send ("Hello", 0); System.out.println (socket.recv(0)); } } import org.zeromq.ZMQ; public class hwserver { public static void main (String[] args) { ZMQ.Context context = ZMQ.context(1); ZMQ.Socket socket = context.socket(ZMQ.REP); socket.bind ("tcp://*:5555"); while (true) { byte [] request = socket.recv (0); socket.send("World", 0); } } }
  • 15. 15 - Internal Use Only - Queue Load Balancing import zmq context = zmq.Context() socket = context.socket(zmq.REQ) socket.connect("tcp://127.0.0.1:5000") socket.connect("tcp://127.0.0.1:6000") for i in range(10): msg = "msg %s" % i socket.send(msg) print "Sending", msg msg_in = socket.recv() import zmq context = zmq.Context() socket = context.socket(zmq.REP) socket.bind("tcp://127.0.0.1:5000") while True: msg = socket.recv() print "Got", msg socket.send(msg) import zmq context = zmq.Context() socket = context.socket(zmq.REP) socket.bind("tcp://127.0.0.1:6000") while True: msg = socket.recv() print "Got", msg socket.send(msg) Each server will be received five messages equivalently
  • 16. 16 - Internal Use Only - Broadcast - Pub/Sub import zmq from random import choice context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind("tcp://127.0.0.1:5000") countries = ['netherlands','brazil','germany','portugal'] events = ['yellow card', 'red card', 'goal', 'corner', 'foul'] while True: msg = choice( countries ) +" "+ choice( events ) print "->",msg socket.send( msg ) import zmq context = zmq.Context() socket = context.socket(zmq.SUB) socket.connect("tcp://127.0.0.1:5000") socket.setsockopt(zmq.SUBSCRIBE, "netherlands") socket.setsockopt(zmq.SUBSCRIBE, "germany") while True: print socket.recv() Subscriber will be received only “netherlands” and “germany”
  • 17. 17 - Internal Use Only - OPEN SHARE CONTRIBUTE ADOPT REUSE