Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gevent server implementation #1

Merged
merged 4 commits into from
Aug 23, 2011
Merged

gevent server implementation #1

merged 4 commits into from
Aug 23, 2011

Conversation

progrium
Copy link
Contributor

added a simple WebSocketServer implementation in gevent using code from threadedhandler and the cherrypyserver.

@Lawouach
Copy link
Owner

Brilliant. Did you get a chance to run it against the Autobahn testsuite? I'll review it asap.

@progrium
Copy link
Contributor Author

No, where can I find the docs to do that?

@Lawouach
Copy link
Owner

I indicate the couple of steps to follow in the ws4py readme but in a nutshell:

Grab a copy at http://www.tavendo.de/autobahn
Install the Python lib via setup.py install
Start your server on localhost:9000
Run the fuzzing client:
cd Autobahn/testsuite/websockets
python fuzzing_client.py

The reports will be generated in the reports directory. Very handy to determine how your code is doing :)

@progrium
Copy link
Contributor Author

Okay, I made some updates as you can see to get most of the tests to pass. I'm wondering how many your implementation doesn't pass. In particular, these are failing for me:

Test Case 2.5
Test Case 5.1
Test Case 9.3.1
Test Case 9.3.2
Test Case 9.3.3
Test Case 9.4.1
Test Case 9.4.2
Test Case 9.4.3

But they seem more specific to the stream parser than my socket management (ping handling, small fragmented messages). I could be wrong.

@Lawouach
Copy link
Owner

On Mon, Aug 22, 2011 at 8:06 PM, progrium <
reply@reply.github.com>wrote:

Okay, I made some updates as you can see to get most of the tests to pass.
I'm wondering how many your implementation doesn't pass. In particular,
these are failing for me:

Test Case 2.5
Test Case 5.1

Those pass for CherryPy:

http://www.defuze.org/oss/ws4py/testreports/servers/cherrypy/

Could there be a different in the way the stream expects to work with
various data providers.

Test Case 9.3.1
Test Case 9.3.2
Test Case 9.3.3
Test Case 9.4.1
Test Case 9.4.2
Test Case 9.4.3

Those fail for me as well.

But they seem more specific to the stream parser than my socket management
(ping handling, small fragmented messages). I could be wrong.

I'll have to give it a try.

Cheers,

@Lawouach
Copy link
Owner

On Mon, Aug 22, 2011 at 8:41 PM, Sylvain Hellegouarch sh@defuze.org wrote:

On Mon, Aug 22, 2011 at 8:06 PM, progrium <
reply@reply.github.com>wrote:

Okay, I made some updates as you can see to get most of the tests to pass.
I'm wondering how many your implementation doesn't pass. In particular,
these are failing for me:

Test Case 2.5

2.5 has been explicitly solved with

https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/framing.py#L154

Test Case 5.1

This should pass because of:

https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/streaming.py#L190

…sgi friendly. now you can use middleware on your upgrade handler
…g tests up to par with the cherrypy implementation
@progrium
Copy link
Contributor Author

Alright, looks like I'm passing those tests now. I should be failing only the same tests as you.

@Lawouach
Copy link
Owner

Cool.

I'll be away from Friday for a couple of weeks and I will not have the
chance to merge your code before hand probably. I'll do that when I return.

  • Sylvain

On Tue, Aug 23, 2011 at 8:38 AM, progrium <
reply@reply.github.com>wrote:

Alright, looks like I'm passing those tests now. I should be failing only
the same tests as you.

Reply to this email directly or view it on GitHub:

#1 (comment)

@progrium
Copy link
Contributor Author

Excellent. See you on the flip side.

-jeff

On Mon, Aug 22, 2011 at 11:42 PM, Lawouach
reply@reply.github.com
wrote:

Cool.

I'll be away from Friday for a couple of weeks and I will not have the
chance to merge your code before hand probably. I'll do that when I return.

  • Sylvain

On Tue, Aug 23, 2011 at 8:38 AM, progrium <
reply@reply.github.com>wrote:

Alright, looks like I'm passing those tests now. I should be failing only
the same tests as you.

Reply to this email directly or view it on GitHub:

#1 (comment)

Reply to this email directly or view it on GitHub:
#1 (comment)

Jeff Lindsay
http://progrium.com

@Lawouach
Copy link
Owner

Merged :)

Well your code is quite self-contained and seems fine (I couldn't test against gevent yet but I trust you). This should make your work a little easier hopefully.

Lawouach added a commit that referenced this pull request Aug 23, 2011
gevent server implementation
@Lawouach Lawouach merged commit 3f772ad into Lawouach:master Aug 23, 2011
Lawouach pushed a commit that referenced this pull request Dec 12, 2016
Address run_forever() terminates too early bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants