These are chat archives for akkadotnet/akka.net

2nd
Dec 2017
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 09:48
@contactsamie usually cancellation tokens are used in such context. you may setup CancellationToken with timeout, after which it will automatically trigger.
cyril andreichuk
@andreichuk
Dec 02 2017 11:00
@Horusiath works fine for me :) what about the scheduler + zero (or near zero) delay?
Paladin
@DeepChipolino_twitter
Dec 02 2017 11:52
alt
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 12:02
@DeepChipolino_twitter this was described in release notes to 1.3.2 - we had to change the way how payload deserialization occurs within event journal, as previous one was broken - AFAIK after updating the schema, this should be backward compatible
Paladin
@DeepChipolino_twitter
Dec 02 2017 12:05
@Horusiath the first one is the app that has 1.3.2 from the beginning, it has SerializerId in the schema (so, the table doesn't need to be altered, as described in release notes for 1.3.2).. Did I get something wrong ?
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 12:06
no, it's fine
cyril andreichuk
@andreichuk
Dec 02 2017 12:12
@Horusiath Akka.IO looks like 1:1 copy of its scala origin. maybe it should be reviewed and at least partly rewritten in more C#/.NET idiomatic style?
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 12:16
@andreichuk I'll take a look at scala origin code.
could you point correlated akka jvm code in your PR?
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 15:51
@andreichuk I've made a simpler case:
private int Send(ByteString data)
{
    try
    {
        return _connection.Socket.Send(data.Buffers);
    }
    catch (SocketException e) when (e.SocketErrorCode == SocketError.WouldBlock)
    {
        try
        {
            _connection.Socket.Blocking = true;
            return _connection.Socket.Send(data.Buffers);
        }
        finally
        {
            _connection.Socket.Blocking = false;
        }
    }
}
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 15:56
I don't know yet how to check the impact of this solution to CPU usage and overall performance.
but anyway, even slow solution is faster than not working one (as it was before)
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 16:06
@andreichuk I've made the PR for both issues, you've set: akkadotnet/akka.net#3206
Bartosz Sypytkowski
@Horusiath
Dec 02 2017 16:29
the most astonishing part for me is that I've gone through networking code of 5 different .NET OSS projects, and only 1 one them has any kind of special rule around SocketError.WouldBlock: DotNetty, and it does so only on reads, never on writes
cyril andreichuk
@andreichuk
Dec 02 2017 20:45
@Horusiath thanks! :)