Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 23:12
    Aaronontheweb commented #4038
  • 23:11
    Aaronontheweb synchronize #4038
  • 23:08
    Aaronontheweb opened #4038
  • 22:55

    Aaronontheweb on 1.3.16

    (compare)

  • 22:54

    Aaronontheweb on master

    close #3935 - Akka.Persistence.… fix: data provided to AndThen (… Akka.Persistence.Query: made Of… and 13 more (compare)

  • 22:53
    Aaronontheweb closed #4037
  • 21:39
    Aaronontheweb synchronize #4037
  • 21:39
    Aaronontheweb ready_for_review #4037
  • 19:57
    Aaronontheweb synchronize #4037
  • 19:53
    Aaronontheweb commented #4037
  • 19:51
    Aaronontheweb opened #4037
  • 19:08
    Aaronontheweb synchronize #4036
  • 19:02
    Aaronontheweb opened #4036
  • 16:48
    IgorFedchenko synchronize #4022
  • 16:25
    Aaronontheweb commented #4035
  • 16:24
    Aaronontheweb commented #4022
  • 16:23
    Aaronontheweb labeled #4035
  • 16:23
    Aaronontheweb labeled #4035
  • 16:23
    Aaronontheweb opened #4035
  • 16:21
    Aaronontheweb commented #4022
ErrCode
@ErrCode
congrats on the latest release! Will switch over.
Ismael Hamed
@ismaelhamed
Unable to find a version of 'Akka.Streams' that is compatible with 'Akka.Persistence.Query 1.2.0.35-beta constraint: Akka.Streams (>= 1.2.0.35-beta)'.
Alex Valuyskiy
@alexvaluyskiy
@ismaelhamed it is a bug. Will fix it soon
Arsene T. Gandote
@Tochemey
Hello I can read that the new 1.2 has this beautiful feature and I quote
Akka.Remote now uses DotNetty for its transport layer
However I would like to know whether the Akka.IO has been rebuilt around the DotNetty lib?
The reason I ask that question is due this :
     * SocketChannel does not exists in the .NET BCL - This class is an adapter to hide the differences in CLR & JVM IO.
     * This implementation uses blocking IO calls, and then catch SocketExceptions if the socket is set to non blocking. 
     * This might introduce performance issues, with lots of thrown exceptions
     * TODO: Implements this class with .NET Async calls
     */
Alex Valuyskiy
@alexvaluyskiy
No, Akka IO does not use DotNetty
Arsene T. Gandote
@Tochemey
@alexvaluyskiy Any reasons why?
Arsene T. Gandote
@Tochemey
Hello I need some quick education here. What is the difference between persisting data to db and Akka Persistence?
mwardm
@mwardm
@Tochemey Akka.Persistence provides you with some framework support to allow actors to save messages (/ "events") into the database and have those messages automatically fed back to them when they (re)start, so that they can restore their state by replaying their messages. These messages are saved in a single table with actor-type, actor-id, message-order, message-data format (conceptually, anyway).
@Tochemey If you have an actual requirement for saving data into a database in a particular format (e.g. normal relational stuff), then you'd write your own code in your actors (or maybe some separate DB ones) to do that.
At least, that's how I'm thinking of it. (Not sure if anyone's using any ORM / EntityFramework / other style persistence mechanisms to save their own data. I dislike dropping all the way back to ADO.Net. Seems so primitive!)
Arsene T. Gandote
@Tochemey
@mwardm Thank you
Bartosz Sypytkowski
@Horusiath
@Tochemey Akka.IO is just an actor wrapper over native sockets and files, it exposes all of the socket events as messages. DotNetty is full-blown framework, that hides a lot of low-level details and brings it's own concurrency control (which akka.io handles through actors)
Chris Ochs
@gamemachine
what is the suggested way to setup custom supervision strategy for sharded actors?
Bartosz Sypytkowski
@Horusiath
@gamemachine sharded actors have arbitrary managed lifecycle, I don't see how supervision strategy would apply here
Chris Ochs
@gamemachine
hmm so it appears sharded actors are meant to be long lived only really.
Bartosz Sypytkowski
@Horusiath
you can use passivation mechanics to stop them, but passivation is not part of supervision chain and they will be recreated anyway if some message will arrive
Chris Ochs
@gamemachine
our use case is we want short term actors that have a globally unique id that we can reach from anywhere in a cluster.
we use a database to create and lookup the id's
so probably best to stick with the initial approach I had, which is just remote deploy
or actually probably simpler to have an actor that just creates them on demand, and it supervises them
Chris Ochs
@gamemachine
so cluster sharding docs say I need to specify an event journal. But node A can send a message to a sharded actor on node B (same computer) and I haven't configured any journal. What gives?
Bartosz Sypytkowski
@Horusiath
@gamemachine cluster sharding uses event journals to keep its internal state across the nodes. So i.e. if a node hosting so called shard coordinator dies, coordinator itself can be recreated on another node and it will still know which shards live on which nodes
(it's also useful to remember that cost of creating and communicating with sharded actors is higher than with standard ones)
Weston
@ronnyek
so persistence wise, is there anything like the persistent state like azure service fabric has
(I think it works the same way in orleans)
Arjen Smits
@Danthar
using snapshots is basically the same
persistence has 2 types of storage methods, journal and snapshot
journal is eventsource based
so you save each event that mutates your state, as it comes in
when your actor restarts, all events are replayed, thus rebuilding your actor state
snapshotting stores the current state of your actor. Well, not the the actor state, but whatever state you tell it to
so if you store a list of whatevers in your actor, you can store that in one go with a snapshot
when your actor restarts, it gets the last snapshot you saved
journalling is often used in conjunction with snapshotting, to improve performance.
Boban
@bobanco
@Aaronontheweb can you check if the overridden the GetHashCode() , Equals() is overridden too and you can provide == != operators too if somewhere == is used instead of Equals()
Aaron Stannard
@Aaronontheweb
@bobanco yeah resharper throws a warning about that
fixed it in my local branch
working on some more model based tests to get to the bottom of the issue
Boban
@bobanco
it's odd how you are getting diffferent hash codes of the same object
the fileds used in the generation of the hash code are immutable?
Tomasz Jaskula
@tjaskula

Hi, I'm trying to create a child actor in F# (not using F# api but classes) and I have the following exception:

[ERROR][15/04/2017 09:07:26][Thread 0003][akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42] Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32[])
Cause: [akka://MovieStreamingActorSystem/user/Playback/UserCoordinator/User42#197236877]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Actors+UserActor with 1 args: (System.Int32[]) ---> System.MissingMethodException: Constructor on type 'Actors+UserActor' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass115_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

Although my class is as follows:

type UserActor(userId : int) as this =
        inherit ReceiveActor()

        let userId = userId

And I try to create it like that:

let newChildActorRef = UserCoordinatorActor.Context.ActorOf(Props.Create(typeof<UserActor>, [|userId|]), "User" + userId.ToString())

Any hints?

Ismael Hamed
@ismaelhamed
@alexvaluyskiy there're still some bad references:
Unable to find a version of 'Akka.Streams.TestKit' that is compatible with 'Akka.Persistence.Sql.TestKit 1.2.0.36-beta constraint: Akka.Streams.TestKit (>= 1.2.0.36-beta)'.
Tomasz Jaskula
@tjaskula
Found the issue, I have to pass args without the array
let newChildActorRef = UserCoordinatorActor.Context.ActorOf(Props.Create(typeof<UserActor>, userId), "User" + userId.ToString())
Michael Tissen
@rubiktubik
Hello, i'am using Akka.Persistence for a event-sourced application and i was wondering if one of the Akka.Persistence Plugins Support Persistence.Query?
Lev Lehn
@llehn

Regarding DI (autofac) integration. The docs say: The basic functionality is provided by a DependencyResolver class, that can create Props using the DI container. with example ending with this IDependencyResolver resolver = new XyzDependencyResolver(someContainer, system);

then there's When creating actorRefs straight off your ActorSystem instance, you can use the DI() Extension..

I don't understand that - in the example the resolver isn't used anywhere. And where does the system.DI() method know which DI container to use?

mwardm
@mwardm
5th
Chris Ochs
@gamemachine
so a comment on the akka documention style. I see this pattern a lot. Some part of the doc will go into all sorts of detail on stuff most people don't need to know, but then fail to document the basics, the stuff you have to know. http://getakka.net/docs/working-with-actors/identifying-actors-via-actor-selection is a good example. It never actually say's where you get the actor identity from. Sender? ActorIdentity .Subject?
Weston
@ronnyek
so if I want to build a console app, and have it connect or share an actorsystem with a webapp