Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Update entity passivation #298

Closed
pvlugter opened this issue May 6, 2020 · 7 comments · Fixed by #484 or #486
Closed

Update entity passivation #298

pvlugter opened this issue May 6, 2020 · 7 comments · Fixed by #484 or #486
Assignees

Comments

@pvlugter
Copy link
Member

pvlugter commented May 6, 2020

Akka 2.6 has entity passivation built-in now. See akka.cluster.sharding.passivate-idle-entity-after setting and discussion.

Or we may want to allow passivation timeouts to be configurable per entity type on the user side?

@ralphlaude
Copy link
Contributor

I think it would be better to have passivation timeouts configurable per entity type. Making the passivation timeouts is for flexible for the users and it can adapted depending on the use cases. I would go for those properties in the conf file:

value-entity {
  passivation-timeout = 30s
}
eventsourced-entity {
 passivation-timeout = 30s
}
replicated-entity {
  passivation-timeout = 30s
}

@pvlugter what do you think?

@marcellanz
Copy link
Contributor

Or we may want to allow passivation timeouts to be configurable per entity type on the user side?

Would it be feasible, or even possible with the proxy, to configure that per registered entity and therefore via discovery?

@pvlugter
Copy link
Member Author

pvlugter commented Nov 5, 2020

Yes, having passivation timeouts configured in the language supports and part of entity discovery makes sense to me.

And having per state model defaults in the proxy sounds good too.

@ralphlaude
Copy link
Contributor

ralphlaude commented Nov 5, 2020

Would it be feasible, or even possible with the proxy, to configure that per registered entity and therefore via discovery?

It could be possible to do via the entity discovery but it need a bit of tweaking for the discovery process and also for the service classes (e.g io.cloudstate.javasupport.Service in the java support) to convey this information. Now theXXXSupportFactoryclasses are instantiated before the discovery process and this could be slightly changed, not sure if it will work. The option of having per registered sounds very good and is more flexible.

Having it in the proxy in the conf file sounds easier for now.

@pvlugter
Copy link
Member Author

This was auto-closed in #484. I'm reopening for following up with passivation timeouts configured in language supports via the discovery protocol.

@pvlugter pvlugter reopened this Nov 12, 2020
@ralphlaude
Copy link
Contributor

I will take a look on this again.

@pvlugter
Copy link
Member Author

Also this older issue on configurable entity passivation: #111

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants