Skip to content

Instantly share code, notes, and snippets.

@denismakogon
Last active December 25, 2015 02:48
Show Gist options
  • Save denismakogon/6904690 to your computer and use it in GitHub Desktop.
Save denismakogon/6904690 to your computer and use it in GitHub Desktop.
"True reservation" process in Trove
Resource reservation - assigning resource to specific
instance via database model for short period of time.
Resource assigning - temporary resource registration
as component of specific instance by database model.
------------------------------------------------------------------
What Resource reservation consists of?
1. Reserver (wants resource itself, expiration time, instance id).
Creates record that tells "This resource is reserved for Instance
with ID for N minutes".
2. Watchdog (periodic task that checks if reservation is expired
and clear record if it is so)
------------------------------------------------------------------
What Resource reservation model looks like ?
|--------------------------------------------------------------|
| | | | | |
|instance_id | resource | expiration time | expired | consumed |
| | | | | |
|--------------------------------------------------------------|
------------------------------------------------------------------
Use case ?
- If we need any resource be reserved for any reasons, we are able to do that.
Where it came from ?
- Reserving floating ips vai nova before nova server is active.
------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment