Tornado-like async (web) server framework?

455 views
Skip to first unread message

Stefan Arentz

unread,
Apr 15, 2012, 9:51:01 PM4/15/12
to clo...@googlegroups.com
There is a lovely little web server for Python called Tornado.

Tornado is an async server that also includes an async http client that plugs right in the server's event loop. This makes it really simple to build scalable web services that call other web services, which is what I mostly use it for.

I would love to do the same in Clojure but I have no idea where to start.

Ideally I would use an async server or framework in the style of Tornado or Twisted. But since Java has excellent thread support I guess I could also use an http lib that allows me to run requests in parallel.

Who has some hints or pointers?

S.

Mark Rathwell

unread,
Apr 15, 2012, 9:58:44 PM4/15/12
to clo...@googlegroups.com
https://github.com/ztellman/aleph

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Baishampayan Ghose

unread,
Apr 15, 2012, 10:31:41 PM4/15/12
to clo...@googlegroups.com

Take a look at Aleph http://github.com/ztellman/aleph

Regards,
BG

Sent from phone, please excuse brevity.

Michael Klishin

unread,
Apr 16, 2012, 12:35:54 AM4/16/12
to clo...@googlegroups.com
Stefan Arentz:

> Who has some hints or pointers?

github.com/momentumclj/momentum is another option. It is still evolving rapidly but I've had very
good experience with it.

MK


Feng Shen

unread,
Apr 16, 2012, 9:50:36 PM4/16/12
to Clojure
I am working on a tiny web server and http client in clojure and java.
It's using java's async Socket IO.
https://github.com/shenfeng/http-kit
The code is mostly written in java, It will expose a nice clojure API.
My goal are async, fast, RAM efficiency, clean and compact code.
I write it for Rssminer(http://rssminer.net, https://github.com/shenfeng/rssminer).

The documentation is not ready. The server's unit test code:
https://github.com/shenfeng/http-kit/blob/master/test/me/shenfeng/http/server/server_test.clj

The production code of Rssminer is now using:
https://github.com/shenfeng/async-http-client
https://github.com/shenfeng/async-ring-adapter
The two are written on top of netty, a great java NIO framework. I
plan to replace it with http-kit.
Reply all
Reply to author
Forward
0 new messages