Lisp HUG Maillist Archive

http real-time update

Hi LispHug,

I am looking for a way to publish real-time updates over HTTP. My application, which runs on MacOSX / Windows, uses hunchentoot as a backend web server, and currently
my client requests data every x seconds. It works fine with this but I like to reduce network traffic, and remove unnecessary polling.

I looked at hunchensocket for WebSockets but it seems to be stopped updating.

Are there any ways to achieve real-time communication over HTTP? Ideally, I would like to stick with hunchentoot as a backend web server.

Thanks in advance,

Yoshi

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: http real-time update

Hi Yoshi,
   I'm also looking for a way to respond to realtime requests over HTTP.  I am currently using portableaserve,  on MaxOSX and Linux, responding to http-post requests with JSON replies,  in about 0.3 seconds,  but would like to respond faster.  If you make any progress with turning around real-time responses faster than that,  I'd be very interested.  Please keep me posted.

thanks,

Lawrence Au

On Nov 4, 2013, at 1:45 PM, Yoshiharu Iguchi wrote:

> 
> Hi LispHug,
> 
> I am looking for a way to publish real-time updates over HTTP. My application, which runs on MacOSX / Windows, uses hunchentoot as a backend web server, and currently
> my client requests data every x seconds. It works fine with this but I like to reduce network traffic, and remove unnecessary polling.
> 
> I looked at hunchensocket for WebSockets but it seems to be stopped updating.
> 
> Are there any ways to achieve real-time communication over HTTP? Ideally, I would like to stick with hunchentoot as a backend web server.
> 
> Thanks in advance,
> 
> Yoshi
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: http real-time update

Hi Yoshi,

You could use chunked HTTP transfer.  I know Hunchentoot supports that, but I don’t know exactly how it works, please apologise for this sparse answer.

AFAIK Hunchentoot as a thread based design (please correct me if I’m wrong), so if you expect a lot of “streaming” connections you might want to avoid Hunchentoot and look for an asynchronous IO based web server.

Incidentally I stumbled on Wookie, an asynchronous Common Lisp web server, which looks very promising, getting it inspiration from what happens in the nodejs world:

	http://wookie.beeets.com

I plan to test it with LispWorks, though I am not sure how easy it will be to compile it.


Best,
Cam



On 04 Nov 2013, at 19:45, Yoshiharu Iguchi <minisoba@gmail.com> wrote:

> 
> Hi LispHug,
> 
> I am looking for a way to publish real-time updates over HTTP. My application, which runs on MacOSX / Windows, uses hunchentoot as a backend web server, and currently
> my client requests data every x seconds. It works fine with this but I like to reduce network traffic, and remove unnecessary polling.
> 
> I looked at hunchensocket for WebSockets but it seems to be stopped updating.
> 
> Are there any ways to achieve real-time communication over HTTP? Ideally, I would like to stick with hunchentoot as a backend web server.
> 
> Thanks in advance,
> 
> Yoshi
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: http real-time update

Yoshiharu Iguchi wrote:
> I am looking for a way to publish real-time updates over HTTP. My application, which runs on MacOSX / Windows, uses hunchentoot as a backend web server, and currently
> my client requests data every x seconds. It works fine with this but I like to reduce network traffic, and remove unnecessary polling.
> 
> I looked at hunchensocket for WebSockets but it seems to be stopped updating.
> 
> Are there any ways to achieve real-time communication over HTTP? Ideally, I would like to stick with hunchentoot as a backend web server.

I had similar goals for a chat/event/web server I'm developing, and I 
settled on using long polling (45s timeout w/keep-alive).

With a custom hunchentoot taskmaster/acceptor, you can handle requests 
using a worker pool instead of thread-per-request.  I'm using a custom 
http frontend (in lisp) which uses kqueue (async API on FreeBSD and OSX) 
to handle slow (and hopefully many) clients, dispatching restartable 
requests to hunchentoot for handling (long polling requests are 
internally suspended and restarted after an event or timeout occurs).


Mike

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:34 UTC