You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Aki Yoshida <el...@gmail.com> on 2013/11/08 12:57:35 UTC

[DISCUSS] Re: update of websocket

Hi Charles and team,

After our discussion
http://irclogs.dankulp.com/logs/irclogger_log/camel?date=2013-11-05,Tue
and the original mail thread.
http://camel.465427.n5.nabble.com/update-of-websocket-td5740578.html

I thought about how to merge or integrate the atmosphere based
server-side websocket feature to the existing websocket component.

I still think putting these two in one would make the component
unnecesarrily complex and hard to maintain the code to not break the
original expectation while adding a new model.

The existing websocket component is tightly coupled with  jetty and
exposes all the jetty options.

In contrast, the atmosphere based websocket component is currenly
analogue to the servlet component. So you can direclty run it within a
container or if you want to use it in a standalone environment, you
can just start an embedded serlet container of your choice and
register the camel servlet to it. In that way, you don't have to put
all the configuration options for the web container in the component
itself, thereby keeping the component itself clean. from them.

I think adding automatically an embedded jetty starup code in the
atmosphere based webservice won't offer much benefit as much as adding
the same option to the servlet component wouldn't. But if people think
otherwise, we could add this in the servlet componen then it could be
aslo used by the atmosphere based websocket component.

Currently, I used the notation wsservlet:///path for the server-side
sockets and ws://host:port/path or (for ssl wss://host:port/path) for
the client-side sockets. And each of them can be used in the consumer
side or in the producer side to support data transfer in full-duplex
mode.

I would prefer to add the atmosphere based websocket component (i.e.,
adding wsservlet) as a separate component and either include the
client side socket support (i.e, ws and wss) in the same component or
in another component. Separating the server-side and client-side will
lead to a smaller dependency requirement for each, which will be
preferable when people tend to use only one or the other. But when
people tend to use both at the same time, putting them together will
be simpler as well as from the point of view in keeping the number of
components down.

Opinions, objections or suggestions? Comments appreciated.

Thanks.
regards, aki