Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 21:29
    Aaronontheweb commented #3863
  • 21:28
    Aaronontheweb synchronize #3863
  • 21:18
    Aaronontheweb synchronize #4000
  • 21:17
    Aaronontheweb commented #3964
  • 21:17
    Aaronontheweb commented #3964
  • 21:16
    Aaronontheweb synchronize #3964
  • 21:12
    Aaronontheweb commented #3964
  • 21:08
    Aaronontheweb synchronize #71
  • 21:04
    Aaronontheweb synchronize #3973
  • 21:00
    Aaronontheweb commented #71
  • 20:58

    Aaronontheweb on dev

    Akka.Persistence.TCK fix - chec… (compare)

  • 20:58
    Aaronontheweb closed #4002
  • 20:51
    Aaronontheweb synchronize #4002
  • 20:45
    Aaronontheweb commented #3811
  • 20:45
    Aaronontheweb commented #3811
  • 20:44
    Aaronontheweb labeled #4002
  • 20:43
    Aaronontheweb milestoned #4002
  • 20:43
    Aaronontheweb opened #4002
  • 20:37
    Aaronontheweb synchronize #71
  • 20:20
    Aaronontheweb synchronize #71
Bartosz Sypytkowski
@Horusiath
(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
is that clustering and requiring lighthouse?
Chris Ochs
@gamemachine
if both have static ip's and can reach each other, I don't see a reason for lighthouse really. just put the addresses of both as the seed nodes in both apps
or same address different ports that works also
Arjen Smits
@Danthar
@ronnyek at the very least that you would need akka.remote. You can create an server/client or peer to peer connection with akka.remote manually
akka.clustering layers on top of akka.remote and adds service discoverability and reliability things that would expect from a full blown cluster
Weston
@ronnyek
Ok...
I think I'll do that and add clustering later... Need to simplify this project for experimentation
Remove variables until I am familiar with and comfortable with Akka.net
Tomasz Jaskula
@tjaskula
Is this the only way defining parent/child relationship with FSharp API ? cc: @Horusiath
let playback = 
        spawn system "Playback"
        <| fun parentMailbox ->
            let child = 
                spawn parentMailbox "child" 
                    <| fun childMailbox ->
                        childMailbox.Defer (fun () -> printfn "Child stopping")
                        printfn "Child started"
                        let rec childLoop() = actor {
                            let! msg = childMailbox.Receive()
                            return! childLoop()
                        }
                        childLoop()
            cprintfn ConsoleColor.Gray "Creating parent actor..."
            // define parent behavior
            let rec loop() = actor {
                let! msg = parentMailbox.Receive()
                child.Forward(msg)  // forward all messages through
                return! loop ()
            }
            loop ()
Bartosz Sypytkowski
@Horusiath
@tjaskula using Akka.FSharp? Yes. But in normal conditions you'd probably move child behavior to separate function
Arsene T. Gandote
@Tochemey
@ronnyek you can build a full blown reactive Web applications using Akka without clustering and Akka remote. It is sth I have done.
Weston
@ronnyek
Basically shooting for say a web application and another worker service
Seems like good have remote or something for that
You'd need
Arsene T. Gandote
@Tochemey
OK
Weston
@ronnyek
You'd know more than I would... I am just saying from my minimal experience... That seems like that would be the case
Arsene T. Gandote
@Tochemey
Never mind
Carey Free
@Cawifre
@llehn In the case of Autofac, you pass the container and the actor system into the constructor for AutoFacDependencyResolver and the wiring is automagic under the hood. You can see an example on the Akka.DI.AutoFac readme. (Incidentally, what is with the inconsistent capitalization all over that repo? Should always be "Autofac", not "AutoFac".) If this world is even a little kind, then the plug-ins for other containers work the same way.
Weston
@ronnyek
any hope of .net core support, or are is it more likely that support will come with netstandard2? I know there were a few diff issues in github, but seems like all were kinda outstanding
adityasharmacs
@adityasharmacs

Hi All, I am trying out Journaling using Mongo Db, just wanted to know if apart frmo the github repo "https://github.com/akkadotnet/Akka.Persistence.MongoDB" is there any place where I can get code that explains Database storage in Journaling for MongoDb ? I have also read the following pages:

  1. https://petabridge.com/blog/intro-to-persistent-actors/
  2. http://bartoszsypytkowski.com/how-akka-net-persistence-works/

But didn't come across a pseudo code that shows entries being saved into Database using Journaling in MongoDb.

Any help is highly appreciated.

Bartosz Sypytkowski
@Horusiath
@adityasharmacs I guess, that the test suite for this plugin would be a first place to go. Also AFAIK MongoDB plugin requires setting bson schema attributes for each type - which instances will you persist - manually at actor system startup
adityasharmacs
@adityasharmacs
Hi @Horusiath : I am newbie to this, can you please give me some more pointers on this? Or any more references where I should look it up?
Bartosz Sypytkowski
@Horusiath
@adityasharmacs I'm not sure, where you could possibly find more references. Maybe @Silv3rcircl3 could help