js-sdk
js-sdk copied to clipboard
Feature: Add Support for Per Actor Type Configuration
Describe the proposal
The Dapr Runtime added support for per actor type configurations in 1.7. This support needs to be added to the SDKs.
The new configuration looks like:
{
"entities":["actorType1", "actorType2"],
"actorIdleTimeout": "1h",
"actorScanInterval": "30s",
"drainOngoingCallTimeout": "30s",
"drainRebalancedActors": true,
"reentrancy": {
"enabled": true,
"maxStackDepth": 32
},
"entitiesConfig": [
{
"entities": ["actorType1"],
"actorIdleTimeout": "1m",
"drainOngoingCallTimeout": "10s",
"reentrancy": {
"enabled": false
}
}
]
}
Implementation can be varied per SDK but should output to the above JSON.
Docs: https://github.com/dapr/docs/pull/2334 Runtime: https://github.com/dapr/dapr/pull/4201
Edit @ 24/OCT/2022 - Xavier Geerinck:
Proposing to update the spec to this:
await server.actor.registerActor(DemoActorReminderTtlImpl, {
"actorIdleTimeout": "1m",
"drainOngoingCallTimeout": "10s",
"reentrancy": {
"enabled": false
}
});
The above will allow easy configuration on the registration of the actor type. It will however be more difficult to utilize the "entities"
field in the spec as described above as we will take it per actor type uniquely rather than allowing bulk types to be changed individually as allowed by the "entities"
spec.
@tanvigour could you update the status of this one? :)
Proposal needs more work at SDK level so will move this to 3.0 as we need to agree on the API spec. Added proposal to the original issue
This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
/keep-alive
This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
/keep-alive