Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
To clarify, I didn't mean gary's last snippet. I meant this could work with the linked Ring middleware: (defn aleph-to-ring-handler [req] (respond! req (ring-handler req))) as would the variation David's been using for his "hello world" benchmarks: (defn aleph-to-ring-handler [req] (future

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
On Jul 21, 11:51 am, David Nolen wrote: > On Wed, Jul 21, 2010 at 2:42 PM, Zach Tellman wrote: > > Both of those seem to be about persisting data across requests.  I > > apologize if I'm being dense, but how does the threading model affect > > how they work? > > They wrap the handler, that is the

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 11:42 am, Zach Tellman wrote: > Both of those seem to be about persisting data across requests.  I > apologize if I'm being dense, but how does the threading model affect > how they work? The flash and session middleware functions update the response returned from the handler function.

Re: Aleph and Conjure

2010-07-21 Thread David Nolen
On Wed, Jul 21, 2010 at 2:42 PM, Zach Tellman wrote: > Both of those seem to be about persisting data across requests. I > apologize if I'm being dense, but how does the threading model affect > how they work? They wrap the handler, that is they expect to see the request and the response. That

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
Both of those seem to be about persisting data across requests. I apologize if I'm being dense, but how does the threading model affect how they work? On Jul 21, 11:28 am, gary b wrote: > On Jul 21, 10:40 am, Zach Tellman wrote: > > > I don't think anything in the Ring utilities are thread-awar

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 10:40 am, Zach Tellman wrote: > I don't think anything in the Ring utilities are thread-aware, so they're > all okay to use.   The flash and session middleware in Ring core are two examples where Ring assumes the thread per request model. http://github.com/mmcgrana/ring/blob/master/ri

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
Also, I've just created a mailing list for Aleph at http://groups.google.com/group/aleph-lib, since it seems like that might reduce the clutter here. On Jul 21, 10:40 am, Zach Tellman wrote: > I don't really understand what's being debated here.  Aleph is fully > Ring-compliant in every way but i

Re: Aleph and Conjure

2010-07-21 Thread Zach Tellman
I don't really understand what's being debated here. Aleph is fully Ring-compliant in every way but its threading model. I don't think anything in the Ring utilities are thread-aware, so they're all okay to use. I'm not very familiar with Compojure, but as long as you're willing to make an expli

Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić
On Jul 21, 4:38 pm, Janico Greifenberg wrote: > On Wed, Jul 21, 2010 at 4:11 PM, Marko Kocić wrote: > > Something like ring-aleph-adapter, however trivial it might be to > > implement, will help in seamlessly switching existing applications to > > aleph/netty. > > But why would that be useful?

Re: Aleph and Conjure

2010-07-21 Thread Janico Greifenberg
On Wed, Jul 21, 2010 at 4:11 PM, Marko Kocić wrote: > Something like ring-aleph-adapter, however trivial it might be to > implement, will help in seamlessly switching existing applications to > aleph/netty. But why would that be useful? Maybe I'm missing something here, but I thought the idea beh

Re: Aleph and Conjure

2010-07-21 Thread gary b
On Jul 21, 7:11 am, Marko Kocić wrote: > Something like ring-aleph-adapter, however trivial it might be to > implement, will help in seamlessly switching existing applications to > aleph/netty. There is a Ring adapter for Netty: http://github.com/datskos/ring-netty-adapter. -- You received this

Re: Aleph and Conjure

2010-07-21 Thread Marko Kocić
> Clojure, because of the JVM, doesn't tie your hands this way. If you want to > do everything evented go ahead. Do everything with threads? Go ahead. Want > to mix the two designs together like Aleph? Sure. All while not losing the > elegant brevity of a Node.js app. Something like ring-aleph-ada

Re: Aleph and Conjure

2010-07-21 Thread David Nolen
On Tue, Jul 20, 2010 at 10:38 PM, Victor S wrote: > Thank you all for the input, it has made me understand some new > things. > > I find node.js push for NIO as the de-facto mode of existence for web > apps interesting, and I was trying to have my cake and eat it too. > JS programming just doesn'

Re: Aleph and Conjure

2010-07-21 Thread Victor S
Thank you all for the input, it has made me understand some new things. I find node.js push for NIO as the de-facto mode of existence for web apps interesting, and I was trying to have my cake and eat it too. JS programming just doesn't look all that appealing. - V On Jul 20, 1:46 pm, Peter Schu

Re: Aleph and Conjure

2010-07-21 Thread Jeff Rose
While Aleph's event model is slightly different from what Ring was originally designed for (the servlet API), I think it would be really easy to use with Ring. In Aleph you explicitly respond to a request, while in Ring you return a response map. Unless I'm missing out on something, you can hooku

Re: Aleph and Conjure

2010-07-20 Thread Peter Schuller
> If a web app does have a large number of concurrent requests, then you > need a model where requests share threads. A full blown event based > programming model is not required for thread sharing. Of course you can mix asynch and threaded at your leasure, with appropriate interfaces in between;

Re: Aleph and Conjure

2010-07-20 Thread gary b
By scalable, I mean that the capacity of the application can be increased by adding resources. Conjure and Compojure are scalable under this definition. If a web app does have a large number of concurrent requests, then you need a model where requests share threads. A full blown event based progr

Re: Aleph and Conjure

2010-07-20 Thread Peter Schuller
> You can build a scalable app with Conjure on Jetty.  You don't need an > evented server like Aleph or node.js to build a scalable app. Depends on what you mean by scalable. If you want to keep 250 000 concurrent mostly idle connections, you'll likely want to be event based. -- / Peter Schuller

Re: Aleph and Conjure

2010-07-20 Thread gary b
Conjure cannot be used with Aleph. Conjure is based on Ring. Ring does not currently support the evented programming model used by Aleph. You can build a scalable app with Conjure on Jetty. You don't need an evented server like Aleph or node.js to build a scalable app. On Jul 18, 5:26 pm, Vict

Re: Aleph and Conjure

2010-07-19 Thread Matt
I don't have any experience with aleph, node.js, or express.js. But assuming you can use those technologies with Ring, then you should be able to do it with Conjure. -Matt Courtney On Jul 18, 8:26 pm, Victor S wrote: > Can conjure be used to build web app over aleph? Or what does it take > to bu

Aleph and Conjure

2010-07-19 Thread Victor S
Can conjure be used to build web app over aleph? Or what does it take to build highly scalable web apps in clojure similar to node.js and express.js? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr