Clojure: Webbit + Ring

Context

I just got http://blog.jayfields.com/2011/02/clojure-web-socket-introduction.html .

I also have a ring + compojure function.

Question:

I would like to use ring ... somehow ... with webbit is this possible?

Thanks!

+4
source share
2 answers

Ring works with web servers through adapters. The most common case is that people want to use the pier, so the Ring transmits from the dock adapter .

To use the ring with webbit, you need to write an adapter for it. Unfortunately, it does not seem that there are any public network adapters, so you may have to minimize your own.

+6
source

A ring defines only a request-response cycle, no no push in Ring SPEC . You can write a network ring adapter, but it will allow you to respond to events occurring in the browser, without the possibility of notifying the browser from the server. But you can still do it directly through the webbit api, but not through the ring middleware.

You can read the same on the aleph page:

The Aleph corresponds to the interface described by the Ring, with one small difference: the request and response are decoupled.

+3
source

All Articles