These are chat archives for akkadotnet/akka.net

20th
Nov 2015
Aaron Stannard
@Aaronontheweb
Nov 20 2015 00:25
@forki what's the deal with this error?
Severity Code Description Project File Line
Error The command ""D:\Repositories\olympus\akka.net.paket\paket.exe" restore --references-files "D:\Repositories\olympus\akka.net\src\contrib\dependencyInjection\Akka.DI.Ninject.Tests\paket.references"" exited with code 1. Akka.DI.Ninject.Tests
happens about half the time during a normal build
like, why does anything need to restore when all I did was update some of my own source?
Aaron Stannard
@Aaronontheweb
Nov 20 2015 00:40
@stefansedich looks like akkadotnet/akka.net#1434 passes now
Mikey
@BrainSlugs83
Nov 20 2015 03:05
Hey guys, in a simple clustering scenario -- how do I go about creating a singleton actor? (like only create it on one single node, and then, how do the other cluster members get an IActorRef/ActorSelection to it?)
Is there an established pattern / example of it?
Stefan Sedich
@stefansedich
Nov 20 2015 03:16
awesome @Aaronontheweb
merged
Stefan Sedich
@stefansedich
Nov 20 2015 03:24
testing my "install.sh" script again then getting onto getting unit tests running under mono.
Mikey
@BrainSlugs83
Nov 20 2015 03:29
Looking at http://getakka.net/docs/clustering/cluster-extension#when-to-work-with-gossip-directly -- it says "Cluster Singletons" can't be done through a router (and needs to be done via monitoring gossip, somehow?) -- Is there an example or a pattern for this anywhere?
Stefan Sedich
@stefansedich
Nov 20 2015 03:51
blob
This message was deleted
This message was deleted
This message was deleted
oops
fresh VM to build under Mono 4.3 is not just a script away!
hopefully I have as much luck with the tests this time around.
Stefan Sedich
@stefansedich
Nov 20 2015 05:08
nope, errors, errors everywhere.
Steffen Forkmann
@forki
Nov 20 2015 05:51
@Aaronontheweb when does this happen? On CI?
Steffen Forkmann
@forki
Nov 20 2015 06:01
Or during VS build?
Philip Laureano
@philiplaureano
Nov 20 2015 06:34
As discussed, here you go, Andrew--this one is the issue about using alternative config formats besides HOCON: akkadotnet/akka.net#1450
Steffen Forkmann
@forki
Nov 20 2015 07:00
@Aaronontheweb akkadotnet/akka.net#1451
Bartosz Sypytkowski
@Horusiath
Nov 20 2015 07:27
@BrainSlugs83 we'll have cluster singletons as part of Akka.Cluster.Tools plugin. Most of it is already done (including cluster singleton), we just need to write the rest of test specs for them.
Thomas Lazar
@thomaslazar
Nov 20 2015 08:27
ok. as soon as i specify any kind of akka.loggers in my test class the EventFilter assertion stuff breaks. even if i specify Akka.Event.StandardOutLogger
anyone know what's up with that?
Arjen Smits
@Danthar
Nov 20 2015 09:19
Implemented a retrying-exponentialbackoff-supervisor. Not meant to be a one-size-fits-all solution. But might be interesting to some ppl nonetheless. https://gist.github.com/Danthar/82e89eff01ba1eb1d4c3
Tom Rathbone
@chillitom
Nov 20 2015 10:31
sending Update() to a PersistentView doesn't appear to have any effect.. could I be doing something wrong? Looking through the source of PersistentView I can't find anywhere where it handles this message type.
Weston
@ronnyek
Nov 20 2015 12:37
is there any chance akka runs under coreclr?
Graeme Bradbury
@GraemeBradbury
Nov 20 2015 12:38
@ronnyek don't know if anyones tried.
Weston
@ronnyek
Nov 20 2015 12:38
maybe I'll take a crack at it
does it run under mono to your knowledge
Graeme Bradbury
@GraemeBradbury
Nov 20 2015 12:39
:+1: tell us how you get on, would be interested to hear how it goes.
I think stefansedich is working on getting 4.3 to work.
tru3d3v
@tru3d3v
Nov 20 2015 13:43

Hi, is it possible if i send text file (133KB) from akka server to client Akka ?. i have try but client is not respond

public class HelloActor : UntypedActor
{
public HelloActor()
{
}

protected override void OnReceive(object request)
{
var data = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory+"myfile.txt");
Sender.Forward(data);
}

}
var actor = System.ActorSelection("HelloActor");
return await actor.Ask<string>(null, TimeSpan.FromHours(1));
is it to large for 133 KB txt file ?
and this is my config hocon at server
remote {

    log-sent-messages = on
    log-received-messages = on
    maximum-frame-size = 10MB
thedarkdestructor
@thedarkdestructor
Nov 20 2015 14:48
Hi guys. Anyone know a link for a good tutorial for a akkadotnet FSM? I have only seen the official documentation but it is quite poor...
Bartosz Sypytkowski
@Horusiath
Nov 20 2015 15:29
@chillitom Update on PersistentView triggers it to send ReplayMessages message to the journal. In result it replays events that happened from the last replayed message received
tru3d3v
@tru3d3v
Nov 20 2015 15:56
Guys. Anyone can explain about large message ? is it to large for 133 KB txt file
???
Aaron Stannard
@Aaronontheweb
Nov 20 2015 17:11
@forki thanks! this was on VS build
@tru3d3v 10mb isn't a valid value for that setting
it's expressed as "total bytes"
public long? GetByteSize()
        {
            var res = GetString();
            if (res.EndsWith("b"))
            {
                var v = res.Substring(0, res.Length - 1);
                return long.Parse(v);
            }

            return long.Parse(res);
        }
Aaron Stannard
@Aaronontheweb
Nov 20 2015 17:18
so you need to multiply 10 1024 1024 to get 10mb :p
bah, stupid markdown
10 * 1024 * 1024
Stefan Sedich
@stefansedich
Nov 20 2015 17:18
or be greedy and go for 1000
Aaron Stannard
@Aaronontheweb
Nov 20 2015 17:23
@BrainSlugs83 another hack I've seen for doing this is pinning your "singleton" to the Akka.Cluster leader
you can use gossip messages to tell if a given node is the leader
and when leader == self then create singleton
otherwise have everyone else look for it
there's only 1 leader in the cluster at any time
and leaders change only when the previous leader was gracefully terminated or forcibly removed by a human
which is why that hack works pretty well
Aaron Stannard
@Aaronontheweb
Nov 20 2015 17:45
@Horusiath nightlies should be working again now
kicking one off
Stefan Sedich
@stefansedich
Nov 20 2015 17:45

@ronnyek @GraemeBradbury I am working on getting it to build and run tests which is a nightmare, for one it won't even build under mono 4.2 as some methods used in the IO stuff is not even in mono 4.2 and was only added a month ago.

would be scary to run it without knowing it builds and all tests pass as who knows what is missing at runtime.

Mikey
@BrainSlugs83
Nov 20 2015 18:08
@Horusiath, thanks for the heads up -- @Aaronontheweb -- double thanks, that seems like it will work well -- especially with a persistent actor (new singleton comes up and will get the last committed state) -- I'm thinking if a node gets a message that it's no longer the leader it should stop the singleton actor too...
Is there anyway to specify that certain roles cannot be the leader? (I have some roles in my cluster that are transient.)
(Or the opposite of that, to declare: "only these roles can be the leader?" -- black-list or white-list works for me, just need to keep the transients from becoming leaders.)
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:11
heh, that's a good question - no, there isn't at the moment
typically though, one of your seed nodes will almost always be your leader
so just boot the non-transient ones first
the other thing you can do... just thinking about this
is have the leader, whoever it is
it can be any type of node
use a clustered router to deploy your "singleton" actor onto a specific type of role
like instead of having that actor run on the leader itself
the leader instead just becomes responsible for 1. checking if that actor has already been deployed and then 2. deploying it onto a specific role if it hasn't
Mikey
@BrainSlugs83
Nov 20 2015 18:14
Oh not a bad idea -- have the leader run the clustered router...
Right -- have to check if it's already been deployed, that makes sense...
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:16
yeah, that's a small bit of "consistency" price you have to pay in exchange for decoupling :p
Mikey
@BrainSlugs83
Nov 20 2015 18:20
How would I detect if it's gone down? -- will a deathwatch on the actor itself work, or should I deathwatch on the node itself? (can the router tell me what node it deployed it the "singleton" to?)
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:20
if the router is configured to only deploy a single routee
which is easy to do
you can use router.Tell(new Identify("are you a singleton?"))
and the routee will reply back with ActorIdentity
and then you can Deathwatch the routee
Stefan Sedich
@stefansedich
Nov 20 2015 18:22
sigh so I just chucked a simple console app at my mono dev VM, and that segfaulted just running.
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:22
Identify is an auto-received message
meaning that all actors will automatically reply to it
Stefan Sedich
@stefansedich
Nov 20 2015 18:22
then it ran after a while, something must be fucked with this vm.
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:22
@stefansedich isn't the cloud magical?
Stefan Sedich
@stefansedich
Nov 20 2015 18:22
this is local heh
Aaron Stannard
@Aaronontheweb
Nov 20 2015 18:23
isn't virtualization magical?
Stefan Sedich
@stefansedich
Nov 20 2015 18:23
indeed
I need another laptop
Mikey
@BrainSlugs83
Nov 20 2015 18:33
@Aaronontheweb thanks -- sometimes Akka makes me feel like, I have a hammer, and all these nails -- and for some reason, I'm looking for the screw driver anyway. XD
Zetanova
@Zetanova
Nov 20 2015 19:54
How to run one tests or all of one tests lib?
Aaron Stannard
@Aaronontheweb
Nov 20 2015 21:37
@Zetanova resharper ;)
or if you want to run the entire test suite, ./build.cmd all
as for re-running it on the build server, I'll need to give you an account
Bartosz Sypytkowski
@Horusiath
Nov 20 2015 22:20
@Aaronontheweb this will be more complicated - for some reason when I'm updating nuget packages in persistence plugin projects, references get kicked out of the csproj
ok, I see now - when you usually get nuget package, you should have a separate dir create for it, with *.nupkg file and lib sub-directory
Bartosz Sypytkowski
@Horusiath
Nov 20 2015 22:25
now when I'm downloading nightlies I don't have lib sub-dir, only [Content_Types].xml file
Aaron Stannard
@Aaronontheweb
Nov 20 2015 22:25
so, no binaries?
Bartosz Sypytkowski
@Horusiath
Nov 20 2015 22:25
nope
Zetanova
@Zetanova
Nov 20 2015 22:41
@Aaronontheweb why not xunit.runner.visualstudio ?
Aaron Stannard
@Aaronontheweb
Nov 20 2015 23:05
@Horusiath welp, might be the FAKE script then
blob
as you can see there, all of the NUKPGs I produced when I ran it yesterday definitely have binaries in them
based on the file sizes
ah, my bad!
those are the symbol pkgs
the true NuGet packages are screwed up
I can see that
so something must not have been updated in the FAKE script when paket was introduced
probably in the output copying step
let me check
Aaron Stannard
@Aaronontheweb
Nov 20 2015 23:11
@Zetanova that should work too
we use XUnit 2
I'm pretty sure that's been updated to work with the VS Test Runner
James Connor
@megakid
Nov 20 2015 23:17
@Aaronontheweb with the hack about monitoring gossip and having the singleton live on the cluster lead, would this work if you had Lighthouse as your seed nodes?
Aaron Stannard
@Aaronontheweb
Nov 20 2015 23:17
you'd have to modify the source
couldn't use it OOB
it's definitely a hack
James Connor
@megakid
Nov 20 2015 23:19
Cool, yeh just wanted to understand that - sounds like proper cluster singleton isn't too far away anyhow
Aaron Stannard
@Aaronontheweb
Nov 20 2015 23:24
fixed it @Horusiath