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

backup & restore #369

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

backup & restore #369

wants to merge 2 commits into from

Conversation

komal-sai-yral
Copy link
Contributor

No description provided.

@komal-sai-yral
Copy link
Contributor Author

  flowchart
  IndividualUserCanister[(Individual User Canister)]
  InMemoryLocalDataStore[(In-Memory Local Data Store)]
  ListOfAllUserIndexes[1. List Of All User Indexes]
  OffChainAgent[Off-Chain Agent]
  SizeBoundLRUCacheOfUserPrincipalToCanisterMapping[2. Size-Bound LRU Cache <br/> Of User Principal <br/> To Canister Mapping]
  UserClientDevice[User Client Device]
  UserClientDeviceInternalCache[Internal Cache]
  UserIndexCanister[(User Index Canister)]
  UserClientDevice -- 1. looks up local LRU cache <br/> for user principal to canister mapping <br/> --> UserClientDeviceInternalCache
  subgraph "1. Client Internal Lookup"
    UserClientDeviceInternalCache
  end
  UserClientDevice -- 2. Requests offchain for mapping --> OffChainAgent
  subgraph "2. Off Chain Agent Lookup"
    OffChainAgent -- 1. fetches list of all user indexes <br/> during initialization from platform orchestrator --> InMemoryLocalDataStore
    OffChainAgent -- 2. fetches user principal to canister mapping <br/> for incoming requests <br/> that are not present in the cache --> UserIndexCanister
    UserIndexCanister --  upserts into local cache --> InMemoryLocalDataStore
    subgraph "Off Chain Agent Local Data Store"
      InMemoryLocalDataStore -- maintains a fixed max size cache <br/> of user principal tocanister mapping <br/> gets initialized to empty on every instance <br> gets filled up for values that it has fetched --> SizeBoundLRUCacheOfUserPrincipalToCanisterMapping
      InMemoryLocalDataStore ----> ListOfAllUserIndexes
    end
  end
  OffChainAgent -- 3. Profile Owner Based Call --> IndividualUserCanister
  subgraph "Incoming Request to Individual Canister"
    IndividualUserCanister -- Return Not current Profile Owner Error --> OffChainAgent
  end
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants