Vert.x VS Akka
한창환 (Chang-Hwan Han)
atin84@gmail.com
 Polyglot event-driven application framework
 http://vertx.io/
 https://github.com/eclipse/vert.x
 Architecture
◦ 네트워크 처리에 Apache Netty를 서버 엔진으로 사용
◦ 노드간 통신을 지원하기 위해 데이타그리드 솔루션 HazelCast 사용
2
 Features
◦ Polyglot
 Java,JavaScript,Python,Groovy,Scala등 지원
◦ Simple concurrency mode
 Node.JS와 같은 단일 스레드 형태
◦ Node.JS보다 빠른 성능
◦ Embedded Vertx
 독립 서버 동작이 가능하며 라이브러리 형태로도 사용이 가능
◦ Simple, asynchronous programming model
3
4
5
 Toolkit and runtime for building concurrent, distributed, and fault tolerant
event-driven applications
 http://akka.io/
 https://github.com/akka/akka
 Actor를 근간으로 하는 high level의 application framework
6
 Features
◦ Simple Concurrency & Distribution
◦ Resilient by Design
◦ High Performance
 단일 시스템에서 초당 5천만 가능
 적은 메모리를 사용하여 1GB로 250만 Actor 가능
◦ Elastic & Decentralized
◦ Extensible
7
8
9
10
Akka Vert.x Quasar Norbert
Interprocess
communication
5 2 3 1
Failure detector 5 4 4 4
Recovery system 5 0 4 0
Programming model 2 1 2 1
… … … … …
Final score 20 8 17 6
11
 Why we chose Akka for our cloud device solution
(https://techblog.king.com/why-we-choose-akka-for-our-cloud-device-solution/)
12
 노드간 통신 (Interprocess communication)
◦ Akka
 Message를 Actor 사이에서 완벽한 투명성을 가지고 전달
 FIFO Message로 Actor간 전송
 계층간의 Actor에게도 Message를 보낼 수 있음
 Event bus 지원
◦ Vert.x
 Pub/Sub 방식 중앙 Event Bus
 고장 감지 (Failure detector)
◦ Akka
 Gossip-based Membership 프로토콜 이용
 서드 파티 소프트웨어 필요 없음 (cluster-aware routers and metrics)
◦ Vert.x
 클러스터 상태를 유지를 위한 Memory Data Grid databases
 Hazelcast 사용 (분산 환경 데이터 공유 In-Memory Data Grid)
13
 회복 시스템 (Recovery system)
◦ Akka
 여러개의 퍼시스턴스 시스템을 사용 가능
 매우 유연한 방식
◦ Vertx 와 Norbert 는 회복 시스템을 제공하지 않음
 프로그래밍 모델 (Programming model)
◦ Akka
 부모,자식으로 계층화되는 actor model
 액터 시스템 패러다임 - 동시성 이슈를 간단하게 해줌
◦ Vertx
 actor-like 모델을 사용
 계층적이지 않음
14
 Computation model:
◦ Vert.x is based on Event Driven model
◦ Akka is based on Actor Model of concurrency
 Reactive Streams:
◦ Vert.x has Reactive Streams builtin
◦ Akka supports Reactive Streams via Akka Streaming
◦ Akka has stream operators ( via Scala DSL ) that is very concise and clean.
 HTTP Support
◦ Vert.x has builtin support of creating network services ( HTTP, TCP etc )
◦ Akka has Akka HTTP for that
 Scala support
◦ Vert.x is written in Java
◦ Akka is written in Scala and it fun to work onetc.
15
 Remote services
◦ Vert.x supports services, so we need to explicitly create services
◦ Akka has Actors which can be deployed anywhere on the newtork, with
support clustering, replication, load-balancing, superivsion etc.
16
Vert.x Akka
Repository
5,366 Stars 6,265
491 Watchers 544
1,024 Forks 2,002
2 days ago Last Commit about 13 hours ago
More
Java Language Scala
17
18
 Tim Fox( Vert.x를 만든 사람)의 Akka에 대한 인터뷰
 I respect and appreciate the power of Scala, and those who can program in it. To me the major
problem Scala has is its too hard and tries to do many things, which means it will never be truly
mainstream like Java. But if you have a super intelligent dev team who can handle it then Scala may
be a great choice.
Akka is a great system that I have a lot of respect for it too. In some areas it takes a similar
approach to Vert.x - e.g. Vert.x has an "actor-like" approach for concurrency and we try and avoid
mutable shared data. Also both Vert.x and Akka interoperate using the new reactive streams
"standard". Both Vert.x and Akka are riding the same Zeitgeist (if that makes sense!) to a certain
extent.
I don't see Vert.x vs Akka as an "either-or" situation. I think it will be common to see installations
that use both Vert.x and Akka happily talking to each other in a nice scalable reactive way.
 요약
◦ 스칼라와 스칼라 개발자들에 대해 존경하고 좋아한다.
◦ 아카는 뛰어난 시스템이고 어떤 부분에서는 Vert.x와 매우 비슷하다.
◦ Vert.x도 Akka처럼 상태변경이 없는 순수성을 지향하고 데이터 공유 및 변경가능성에 대해 피하려고 한다.
◦ 새로운 Reactive Stream 표준에 있어서 Vert.x와 Akka는 상부 상조할 것이다.
◦ 어떻게 보면 Vert.x와 Akka 모두 같은 시대정신을 갖고 있다.
◦ Vert.x와 Akka는 같이 사용할 수도 있을 것이고, 리액티브의 길에 있어서 좋은 동반자가 될 것이다.
1. Vert.x VS Akka (https://java.libhunt.com/project/vertx/vs/akka)
2. Why we chose Akka for our cloud device solution
(https://techblog.king.com/why-we-choose-akka-for-our-cloud-device-solution/)
3. Difference in message-passing model of Akka and Vert.x
(http://stackoverflow.com/questions/21481238/difference-in-message-passing-
model-of-akka-and-vert-x)
4. Interview with Tim Fox About Vert.x 3, the Original Reactive, Microservice Toolkit for
the JVM
(https://www.infoq.com/articles/vertx-3-tim-fox)
5. Akka wiki (https://en.wikipedia.org/wiki/Akka_(toolkit))
6. Vert.x wiki (https://en.wikipedia.org/wiki/Vert.x)
19

Vert.x vs akka

  • 1.
    Vert.x VS Akka 한창환(Chang-Hwan Han) atin84@gmail.com
  • 2.
     Polyglot event-drivenapplication framework  http://vertx.io/  https://github.com/eclipse/vert.x  Architecture ◦ 네트워크 처리에 Apache Netty를 서버 엔진으로 사용 ◦ 노드간 통신을 지원하기 위해 데이타그리드 솔루션 HazelCast 사용 2
  • 3.
     Features ◦ Polyglot Java,JavaScript,Python,Groovy,Scala등 지원 ◦ Simple concurrency mode  Node.JS와 같은 단일 스레드 형태 ◦ Node.JS보다 빠른 성능 ◦ Embedded Vertx  독립 서버 동작이 가능하며 라이브러리 형태로도 사용이 가능 ◦ Simple, asynchronous programming model 3
  • 4.
  • 5.
  • 6.
     Toolkit andruntime for building concurrent, distributed, and fault tolerant event-driven applications  http://akka.io/  https://github.com/akka/akka  Actor를 근간으로 하는 high level의 application framework 6
  • 7.
     Features ◦ SimpleConcurrency & Distribution ◦ Resilient by Design ◦ High Performance  단일 시스템에서 초당 5천만 가능  적은 메모리를 사용하여 1GB로 250만 Actor 가능 ◦ Elastic & Decentralized ◦ Extensible 7
  • 8.
  • 9.
  • 10.
  • 11.
    Akka Vert.x QuasarNorbert Interprocess communication 5 2 3 1 Failure detector 5 4 4 4 Recovery system 5 0 4 0 Programming model 2 1 2 1 … … … … … Final score 20 8 17 6 11  Why we chose Akka for our cloud device solution (https://techblog.king.com/why-we-choose-akka-for-our-cloud-device-solution/)
  • 12.
    12  노드간 통신(Interprocess communication) ◦ Akka  Message를 Actor 사이에서 완벽한 투명성을 가지고 전달  FIFO Message로 Actor간 전송  계층간의 Actor에게도 Message를 보낼 수 있음  Event bus 지원 ◦ Vert.x  Pub/Sub 방식 중앙 Event Bus  고장 감지 (Failure detector) ◦ Akka  Gossip-based Membership 프로토콜 이용  서드 파티 소프트웨어 필요 없음 (cluster-aware routers and metrics) ◦ Vert.x  클러스터 상태를 유지를 위한 Memory Data Grid databases  Hazelcast 사용 (분산 환경 데이터 공유 In-Memory Data Grid)
  • 13.
    13  회복 시스템(Recovery system) ◦ Akka  여러개의 퍼시스턴스 시스템을 사용 가능  매우 유연한 방식 ◦ Vertx 와 Norbert 는 회복 시스템을 제공하지 않음  프로그래밍 모델 (Programming model) ◦ Akka  부모,자식으로 계층화되는 actor model  액터 시스템 패러다임 - 동시성 이슈를 간단하게 해줌 ◦ Vertx  actor-like 모델을 사용  계층적이지 않음
  • 14.
    14  Computation model: ◦Vert.x is based on Event Driven model ◦ Akka is based on Actor Model of concurrency  Reactive Streams: ◦ Vert.x has Reactive Streams builtin ◦ Akka supports Reactive Streams via Akka Streaming ◦ Akka has stream operators ( via Scala DSL ) that is very concise and clean.  HTTP Support ◦ Vert.x has builtin support of creating network services ( HTTP, TCP etc ) ◦ Akka has Akka HTTP for that  Scala support ◦ Vert.x is written in Java ◦ Akka is written in Scala and it fun to work onetc.
  • 15.
    15  Remote services ◦Vert.x supports services, so we need to explicitly create services ◦ Akka has Actors which can be deployed anywhere on the newtork, with support clustering, replication, load-balancing, superivsion etc.
  • 16.
    16 Vert.x Akka Repository 5,366 Stars6,265 491 Watchers 544 1,024 Forks 2,002 2 days ago Last Commit about 13 hours ago More Java Language Scala
  • 17.
  • 18.
    18  Tim Fox(Vert.x를 만든 사람)의 Akka에 대한 인터뷰  I respect and appreciate the power of Scala, and those who can program in it. To me the major problem Scala has is its too hard and tries to do many things, which means it will never be truly mainstream like Java. But if you have a super intelligent dev team who can handle it then Scala may be a great choice. Akka is a great system that I have a lot of respect for it too. In some areas it takes a similar approach to Vert.x - e.g. Vert.x has an "actor-like" approach for concurrency and we try and avoid mutable shared data. Also both Vert.x and Akka interoperate using the new reactive streams "standard". Both Vert.x and Akka are riding the same Zeitgeist (if that makes sense!) to a certain extent. I don't see Vert.x vs Akka as an "either-or" situation. I think it will be common to see installations that use both Vert.x and Akka happily talking to each other in a nice scalable reactive way.  요약 ◦ 스칼라와 스칼라 개발자들에 대해 존경하고 좋아한다. ◦ 아카는 뛰어난 시스템이고 어떤 부분에서는 Vert.x와 매우 비슷하다. ◦ Vert.x도 Akka처럼 상태변경이 없는 순수성을 지향하고 데이터 공유 및 변경가능성에 대해 피하려고 한다. ◦ 새로운 Reactive Stream 표준에 있어서 Vert.x와 Akka는 상부 상조할 것이다. ◦ 어떻게 보면 Vert.x와 Akka 모두 같은 시대정신을 갖고 있다. ◦ Vert.x와 Akka는 같이 사용할 수도 있을 것이고, 리액티브의 길에 있어서 좋은 동반자가 될 것이다.
  • 19.
    1. Vert.x VSAkka (https://java.libhunt.com/project/vertx/vs/akka) 2. Why we chose Akka for our cloud device solution (https://techblog.king.com/why-we-choose-akka-for-our-cloud-device-solution/) 3. Difference in message-passing model of Akka and Vert.x (http://stackoverflow.com/questions/21481238/difference-in-message-passing- model-of-akka-and-vert-x) 4. Interview with Tim Fox About Vert.x 3, the Original Reactive, Microservice Toolkit for the JVM (https://www.infoq.com/articles/vertx-3-tim-fox) 5. Akka wiki (https://en.wikipedia.org/wiki/Akka_(toolkit)) 6. Vert.x wiki (https://en.wikipedia.org/wiki/Vert.x) 19