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

Client- and serverside bug fixes #94

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

steforster
Copy link

I picked Alchemy as communication framework for my remote actor library because of Alchemys slim design and the availability of a client implementation.
But after some initial success I ran into more and more bugs, especially on the client side.
This pull request collects all committs that were needed to make the library much more stable.
When reading the list of open issues I think some of them could be fixed by this pull request too:
E.g. #93, #89, #84, #78, #72, #66, #60, #53, #49, #25

The changed points are:

  • Client connect and disconnect sequence:
    Fixed errors and made it rfc6455 conformant
  • Receive successive messages on client or server side:
    Fixed message loss, when several messages are received in the same TCP packet
  • Tested under Monodevelop
  • Integration tests: New tests for successive and larger messages
  • Added configuration flag "Handler.FastDirectSendingMode":
    Useful when a server must be very responsive. When setting this flag,
    the maximal throughput rises from 33 to more than 5000 request/response pairs per second
  • Improved server side asynchrony when listening for clients and when receiving a client message.
  • Removed static allocated threads on client side. These threads were dispensable in an asynchronous design.

segor and others added 21 commits October 9, 2013 21:46
Avoids null-reference exception, when underlying socket is not connected.
Used to indicate when server shuts down.
Added some settings in csproj and .gitignore.
When FastDirectSendingMode is set to true, the send-threads are not started.
Messages are then sent directly from the multithreaded application to
the underlaying socket buffer. 
The Send method may block a short time
until the previous send operation has copied its data do the socket buffer.
There is a considerable speed increase for applications needing
fast roundtrip times and have a small number of clients:
    FastDirectSendingMode = false:   33 request+responses per second - caused by a delay of 10ms in every dequeue operation.
    FastDirectSendingMode = true:  2500 request+responses per second
Documented the strange behavour of WebSocketServer.Dispose().
Added asynchronous connect operation to client;
Added LatestException to UserContext.
This improves WebSocketClient connect and disconnect.
…en sending many messages in server or client.
Support partially received headers on server and client side.
Fixed reset of FrameHeader.IsEnd.
Fixed client disconnect (make it ready for next connect).
Fixed WebSocketServer.Clients (count).
Fixed and improved integration test ClientSendDataConcurrent.
Added integration test ClientSendMultipleMessages.
   No need to ReceiveReady.Wait until a request has been received.
Removed client side setup threads. Direct setup is faster.
   No need for static threads on client side.
Improved integration tests.
@tluyben
Copy link

tluyben commented May 20, 2014

Ah this fixes that weird https://github.com/Olivine-Labs/Alchemy-Websockets/blob/master/src/Alchemy/WebSocketClient.cs#L151 stuff; I'm not sure why that actually would ever work. Thanks, please merge.

@zyo2012
Copy link

zyo2012 commented Jul 23, 2014

I've tested this fork it's running supper great, no missing packet anymore. Please merge!

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.

5 participants