Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Add custom lease documentation #7388

Merged

Conversation

Arkatufus
Copy link
Contributor

No description provided.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall but left some feedback

@@ -0,0 +1,105 @@
---
uid: lease
title: Lease
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Distributed Locks with Akka.Coordination" would be better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


## General Definition

A **lease-based access control system** is a distributed coordination mechanism in which access to a resource is granted by issuing a lease, or token, that represents temporary permission to access a resource. The lease must be acquired by any process intending to interact with the resource. This mechanism often involves the following elements:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd simplify this to say Akka.Coordination provides a generalized "distributed lock" implementation called a Lease that uses a unique resource identifier inside a backing store (such as Azure Blob Storage or Kubernetes Custom Resource Definitions) to only allow one current "holder" of the lease to perform an action at any given time.

Akka.NET uses leases internally inside Split Brain Resolvers (link), Cluster.Sharding, and Cluster Singletons for this purpose - and in this document you can learn how to call and create leases in your own Akka.NET applications if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* **Lease Name**: A unique identifier for the lease, which specifies the resource to be protected.
* **Owner Name**: A unique identifier for the entity (usually an actor or node) that is attempting to acquire the lease.
* **Lease Timeout**: A duration parameter that specifies how long the lease should last. Leases may be renewed or revoked depending on the implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a section here on "available lease implementations" and link to the appropriate docs in the Akka.Management repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) November 14, 2024 21:50
@Aaronontheweb Aaronontheweb added docs akka-coordination Akka.Coordination package updates and materials labels Nov 14, 2024
@Aaronontheweb Aaronontheweb merged commit 4082e9c into akkadotnet:dev Nov 14, 2024
12 checks passed
@Arkatufus Arkatufus deleted the Add-custom-lease-documentation branch November 14, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
akka-coordination Akka.Coordination package updates and materials docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants