Hi,

I have used gevent websocket, which integrated well with pywsgi, which is
(or was?) used for the RASP API of Ryu.
https://pypi.python.org/pypi/gevent-websocket/



2014-02-13 3:54 GMT+01:00 Satoshi Kobayashi <[email protected]>:

> 2014-02-13 8:23 GMT+09:00 FUJITA Tomonori <[email protected]>:
>
> Hi,
>>
>> On Wed, 12 Feb 2014 12:52:36 +0900
>> Satoshi Kobayashi <[email protected]> wrote:
>>
>> > If Raw TCP is changed to WebSocket only, It do not have many merits. But
>> > when messaging is also changed to non-binary (JSON?), it seems to be
>> easy
>> > to use. Many development tools exist.
>>
>> As I wrote in another mail, I talked about extending our REST API so
>> JSON RPC or something that more developers are familir with. What RPC
>> protocol is mostly used with WebSocket?
>>
>
> Umm...I do not know about it. WAMP (The WebSocket Application Messaging
> Protocol) also seems to be famous.
>
>
>>
>> I used Messagepack RPC for our VRRP API but I guess that people prefer
>> the REST-alike API. As long as bi-directional, such API works for
>> VRRP, I guess (as you know, events like master-slave transition needs
>> to be notified to other components).
>
>
>>
>> > BTW, I researched whether Ryu can support WebSocket. It seemed that
>> > Eventlet (0.14.0) WebSocket support did not correspond to RFC6455, FYI.
>>
>> That's mean it's not that simple to add WebSocket support to Ryu?
>>
>
> It may not be easy to provide by the same endpoint as REST API. The
> prototype using another port was made by ws4py.
>
> ----------
> from wsgiref.simple_server import make_server
> from ws4py.websocket import EchoWebSocket
> from ws4py.server.wsgirefserver import WSGIServer,
> WebSocketWSGIRequestHandler
> from ws4py.server.wsgiutils import WebSocketWSGIApplication
> from ryu.base import app_manager
> from ryu.lib import hub
>
> class WebSocketServer(object):
>
>     def __init__(self, *args, **kwargs):
>         hub.spawn(self.serve_forever)
>
>     def serve_forever(self):
>         server = make_server('localhost', 5000, server_class=WSGIServer,
>                              handler_class=WebSocketWSGIRequestHandler,
>
>  app=WebSocketWSGIApplication(handler_cls=EchoWebSocket))
>         server.initialize_websockets_manager()
>         server.serve_forever()
>
> class WebSocketApp(app_manager.RyuApp):
>     _CONTEXTS = {
>         'websocket': WebSocketServer,
>     }
>
> ----------
>
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to