Skip to content

Locking Durable Entities from within client functions #1938

Answered by cgillum
a3y3 asked this question in Q&A
Discussion options

You must be logged in to vote

Lock operations on entities involve two messages: one that is sent to the entity to lock it and one that is sent back to the sender to confirm that the lock was acquired. A lock can be held for an indefinite amount of time and also has to keep track of who owns the lock. Orchestrations are compatible with all these characteristics since they are long-running and have permanent identifiers.

Client functions, on the other hand, are transient and not capable of waiting indefinitely for an ACK. They also don't have any kind of permanent identifier for the entity to use when deciding whether to allow a caller to perform operations. I suppose a non-orchestrator client could come up with an iden…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@a3y3
Comment options

@a3y3
Comment options

@cgillum
Comment options

Answer selected by cgillum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants