Hacker News new | ask | show | jobs
by nqzero 3801 days ago
i'm using java fibers (https://github.com/kilim/kilim) for a database

for anyone interested in using fibers inside a java webapp, i just wrote up a quick survey of async java servlet performance: http://blog.nqzero.com/2016/01/asynchronous-java-webserver-h...

(based TechEmpower plaintext benchmark, but limited to java async)

the model is that you use async in the server, and then bridge to a fiber implementation and then complete the async response when the fiber completes. for handling high latency low cpu processing on the server, this technique allows handling a huge number of connections

1 comments

What do you think of Quasar fiber[1]?

[1] http://docs.paralleluniverse.co/quasar/#fibers

i assume that it's comparable to kilim, but have limited experience

Comsat (one of the servers in my benchmark i linked) is written by the same people and uses Quasar. so eg Comsat Jetty is an async jetty servlet with a bridge to a Quasar fiber-based handler. the performance in my simplistic test wasn't great (async jetty was 50% faster than comsat jetty) - i don't know if that's representative

however, it's very easy to work with and mimics the Jetty API, which is really nice. https://github.com/nqzero/jempower/blob/master/comsat/src/ma...

for my database i was initially worried about the LGPL license for Quasar, but the guys assured me that it's not viral in this usage and i think they're correct

pron (one of the developers) is active posting on HN and has written some very good/knowledgeable stuff about java, so i suspect that Quasar is technically solid. i do plan on doing an integration with my database at some point and i'll write up my results and post them on HN