These are chat archives for akkadotnet/akka.net

6th
Sep 2017
Vagif Abilov
@object
Sep 06 2017 08:36
What about persistence adapters for 1.3.1? (SQL Server etc.) They haven't been updated since 2016.
Joshua Garnett
@joshgarnett
Sep 06 2017 10:53
Those should be following close after, there were some fixes from 1.3 needed to the SQL plugins could be updated
kwojciechowski
@kwojciechowski
Sep 06 2017 11:13
is it allowed to send generic messages to actors ?
eg.
var response = new Response<TResponse>(result);
context.Sender.Tell(response);
?
i get a dissassociation error on this
vicosoft4real
@vicosoft4real
Sep 06 2017 12:22
Please don't leave Akka.persistence.mongodb behind. The last update was on Akka 1.1.1
@Aaronontheweb Good job, Congrats!
Joshua Garnett
@joshgarnett
Sep 06 2017 13:08
@Aaronontheweb & @alexvaluyskiy AkkaNetContrib/Akka.Persistence.MySql#13 is ready for merging. All unit tests now pass after the upgrade to Akka 1.3.1.
Sean Templeton
@seantempleton
Sep 06 2017 14:47
Hello all. I tried using the documentation to add a custom serializer for a NodaTime ZonedDateTime but it is not being used (not hitting FromBinary() or ToBinary() breakpoints when I run. Though the constructor is called so I know it is being picked up from the HOCON.) Is there anything additional that needs to be done that is not documented?
Just using the default NewtonSoftJson Serializer I'm getting the error seen here: akkadotnet/akka.net#1409. As a test, if I create a NewtonSoftJsonSerializer and serialize/deserialize a ZonedDateTime it works fine.
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 14:50
@seantempleton default version of json.net, akka.net uses, has some extra options set (reference tracking, embedded type names etc.). It's not able to correctly serialize each type - it's one of the reasons default serializer is going to change in the future
Sean Templeton
@seantempleton
Sep 06 2017 14:53
Right. But I thought I would be able to add my own serializer for just the ZonedDateTime and use the default for everything else
Vagif Abilov
@object
Sep 06 2017 14:56
@seantempleton you should be able to do that. It's supported.
Here's extract from our HOCON:
serializers {
hyperion = "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"
json = "Akka.Serialization.NewtonSoftJsonSerializer"
}
serialization-bindings {
"System.Object" = hyperion
"Newtonsoft.Json.Linq.JObject, Newtonsoft.Json" = json
}
Sean Templeton
@seantempleton
Sep 06 2017 15:02
Yeah, I tried adding my converter to the HOCON. But like I said, the constructor of CustomConverter is called, but it is not used when sending the message to my remote actor.
serializers {
customconverter = "MyAssembly.CustomConverter, MyAssembly"
}
serialization-bindings {
"NodaTime.ZonedDateTime, NodaTime" = customconverter
}
Sean Templeton
@seantempleton
Sep 06 2017 15:22
Or can you only use a custom serializer for the actual message class itself, which contains the ZonedDateTime, and not only on ZonedDateTime?
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 15:23
@seantempleton setting custom serializer works only for top-level types, if you're using it as a field, it won't work this way
but you can add custom converters to json serializer with:
akka.actor.serialization-settings.json.converters = [
  ""Akka.Tests.Serialization.DummyConverter, Akka.Tests""
]
you just must set there a list of fully qualified type names with assembly names pointing to types inheriting from JsonConverter
they will be automatically loaded into default serializer
Sean Templeton
@seantempleton
Sep 06 2017 15:29
ah, I see. Thanks @Horusiath I will try that out.
Sean Templeton
@seantempleton
Sep 06 2017 16:04
Thank you @Horusiath I was able to create my own JsonConverter class which simply uses a static converter that NodaTime already has and that is able to serialize and deserialize a ZonedDateTime easily
Aaron Stannard
@Aaronontheweb
Sep 06 2017 16:40
@object those are being worked on now
Michel van den Berg
@promontis
Sep 06 2017 16:49
I need to build 'scraper' for instagram likes, and I'm thinking of using Akka.NET. Each user has an id, which we can use in the instagram API call to get his likes. I need to implement a polling mechanism, for which I want to use the scheduler (like retrieve new likes every x seconds). I'm thinking of creating an actor per user, but I'm unsure on how these actors will behave when the node/cluster goes down; I would like these actors to come back up and start polling again. Should I be keeping a list of these 'user' actors in a 'supervising' actor, and use something like Akka Persistence (or simply a database table?) to make them restart when the node/cluster comes up again? If so, wouldn't such a 'supervising' actor become a bottleneck in the system? If so, should I be partitioning/sharding the users? There can be millions of users.
Weston
@ronnyek
Sep 06 2017 17:26
so I am thinking akka could be a good backend for something I was thinking about building... which would be a flow based programmign runtime
wondered if anyone had any ideas, considerations, words of confidence or recommendations against that idea
Weston
@ronnyek
Sep 06 2017 17:48
actually looks like thats what streams kinda is
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 17:49
@ronnyek essentially yes ;)
Weston
@ronnyek
Sep 06 2017 17:52
I guess the question is whether or not the graphs can be defined externally
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 17:53
what do you mean by externally?
Weston
@ronnyek
Sep 06 2017 17:54
eg, I provide a list of components that transform stuff etc and how those all get wired together
and at start load that graph and start executing
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 17:55
most of akka's stages (the LINQ-like stuff) are internally objects that can be wired using Via/To methods
you can operate on them like on objects (they are not serializable however)
Weston
@ronnyek
Sep 06 2017 17:56
well thates fine, its not like I couldnt execute those things manually
read a def and wire using via and to
I am also looking at documentation, so I am seeing some of the answers to some of my questions
Alfredo Herrera
@alfredherr
Sep 06 2017 18:24
Hello - can anyone point me to a project/sample of a seed node that works on Linux/Core? Lighthouse is set up as a windows service, and before change it I'd thought i would ask if one already exists.
Im trying Akka.net on DotNet Core
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 18:25
@alfredherr lighthouse is essentially an empty ActorSystem, which has it's own address configured as its seed node
Weston
@ronnyek
Sep 06 2017 18:49
man tweet sample is pretty good, but in just trying to adapt that to what I am doing (without setting up a twitter account)
seems like some of that code doesnt work
(obviously not trying to reference tweets etc =)
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 18:52
you're talking about sample from docs?
Weston
@ronnyek
Sep 06 2017 19:39
well I dont think the whole thing is in the docs anymore
just bits and peices
and things liek "formattweet" doesnt appear to exist in those docs so no idea what its returning
Valdimar Thor
@ValdimarThor
Sep 06 2017 19:58
@philsandler_twitter, thanks. Was hopping for an elegant solution to this but I guess a service locator would work
Maciek Misztal
@mmisztal1980
Sep 06 2017 20:02

I've built a simple .netcore 2.0 app and packaged it into a container based on the microsoft/dotnet:2.0.0-runtime-jessie. When trying to run, I've received the following message:

docker run -it --rm my-org/my-container
Error:
  An assembly specified in the application dependencies manifest (OS.Cluster.Service.deps.json) was not found:
    package: 'Akka.Cluster', version: '1.3.0'
    path: 'lib/netstandard1.6/Akka.Cluster.dll'

What have I missed? as far as I recall Akka 1.3.* is indeed targetting netstandard 1.6, but I'm not sure if I need to change something in my project scaffolding or in the dockerfile

Aaron Stannard
@Aaronontheweb
Sep 06 2017 20:02
hmmmm @mmisztal1980
Weston
@ronnyek
Sep 06 2017 20:02
man I just need to see a quick example of this streams stuff
that's what we use for running the crawl
via Akka.Streams
@mmisztal1980 but yeah, Akka 1.3.0 is all .NET Standard 1.6
Weston
@ronnyek
Sep 06 2017 20:04
I dont think that looks simple
but at least its code that I can easily run =)
Aaron Stannard
@Aaronontheweb
Sep 06 2017 20:04
that should all run fine on .NET Standard 2.0
or .NET Core 2.0
Marc Piechura
@marcpiechura
Sep 06 2017 20:09
@ronnyek the source for the tweets example is here https://github.com/Silv3rcircl3/Akka.Net-Streams-reactive-tweets
Maciek Misztal
@mmisztal1980
Sep 06 2017 20:10
dotnet build made all the dlls end up in the bin/{configuration}/netcoreapp2.0 folder
Weston
@ronnyek
Sep 06 2017 20:11
and that all still compiles @Silv3rcircl3
?
Marc Piechura
@marcpiechura
Sep 06 2017 20:12
Should be :-)
Weston
@ronnyek
Sep 06 2017 20:12
there was a place where it was doing "SelectManySomething
Marc Piechura
@marcpiechura
Sep 06 2017 20:12
But haven't touched it for a year
Weston
@ronnyek
Sep 06 2017 20:12
with no generic arguments and my code looked to be requiring me to providing args (but it didnt seem like a type inference prob)
flows are like chains of actions?
and graph is like more of actual decisions and output direction etc?
Marc Piechura
@marcpiechura
Sep 06 2017 20:20
Yup regarding the flow, a graph is more like a complex flow, i.e. you can do things like broadcast / merge which you can't do with "normal" Flow actions, but in the end the created graph is a flow too. The one in the twitter example is a flow of Message -> string which than can be used like a simple flow, e.g. Select
Weston
@ronnyek
Sep 06 2017 20:20
ok
Marc Piechura
@marcpiechura
Sep 06 2017 20:21
But a graph can also become "closed" , i.e. It provides no output and therefore is a sink
Maciek Misztal
@mmisztal1980
Sep 06 2017 20:41
@Aaronontheweb interestingly, when I do a dotnet OS.Cluster.Service.dll the app springs to life:
dotnet OS.Cluster.Service.dll
[WARNING][06.09.2017 20:40:24][Thread 0002][ActorSystem(System)] The type name for message/serializer binding '' did not resolve to an actual Type: 'System'
[22:40:25 INF] Starting remoting
[22:40:25 INF] Remoting started; listening on addresses : [akka.tcp://System@127.0.0.1:10000]
[22:40:25 INF] Remoting now listens on addresses: [akka.tcp://System@127.0.0.1:10000]
[22:40:25 INF] Cluster Node [akka.tcp://System@127.0.0.1:10000] - Starting up...
[22:40:25 INF] Cluster Node [akka.tcp://System@127.0.0.1:10000] - Started up successfully
[22:40:25 WRN] NewtonSoftJsonSerializer has been detected as a default serializer. It will be obsoleted in Akka.NET starting from version 1.5 in the favor of Hyperion (for more info visit: http://getakka.net/docs/Serialization#how-to-setup-hyperion-as-default-serializer ). If you want to suppress this message set HOCON `akka.suppress-json-serializer-warning` config flag to on.
[22:40:25 INF] Node [akka.tcp://System@127.0.0.1:10000] is JOINING, roles [os-cluster-svc]
[22:40:25 INF] Leader is moving node [akka.tcp://System@127.0.0.1:10000] to [Up]
Weston
@ronnyek
Sep 06 2017 21:00
man the syntax to define graphs is just nuts.
Alfredo Herrera
@alfredherr
Sep 06 2017 21:00
P
Weston
@ronnyek
Sep 06 2017 21:01
I mean I think whats going on there isnt that nuts
but I'm confused as hell I'd almost want to see somethign thats a simple source->in/out (flow?)-> sink
Weston
@ronnyek
Sep 06 2017 21:11
I basically want to take something that used to be an actor receiving a message and kicking off a graph
which is what the download stuff appears to do
Weston
@ronnyek
Sep 06 2017 21:27
nice
I think I manage to get a flow working
Bartosz Sypytkowski
@Horusiath
Sep 06 2017 21:39
@ronnyek unfortunatelly, Scala API for graphs is beautiful, but it's achieved using dozen of tricks that no .NET language is able to provide (and it's uglier from the inside)
I hope to introduce something on this field soon
Weston
@ronnyek
Sep 06 2017 22:00
so if I were trying to build reusable... components... like resuable sources/transformers etc
I'd be implementing graphstages
and then ultimately just bundling them together with GraphDsl.Create?