Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

feat: Sphere writes do not block immutable reads #321

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

cdata
Copy link
Collaborator

@cdata cdata commented Apr 14, 2023

This change introduces a SphereChannel, which enables us to execute read-only and read-write streams of work on spheres concurrently or in parallel. Standard race condition considerations apply: if you intersperse reads and parallel writes, the values that are read will be subject to race results (for example).

Although the mutable and immutable sides of the channel do not block each other, it's still possible for immutable reads to reach out to the network (which means any given immutable read may take a beat to finish, subject to network conditions).

@cdata cdata requested a review from jsantell April 14, 2023 18:13
@cdata cdata force-pushed the feat/no-lock-sphere-read branch 2 times, most recently from 0368ef6 to 90b7163 Compare April 14, 2023 18:15
@cdata cdata force-pushed the feat/no-lock-sphere-read branch from 90b7163 to af06462 Compare April 14, 2023 18:40
jsantell
jsantell previously approved these changes Apr 17, 2023
Copy link
Contributor

@jsantell jsantell left a comment

Choose a reason for hiding this comment

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

Looking great!

rust/noosphere/tests/integration.rs Show resolved Hide resolved
rust/noosphere/src/sphere/channel.rs Show resolved Hide resolved
rust/noosphere/src/noosphere.rs Show resolved Hide resolved
rust/noosphere/tests/integration.rs Show resolved Hide resolved
@cdata
Copy link
Collaborator Author

cdata commented Apr 18, 2023

Going to go ahead and land this with PR feedback addressed. We can revisit if desired.

@cdata cdata merged commit 14373c5 into main Apr 18, 2023
@cdata cdata deleted the feat/no-lock-sphere-read branch April 18, 2023 16:31
@github-actions github-actions bot mentioned this pull request Apr 18, 2023
This was referenced Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants