These are chat archives for akkadotnet/akka.net

26th
Nov 2015
Aaron Stannard
@Aaronontheweb
Nov 26 2015 01:33
@Horusiath yes
Kunjan Dalal
@kunjee17
Nov 26 2015 04:43
@Horusiath thanks for detailed answer. @stefansedich I searched for Orleans vs ASF and find out it is more like magic they doing behind the scenes. But they are not using it and both have two different ways to go. o_O.
Kunjan Dalal
@kunjee17
Nov 26 2015 05:03
@annymsMthd docker??? That will be sweet... :+1:
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 08:14
@Aaronontheweb ok, my local dev just broke - 1,5k errors after running build all
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 11:37
just found interesting thing - I have custom base actor of type A inheriting from ReceiveActor and defining some base Receivers in it's constructor, and concrete actor B inheriting from A that is created using castle windsor DI. But when DI creates instance of B, I receive null exception - it turns our that list of receivers of actor B is empty (as it didn't introduced any for itself, inheriting only those from A) - it looks like receivers defined by A have been cleared out.
problem appears only when actor props are created using DI
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 12:09
for some reason protected override bool AroundReceive(Receive receive, object message) receive parameter passed is null
MartinNiemandt
@MartinNiemandt
Nov 26 2015 13:31
Hi guys would aliasing a namespace cause issues? e.g. making the actor not receive the message ? what effect would it have if the aliases are different?
by alias I mean this using LeNameSpace = System.Original.Namespace.Messages
MartinNiemandt
@MartinNiemandt
Nov 26 2015 13:40
Sorry I was not thinking, and my last messages seems a bit stupid but I meant, if the alias my actor used eg using abc = Shared.Messages; and my sender used using cba = Shared.Messages; would the Receive<abc.message> still be hit if the sender sent cba.message?
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 14:03
@MartinNiemandt aliases in C# are resolved before compilation, they have basically no meaning for the compiler. So in result you'll always receive fully qualified message type
MartinNiemandt
@MartinNiemandt
Nov 26 2015 14:19
@Horusiath thank you! I was wondering why my actor was ignoring everything I told it then I just realized it is probably giving me the silent treatment not naming him :|. but I got some helpful info from the experience all the same.
MartinNiemandt
@MartinNiemandt
Nov 26 2015 16:49
Hi Me again, I keep getting this Additional information: 'akka.actor.provider' is not a valid type name : 'Akka.Remote.RemoteActorRefProvider, Akka.Remote' from the ConfigurationFactory I went and tried your chat server sample with it and got the same, any ideas?
MartinNiemandt
@MartinNiemandt
Nov 26 2015 17:24
Sorry, I see now Akka.Remote was missing. Staring at the code all day made me blind to the obvious. sorry for the trouble
Aaron Stannard
@Aaronontheweb
Nov 26 2015 17:45
@Horusiath yes, I had the same issue initially - Paket introduced a ton of stuff into the build process that essentially broke MSBuild when I removed paket.targets from all project files
like I had a GAC collision around System.Collections.Immutable a bunch of issues with XUnit2 DLLs not being able to load
I likely missed some stuff when I got rid of much of it - or there are files that are git-ignored that need to be deleted
Christian Duhard
@cduhard
Nov 26 2015 17:55
any recommendations in regards to back-pressure with Akka.net?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 17:56
reactive streams when we have Akka.Streams >_<
in the short run, throttling + throttle control messages sent from consumer to producer
Christian Duhard
@cduhard
Nov 26 2015 17:56
there isn't a mechanism for that in akka.net yet is there?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 17:57
no, we need to port the Throttler pattern into Akka.Pattern
part of the JVM source
Christian Duhard
@cduhard
Nov 26 2015 17:57
k
if i wasn't all drrr reading Scala code
Christian Duhard
@cduhard
Nov 26 2015 17:59
my Scala skillz are weaksauce
Aaron Stannard
@Aaronontheweb
Nov 26 2015 17:59
only one way to improve that
Christian Duhard
@cduhard
Nov 26 2015 17:59
heh
Aaron Stannard
@Aaronontheweb
Nov 26 2015 17:59
I can read Scala really well now but I still have never written a line of it from scratch
which is extremely weird
Christian Duhard
@cduhard
Nov 26 2015 18:00
i actually did an FP Coursera course a couple years ago by Odersky, it was in Scala
retained nothing apparently
so is a throttler implemented as a router of sorts?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:02
it's a proxy, same as a router
transparently sits in the middle
and forwards messages
unbeknownst to sender and receiver
Christian Duhard
@cduhard
Nov 26 2015 18:03
i assume it gets feedback from receiver? or are these static rates?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:03
according to the comments
the rates are adjustable
you can set the throttle rate via a control message
Christian Duhard
@cduhard
Nov 26 2015 18:03
oh yeah, good comments in the source
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:04
we don't have a generalized "akka.contrib" package like JVM Akka does
Christian Duhard
@cduhard
Nov 26 2015 18:05
not sure if I see real value in the throttler, the messages are going to pile up somewhere
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:05
probably should add one
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 18:05
@cduhard when Akka.Streams will be ready, you will have backpressure out of hand. But in general few notes about buffered streaming with back pressure:
  • it's based on simple pub/sub pattern. Even simpler: there is only one subscriber per publisher
  • each subscriber needs to define it's maximal demand - it's basically a number which tells how many message subscriber can buffer
  • publisher won't send any messages to a subscriber, until subscriber will request messages using Request(int)with it's current demand. Current demand is (max demand - bufferedMessages.Count)
  • given Request message from subscriber, publisher remembers current demand and when it receives new message it publishes it and decreases demand number - since publishers/subscriber relation is 1-1, it's easy to keep track of current demand
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:05
real value in the throttler is when your consumer is going to fall over if it does too many things concurrently
i.e. if each message kicks off an async I/O operation
and you need to have a limited concurrent number of those
Christian Duhard
@cduhard
Nov 26 2015 18:05
yeah, i've crushed a few services already like that
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:06
throttling is the right tool for solving that sort of problem
increase throughput by decreasing contention
decrease contention by decreasing degree of parallelism
Christian Duhard
@cduhard
Nov 26 2015 18:06
why not just add a child worker pool?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:07
the idea is that it's not the # of actors who are the bottleneck
Christian Duhard
@cduhard
Nov 26 2015 18:07
but you can do sync processing in each member of the pool
or am i missing something
Bartosz Sypytkowski
@Horusiath
Nov 26 2015 18:07
@cduhard often bottleneck is in I/O not CPU
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:07
:+1:
Christian Duhard
@cduhard
Nov 26 2015 18:07
yeah, i am talking IO
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:08
it's still a good idea to use async I/O
but you just want to limit the number of aync I/O calls that can happen simultaneously using throttling
Christian Duhard
@cduhard
Nov 26 2015 18:09
but isn't a pool of synchronous workers essentially the same as throttling? conceptually anyways
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:09
conceptually it is
but in reality you're using some of your application threads to perform blocking I/O now
instead of letting Windows use IO-completion ports
Christian Duhard
@cduhard
Nov 26 2015 18:10
so you are referring to disk i/o specifically
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:10
network I/O too
sockets use IO-completion ports
so even the HttpClient under the hood uses them
and any REST-API client built on top of that also uses them
but more to the point - throttling gives you a way to solve that contention problem without blocking a thread
Christian Duhard
@cduhard
Nov 26 2015 18:11
one case i am talking about if DB access
is
my only option is a worker pool currently. this would be a good case for a throttler?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:12
hmm... so is the issue decreasing contention on your database?
like SQL Server lock escalation and fun stuff like that?
Christian Duhard
@cduhard
Nov 26 2015 18:12
yes
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:13
got it
in that case actually, yeah I would go for blocking writes
and have a fixed number of workers
Christian Duhard
@cduhard
Nov 26 2015 18:13
cool
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:13
we (Petabridge) have recommend that pattern to a number of users who are dealing with those sort of SQL Server-specific contention issues
if you limit the number of concurrent writers, there's less contention around the row and table locks
which decreases the CPU price that the database server pays and increases throughput overall
Christian Duhard
@cduhard
Nov 26 2015 18:14
at the boundaries of this new service i am dealing with the pressure by using EVentStore and competing consumers subscriptions
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:14
this was the original idea behind "putting a queue" in front of adatabase
Christian Duhard
@cduhard
Nov 26 2015 18:15
so exactly "putting a queue" in front
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:15
yeah
Christian Duhard
@cduhard
Nov 26 2015 18:15
the workers are within the boundaries of the new service
one thing i wonder, is what a recommended way to store a messages state while it's waiting for these workers to respond
Zetanova
@Zetanova
Nov 26 2015 18:17
can sombody help be with git a little, i wasted the hole day yesterday
Christian Duhard
@cduhard
Nov 26 2015 18:17
i'ce just used a state cache that times itself out and resends the messages through or deadletters them eventually
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:17
@Zetanova sure thing - just need help separating your code into branches?
Christian Duhard
@cduhard
Nov 26 2015 18:17
within aggregate root
Zetanova
@Zetanova
Nov 26 2015 18:17
@Aaronontheweb some branches cant sync anymore, and in the dev branch are still commits
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:18
got it - well I'll tell you what, you're all done with the code right?
Zetanova
@Zetanova
Nov 26 2015 18:20
yes, i wanted to PR two things i did
i managed to carrypick the commits and rebase them
but then just coulded PR it or sync
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:22
which branches of your repo?
Zetanova
@Zetanova
Nov 26 2015 18:22
in the dev branch i allways getting the single commits back
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:24
akkadotnet/akka.net#1470
I pulled down your fork :p
I don't see the commits for the other change
Zetanova
@Zetanova
Nov 26 2015 18:26
i worked yesterday on it too
the AsyncTaskSchduler is slowing things down if u call some nested async/await services
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:28
got the async task scheduler
what was the other thing you were working on
Zetanova
@Zetanova
Nov 26 2015 18:29
CommonJournal and CommonSnapshotStore
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:30
I don't see your other commits in the dev branch
Zetanova
@Zetanova
Nov 26 2015 18:30
its in old-dev3
and its somehow broken
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:30
is that live on your fork?
Zetanova
@Zetanova
Nov 26 2015 18:31
i did now a forecd push
maybe now
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:31
@/all a Thanksgiving PSA from the Akka.NET team: if you want to commit to Akka.NET, contributing.md lays out a fool-proof Git workflow for doing this. Read it first before you contribute! https://github.com/akkadotnet/akka.net/blob/dev/CONTRIBUTING.md
Zetanova
@Zetanova
Nov 26 2015 18:32
Zetanova/akka.net@6f579b7
Arjen Smits
@Danthar
Nov 26 2015 18:32
happy thanksgiving to you as well guys :)
have a great day/weekend
Zetanova
@Zetanova
Nov 26 2015 18:32
Zetanova/akka.net@0cf305d
this is just a fix that we fixed some weeks ago
Zetanova/akka.net@5532e82
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:33
ty @Danthar
thanksgiving is a great day for coding as it turns out
Zetanova
@Zetanova
Nov 26 2015 18:33
this is the common db persistence provider
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:33
no emails
Zetanova
@Zetanova
Nov 26 2015 18:34
may lerning curve in git is low
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:34
git takes practice
Zetanova
@Zetanova
Nov 26 2015 18:34
today is all working suddenly
Arjen Smits
@Danthar
Nov 26 2015 18:34
@Aaronontheweb no emails. lol thats easy, simply turn of email sync :D
Zetanova
@Zetanova
Nov 26 2015 18:34
yesterday nothing, i thing there was a problem in the github update
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:36
@Zetanova updated #1470
Zetanova
@Zetanova
Nov 26 2015 18:38
this AsyncTaskSchudler needs still work. Its totaly single threaded, will deathlock at AsyncTask().Result
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:41
@Zetanova #1471
for the AsyncTaskScheduler then
one of the things you can do is make a change and submit a pull request to my branch on #1470
same one that's open on that PR
I'll merge your changes into my branch and update the PR
all I'm doing is going through and moving patches out of your dev branch and into feature branches
using git cherry-pick and the commit numbers you provided
if you want I can close those PRs and you can do it yourself
whatever solves the problem best for you
Zetanova
@Zetanova
Nov 26 2015 18:43
i did it yesterday to
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:44
did you try checking out to a new branch first?
git checkout -b 1410-fix
Zetanova
@Zetanova
Nov 26 2015 18:44
yes
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:44
ah, so why didn't that work for you?
Zetanova
@Zetanova
Nov 26 2015 18:44
there was a problem at guthub i thing
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:44
ah, pushing up to github?
Zetanova
@Zetanova
Nov 26 2015 18:44
yes
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:44
mind messaging me 1:1 and showing me the error message?
Zetanova
@Zetanova
Nov 26 2015 18:44
today the things seams to work
no error
didnt know how to debug
push / pull just executed without any output
today they have one
on the same command
how to clear my dev branch?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 18:54
to DELETE your dev branch
git branch -D dev
git push origin :dev
that's a hard delete
Zetanova
@Zetanova
Nov 26 2015 18:56
will look first on your PR
thx
one other question
if i am working on 2 features
how to have a branch that have the commits of the other?
or just to make one feature branch and then split it in the end?
Zetanova
@Zetanova
Nov 26 2015 19:09
Zetanova/akka.net@5532e82
is mssing
its the common db provider
Zetanova
@Zetanova
Nov 26 2015 19:15
one sec
Zetanova/akka.net@242f263
Zetanova
@Zetanova
Nov 26 2015 19:20
this one
i will delete my dev after this commit
and be carefull on the next features
Aaron Stannard
@Aaronontheweb
Nov 26 2015 19:23
make two feature branches first
make changes on one
then switch to the other
and make changes to that one
in other words - do the work directly on the feature branch
don't try to move it after the fact
Zetanova
@Zetanova
Nov 26 2015 19:24
and to get a build that includes all my feature branches to runtime test it?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 19:25
if the two features aren't directly related to each other
test each independently
if the features are directly related, either roll them together as one
or do one set of changes first, submit that as a PR
and start work on a separate branch later where the two are integrated
and then you can use a rebase to clean everything up afterwards
branches are cheap
use them generously
Zetanova
@Zetanova
Nov 26 2015 19:38
Zetanova/akka.net@242f263
its possible
can i delete dev branch allready?
Aaron Stannard
@Aaronontheweb
Nov 26 2015 21:21
as long as all of your work is saved into a branch somewhere
so you don't lose the commits
Onat Yiğit Mercan
@onatm
Nov 26 2015 22:34
does anyone have problem building after akkadotnet/akka.net@b293dae