js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Feature: Add Support for Per Actor Type Configuration

Open halspang opened this issue 2 years ago • 6 comments

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.

halspang avatar Apr 07 '22 16:04 halspang

@tanvigour could you update the status of this one? :)

XavierGeerinck avatar Aug 23 '22 15:08 XavierGeerinck

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

XavierGeerinck avatar Oct 24 '22 08:10 XavierGeerinck

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.

dapr-bot avatar Jan 08 '23 15:01 dapr-bot

/keep-alive

XavierGeerinck avatar Jan 08 '23 16:01 XavierGeerinck

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.

dapr-bot avatar Mar 09 '23 16:03 dapr-bot

/keep-alive

shubham1172 avatar Mar 09 '23 16:03 shubham1172