rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* Rack asynchronous responses with async.callback
@ 2012-04-16  0:41 P .
  2012-04-16  7:40 ` Konstantin Haase
  0 siblings, 1 reply; 2+ messages in thread
From: P . @ 2012-04-16  0:41 UTC (permalink / raw)
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

I am doing some work with JRuby that may need asynchronous HTTP support.  
There doesn't seem to be much documentation about this online, so I did 
some digging to see how the existing Rack async servers do things, and 
wrote up some documentation for myself.  I thought maybe others would find 
it useful: 
http://polycrystal.org/2012/04/15/asynchronous_responses_in_rack.html

I also found some posts from a couple years ago implying that 
'async.callback' will never be a part of the Rack specification: 

https://groups.google.com/forum/?fromgroups#!searchin/rack-devel/async/rack-devel/fu58paleLJg/frwK57QHNn4J

Is this still the case?  I must say I'm a bit disappointed by this 
discovery, but I don't fully understand all the issues (in particular, my 
documentation above ignores interaction with middleware).

[-- Attachment #2: Type: text/html, Size: 1053 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rack asynchronous responses with async.callback
  2012-04-16  0:41 Rack asynchronous responses with async.callback P .
@ 2012-04-16  7:40 ` Konstantin Haase
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Haase @ 2012-04-16  7:40 UTC (permalink / raw)
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

 

Hi there!


async.callback will never be part of the spec, that's true. But there will 
be a completely different spec for a successor of Rack, which will include 
first class support for async responses. Howerver, work is going rather 
slow on that front at the moment.


At status quo, both Thin and Rainbows support just returning a Defferrable 
(or really, anything that responds to both callback and errback) without 
the need to an async response, rendering both the async handshake and 
async.callback unnecessary. Main issue is other middleware (esp. 
Rack::Lint) wrapping the body object in something that does not proxy those 
methods.


Konstantin

On Monday, April 16, 2012 2:41:07 AM UTC+2, pmahoney wrote:
>
> I am doing some work with JRuby that may need asynchronous HTTP support.  
> There doesn't seem to be much documentation about this online, so I did 
> some digging to see how the existing Rack async servers do things, and 
> wrote up some documentation for myself.  I thought maybe others would find 
> it useful: 
> http://polycrystal.org/2012/04/15/asynchronous_responses_in_rack.html
>
> I also found some posts from a couple years ago implying that 
> 'async.callback' will never be a part of the Rack specification: 
>
>
> https://groups.google.com/forum/?fromgroups#!searchin/rack-devel/async/rack-devel/fu58paleLJg/frwK57QHNn4J
>
> Is this still the case?  I must say I'm a bit disappointed by this 
> discovery, but I don't fully understand all the issues (in particular, my 
> documentation above ignores interaction with middleware).
>

[-- Attachment #2: Type: text/html, Size: 2097 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-16  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16  0:41 Rack asynchronous responses with async.callback P .
2012-04-16  7:40 ` Konstantin Haase

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).