These are chat archives for akkadotnet/akka.net

5th
Jun 2017
Aaron Stannard
@Aaronontheweb
Jun 05 2017 00:33
@fanoI remote deployment onto a UI thread will never work
reason is that the synchronized-dispatcher has to be able to bind to the SynchronizationContext of the UI thread
which can't be reached by the remoting actors
like, it has to literally be able to hit the UI thread
when you create an actor locally that uses the synchronized-dispatcher
you call the ActorOf method from the SynchronizationContext that actor will use
when you call ActorOf from a UI event in winforms
that's what allows this to work
best thing to do is to not literally use Akka.Remote remote deployment
it can never access the UI thread
unless you tell the entire remoting system to run on the UI thread
put this process in reverse
create a local actor on the UI thread
send it a message remotely from your backend that allows it to spawn children that also use the synchronized-dispatcher
that will work
Gregorius Soedharmo
@Arkatufus
Jun 05 2017 00:47
@Silv3rcircl3 I'm quite confused, trying to convert the FileSinkSpec.scala
Marc Piechura
@marcpiechura
Jun 05 2017 07:22

@Arkatufus where in particular ? TestLinesCommon is a list of string with 4 entries, first one contains "a" 1000 times followed by a new line .

commonByteString is a Select(s => ByteString.FromString(s)).Aggregate(ByteString.Empty, (acc, line) => acc + line).Compact();

mkString aggregates the list into a single string, i.e. string.Join("", TestLinesCommon)

And write is a local function

fanoI
@fanoI
Jun 05 2017 07:57

@Aaronontheweb yes I've understood why a synchronized-dispatcher Actor cannot be created remotely but it is not what I'm trying to do... I'm doing something similar to what you are saying:

  1. Remote System which Main() ends with Application.Run()
  2. Via remote is requested to create a "normal" Actor
  3. This Actor in its PreStart() method creates another Actor() with synchronized-dispatcher

Point 1 e 2 work but point 3 not! Why this happens? The error is the usual that there is no synchronized-dispatcher running but I've a form opened so it is not true :-(

The only way I've found to make this work:

  1. Remote System which Main() ends with Console.ReadLine() (a Console application)
  2. Via remote is requested to create a "normal" Actor
  3. This Actor in its PreStart() method creates an ApplicationContext() in which the UI Actor is created with synchronized-dispatcher it is a "kludge" as I've to expose the Actor's Context to a UI component to create the UI Actor... I need to use a Task to not block this Actor in "Application.Run(MyAppContext())"!
Ivan Dorna
@dorvan
Jun 05 2017 08:42
hello
Gregorius Soedharmo
@Arkatufus
Jun 05 2017 08:55
@Silv3rcircl3 Just the general scala => C# conversion, I guess. I'm not quite sure I'm doing it right. Here's what I got so far:
        [Fact]
        public void SynchronousFileSink_write_single_line_to_a_file_from_lazy_sink()
        {
            this.AssertAllStagesStopped(() => {
                TargetFile(f => {
                    var completion = Source.From(_testByteStrings);
                    completion.RunWith(Sink.LazySink<ByteString, Task<IOResult>>(
                            b => Task.FromResult(FileIO.ToFile(f)),
                            () => Task.FromResult(new IOResult(0, new Result<NotUsed>(NotUsed.Instance)))
                        ), _materializer);
                    completion.MapMaterializedValue();

                });
            }, _materializer);
        }
Arjen Smits
@Danthar
Jun 05 2017 09:24
Hi @dorvan :)
Ivan Dorna
@dorvan
Jun 05 2017 09:24
hello @Danthar ...
i've contacted Roger on twitter, we are following akka.net since some months ago,
because we want to integrate actors model in our system and application projects.
we works on a 2+N nodes active/active cluster. also as fallback using local services.
Arjen Smits
@Danthar
Jun 05 2017 09:29
Sounds interesting :)
So im assuming you have some questions ?
Ivan Dorna
@dorvan
Jun 05 2017 09:30
mmh... i need some other information before to formulate some questions i've in mind...
this is "first contact" :-D
like "I come in peace"
Arjen Smits
@Danthar
Jun 05 2017 09:32
hahaha
ok
no prob
powers down weapons :P
Ivan Dorna
@dorvan
Jun 05 2017 09:34
more like the the dining together :-D like stargate movie with chicken ...
Arjen Smits
@Danthar
Jun 05 2017 09:34
^^
Ivan Dorna
@dorvan
Jun 05 2017 09:36
our start point is: https://github.com/Anthilla/Antd
we want to integrate actor model (or directly akka.net) in the project..
we are evaluating impacts, and problems looking github issues evolutions of akka.net
Arjen Smits
@Danthar
Jun 05 2017 09:39
Ah cool stuff.
Work is being done currently to support .net standard 1.6
Our readme has a link to the current roadmap, if your interested
Ivan Dorna
@dorvan
Jun 05 2017 09:43
i see...
Marc Piechura
@marcpiechura
Jun 05 2017 09:43
@Arkatufus can you create a WIP PR with those changes? Makes it easier for feedback, I'll look into it in a couple of hours
Ivan Dorna
@dorvan
Jun 05 2017 09:46
actually we use .net 4.6.1, wedevelop in VS, compile in VS and run in Mono/Linux V.4.8.0.495
on 4.4 and 4.9 kernels .
Arjen Smits
@Danthar
Jun 05 2017 09:47
ah. Thats also a possibility :)
Gregorius Soedharmo
@Arkatufus
Jun 05 2017 09:48
@Silv3rcircl3 Its not even complete, I've only done one file so far, that one's based on this commit: https://github.com/akka/akka/pull/22033/files
@Silv3rcircl3 should I just make a PR off it?
Marc Piechura
@marcpiechura
Jun 05 2017 09:49
Yup, just put WIP in the header , you can simply push to your branch in the feature and the PR gets updated automatically
Gregorius Soedharmo
@Arkatufus
Jun 05 2017 09:49
alright, just a sec
Gregorius Soedharmo
@Arkatufus
Jun 05 2017 10:08
@Silv3rcircl3 akkadotnet/akka.net#2726
Natan Vivo
@nvivo
Jun 05 2017 12:59
hey guys, any idea when 1.3 is coming out?
Marc Piechura
@marcpiechura
Jun 05 2017 13:01
Natan Vivo
@nvivo
Jun 05 2017 14:42
Thanks @Silv3rcircl3 . Didn't see that post. Hoping cluster will be more stable there
Ivan Dorna
@dorvan
Jun 05 2017 14:56
can i suggest something? to increase Akka.Remote throughput, i see it as goal for 1.3 refer to vsync project https://vsync.codeplex.com/ , there are good things to increase throughput especially if mixed with an rsync protocol and async methods.
Ivan Dorna
@dorvan
Jun 05 2017 15:22
for db support as internal used db, in our project Antd we have tested some db as library db backend. We had the top perfomance and flexibility with litedb (http://www.litedb.org/) wrote in c#.
Aaron Stannard
@Aaronontheweb
Jun 05 2017 16:26
@nvivo yep, working on those as well