These are chat archives for akkadotnet/akka.net

31st
Jan 2015
Avo M
@avoxm
Jan 31 2015 02:32
hey @Aaronontheweb a question somewhat remotely related to Akka.NET
I am implementing NSQ C# client and was thinking since I am checking Akka.NET I might use helios for TCP communication
since documentation is not there yet, I was wondering if there are any blog posts you had where I can read a bit more about helios
and BTW do you think it is a good fit for such a simple thing or it wold be an overkill and I would rather use simple TcpClient
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:07
@avoxm the lack of documentation for Helios is a deep source of personal embarrassment for me :violin:
the best answer I can give you in the short run is to take a look at the https://github.com/Aaronontheweb/helios/tree/master/samples/TimeService sample
Helios is actually fairly lightweight
the two important things it does are:
  1. Multiplexes multiple sockets across a fixed number of threads. I.E. 2 threads can service dozens of sockets on the inbound / TCPListener side
  1. Provides a configurable way of applying codecs to messages on sockets
out of the box Helios uses a technique called "length-frame encoding"
where it appends a 4-byte header to the front of each message that tells the receiver how long each message is
this makes it really easy for the receiver to break up its receive buffer into distinct messages
if you need to disable that encoding for any reason
you can tell the ClientBoostrap to use a NoOpEncoder and NoOpDecoder
which tells the Helios IConnection object not to attempt to do any special encoding or decoding
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:13
I really need to just document that stuff
especially bad because I've started designing a version 2.0 of Helios that uses a true pipelining technique for processing socket messages, which is a much easier programming model than the current "evented" stuff Helios does
so before I can really move onto do that, I need to have some docs explaining how the current implementation works
Avo M
@avoxm
Jan 31 2015 05:19
@Aaronontheweb thanks for details
am I right to assume that I can use it as a general tcp client ?
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:20
yessir
you can, absolutely
Avo M
@avoxm
Jan 31 2015 05:20
seems there are some differences
I haven;t had a chance to figure out what is the issue
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:21
the big difference is mostly that the Helios client works by notifying you with events asynchronously
so you don't have to manually write up the code for async I/O callbacks
Avo M
@avoxm
Jan 31 2015 05:21
but when I send data through TcpClient I receive the recponse
when I send through helios seems no response is received
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:22
might be that you have to call IConnection.BeginReceiving inside your OnConnected event
another user-unfriendly convention that I want to remove in the next version of Helios
Avo M
@avoxm
Jan 31 2015 05:23
actually I am using sample WinForm app which comes with sources
I am sending test requests to my redis server and no response is coming back
same with modified TimeClient
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:23
hmmm
does Redis expect certain headers to appear at the front of their socket messages?
Avo M
@avoxm
Jan 31 2015 05:24
not really
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:24
in the wire format specification for it?
Avo M
@avoxm
Jan 31 2015 05:25
you can even use telnet
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:25
in that case, I would make sure that you specify NoOpDecoder and NoOpEncoder
issue might be that Helios thinks all of the responses are corruped
corrupted*
because the 4-byte header isn't there, so it reads some giant value back from a datablock that is actually just your redis data
and then Helios goes: "what, wait a minute - there can't really be -635000 bytes worth of data in this message"
and starts discarding that data
it'll pump an error into the OnExceptionevent usually when it does that
Avo M
@avoxm
Jan 31 2015 05:26
ok let me try
sorry @Aaronontheweb where should I specify those ? while ClientBootstrap ?
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:30
var bootstrapper =
                new ClientBootstrap()
                .SetEncoder(new NoOpEncoder())
                .SetDecoder(new NoOpDecoder())
                    .SetTransport(TransportType.Tcp).Build();
And make sure you have something like this too:
TimeClient.OnConnection += (address, connection) =>
            {
                Console.WriteLine("Confirmed connection with host.");
                connection.BeginReceive(ReceivedCallback);
            };
Avo M
@avoxm
Jan 31 2015 05:31
ok cool, thanks
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:31
my guess is that the encoder and decoder were the issue
Helios is not very user-friendly
it's very performant, but not intuitive :\
I'd very much like to fix that - starts with better documentation
Avo M
@avoxm
Jan 31 2015 05:39
thanks lot @Aaronontheweb that was exactly the issue
I will be doing a lot of stuff with kafka and nsq
I'll try to use helios it will force me to get to know the code along the way
I have work with netty so I guess it shouldn't be that bad :)
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:40
Helios 2.0 is aspiring to be exactly like Netty
Avo M
@avoxm
Jan 31 2015 05:41
that would be awesome
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:41
i didn't understand Netty's internals well enough to get it right for the first few versions of Netty
err, Helios :smile:
the low-level JVM networking stack is much more complicated than .NET's
Avo M
@avoxm
Jan 31 2015 05:41
any timeline for v 2 in mind ?
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:42
I've started designing the pipelining mode and I've diagrammed the model
began coding parts of it
Avo M
@avoxm
Jan 31 2015 05:42
yes I hear you especially NIO is a bit confusing
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:42
but at the moment I'm pretty singularly focused on shipping Akka.Cluster
so I don't really have a solid timeframe for it
Avo M
@avoxm
Jan 31 2015 05:43
if you have something specific to start for v 2 with some boost would be happy to jump in
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:43
you know, I think the best thing I could do is start publishing my designs for it
that'd provide a good starting place for it
even if my design is wrong / has to change - it's a lot easier to start with something you can tear down instead of a blank sheet of paper, right ?
Avo M
@avoxm
Jan 31 2015 05:45
yes and no :), but still it is a good thing since there will be something to push forward
do you expect any braking changes
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:46
oh yeah
it's going to be incompatible with previous versions of Helios
Avo M
@avoxm
Jan 31 2015 05:46
I see
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:47
I think it will ultimately be worth it
the pipeline model makes a lot of common scenarios much easier
adding authentication support, for instance
or doing layers of codecs
Avo M
@avoxm
Jan 31 2015 05:47
well if you are caught up in Akka.Cluster if you want you can open issues as a guidelines and I can start coding
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:48
thanks @avoxm - I'll do that
might be a few weeks before I get a chance to that place
Avo M
@avoxm
Jan 31 2015 05:48
I will need a solid framework for my clients anyway I would rather use this then reinvent a wheel
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:49
but I'm eager to make Helios a viable stand-alone framework
me too!
Avo M
@avoxm
Jan 31 2015 05:49
sounds like a plan !!
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:50
alrighty, I'm off for the night - have a good one
Avo M
@avoxm
Jan 31 2015 05:50
I will start digging into code and if that's ok will bug you time after time
Aaron Stannard
@Aaronontheweb
Jan 31 2015 05:50
yep, feel free to bug me :smile:
Avo M
@avoxm
Jan 31 2015 05:50
you too buddy.
thanks Aaron
ttyl
Roger Johansson
@rogeralsing
Jan 31 2015 09:43
@/all New documentation system is up, docs are now generated from MD files inside main repo /documentation/wiki .. we are now closing the github gollum wiki
Roger Johansson
@rogeralsing
Jan 31 2015 09:49
We also have the option to set metadata per page using yaml now. e.g. custom title
@Aaronontheweb are you planning to keep the name helios? its superconfusing with the ms helios that is also for comm
Aaron Stannard
@Aaronontheweb
Jan 31 2015 09:55
yeah, I'll probably still keep it
Roger Johansson
@rogeralsing
Jan 31 2015 11:35
@/all Do you guys think it would be a good idea to embed live code examples in the docs ? https://dotnetfiddle.net/Widget/Preview?url=/Widget/4QLbhL
Avo M
@avoxm
Jan 31 2015 15:12
@Aaronontheweb actually I was thinking that changing the name of helios would be a good thing
[Sol] can be an option
and nuget search will be less confusing
BTW any plans to move it under organization ?
Roger Johansson
@rogeralsing
Jan 31 2015 15:20
Anyone else having problem installing akka.remtote from nuget? failing to install protobuf
Bartosz Sypytkowski
@Horusiath
Jan 31 2015 20:12
do we have any way to extend actorsystem.settings.config from some extension plugin perspective? I want to use Persistence plugin to automatically apply it's custom config as a fallback to existing system's config
Roger Johansson
@rogeralsing
Jan 31 2015 20:34
@Horusiath yes. plugins can call settings.InjectTopLevelFallback(config); that will register a new fallback config with the existing one as fallback
Bartosz Sypytkowski
@Horusiath
Jan 31 2015 20:35
ok, thx
Roger Johansson
@rogeralsing
Jan 31 2015 20:35
so it will be top level between plugins, but fallback for userconfig
Aaron Stannard
@Aaronontheweb
Jan 31 2015 21:13
@avoxm yeah, I'm going to move Helios under its own org
@rogeralsing is it a NuGet issue? Or did the previous package get delisted or something?
Avo M
@avoxm
Jan 31 2015 22:36
@Aaronontheweb have you had a chance to check http://www.supersocket.net/ while working on helios ?