# Module proposal: BOSH

**URL:** <https://www.ruby-forum.com/t/module-proposal-bosh/145250>\
**Category:** NGINX\
**Created:** [August 7, 2008, 6:41am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250 "2008-08-07T06:41:30Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 6:41am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/1 "2008-08-07T06:41:30Z")

</div>

After much headache with Ejabberd and some internal discussions, we  
talked about Nginx supporting the BOSH protocol. This would allow simple  
creation of scalable instant message systems and anything else that  
requires stateless connections to act statefully.

> **[Bosh](https://en.wikipedia.org/wiki/BOSH)**
>
> Bosh or BOSH may refer to:

Nginx would hold 2 client connections and create a persistent connection  
to upstream servers. To even begin to make this possible, Nginx would  
need to support persistent connections to upstreams. What is the status  
of that feature? Its been listed on the feature request page in the wiki  
for a while.

Anyone interested in seeing this?

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 6:50am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/2 "2008-08-07T06:50:17Z")

</div>

On Wed, Aug 6, 2008 at 9:36 PM, Adam M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> feature? Its been listed on the feature request page in the wiki for a  
> while.
> 
> Anyone interested in seeing this?

yes!

-alex

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 8:00am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/3 "2008-08-07T08:00:25Z")

</div>

On 8/6/08, Adam M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Anyone interested in seeing this?

i don’t think i’d be using it for quite some time but it does sound  
cool and yet another thing nginx can excel in.

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 8:49am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/4 "2008-08-07T08:49:31Z")

</div>

Adam M. ha scritto:

> After much headache with Ejabberd

Can you give more detail?  
Thanks.

> […]

Manlio P.

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 11:40am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/5 "2008-08-07T11:40:34Z")

</div>

I can obviously see how clever a lot of it is, but am I the only  
person who finds all this Comet/Bayeux/BOSH/Javascript “TCP sockets”/  
etc stuff slightly unsettling? If you push and bend (e.g.) HTTP to do  
all this stuff it was never intended to do, won’t it, and all the  
infrastructure supporting it, eventually just break? OK, so there’s  
Jetty and nginx can handle loads of keepalives and so on and so forth,  
but …

If people want bidirectional comms with browsers, if they want publish/  
subscribe mechanisms, wouldn’t all this work by very clever people be  
better directed towards getting a sensible security infrastructure in  
place to allow listening sockets in client sandboxes, rather than  
building ever bigger wrappers with sticky tape and bits of string?

\</devil’s advocate\>

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/6 "2008-08-07T18:59:01Z")

</div>

A listening socket on the client isn’t going to really work because of  
firewalls and other network nastiness. And HTTP is the preferred  
method for this kind of thing because it works on browsers without  
modifying them. Assuming a new standard were made, it would be a good  
number of years before the browsers that most people use would support  
them, so the standard would be useless anyway, whereas http works now.

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 7, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/7 "2008-08-07T19:00:46Z")

</div>

On Wed, Aug 6, 2008 at 9:36 PM, Adam M.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> feature? Its been listed on the feature request page in the wiki for a  
> while.
> 
> Anyone interested in seeing this?

yes, this would be super awesome! +1

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 11, 2008, 10:13am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/8 "2008-08-11T10:13:19Z")

</div>

Awesome if have!

Regards,  
Du Song

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 12, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/9 "2008-08-12T15:53:06Z")

</div>

Adam M. wrote:

> Nginx would need to support persistent connections to upstreams. What is the  
> status of that feature? Its been listed on the feature request page in the  
> wiki for a while.

I would be very interested to see support for persistent connections to  
upstreams, and the company I’m working for would be willing to  
(co)sponsor such a feature. I already contacted Evan M. about this,  
but he doesn’t have enough time to pick this up currently. Anyone else  
capable of and willing to pick this up?

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [August 12, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/10 "2008-08-12T16:08:54Z")

</div>

On Tue, Aug 12, 2008 at 6:53 AM, Spil G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Adam M. wrote:
> 
> > Nginx would need to support persistent connections to upstreams. What is the  
> > status of that feature? Its been listed on the feature request page in the  
> > wiki for a while.
> 
> I would be very interested to see support for persistent connections to  
> upstreams, and the company I’m working for would be willing to  
> (co)sponsor such a feature. I already contacted Evan M. about this,  
> but he doesn’t have enough time to pick this up currently. Anyone else  
> capable of and willing to pick this up?

My company is also willing to add to the bounty for persistent  
connection support to upstreams, notably memcached. I simply do not  
have the time.

Cheers  
Kon

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [October 9, 2008, 10:57am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/11 "2008-10-09T10:57:47Z")

</div>

Adam M. wrote:

> is the status of that feature? Its been listed on the feature request  
> page in the wiki for a while.
> 
> Anyone interested in seeing this?  
> Has any progress been made with this?

–

_Phillip B Oldham_  
The Activity People  
removed\_email\_address@domain.invalid [mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

_Policies_

This e-mail and its attachments are intended for the above named  
recipient(s) only and may be confidential. If they have come to you in  
error, please reply to this e-mail and highlight the error. No action  
should be taken regarding content, nor must you copy or show them to  
anyone.

This e-mail has been created in the knowledge that Internet e-mail is  
not a 100% secure communications medium, and we have taken steps to  
ensure that this e-mail and attachments are free from any virus. We must  
advise that in keeping with good computing practice the recipient should  
ensure they are completely virus free, and that you understand and  
observe the lack of security when e-mailing us.

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [October 9, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/12 "2008-10-09T12:25:28Z")

</div>

Hello!

On Thu, Oct 09, 2008 at 11:23:18AM +0200, Spil G. wrote:

> Anyone else made any progress?  
> I’ve recently posted here a patch that will allow nginx to know  
> when request is completed even if backend server wasn’t closed  
> connection. The patch is currently waiting for Igor’s review.

There are two things left for http persistent connections support:  
chunked encoding (should be relatively easy with the mentioned  
patch) and saving connections for later use instead of closing  
them (relatively easy as is).

Maxim D.

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [October 9, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/13 "2008-10-09T15:42:25Z")

</div>

Maxim D. wrote:

> There are two things left for http persistent connections support:  
> chunked encoding (should be relatively easy with the mentioned  
> patch) and saving connections for later use instead of closing  
> them (relatively easy as is).

No interest in collecting the bounty?

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [October 9, 2008, 11:23am UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/14 "2008-10-09T11:23:18Z")

</div>

Phillip B Oldham wrote:

> Has any progress been made with this?

AFAIK _someone_ still has to pickup the persistent connection thing.  
Several companies are willing to pay bounties for this, and I asked Evan  
Miller to do this, but he is currently out of OSS time. I still have  
this on my radar though and am still actively seeking for a developer  
willing to pick this up. No luck yet though.

Anyone else made any progress?

---

<div class="post-metadata">

**Author:** ![adammontgomery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ce7236/32.png) [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Post date:** [October 9, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/module-proposal-bosh/145250/15 "2008-10-09T23:59:48Z")

</div>

Hello!

On Thu, Oct 09, 2008 at 03:42:25PM +0200, Spil G. wrote:

> Maxim D. wrote:
> 
> > There are two things left for http persistent connections support:  
> > chunked encoding (should be relatively easy with the mentioned  
> > patch) and saving connections for later use instead of closing  
> > them (relatively easy as is).
> 
> No interest in collecting the bounty?

Feel free to donate if/when I’ll do it. 🙂

Maxim D.
