Code Monkey home page Code Monkey logo

akka-typed-persistence's People

Contributors

dilation avatar dispalt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

akka-typed-persistence's Issues

Access to sequenceNr

It would be nice to get access to the sequenceNr from within the actor. I have a process that depends on replaying at a certain event and knowing the seqNr is the best way to achieve that, also it seems like it would be useful for others.

Thoughts?

Update[S,E] vs Recovery[A,D,S]

Why not make allow the Update function have access to the context as well?

For instance in this example,

It practically doesn't make sense to treat a ref as an event. Since it changes from program invocation to program invocation right? Now obviously this is a test so it's not really meant to be practical, but wouldn't it be better to give the update method access to the context so then you could treat the forking a child actor as an event save, like below?

implicit val parentUpdater: Update[ParentState, at.ActorRef[Mesg]] =
    Update.instance((_, e, ctx) => e match {
 case Uninitialized => 
   val childRef = child(pid).deployInto(ctx.ctx)
  Initialized(childRef)
}

...


 case Uninitialized =>
   ctx.apply(childRef, sync = true)

Cats 0.8

Any chance you'd accept an upgrade to cats 0.8? It's mainly just replacing the Xor construct with Either

Neat library!

Spawning a child actor

Is there an example spawning a child actor somewhere? I seem to be running into trouble with it, I am using the ctx.ctx.spawn facility:

[ERROR] [12/20/2016 14:32:09.070] [pingSystem-akka.actor.default-dispatcher-4] [akka://pingSystem/user/pingActor/$a] Wrap.message called with CheckZipStart(SessionId(272c5c45-9269-434c-a94c-893bc91bb815),94110,1482273129041,Actor[akka://pingSystem/system/testActor-1#496883580]); maybe the persistent typed behavior was deployed as a regular actor?
java.lang.IllegalStateException: Wrap.message called with CheckZipStart(SessionId(272c5c45-9269-434c-a94c-893bc91bb815),94110,1482273129041,Actor[akka://pingSystem/system/testActor-1#496883580]); maybe the persistent typed behavior was deployed as a regular actor?
	at com.nokia.ntp.ct.persistence.package$.impossible(package.scala:96)
	at com.nokia.ntp.ct.persistence.PersistentBehavior$Wrap.message(persistentBehavior.scala:110)
	at akka.typed.adapter.ActorAdapter$$anonfun$receive$1.applyOrElse(ActorAdapter.scala:32)
	at akka.actor.Actor$class.aroundReceive(Actor.scala:484)
	at akka.typed.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:9)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
	at akka.actor.ActorCell.invoke(ActorCell.scala:495)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
	at akka.dispatch.Mailbox.run(Mailbox.scala:224)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Gitter Channel?

Would you be interested in setting up a gitter channel?

I am using this all and it's working great so far.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.