lightbend / kalix-jvm-sdk

Java and Scala SDKs for Kalix
https://docs.kalix.io/java/index.html
Other
59 stars 39 forks source link

Add extension point for implementing custom event sourced entity api #980

Open patriknw opened 2 years ago

patriknw commented 2 years ago

Such as an FSM style API.

Probably corresponding to EventSourcedEntityRouter a way to implement these two methods in user code:

def handleEvent(state: S, event: Any): S

def handleCommand(commandName: String, state: S, command: Any, context: CommandContext): EventSourcedEntity.Effect[_]

See spike from @jroper at https://github.com/jroper/kalix-fsm-java

johanandren commented 2 years ago

We discussed this and after some meetings with the customer it seems very unclear if this is actually something they need. I'll close and we can revisit.

jroper commented 2 years ago

It is definitely something they need, and I believe they are using it already - that is to say, they are implementing the internal router API that we provide.

johanandren commented 2 years ago

We'll do a meeting with them next week and make sure we understand what they need.