Skip to content

Conversation

@skiplabsdaniel
Copy link
Contributor

The purpose of the persistence layer is to enable the Skip runtime to become the sole point of entry for data:

  • Ensuring that only data in the Skip runtime is stored.
  • Should speed up the loading of input values

A Store concept has been added, so that a service's "InitialData" elements can be an input array as it is today, or a Store (this allows mixing requirements, with different stores for different needs depending on the nature of the data, while still having the possibility of volatile data).
A store is a class that implements the interface:

export interface Store<K extends Json, V extends Json> {
  load(): Promise<Entry<K, V>[]>;
  save(data: Entry<K, V>[]): Promise<void>;
}

If the write in SKIP runtime fails the data is not stored, and if saving to a store fails, the corresponding write in the SKIP runtime will also fail.

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.

1 participant