4th seminar message

18
Event & Message 4 th seminar (2016)

Upload: yonghoon-ji

Post on 16-Apr-2017

231 views

Category:

Software


0 download

TRANSCRIPT

Page 1: 4th seminar message

Event & Message

4th seminar (2016)

Page 2: 4th seminar message

Overview - Enhancement

Git

SpringBoot

TDD

TestNG

Mockito

Code Coverage

JPA

Vaadin

Nexus

Guava

Aligner

NLP

V8

Parser

Junit

RabbitMQ

Solr&Elastic search

Corpus

NoSQL

Page 3: 4th seminar message

TermsEvent

In computing, an event is an action or occurrence recognised by software that may be handled by the software.

Message

In computing, messages passed between programs or between components of a single program.

Page 4: 4th seminar message

Traditional java event handling 1

Object A

Application 1

ButtonListener

Object B

message

message

User event

implement an interface defined with the event

Page 5: 4th seminar message

Traditional java event handling 2

Object

Application 1

message

Object

Application 2

message

DBMS

soc soc

Page 6: 4th seminar message

Google global bus publish-subscribe-style communication between components.Add an annotation(@Subscribe) to ObjectAEventBus.register(ObjectA)EventBus.post(ObjectA)

Page 7: 4th seminar message

Google global bus

Object A

Application 1

Register

Event busObject B Post with ObjectA’s event

Page 8: 4th seminar message

Google global bus Example

// Class is typically registered by the container.class EventBusChangeRecorder { @Subscribe public void recordCustomerChange(ChangeEvent e) { recordChange(e.getChange()); }}// somewhere during initializationeventBus.register(new EventBusChangeRecorder());// much laterpublic void changeCustomer() { ChangeEvent event = getChangeEvent(); eventBus.post(event);}

Page 9: 4th seminar message

Message Broker?

Message brokers are elements in telecommunication networks where software applications communicate by exchanging formally-defined messages.List of message broker software

AMQP : RabbitMQ, Apache QpidMQ : IBM WebSphere, Apache ActiveMQ(JMS)AQ : Oracle Advanced Queuing

Page 10: 4th seminar message

Message Queue and broker

Object

Application 1

Send/Recv

Object

Application 2

Send/Recv

Message broker

producer consumer

Page 11: 4th seminar message

RabbitMQReliability

Flexible Routing

Clustering

Runs on all major operating systems

Open source

Multi-protocolSTOMP : text-based messaging protocol, MQTT : binary protocolAMQP 1.0 : wire protocol, HTTP : JSON-RPC

Many Clients : java, ruby, python, .net, C, C++ and so on.

Management UI

Page 12: 4th seminar message

RabbitMQ – queuingSimple queue

Page 13: 4th seminar message

RabbitMQ – queuingWork queue : consuming by multiple worker

Page 14: 4th seminar message

RabbitMQ – queuingPublish / subscribe : broadcast log messages to many receivers. (X : Exchange)

Page 15: 4th seminar message

RabbitMQ – queuingRouting

Page 16: 4th seminar message

RabbitMQ – queuingTopic

Page 17: 4th seminar message

RabbitMQ – queuingRPC : relaying remote procedure call

Page 18: 4th seminar message

Demo