question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent behaviour between docs and implementation in Actor Timers and Reminders

See original GitHub issue

While implementing #658 (Adding support for TTL and intervals) I possibly came across some inconsistency with the documentation on Actor Timers and Reminders.

Expected Behavior

The dapr-sdk-actors implementation - the AbstractActor class which a client inherits for their own Actor implementation, to be more specific - matches the documentation. Or of course, vice-versa, the documentation matches the implementation.

Actual Behavior

The current implementation of registerReminder() and registerActorTimer() in AbstractActor requires both dueTime and period to be present.

I’ve found the following documentation on Actor Timers: https://docs.dapr.io/developing-applications/building-blocks/actors/howto-actors/#actor-timers-and-reminders

Which states the following:

dueTime is an optional parameter that sets time at which or time interval before the callback is invoked for the first time.

period is an optional parameter that sets time interval between two consecutive callback invocations

The request structure for reminders is identical to those of actors. Please refer to the actor timers examples.

The reference API documentation states the following on Reminders: https://docs.dapr.io/reference/api/actors_api/#create-actor-reminder. I can’t seem to find any information about optional fields here, or TTL for that matter.

dueTime | Specifies the time after which the reminder is invoked, its format should be time.ParseDuration format period | Specifies the period between different invocations, its format should be time.ParseDuration format or ISO 8601 duration format with optional recurrence.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Giovdscommented, Feb 2, 2022

@Giovds Will you be interested in working on this?

@mukundansundar I am currently working on some other stuff as well, but I might give it a go if it is still an open issue by the time I am done. In the meantime, if anyone wants to give it a go feel free to do so - might even be a decent up-for-grabs.

1reaction
artursouzacommented, Feb 2, 2022

I agree with the builder pattern proposed above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reliable Actors timers and reminders - Azure Service Fabric
This article shows how to use timers and reminders and explains the differences between them. Actor timers. Actor timers provide a simple ...
Read more >
How-to: Use virtual actors in Dapr | Dapr Docs
Actor timers and reminders. Actors can schedule periodic work on themselves by registering either timers or reminders. The functionality of ...
Read more >
Actor Model of Computation: Scalable Robust Information ...
Inconsistency robustness is both an observed phenomenon and a desired feature. The Actor Model is a mathematical theory of computation that treats “Actors”...
Read more >
Service
CarrierMessagingService, A service that receives calls from the system when ... It is up to the Service to implement these with the appropriate...
Read more >
Akka Scala Documentation
Docs subproject on github: for Java and Scala. ... For example, here is the dependency for akka-actor: <dependency>.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found