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

New internals #534

Closed
wants to merge 2 commits into from
Closed

New internals #534

wants to merge 2 commits into from

Conversation

brandonbloom
Copy link
Member

@brandonbloom brandonbloom commented Nov 22, 2021

extremely early, attempting to address or make possible to address numerous issues, including but not limited to:

The general ideas are as follows:

  • Factor out "Stack" from "Workspace", specifically the bits in server/workspace.go that might have multiplicity N >= 0 relative to each workspace.
  • Refactor "Component" in to physical and logical halves. The logical half will remain called "Component" and the physical half will be called a "Resource". Main distinction is that resources are expected to be external, have a globally unique IRI of some kind, and it is expected that their lifetime is shorter than a component and subject to external influences. Components may have zero or more resources. For example, a process-component will have start & stop, and each time it starts/stops, it will create/destroy a unix-process-resource.
  • Keep a pending-operations log for CRUD operations on resources, so that if an operation fails, the user can debug/recover.
  • Rework "apply" to use initialize/start/stop/dispose, causing components to create/delete resources, instead of create/delete-ing processes, containers, etc directly. (ie fix [BUG] apply unnecessarily re-creates resources #290)
  • Write a data migration codepath that takes the component state from above and moves it to some tables in sqlite instead of storing in the state.json file.

@brandonbloom brandonbloom self-assigned this Nov 22, 2021
@brandonbloom
Copy link
Member Author

going to close this PR for now, as I'm going to come at this problem from a different direction

@brandonbloom brandonbloom deleted the new-internals branch May 14, 2022 00:48
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.

[BUG] apply unnecessarily re-creates resources
1 participant