You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by jonathan chetwynd <j....@btconnect.com> on 2010/11/02 16:50:50 UTC
websockets?
is there a websockets interface in development?
regards
Jonathan Chetwynd
www.peepo.com
notwithstanding: WebSockets are not even a fixed standard so far
http://damienkatz.net/2010/08/whats_new_in_couchdb_10_securi.html
they are implemented in recent versions of Opera, Safari and Firefox:
Re: websockets?
Posted by Dmitry Unkovsky <oi...@gmail.com>.
+1 on "websockets a better fit". The exact fit ;)
After all, it can go very nice with erlang messaging concept.
http://armstrongonsoftware.blogspot.com/2009/12/comet-is-dead-long-live-websockets.html
On 2 November 2010 21:22, Dirkjan Ochtman <di...@ochtman.nl> wrote:
> On Tue, Nov 2, 2010 at 19:32, Jan Lehnardt <ja...@apache.org> wrote:
>> Can you qualify "better fit". Not trying to throw stones your way, but
>> what exactly makes it better in your view? (Maybe all I need is a link
>> to the ticket :)
>
> I don't think there's much in the ticket.
>
> It seems to me that HTTP is fundamentally a request-response protocol.
> You can do multiple requests over a single connection, but that's not
> what the changes feed does. The way HTTP is used for the changes feed
> seems to be, "here's this response that never ends, be sure to poll it
> once in a while to see if it's grown". On the other hand, the
> WebSocket model seems to fundamentally be about sending small(er)
> chunks of data between HTTP server and client, which seems to be a
> better fit for the continuous changes feed conceptually, and would
> probably make accepting those chunks from JS running in a browser and
> updating your page state with them much easier, just because now we're
> talking about small chunk events instead of a growing response
> document.
>
> Cheers,
>
> Dirkjan
>
--
DU
Re: websockets?
Posted by Dirkjan Ochtman <di...@ochtman.nl>.
On Tue, Nov 2, 2010 at 19:32, Jan Lehnardt <ja...@apache.org> wrote:
> Can you qualify "better fit". Not trying to throw stones your way, but
> what exactly makes it better in your view? (Maybe all I need is a link
> to the ticket :)
I don't think there's much in the ticket.
It seems to me that HTTP is fundamentally a request-response protocol.
You can do multiple requests over a single connection, but that's not
what the changes feed does. The way HTTP is used for the changes feed
seems to be, "here's this response that never ends, be sure to poll it
once in a while to see if it's grown". On the other hand, the
WebSocket model seems to fundamentally be about sending small(er)
chunks of data between HTTP server and client, which seems to be a
better fit for the continuous changes feed conceptually, and would
probably make accepting those chunks from JS running in a browser and
updating your page state with them much easier, just because now we're
talking about small chunk events instead of a growing response
document.
Cheers,
Dirkjan
Re: websockets?
Posted by Jan Lehnardt <ja...@apache.org>.
On 2 Nov 2010, at 19:07, Dirkjan Ochtman wrote:
> On Tue, Nov 2, 2010 at 19:03, Benjamin Young <be...@couchone.com> wrote:
>> The "draft" status isn't what would keep WebSockets out of CouchDB. CouchDB
>> uses HTTP for it's API, so unless CouchDB were to pipe HTTP over the
>> WebSocket protocol (which would be silly) or implement a straight
>> TCP/IP-based API (which is highly unlikely), WebSockets doesn't bring much
>> to the table.
>>
>> If you're looking for "streamed" data from CouchDB, you might checkout the
>> _changes feed. There's also been some Comet work done in the past (I think).
>
> Mmm, I think continuous changes as implemented by CouchDB would be a
> much better fit for WebSockets than for chunked transfer-encoding, the
> way it's done now.
Can you qualify "better fit". Not trying to throw stones your way, but
what exactly makes it better in your view? (Maybe all I need is a link
to the ticket :)
Cheers
Jan
--
> I've opened a ticket about this in the past, and I
> think at least a few people agree with me on this. One of the holdups
> is that mochiweb, the http layer CouchDB uses, doesn't implement
> WebSockets yet. There's a fork on GitHub which supports it, but the
> mochiweb author has said he wouldn't merge it unless asked
> specifically to do so (because he has had no need for the
> functionality so far).
>
> Cheers,
>
> Dirkjan
Re: websockets?
Posted by Dirkjan Ochtman <di...@ochtman.nl>.
On Tue, Nov 2, 2010 at 19:03, Benjamin Young <be...@couchone.com> wrote:
> The "draft" status isn't what would keep WebSockets out of CouchDB. CouchDB
> uses HTTP for it's API, so unless CouchDB were to pipe HTTP over the
> WebSocket protocol (which would be silly) or implement a straight
> TCP/IP-based API (which is highly unlikely), WebSockets doesn't bring much
> to the table.
>
> If you're looking for "streamed" data from CouchDB, you might checkout the
> _changes feed. There's also been some Comet work done in the past (I think).
Mmm, I think continuous changes as implemented by CouchDB would be a
much better fit for WebSockets than for chunked transfer-encoding, the
way it's done now. I've opened a ticket about this in the past, and I
think at least a few people agree with me on this. One of the holdups
is that mochiweb, the http layer CouchDB uses, doesn't implement
WebSockets yet. There's a fork on GitHub which supports it, but the
mochiweb author has said he wouldn't merge it unless asked
specifically to do so (because he has had no need for the
functionality so far).
Cheers,
Dirkjan
Re: websockets?
Posted by Benjamin Young <be...@couchone.com>.
The "draft" status isn't what would keep WebSockets out of CouchDB. CouchDB
uses HTTP for it's API, so unless CouchDB were to pipe HTTP over the
WebSocket protocol (which would be silly) or implement a straight
TCP/IP-based API (which is highly unlikely), WebSockets doesn't bring much
to the table.
If you're looking for "streamed" data from CouchDB, you might checkout the
_changes feed. There's also been some Comet work done in the past (I think).
If you're looking for incoming "streamed" data, Max Ogden's put up some
Pubsubhubbub stuff for CouchDB:
http://github.com/maxogden/couchpubtato
Do you have a specific use case you're trying to solve with WebSockets?
On Tue, Nov 2, 2010 at 11:55 AM, Fedor Indutny <fe...@gmail.com>wrote:
> As I know, websockets wouldn't be implemented in couchdb, while it's a
> draft.
>
> 2010/11/2 jonathan chetwynd <j....@btconnect.com>
>
> > is there a websockets interface in development?
> >
> > regards
> >
> > Jonathan Chetwynd
> > www.peepo.com
> >
> > notwithstanding: WebSockets are not even a fixed standard so far
> > http://damienkatz.net/2010/08/whats_new_in_couchdb_10_securi.html
> >
> > they are implemented in recent versions of Opera, Safari and Firefox:
> >
> >
>
>
> --
> Fedor Indutny
>
Re: websockets?
Posted by Fedor Indutny <fe...@gmail.com>.
As I know, websockets wouldn't be implemented in couchdb, while it's a
draft.
2010/11/2 jonathan chetwynd <j....@btconnect.com>
> is there a websockets interface in development?
>
> regards
>
> Jonathan Chetwynd
> www.peepo.com
>
> notwithstanding: WebSockets are not even a fixed standard so far
> http://damienkatz.net/2010/08/whats_new_in_couchdb_10_securi.html
>
> they are implemented in recent versions of Opera, Safari and Firefox:
>
>
--
Fedor Indutny