Swarm icon indicating copy to clipboard operation
Swarm copied to clipboard

Create "Swarm-ful" HTTP server library

Open sanity opened this issue 13 years ago • 3 comments

The ideal Swarm web framework would treat the open HTTP connection to the web browser as just another Swarm object, referenced through a Ref(), but, of course, tied to a specific computer.

This would mean that a HTTP request could come in, and the resultant continuation could move around to other computers, before coming back to the original computer in order to send the HTTP response.

Most existing Java (and Scala?) web frameworks are unsuitable for this, as typically they'll call a method with HTTP request and response objects, but they expect that when this method returns, that the response is ready to be sent. Unfortunately, this method will not typically be within a continuation "reset {}" block.

sanity avatar Jun 09 '11 15:06 sanity

Jetty Continuations could provide some good insight into this. An example usage is Akka's Mist.

earldouglas avatar Jun 10 '11 04:06 earldouglas

Also this article

earldouglas avatar Aug 11 '11 06:08 earldouglas

Indeed, in fact on of my first exposures to continuations on the JVM was the RIFE web framework, which implemented continuations using some kind of bytecode mainipulation.

sanity avatar Aug 11 '11 17:08 sanity