Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 17:25
    valdisz synchronize #3889
  • 17:17
    valdisz synchronize #3889
  • 15:44
    valdisz synchronize #3889
  • 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Microsoft.Extensions.Depen… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3989
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump ApiApprover from 3.0.1 to … (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3992
  • Oct 19 13:34
    dependabot-preview[bot] edited #3993
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3985
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump System.Reflection.Emit fro… (compare)

Aaron Stannard
@Aaronontheweb
some graphs can be materialized into Task instances
others can be materialized into things like queues
but Source.ActorRef can be materialized into IActorRef
after I wire up the graph and connect everything
Ryan Anthony
@ryandanthony_twitter
k
Aaron Stannard
@Aaronontheweb
that call on the last line gives me what I want
Ryan Anthony
@ryandanthony_twitter
k
attempting :)
Marc Piechura
@marcpiechura
Note you don’t need to use the GraphBuilder if you have a simple linear stream, maybe easier to start with ;-)
Ryan Anthony
@ryandanthony_twitter
k
I managed to get it to work, but if the code can be simpler, I am all ears
Ryan Anthony
@ryandanthony_twitter
@marcpiechura thanks for the pointer, that is much cleaner for 1:1
Aaron Stannard
@Aaronontheweb
yeah good advice @marcpiechura
Onur Gumus
@OnurGumus
@Aaronontheweb I have added nugget as symbol source to vs. The when I try to load symbols it can't find any.
My get binaries are different i don't want to use it.
Aaron Stannard
@Aaronontheweb
I'm not sure how to help you then
might want to open a support ticket with NuGet
because we really do publish the packages there
I can see the confirm responses in our build system
Keith Nicholas
@keithn
I'm just reading https://petabridge.com/blog/akkacluster-state-distribution/ It's kind of confusing at the end when it asks the question "how do I guarantee that my state is managed safely?" it makes reference to sharding, and then trys to explain how to do it. I think I might be missing something. When a new node joins a cluster and we get a repartitioning of the hash range, do the actors get moved around to different nodes?
so the actor with the state about "aaron" will get moved to a spot where everyone will still find the right actor
As far as I understand that's what the sharding module does. If so, without the sharding module, "how do I guarantee that my state is managed safely?" is you can't with nodes joining and leaving without some how moving actors?
Keith Nicholas
@keithn
ah, I think I get it, that you ask some actor to broadcast a message to all nodes, then they all come back saying they have an actor, or not. If they all come back, then you create the actor. Seems like this is an expensive operation. So I'm guessing when you do this you want to design it so you hold on to the actorref as long as you can to minimize having to locate it. Seems like there's some edge cases as nodes join as you are trying to find things?
Keith Nicholas
@keithn
So far my investigation of Akka.NET, to have a single entity with state live in a cluster seems to be not straight forward.
Keith Nicholas
@keithn
Also, looking at the webcrawler example... doesn't it have a problem that if the MasterBroadcaster goes down, the system dies until a new node joins to trigger creation of a new masterbroadcaster?
Keith Nicholas
@keithn
I'll just talk to myself :) ... No Keith, it won't, because when the next start job comes along it will cause a error, which will cause a restart and it will become the master broadcaster
Bartosz Sypytkowski
@Horusiath
@keithn I'm not sure, but isn't cluster sharding a fair response to your question with aggregate state management?
also depends what do you mean by "state is managed safely". Do you mean, a consistent state? Since depending on your needs, you can manage state safely without hard consistency constraints (i.e. DistributeData plugin works that way).
Keith Nicholas
@keithn
"state managed safely" is from the article, not me...... I'd guess it means consistent state. Yes, cluster sharding is layer to solve this, but you end up with some new problems to do with sharding. Also it seems the programming model doesn't seem super straight forward. It needs a db by default, but can use distributed data to do it also. but I'm not sure, I haven't tried it yet. It's all beta/experimental so no idea how battle hardened it is? And how would it all compare to using something like a clustered redis system to store state?
Also, back to the webcrawler, and the selection of a new masterbroadcaster, is there a potential race condition when two nodes fail to find a master broadcaster but neither see one and both try to become one?
Bartosz Sypytkowski
@Horusiath
@keithn I know, that people are using cluster sharding on production - in akka beta usually means, that the final version of an API may change a little (for cluster sharding it remain the same for last 0.5-1 year) and that a separate benchmark tests still needs to be done.
Conceptually you don't need to learn a lot more to understand sharding, than akka actors mechanics - I think I've put full on that topic (both high level and technical details) in 2 articles on petabridge site. Also actors are totally different programming paradigm than using a cache to store state - it's about building stateful applications. For cluster sharding a persistent db is used only by coordinator to keep consistent track of what shards have been created and where they belong.
jameswilddev
@jameswilddev
Hello! Does Akka.NET's implementation of HOCON include the full range of byte size units (https://github.com/lightbend/config/blob/master/HOCON.md#size-in-bytes-format )? The nearest code I can find only seems to support "b" (bytes): https://github.com/akkadotnet/akka.net/blob/3f924fda8d6ca55c5af90a710d23be8ce36d5c7a/src/core/Akka/Configuration/Hocon/HoconValue.cs#L443
Simon Burgoyne
@simboo

When using
Sink.OnComplete<TIn>(Action success, Action<Exception> failure)

In the success/failure actions Context.Self changes from the actor address to that of the flow, is this expected, known about ?

Self: Debug Trace: 1. Before streaming 2. In success action.

  1. akka://test/user/actorthatstreams
  2. akka://test/user/actorthatstreams/StreamSupervisor-0/Flow-0-0-unknown-operation

I've written a failing test:

using System;
using System.Linq;

using Akka.Actor;
using Akka.Streams;
using Akka.Streams.Dsl;
using Akka.TestKit.VsTest;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Playground
{
    [TestClass]
    public class SelfTests : TestKit
    {
        public SelfTests()
            : base(
                @"akka.loglevel = DEBUG 
                  akka.suppress-json-serializer-warning = on
                  akka.actor.debug.lifecycle = on")
        {
        }

        [TestMethod]
        public void SelfDoesNotChangeWhenWeStream()
        {
            var aut = Sys.ActorOf<ActorThatStreams>("actorthatstreams");
            var self1 = aut.Ask<string>(new GetSelf(), TimeSpan.FromSeconds(1)).Result;

            System.Diagnostics.Debug.WriteLine($"1. {self1}");

            Watch(aut);
            var self2 = aut.Ask(new RunStream(), TimeSpan.FromSeconds(1)).Result;

            System.Diagnostics.Debug.WriteLine($"2. {self2}");

            Assert.AreEqual(self1, self2);
        }
    }

    public class GetSelf { }
    public class RunStream { }
    public class StopSelf { }

    public class ActorThatStreams : ReceiveActor
    {
        private IActorRef sender;

        public ActorThatStreams()
        {
            Receive<GetSelf>(message => { Sender.Tell(GetSelf()); });
            Receive<StopSelf>(message => { Context.Stop(Self); });
            Receive<RunStream>(message =>
            {
                sender = Sender;
                Source.From(Enumerable.Range(1, 10)).RunWith(Sink.OnComplete<int>(OnSuccess, OnFailure), Context.Materializer());
            });            
        }

        private void OnSuccess() { Stop(); }
        private void OnFailure(Exception obj) { Stop(); }

        private void Stop()
        {
            sender.Tell(GetSelf());
            Context.Stop(Self);
        }

        private string GetSelf()
        {            
            return Self.Path.ToString();  
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Akka" version="1.3.6" targetFramework="net461" />
  <package id="Akka.Streams" version="1.2.3" targetFramework="net461" />
  <package id="Akka.TestKit" version="1.2.3" targetFramework="net461" />
  <package id="Akka.TestKit.VsTest" version="1.2.0.4-beta" targetFramework="net461" />
  <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
  <package id="Reactive.Streams" version="1.0.2" targetFramework="net461" />
  <package id="System.Collections.Immutable" version="1.3.1" targetFramework="net461" />
</packages>
Aaron Stannard
@Aaronontheweb
@jameswilddev I think we just support "bytes"
no kb or mb
Yesh Nadella
@yesh-nadella

I'm using DistributedPubSub extension and I'm getting the below error. Am I missing a setting? I'm not sure why "akka.tcp://" is missing from the second path.

Message Status from akka.tcp://Test@localhost:4057/system/distributedPubSubMediator to akka://Test/system/distributedPubSubMediator was not delivered. 5 dead letters encountered

Marc Piechura
@marcpiechura
@simboo the success and failure callbacks are called in the Flow actor, not in your ActorThatStreams, so you need to create a closure of Self and pass this to onsuccess and onfailure
AndreSteenbergen
@AndreSteenbergen
Is there any way to get some information from exceptions? I am running on a test server, and I run into an null pointer exception somwhere.
[ERROR][4/30/18 4:23:17 PM][Thread 0005][akka://crawler/user/api/https%3A%2F%rottentomatoes.com%2F/coordinators] Object reference not set to an instance of an object.
Cause: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Akka.Actor.ActorCell.HandleFailed(Failed f)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
It is the TrackingService from the crawler example on github which is giving this issue, but I have no real clue what object is null which I am trying to use
Simon Burgoyne
@simboo
@marcpiechura Thx makes sense.
AndreSteenbergen
@AndreSteenbergen
Fixed the issue, a check I forgot to make 1 null check, but the issue still exists. How to get a better stack trace, in regular c# coding you would end up with a stacktrace leading to a line number .... The exception raised in the actor seems lost to me.
Alex Hofer
@alexhofer

Hey @Aaronontheweb we ran into an issue yesterday where some values were being nulled out after sending a message to another actor. We traced the issue down to a naming difference between our Interface property name and Constructor parameter name in the class. When we would send the message to an actor the below Key would be null after deserializing at the receiving actor. We were wondering if you could help us understand why the parameter name needs to match the Interface name to be deserialized correctly?

An example message is GetFoo below:

public interface IWithFooKey
    {
        FooKey Key { get; }
    }

public class GetFoo : IWithFooKey
{
    public FooKey Key { get; }
    public GetFoo(FooKey fooKey)
    {
        Key = fooKey;
    }
}

Thanks!

Aaron Stannard
@Aaronontheweb
@alexhofer hey Alex, I'll take a look at this in the moment
I think I know what the issue might be but I'll need to check
Alex Hofer
@alexhofer
Thanks @Aaronontheweb !
Aaron Stannard
@Aaronontheweb
you're using the default JSON serializer I take it?
Alex Hofer
@alexhofer
Yep, we haven't changed any of that
Aaron Stannard
@Aaronontheweb
yeah, so this is an issue with some of the magic JSON.NET uses to try to determine how best to serialize and deserialize the object
so it's a bit beyond the scope of Akka.NET