• Akka is a Scala-based platform that provides simpler scalability, fault-tolerance, concurrency, and remoting through the actor model and software transactional memory.

  • Apache James Server is a modular e-mail server platform that integrates SMTP, POP3, IMAP, and NNTP.

  • Apache Spark is a fast and general purpose cluster compute framework, commonly used for "Big Data" applications.

  • Apache Tajo is a distributed, fault-tolerance, low-latency, and high throughput SQL engine that provides ETL features and ad-hoc query processing on large-scale data sets.

  • Arquillian is an innovative in-container testing platform for the JVM

  • Async HTTP Client is a simple-to-use library that allows you to execute HTTP requests and process the HTTP responses asynchronously.

  • BungeeCord is the de facto proxy solution for combining multiple Minecraft servers into a cloud / hub system.

  • Couchbase is a distributed NoSQL document-oriented database that is optimized for interactive applications.

  • Cluster - Service Fabric I/O Service Fabric Cluster provides a fault-tolerant decentralized peer-to-peer based cluster membership service with no single point of failure or single point of bottleneck. It does this using gossip protocols and an automatic failure detector.

  • Elastic Search is a distributed RESTful search engine built on top of Lucene.

  • Eucalyptus is a software infrastructure for implementing on-premise cloud computing using an organization's own IT infrastructure, without modification, special-purpose hardware or reconfiguration.

  • Finagle is an extensible RPC system for the JVM, used to construct high-concurrency servers.

  • Forest is a general purpose friend-to-friend platform.

  • Gatling is an asynchronous and efficient stress tool developed with Netty and Akka.

  • Hammersmith is a pure asynchronous MongoDB driver for Scala

  • Higgs is a high performance, message oriented network library.

  • Holmes is a Java application that implements DLNA/UPnP protocol for playing videos, music, pictures and podcasts (RSS) to compatible devices.

  • HornetQ is a project to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system.

  • http-client is a high performance and throughput oriented HTTP client library.

  • Infinispan is an extremely scalable, highly avaiable data grid platform.

  • jaC64 is a C64 emulator with multiplayer support.

  • JBossWS is a feature-rich JAX-WS compatible web service stack.

  • Jetserver is a fast multiplayer java game server written using JBoss Netty and Mike Rettig's Jetlang. It supports TCP and UDP transmission and Flash AMF3 protocol.

  • JXTA is a set of open protocols that enable any connected device on the network, ranging from cell phones and wireless PDAs to PCs and servers, to communicate and collaborate in a P2P manner.

  • LittleProxy is a high-performance HTTP proxy.

  • LittleShoot is an open source P2P technology for publishing, searching, and downloading files based on open protocols and open standards.

  • MessagePack is a binary-based efficient object serialization library that enables to exchange structured objects between many languages.

  • Mobicents Media Server is a media gateway server that processes the audio and/or video streams associated with telephone calls or VoIP connections.

  • Mobicents SIP Servlets is an open source certified SIP Servlet implementation.

  • Moquette MQTT broker Simple MQTT broker that uses Netty for protocol codec.

  • Naggati "it's (DEPRECATED) now" is a protocol builder for Netty, written in Scala.

  • Netflow.io is a Scala/Netty Netflow Collector used at wasted.io

  • Netty Tools is a small collection of tools useful when working with Netty, which includes various HTTP clients and servers, bandwidth meter, and Thrift RPC processor.

  • Netty-ICAP Codec is a high performance full RFC3507 compliant ICAP codec implementation. This protocol is mostly used in proxy environments in order to offload work to external servers.

  • Netty-Livereload is the Livereload protocol implementation on Netty WebSocket implementation.

  • Netty-SocketIO is a Socket.IO server written on top of Netty

  • Netty-ZMTP is a collection of Netty channel handlers that aims to implement ZMTP/1.0, the ZeroMQ Message Transport Protocol.

  • Socket-IO - Service Fabric I/O Ultra Fast Socket.IO server based on Netty.

  • Nifty is a Netty-based Thrift transport implementation.

  • NIOSMTP is an asynchronous SMTP client implementation.

  • OpenTSDB is a distributed, scalable, Time Series Database written on top of HBase to store, index, and serve the metrics collected from computer systems.

  • Peregrine is a map reduce framework designed for running iterative jobs across partitions of data. Peregrine is designed to be FAST for executing map reduce jobs by supporting a number of optimizations and features not present in other map reduce frameworks.

  • Play Framework is a clean alternative web application framework to J2EE stack, which focuses on developer productivity and targets RESTful architecture.

  • PS3 Media Server is a DLNA compliant UPNP Media Server for PS3 which transcodes and streams any kind of media files.

  • Protobuf-RPC-Pro is a Java implementation for Google's Protocol Buffer RPC services.

  • Pushy is a Java library for sending APNs (iOS/OS X) push notifications.

  • Ratpack is a simple, capable, toolkit for creating high performance web applications.

  • Redisson provides a distributed and scalable Java data structures (Set, SortedSet, Map, ConcurrentMap, List, Queue, Deque, Lock, AtomicLong, CountDownLatch, Publish / Subscribe, HyperLogLog) on top of Redis server.

  • RESTExpress is a lightweight, fast, micro-framework for building stand-alone REST services in Java. It supports JSON and XML serialization automagically as well as ISO 8601 date formats.

  • RHQ collectd decoder decodes collectd UDP datagrams.

  • Spigot is a high performance Minecraft server based on CraftBukkit designed to provide the highest possible performance and reliability. It uses Netty for its custom network stack.

  • Spinach is a scalable thread-safe Disque client providing both synchronous and asynchronous connections.

  • Teiid is a data virtualization system that allows applications to use data from multiple, heterogenous data stores.

  • Torrent4J is a BitTorrent library implemented in pure Java.

  • TomP2P is an extended DHT (distributed hash table) which stores values for a location key in a sorted table.

  • Unfiltered is a toolkit for servicing HTTP requests in Scala that provides a consistent vocabulary for handing requests on various server backends.

  • Vert.x is an effortless asynchronous application development for the modern web and enterprise

  • WaarpFtp is an FTP Server based on Netty

  • Webbit is an event-based WebSocket and HTTP server.

  • Xitrum is an async and clustered Scala web framework and HTTP(S) server on top of Netty and Hazelcast.

  • zooterrain is a small self-containing web server app which pushes all ZooKeeper znodes and their changes to the browser (using WebSocket).



JAVA OIO


그림에 있는 순서대로 흘러가면 됩니다.

- 서버쪽에서는 Accept 를 통해 클라이언트의 접속을 기다리며 

- 접속이 되면 , 해당 클라이언트만을 위한 쓰레드를 생성합니다.

- 그 후 클라이언트는 그 쓰레드와 통신을 하게됩니다.

- 결국 클라이언트 만큼 쓰레드가 서버에 생성됩니다.


JAVA NIO



- 위 그림의 Java NIO 서버는 Hadoop 이라는 오픈소스 코어에서 가져왔습니다.

- 클라이언트측은 OIO (Old Input/Output) 이며, 서버는 NIO (New input /output) 입니다.

- 셀렉터, 채널 , 바이트버퍼의 개념을 알아야 이해할수있습니다.

- 보시다시피 굉장히 복잡하기때문에 , 스스로 만드는것 보다는 오래 검증된 라이브러리 (Netty) 같은것을
  사용하는편이 안전합니다.

- 클라이언트와 쓰레드 갯수와 무관해집니다. 


위의 그림은 오프라인 스터디용으로 작성하였기때문에, 여기에 구체적인 설명은 하지 않겠습니다.  ^^


P.S

TCP 는 연결지향이지만 메세지의 끝이 불분명하기때문에 양측에서 메세지의 처음과 끝을 약속하여 처리합니다.

- 문자열을 보낼때, 라인단위로 보냅니다. 그러면 수신측에서는 /n 을 발견할때까지 읽어서 처리합니다.

- /n 를 하나의 메세지의 끝으로 약속했을때, 메세지 안에 바이너리 데이터가 있다면 Base64 등으로 문자인코딩함.

- 처음 4바이트를 읽어서, 메세지의 길이를 확인한후에 길이만큼 바이트를 읽습니다.  ( 위에 하둡에서 이렇게 처리) 

- sync:cmd:datal-length:-------- data ------------:endSync  이런식으로 완전한 패킷정의 


스택오버플로우에 이희승씨가 요렇게 남겼네요.


- 3.x 은  deprecated 되었습니다. 유저들이 아직 많이들 사용하니깐 유지보수는 해드려요.

- 4.0 는 현재 안정화 버전입니다. 먼가 의심스러우면 요걸 쓰세요.

- 4.1 는 4.0 의 하위호환버전입니다.  몇가지 쩌는 것들을 추가했는데요. HTTP/2 나  asynchronous DNS resolver 같은거 말이죠.  그래서  4.1 은 이미 님의 어플이 4.0에서 돌아간다면 새버전으로 바꾸시는게 어떨까 하네요.

- 5.0 은 하위호환되지 않는 버전입니다.이건 4.0 처럼 rewrite 된건 아닌데요. 몇가지 디자인 결함을 바로 잡았습니다. Netty4 를 사용하고계시다면 Netty5 로 바꾸려면 몇가지 코드를 수정해야합니다.그건 Netty 3 을 Netty4 로 포팅하는것과는 다릅니다. 결국 4.x 도 deprecated  될것이고 5.0이 안정화 버전이 되겠지요.





4.0 의 주요 새로운점 


1. Buffer API changes


* ChannelBuffer  ByteBuf

- 패키지가 분리되었고 네티를 쓰지 않더라도 독립적으로 buffer API 를 쓸수있도록 하였다.그에 따라  이       름이 바뀌었다. 

- 새로운 버퍼를 생성하는 ChannelBuffers 는  Unpooled  과 ByteBufUtil 두개의 유틸리티 클래 스로 나뉘었으며, 이름에서 나타나듯이 4.0에서 새로 만들어진 풀링기능을 가진 ByteBufs가 
ByteBufAllocator  에 의해  만들어진다.

* ByteBuf is not an interface but an abstract class

* Most buffers are dynamic with maximum capacity


- 3.x 에서는 고정/동적 버퍼가 있었는데, 4.0 이래로는 모든 버퍼가 동적이 되었다. 또한 이전의 동적버퍼들보다

 더 나아졌다. ByteBuf.capacity(int newCapacity) 때문에 줄거나 늘어나는 작업을 하기 쉬워졌다.

 단 wrappedBuffer 로 생성된것은 예외다.

// No more dynamicBuffer() - use buffer().
ByteBuf buf = Unpooled.buffer();

// Increase the capacity of the buffer.
buf.capacity(1024);
...

// Decrease the capacity of the buffer (the last 512 bytes are deleted.)
buf.capacity(512);

 * Pooled buffers

  Netty 4 는 고성능 버퍼풀을 제공하며 jemalloc 의 다른 버전으로  buddy allocation 과 slab allocation 를 
   결합시켰습니다.  이것을 이용하면 좋은점은 

  • 버퍼에 대한 빈번한 메모리 할당/해제로 일어나는 GC 의 부담을 덜수있습니다.
  • 새로운 버퍼를 만들때 일어나는 메모리 대역소비를 줄였습니다. 새버퍼를 만들때는 필연적으로 0 를 채우죠.
  • 다이렉터 버퍼의 해제를 적시에 일어나게 합니다.

만약 사용자가 풀되지 않는 버퍼를 얻길 원치 않는다면, ByteBufAllocator 로 부터 버퍼를 가져오면 됩니다.

Channel channel = ...;
ByteBufAllocator alloc = channel.alloc();
ByteBuf buf = alloc.buffer(512);
....
channel.write(buf);

ChannelHandlerContext ctx = ...
ByteBuf buf2 = ctx.alloc().buffer(512);
....
channel.write(buf2)

일단 ByteBuf 가 리모트 피어로 쓰여지면 자동적으로  버퍼를 가져온 풀로 회수됩니다.

디폴트  ByteBufAllocator  는 PooledByteBufAllocator.만약 이것을 쓰기 원치 않으면 Channel.config().set

Allocator(...) 를 통해 원하는것을 넣어주면됩니다.UnpooledByteBufAllocator 이런거 말이죠.

노트:  현재 기본할당자는 UnpooledByteBufAllocator 입니다. 메모리릭의 존재가 확인되지 않는다면 

PooledByteBufAllocator 가 디폴트로 사용될것입니다.


ByteBuf 는 항상 레퍼런스 카운트 기능이 사용됩니다.


ByteBuf 의 더 예측가능한 생존싸이클을 컨트롤하기위해 Netty 는 더이상 가비지컬렉션에 의존하지 않고 레퍼런스 카운터를 사용합니다. 기본적인 룰은 :

  • 버퍼가 할당되면 레퍼런스 카운트는  1 입니다.
  • 레퍼런스 카운트가 0 이되면 해제되며  풀로 되돌아갑니다.
  • 다음은 IllegalReferenceCountException 를 일으킵니다.

    • 레퍼런스 카운트 0 인 버퍼로의 접근
    • 마이너스 값으로 레퍼런스카운트 변경 
    • Integer.MAX_VALUE 이상으로 레퍼런스카운트 증가
  • Derived buffers (e.g. slices and duplicates) 와  swapped buffers (i.e. little endian buffers) 는 그것을 생성하기위해 사용한  버퍼와 레퍼런스 카운트를 공유합니다. 


ByteBuf 가 ChannelPipeline 에서 사용될때 추가적인 룰이 있는데 명심하십시요.

  • 각각의 파이프라인안의 인바운드 ( upstream ) 핸들러는 받은 메세지를 릴리즈 해야합니다. 네티는 자동적으로 릴리즈 해주지 않아요.

    • 노트: 코덱 프레임워크는 자동적으로 릴리즈 합니다. 그리고 유저는 만약 다음 핸들러로 메세지를 넘겨주고 싶을때는 반드시 레퍼런스카운트를 증가시켜줘야합니다.
  • 아웃바운드 (downstream) 메세지가 파이프라인의 끝에 도달하면 네티는 쓰고나서 릴리즈합니다.


   자동 버퍼 릭 탐지

레퍼런스 카운팅이 강력하더라도 에러가 발생하기 쉽습니다. 버퍼를 해제하는것을 까먹을수가 있는데 이때 릭 탐지기는 로그를 써줍니다. 릭 탐지기는 PhantomReference 과 스택트레이스를 얻기때문에 높은 성능낭비를 가져올수있기때문에 릭을 발견하기위해 오랫동안 돌려본후에 기능을 꺼야합니다.

 -Dio.netty.noResourceLeakDetection  JVM 옵션으로 끌수있습니다.


2. Channel API changes




4.1 의 주요 새로운점 







5.0 의 주요 새로운점 

http://netty.io/wiki/new-and-noteworthy-in-5.0.html 정리중 








Netty 홈페이지에 jar 다운받으러 갔더니 배너에 저런게 있네요? ㅎㅎ  귀엽습니다.  한동안 아래 Netty in

Action 책을 기다렸는데 8월31일날 발간한다더니 역시나 10월달로 연기됬네요.  마지막 사진은 진짜네티

입니다. ^^

Netty 싸이트 인용 (http://netty.io/)

Netty는 NIO 클라이언트/서버프레임워크이다. 빠르고 쉽게 네트워크 어플리케이션을 개발할수있게 해준다. TCP 와 UDP 소켓서버같은 네트워크 프로그래밍을 매우 단순하고 능률적으로 만들어준다. 



Netty 는 높은 수준의 병렬 네트워킹 어플리케이션/서비스를 목적으로 만들어진 자바 라이브러리/API 이다. Netty 가 표준 Java API 들과 구분되는 뚜렷한 이유는 비동기 API 라는점이다. 이 용어는 사람마다 다르게 해석될수도있는데 논블럭킹 과 이벤트드리븐이라는 용어와 연관되어진다. 어쨋던 전에 비동기 API를 사용해보지 않았다면, Netty 를 구현함에 있어서 사고방식의 전환이 조금 필요할것이다. 비동기적으로 호출된다는것은 즉시 반환이 이루어진다는점과 리턴값이 없다는점을 염두해야한다. 받아야할 리턴값은 다른 쓰레드가 미래의 어느 시점에 되돌려 줄것이다. 이것이 일반적인 표준API 과 기본적인 차이점이다. 아래 예를 통해 잠시 살펴보자.


Standard API 

public int getWidgetCount();


Asynchronous API 

public WidgetCountListener myListener = new WidgetCountListener() {
     public void onWidgetCount(int widgetCount) {
          ...... do your thing with the widget count
 
     }
};


위의 getWidgetCount 함수는 int 값을 리턴하지만, 아래의 비동기 방식에서는 리턴하지 않으며 대신 응답 핸들러를 주입하게됩니다. 이 핸들러는 나중에 작업을 처리하는 쓰레드에 의해서 호출되어 질것이며, 사용자는 결과를 얻고 싶을때 가져와서 사용하게 됩니다. 보증할수없는 복잡성한 레이어를 추가한것으로 보이지만 이것은 높은성능향상을 어플리케이션과 서비스에 가져다 주게됩니다. 클라이언트는 응답을 기다리기위해 wait() 함수속에서 시간을 낭비할 필요가 없습니다. 엄마가 밥도 아직 차리지 않았는데, 멍하니 식탁에 앉아있을 필요가 없습니다. 게임하면서 놀다가 엄마가 부르면 그때 나가서 냠냠하면 된다는 이야기입니다.(실제 엄마들 처럼 미리 부르지 않습니다 ^^;;) 이런 시스템은 Selectors 라는것과 함께 사용되는데 이것은 OS 시스템과 연동되어집니다.OS 에서 준비가 완료되면 알려주며, 이런 과정은 추상화되어 개발자는 상위레벨에서 쉽게 Java NIO / Netty API 를 구현할수있게 됩니다.

이 연재에서는 기본컨셉과 코어블럭들의 이름에 대해서 소개하고, 실제 코드예제를 볼것입니다.



..번역중..


 ChannelFactory


 NioClientSocketChannelFactory and NioServerSocketChannelFactory


The Boss Threads


The Worker Threads


ChannelEvent


SimpleChannelHandler


ChannelFuture.


ObjectEncoder /  ObjectDecoder


DateReceiver


ServerBootstrap /  ClientBootstrap


messageReceived / messageEvent


Upstream and Downstream

Dynamically Modifying ChannelHandlers in the Pipeline


ChannelHandlerContext



레퍼런스 

http://seeallhearall.blogspot.kr/2012/05/netty-tutorial-part-1-introduction-to.html  요약정리

http://tech.kinja.com/interview-with-norman-maurer-netty-vert-x-1119968136 번역 



이 기사는 JVM 상에서 돌아가는 이벤트 드리븐 솔루션에 촛점을 맞춘 뉴 인터뷰 시리즈중 첫번째 부분이다.


Norman Maurer 는 유명한 Netty 라이브러리의 기술리더이자 vert.x 프로젝트의 코어 커미터이다.

Interview with Norman Maurer (Netty/Vert.x)

Netty4 and Vert.x 2.0 릴리즈를 축하드립니다.

감사합니다.

Netty4 에 대해 이야기해볼까요

좋습니다.

다음과 같은 것들 ..음   ChannelHandlers 가 소수의 이벤트를 발생시키는것과 같은것 뿐 만 아니라, 모듈화 방식 변경에 대해 파고들었는데요...

예.. 우리는 몇가지 이슈를 가지고있었어요..무거운 이벤트 생성 GC-presure 같은 .. 그런것들을 바로잡을 시간이라 생각했습니다.


Vert.x 말고 Netty 4 기반의 다른 프로젝트에 대해 인지하시는지? 개인적으로 , 좀더 실세계 예제를 보고 싶은데요..

몇가지 Netty 4로 포팅하려는 프로젝트들은 있어요 뭐.. 그들 대부분은 아직 시작이지만요..


이런 질문을 하게 만드는 이유는 Netty 4 가 매우 큰 진보를 하고있다는게  분명히 다가오는데에 있는데요 (new Buffer handling, ChannelFuture-s, easier resource management, leak detection etc.) 근데 마이그레이션은  꽤 까다롭다고 생각되는데요.

오케이, 몇가지 구체적으로 말해보자면, Vert.x 는 좀 도전적이죠. Vert.x 를 작업하는 팀의 일부분인게 놀라운건 아니지만.. 다음 프로젝트는 제가 알기론 HornetQ 의 Netty 4 적용일거에요.

좀 더 작은 프로젝트들도 몇개있긴해요. 매력적이지만 좀 느리게 진행되는데, 무거운 API 들과 양질의 문서화때문일거에요. 우리의 약한부분이기도 한데 나의 책과 함께 좀 더 나아지게 할것입니다.

전반적으로 오래된 유저들 (새로운 컨셉에 적응해야할) 보다는 새로 진입하는분들이 적응하긴 쉬울꺼에요, 예를들어 Netty 3 유저들은 왜 버퍼들이 이제 pooled 되었는지도 이해해야하고 그들을 릴리즈하는게 누구 책임인지도 이해해야하죠.

이런 변경은 좋은방향으로 나아갈겁니다. 우리의 벤치마크에 따르면 Vert.x 의 pooled 버퍼는 un-pooled 에 비해 10% 스피드업이라는 결과를 보여주고 있어요.


전에 리소스 핸들링에 대해서 다시 생각하고있다는걸 언급했었는데요, 버퍼 리소스를 해제시키는게 누구 책임인가요? pool 에 의해 다 해결되나요?

아니요. 기본적으로 인바운드 트래픽에 대해서 네티의 transport 는 pool 바깥에서 버퍼를 얻습니다. 그리고나서 파이프라인을 통해 버퍼를 통과시키고 , ChannelInboundHandler  는  버퍼를 받아요. 파이프라인의 마지막 핸들러는 그것을 해제시킬 필요가 있습니다.


새로운 메모리릭 감지기는 버퍼가 제대로 해제가 안되었을경우 잡을수 있나요?

우리의 엔코더와 디코더는 자동적으로 버퍼를 해제합니다.  우리는 SimpleChannelInboundHandler 를 제공하고 있는데 이것은 모든  버퍼를 자동 해제합니다. 대조적으로 ChannelInboundHandlerAdapter  그렇지 않아요.  대부분의 경우에서는 전자를 사용할수있을겁니다.  ByteBuf 를 직접 다룰경우나 동일한 버퍼를 채널에 돌려주면서 쓰는곳은 좀 예외겠지만요. (에코서버나 프록시같은). 아웃바운드(즉 write) 경우는 버퍼는 채널에 쓰기가 완료되면서 해제됩니다. 메모리릭 감지기는 이런것들을 감지하고 경고를 로깅할것입니다.


알겠습니다. 좀 더 가벼운 주제로 바꿔보겠습니다. 만약 HTTP server 를 만들필요가 있을때 기반으로 Netty4 나 Vert.x 중 무엇이 좋을까요?  둘다 좋을거 같긴한데요.

글쎄요. 네티는 좀더 로우레벨이죠.  ( 역주 : 개인적으로는 Vert.x 를 로우레벨로 쓰는것은 어떨지  궁금하다, 즉 거의 모든 경우에 있어서 Vert.x 를 사용하고 싶다는 ...)


sockJs 가 Netty4  를  hits  한다고 한다면 ,    Vert.x 구현체를 사용해야하나요? 

바라보는곳이 어딘지에 따라 달라지겠지요. Vert.x 는 네티에 비해 좀더 많은것을 제공하고있어요. 만약 여러가지 애드온이나 라이브러리가  필요하지 않다면 , 그냥 네티가 좋을수도있구요, Vert.x 는 정말 다양한 API 를 제공하고있어요, 또 만약 polyglot 으로 가고 싶다면 Vert.x 죠. 


Vert.x 2.0 에서는 모듈 시스템이 많이 발전된것처럼 보입니다. 이 새로운 구조에 대해서 말해주시겠습니까?  maven repos 에 모듈들을 등록해놓고 가져다 사용한다는것이 참 매력적으로 보입니다.

ok~   우리는 Vert.x 의 많은 부분을 모듈을 사용하여 플러거블하게 바꾸었습니다. 좀 더 가볍게되었지요.  전에는 다양한 언어의 API 들이 무겁게 엮여있었어요. 지금은 모든것이 모듈입니다. 그것은 엔드유저가 사용하기 쉽게 만들었어요. 재사용 컴포넌트를 만드는것도 쉽구요. 모듈에 대한 전체 아이디어는 Node.js 와 비슷합니다. 즉 그들의 모듈을 쉽게 등록하게하는것이죠.


이 모든것은 꽤 환영할만한 변경인거 같습니다.

곧 Scala 나 Clojure 를 지원하는것을 보고싶네요.  php 를 시작한 멤버도 있습니다.


언어 모듈은 엔드유저 API 를 래핑하는건가요? 아니면 좀 더 아랫단에 가깝게 접근하나요?

 언어모듈은 그냥 java API 를 둘러싼 래퍼입니다.


...and as for custom modules, are those polyglot, too?

For custom modules you can depend on whatever other module you want too... so yes. The runnable modules communicate over the EventBus (JSON) so you can use a module and not care about in which language it was written.

I found the polyglot story interesting but to be honest, I have some reservations. In my experience, maintaining mixed projects (mixed in terms of languages) can be painful. Especially when the need of passing native data types arises

I think it is a matter of taste. I would, for example, only choose one language and stick with it when working on a project but if you split your project into different modules, you can mix things easily. For example, one team could work on a db driver and write it in JavaScript as all of them are js devs, another team would work on the core backend but use the db driver via theEventBus (JSON) and even not knowing that it was written in JavaScript. So mainly the polyglot thingy gives everyone freedom and still allows easy reuse.

Yeah - I certainly can see different JVM langs interoperating on a service level (lots of companies are building on the JVM in this fashion i.e. Twitter, Netflix etc.) my comment was more about working within a single project.

I agree - mixed languages in one "module/service" can cause problems in term of maintenance. Personally I would choose one lang and stick with it per "service/module".

The new vert.x website characterizes the EventBus as "actor-like". Where do you think the difference is?

Well, Vert.x gives you all in one platform, with actor based system you still need to stick in your own HTTP server whatever like Spray does. So I see Vert.x more like a complete platform which allows to write async network code, potentially using multiple languages.

I saw a few community projects popping up on the mailing list

Yep. We got a few now...

Can you name a few 3rd party extensions that you are particularly fond of?

The one I really find interesting, which is still in active development, is a module which provides async mysql/postgresql access without using JDBC at all. Db access is still a big problem in the async world.

Yeah, totally. That's a big pain point...

In fact, I just started to port the original code to Netty4 to make sure it is run on the same EventLoop as Vert.x.

The other interesting project I'm waiting for is an async DNS codec. We actually want to make use of this DNS solution in a vert.x module.

I also saw some activities around RxJava support. Are you planning any official module for that?

We are working on it ;)

While we are at modules, I remember seeing a web framework/middleware on top of Vert.x, too

yeah that's called Yoke.

Do you see Vert.x as an end user library or folks should see it as higher abstraction than Netty but lower than say Play?

Basically what we want to offer with Vert.x is an easy way to write network services which can scale and everything on top should go in modules. We hope to make it easy to implement extra features as modules and register them in our module registry.

I was quite surprised to see that vert.x embed got some extra support in 2.0. When we talked about Vert.x a while back, the future of the embedding feature was less clear...

haha... I think one of the really hot things in this area is the .js support

Do you guys plan to have anything special for Nashorn?

We have licensing issues with Nashorn [Nashorn is under GPL2] which is unfortunate.

But what quite interesting in JavaScript land is a node.js module which allows you to write node.js apps on top of Vert.x. It's still work-in-progress but it will provide a relatively easy migration path. Vert.x really out-performs node.js in many ways.

My final questions are about the whole event-driven space which seems to be booming these days.

What do you think about Reactor?

Reactor uses Netty [for their TCPServer/Client implementation], so I'm in contact with them. I think this space is indeed really hot at the moment and we will surely see a lot of traction in the future. The problem is that there are still a lot of legacy libraries around which slow things down.

Jonas Bonér from Typesafe was pushing for a shared vocabulary. Any thoughts on this initiative?

Yeah the manifesto ... To be honest, I think it's nothing new.. In fact, many frameworks do exactly what is written there. For example, all the event related attributes he mentions were also implemented in Netty 3Vert.x also fits into this paradigm quite well.

What other collaborations can you imagine between these various projects (Vert.x, RxJava, Akka, Netty, Finagle, Reactor etc. etc.)?

Finagle is built on top of Netty - so obviously there is collaboration there already. Same for Play[although Play may switch to akka-io at some point but we'll see]. As for Reactor, I helped them with their Netty-based TCP implementation.

Well, that was it. Thanks for your time!

Thank you.


+ Recent posts