dapr / dapr/js-sdk

Feature: Add Support for Per Actor Type Configuration

Open
#243 6 comments 1 reaction 1 assignee Assigned to @DeepanshuA View on GitHub
enhancement enhancement-runtime-dependency pinned
Dominant language
JavaScript
Stars
217
Forks
104
PR merge metrics
No merged PRs in 30d

Description

## 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:

```json
{
"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:

```javascript
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.