These are chat archives for akkadotnet/akka.net

12th
Feb 2015
Andrew Skotzko
@skotzko
Feb 12 2015 00:40
Ha, yes, for sure! Sorry about that guys. Great meeting everyone though and @Horusiath your English is good.
Aaron Stannard
@Aaronontheweb
Feb 12 2015 00:40
now for the fun part
merging everything in dev with master
technically should work :shipit:
and holy shit, it did
yay
Aaron Stannard
@Aaronontheweb
Feb 12 2015 00:54
waiting for the AppVeyor build to start 15 minutes after submitting a PR http://i2.kym-cdn.com/entries/icons/original/000/007/784/what-year-is-it-robin-williams.jpg
Andrew Skotzko
@skotzko
Feb 12 2015 00:57
yeah, we need to get those build servers up asap
Natan Vivo
@nvivo
Feb 12 2015 01:14
Hey guys. Congratulations on the new release!
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:14
thanks @nvivo !
just started the publishing process now
have to push packages and symbols for 20-something unique packages :sparkles:
Natan Vivo
@nvivo
Feb 12 2015 01:15
Cool, it's almost midnight here, I'll try it tomorrow morning =)
Andrew Skotzko
@skotzko
Feb 12 2015 01:15
hey @nvivo !
Welcome
Natan Vivo
@nvivo
Feb 12 2015 01:16
Thanks
Great job you guys are doing
What about the tag on the git repo? Is it created automatically by the build process?
Andrew Skotzko
@skotzko
Feb 12 2015 01:20
The failed build yuo mean?
or which tag
Natan Vivo
@nvivo
Feb 12 2015 01:20
The git tag for 0.8 that shows in the Releases tab on github
Andrew Skotzko
@skotzko
Feb 12 2015 01:20
oh, the version tag?
yeah
Natan Vivo
@nvivo
Feb 12 2015 01:20
Yep
Andrew Skotzko
@skotzko
Feb 12 2015 01:21
about to change
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:22
just pushed it
Andrew Skotzko
@skotzko
Feb 12 2015 01:22
boom!
release tag up
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:22
apparently our build system's NuGet publishing stuff doesn't work the way I thought it did :fire:
gotta figure that out RQ
or manually start pushing packages :part_alternation_mark:
Natan Vivo
@nvivo
Feb 12 2015 01:23
I learned about akka on Aaron's post on HN, a couple weeks ago. didn't even know what it was... I'm still learning this, there is too much to grasp.
Andrew Skotzko
@skotzko
Feb 12 2015 01:23
We’re working hard on making the onboarding easier. One of my top priorities
Maybe we could chat tomorrow about your experience so far?
Natan Vivo
@nvivo
Feb 12 2015 01:24
Sure
Andrew Skotzko
@skotzko
Feb 12 2015 01:25
cool
sent you a private gitter chat
Rodrigo Vidal
@rodrigovidal
Feb 12 2015 01:30
Hey guys, why not publish release notes in Github Releases, instead of release_notes.md?
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:44
packages are up, but symbols are not - my shame is made public: http://www.symbolsource.org/Public/Status
SymbolSource barfed every time I tried to submit something - same thing happened with Helios symbols earlier this week
@rodrigovidal oh man, I didn't even know about that
let me see if I can update my Git tag to include that
Rodrigo Vidal
@rodrigovidal
Feb 12 2015 01:48
@Aaronontheweb yeah you can :)
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:48
RELEASE_NOTES.MD serves a functional purpose - build.fsx parses it to automatically include that data in the NuGet notes and version number
Rodrigo Vidal
@rodrigovidal
Feb 12 2015 01:49
Oh, I didn’t know that. That’s nice!
@Aaronontheweb Maybe we could publish it in both places? Do you think it’s worthwhile?
Aaron Stannard
@Aaronontheweb
Feb 12 2015 01:56
I think publishing it in both places is a good idea
I usually put the body of the release notes into my PR too
I actually like using the releases better because they don't get hidden like a closed PR
so I'll go and update the past few releases now
Rodrigo Vidal
@rodrigovidal
Feb 12 2015 01:57
@Aaronontheweb awesome! thank you!
back-filled the previous couple of releases
like this a lot
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 06:43
@Aaronontheweb 0.8 description for plugable actor pipeline is outdated
This is not the correct interface:
interface IActorProducerPlugin {
    bool CanBeAppliedTo(ActorBase actor);
    void AfterActorCreated(ActorBase actor, IActorContext context);
    void BeforeActorTerminated(ActorBase actor, IActorContext context);
}
This is:
interface IActorProducerPlugin
{
    bool CanBeAppliedTo(Type actorType);
    void AfterIncarnated(ActorBase actor, IActorContext context);
    void BeforeIncarnated(ActorBase actor, IActorContext context);
}
Natan Vivo
@nvivo
Feb 12 2015 12:55
Anyone there?
Anthony Brown
@bruinbrown
Feb 12 2015 12:58
I'm around
Natan Vivo
@nvivo
Feb 12 2015 12:59
Hey.
Can I ask questions here?
or is this just for project development?
Anthony Brown
@bruinbrown
Feb 12 2015 13:05
If it's a big question, then I'd probably ask on SO but for small stuff I'd say so
Natan Vivo
@nvivo
Feb 12 2015 13:10
Just this: can I start say 100 child workers that will do network requests, but instead of distribute using round robin, only send work to the actor once it's finished? kinda like all them are sharing the same mailbox
was just wondering if this is possible
Anthony Brown
@bruinbrown
Feb 12 2015 13:14
I guess the closest to that that you're likely to get is the Smallest Mailbox routing option http://getakka.net/wiki/Routing#smallestmailbox
Natan Vivo
@nvivo
Feb 12 2015 13:15
Yeah, I saw that but its not exactly what I'm looking for. Maybe it's better to use a custom task scheduler for that
Anthony Brown
@bruinbrown
Feb 12 2015 13:17
I'm curious as to why you only want to send a message to a target once it's finished processing it's current message though
Natan Vivo
@nvivo
Feb 12 2015 13:17
It's a queue, I have something like 50.000 requests to process, and each one requires a dns lookup
I'd like to limit the concurrent dns lookups I perform at a time
so that it only does something like 400 lookups at a time
each lookup requires a thread, and I don't want to starve the threads just with dns lookups
I'm using some async resolvers, but still I need to keep performning checks on each resolution, so in the end 50.000 requests will create 1000 threads easily
Anthony Brown
@bruinbrown
Feb 12 2015 13:23
Is there no opportunity to cache lookups? If so, you could always use something like ConsistentHashing to ensure that all of the same address reach the same actor
Natan Vivo
@nvivo
Feb 12 2015 13:24
I'm already using a local dns server installed on the machine, so the queries are local
the point is that for example, if I distribute 1000 requests to 100 workers, each one will get 10. maybe 9 workers will finish everything before the other 1 times out a request
then that worker will keep 9 requests in the queue while I have other 9 workers doing nothing
the Task model works fine for this, but I need to create a custom scheduler. there is a documentation on msdn on how to do that, but I was just thinking if akka already implemented something like this
it seems the Scala version has some features like this, but depends on some routers that are not implemented yet
Anthony Brown
@bruinbrown
Feb 12 2015 13:27
Yeah I see what you mean, I think that is something you'll likely have to implement yourself, most routers are simple message passers, there's things like the Tail Chopping Router which is starting to sound like it's what you're looking for
Natan Vivo
@nvivo
Feb 12 2015 13:27
currently what I'm doing is that I batch the requests in groups, and the actor starts 400 tasks and waits for all of them to finish
works, but is not optimal
Roger Johansson
@rogeralsing
Feb 12 2015 13:30
you can probably do a pull based model for this, say that you push all 50k messages to an actor that just buffer all these messages, it doesnt do anything with them, just keep them around in a queue... then you have 400 workers, wich each sends a GetMoreWork message to the buffer actor...
Natan Vivo
@nvivo
Feb 12 2015 13:31
hm
something like, everytime I finish a request, I send the parent a "give me more"
Roger Johansson
@rogeralsing
Feb 12 2015 13:32
exactly
Natan Vivo
@nvivo
Feb 12 2015 13:32
didn't think of that. I'll try it
Roger Johansson
@rogeralsing
Feb 12 2015 13:33
the parent can send a NoMoreWorkToGive once it is empty to make the workers stop requesting... and once there is a message in the parent, it sends a message to awaken the workers
Natan Vivo
@nvivo
Feb 12 2015 13:34
right. I read about that model in the akka patterns, I remember now
I'm reading so much stuff lately I'm not having time to process
Roger Johansson
@rogeralsing
Feb 12 2015 13:34
:)
Natan Vivo
@nvivo
Feb 12 2015 13:36
I was thinking, about that PR I did for the stashing sample
Maybe it would be a good idea to separate some samples, but have some kind of official pattern repository
that would imply improving the samples to be really a "best practices" guide
but is something I miss today, I'd be willing to create some samples once I get it right
On the ZeroMQ guide for example, one thing I found great was that they have these named patterns you can follow to implement network protocols
I feel like Akka.net could have some better examples than the original one. I find the java examples unecessarily complicated
while porting the fault tolerance example, there is a lot of unecessary code there. I even simplified some things, but the model itself is complicated
Roger Johansson
@rogeralsing
Feb 12 2015 13:42
ok ok, yes I agree, there should be some sort of patterns repository. maybe even with a bit larger examples that doesnt just show a single feature only
Natan Vivo
@nvivo
Feb 12 2015 13:43
Roger, while you are here...
Roger Johansson
@rogeralsing
Feb 12 2015 13:44
yes?
Natan Vivo
@nvivo
Feb 12 2015 13:44
I opened an issue on the template repository about ctrl+scroll not working on the website
and I have been digging what is causing this
Roger Johansson
@rogeralsing
Feb 12 2015 13:44
ah , ok found anything?
Natan Vivo
@nvivo
Feb 12 2015 13:44
it seems there is a "smooth scroll" jquery plugin that is causing this
it seems just disabling that specific plugin solves the problem. do you think smooth scrolling is that important?
Roger Johansson
@rogeralsing
Feb 12 2015 13:45
ok, we bought a template for the layout, so that is probably bloated with sliders and stuff
Natan Vivo
@nvivo
Feb 12 2015 13:45
I could do a PR to disable it
Roger Johansson
@rogeralsing
Feb 12 2015 13:45
that would be good :)
Natan Vivo
@nvivo
Feb 12 2015 13:45
ok. because I use a 26" monitor, and I'm so used to zoom things otherwise I cannot read it
=)
I'll see what I can do
Roger Johansson
@rogeralsing
Feb 12 2015 13:48
btw. what akka patterns book are you reading?
there is a Work Pulling Pattern down the page
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 13:51
@nvivo I was looking at your sample, but for me it looks a little bit over-engineered for the case, you're presenting ;)
Natan Vivo
@nvivo
Feb 12 2015 13:51
the stashing?
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 13:51
yep
Natan Vivo
@nvivo
Feb 12 2015 13:52
I was trying to create a sample with some real world analogy... in the case it tries to do a database query, and if it can't it stashes.. so there is some code to emulate that
What do you think could be simplified?
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 13:53
in case, when database connection is a single step action, simply initialize connection before actor starts/restarts and dispose it after stop, if timeout exception will trigger, just "let it fall" and ensure that parent will restart actor in it's supervision strategy
Natan Vivo
@nvivo
Feb 12 2015 13:54
but that would leave the connection open for too long
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 13:55
(problem is a long running timeout negatively affecting in scenarios of message burst, but CircuitBreaker will address it when it's ready)
Natan Vivo
@nvivo
Feb 12 2015 13:55
usually you should open and close the connection per statement if possible, so you make better use of connection pooling
also, you are assuming this actor would stop at some point. the idea is that it is an "eternal" process
but I agree, its my first example. there might be a lot of things to improve
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 13:56
it's not orleans ;)
Natan Vivo
@nvivo
Feb 12 2015 13:56
=) you got the point
I'll talk later with Andrew to see what he was planning for the documentation
I think to have any kind of agreement, we need to estabilish what kind of samples should exist and what they are trying to show
To me that sample is very simple, but as you showed, people see things differently =)
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:00
it's actually both beauty and the curse of actor model - you can accomplish one thing in so many ways
Natan Vivo
@nvivo
Feb 12 2015 14:01
yeah, but I feed that there could be some patterns to follow. not to be the single source of truth, but just to give people that are learning some path to follow
that's just my experience, but more people I know won't keep looking for java and scala blog posts to learn a .net library
*most people
Håkan Canberger
@HCanber
Feb 12 2015 14:02
Earlier we've said we should keep samples to a minimum, as samples needs to be maintained as well. Instead, if someone has a sample, they can put it in there own repo and we can point to it in the docs. See https://github.com/akkadotnet/akka.net/pull/478#issuecomment-60043352
Natan Vivo
@nvivo
Feb 12 2015 14:03
right, could be an option
I feel that there are some patterns that could be maintained somewhere inside the project. I agree it doesn't need to be akka.net repository
for example, this official scala documentation I'm readding is full of common patterns, but points to blog posts scattered around the internet
maybe I can start a repository and see how it goes
Håkan Canberger
@HCanber
Feb 12 2015 14:05
I'm not sure you need code for demonstrating patterns. It can be in the docs only.
Natan Vivo
@nvivo
Feb 12 2015 14:05
I don't think its the same thing
It depends on what you are looking for. When you know the framework well, you can just write something and it makes sense
I spent 1 week trying to understand what "send a Failure event" means
I just think a lot of people learning akka pass thorugh that, and while there is a lot of material with Scala and Java, .NET doesn't have much
I know I have been reading A LOT of java and scala source code to grasp how to do things, because the documentation doesn't tell some details
Roger Johansson
@rogeralsing
Feb 12 2015 14:08
@Horusiath I'm getting a lot of failed tests in the persistence module, is there something broken there?
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:08
^^ dunno
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:15
I've downloaded the dev branch from the github, all Persistence-related tests are passing
Roger Johansson
@rogeralsing
Feb 12 2015 14:16
are you using the old vs testrunner plugin?
the one we have had all the time that is
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:16
resharper test runner
Roger Johansson
@rogeralsing
Feb 12 2015 14:17
ok, I'm uisng the new updated xUnit vs runner.. probably that one that is failing
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:19
@nvivo I think, that having so many materials around in canonical JVM Akka is an asset - lets be serious, we as a .NET community will never reach that level of details and good practices about actor model in the nearby years alone
Natan Vivo
@nvivo
Feb 12 2015 14:21
I'm not complaining =) I'm just saying it is not ideal, and could be improved
Roger Johansson
@rogeralsing
Feb 12 2015 14:25
this is whats fails for me in persistence:
This message was deleted
    private void ExpectMsgInOrder(params object[] ordered)
    {
        var msg = ExpectMsg<object[]>();
        msg
            //.Select(x => x.ToString())
            .ShouldOnlyContainInOrder(ordered);
    }
@Horusiath not getting any messages back
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:26
<dev-excuse> Works for me ;) </dev-excuse>
Roger Johansson
@rogeralsing
Feb 12 2015 14:28
@Horusiath should this return a real value? PersistenceSpec.Configuration("inmem", "PersistentActorSpec").ToString()
because I get an empty config for that
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 14:29
it should, this is simple string format method
Roger Johansson
@rogeralsing
Feb 12 2015 15:00
@HCanber can you take a peek at the testkits and xUnit 2, does it work? will it be an effort to upgrade? I cant seem to get tests to pass either with 1.9.2 nor 2.0 on my machine anymore
The new xUnit2 vs runner is super confusing, and the old one cant be installed any more... :worried:
David Smith
@smalldave
Feb 12 2015 15:15
which runner are you using. vs or resharper?
Roger Johansson
@rogeralsing
Feb 12 2015 15:16
vs.. resharper cant find xunit tests w/o the old runner plugin it seems ( ?)
@Horusiath found the reason why the persistence tests fail for me, I upgraded the Json.NET package in nuget, that seems to mess it all up, if I revert to use the old json.net it does work as expected..
David Smith
@smalldave
Feb 12 2015 15:24
resharper plugin hasn't worked for us really since moving to 2. trying to find a working combination of xunit 2 + runners has so far escaped us. personally think you are better off waiting for stable xunit 2 and runners. any chance of a bug fix for 1.9.2?
Roger Johansson
@rogeralsing
Feb 12 2015 15:24
I talked to one of the xUnit guys, he clearly said that 1.9.2 was dead to them
so unless we patch it ourselves, we are out of luck
David Smith
@smalldave
Feb 12 2015 15:28
how confident was he that the release candidate was ready to use? to be fair the bigger issue is that the runners need to catch up. xunit 2 is completely different
Håkan Canberger
@HCanber
Feb 12 2015 16:55
I don't think upgrading to 2 will be that hard. Testkit.xunit is quite small. @rogeralsing What is it that you want to patch in xunit 1.9.2?
Aaron Stannard
@Aaronontheweb
Feb 12 2015 18:25
@Horusiath sorry about that! I'll update the release notes. Thought I had the latest :\
we should add a dedicated page in the docs for that - that's a cool extensibility feature that's unique to Akka.NET
Aaron Stannard
@Aaronontheweb
Feb 12 2015 18:32
@/all one of the things I'm considering writing for Petabridge is an "actor design patterns" guide for some of the stuff we've used in production. Would cover some architectural patterns (actor fan out, coordinator pattern, transactional actors, etc...) as well as some micro-level stuff for making it easy to design testable actors that play nice with Akka.TestKit. Think it's too early in the lifecycle of Akka.NET to start covering this stuff? If so, I'll spend my time working on some more immediately practical stuff like integrating Akka.NET with SignalR and ASP.NET MVC
would also cover some architectural patterns for leveraging Akka.Remote effectively too
Bartosz Sypytkowski
@Horusiath
Feb 12 2015 20:39
just finished my presentation, I seriously hope I didn't say anything stupid or arrogant
Natan Vivo
@nvivo
Feb 12 2015 22:23
guys, are your presentations available on youtube?
@Aaronontheweb, I was talking about this today. I think this is a great idea. An Akka .NET version of "letitcrash.com"