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

Refactor: break up replication into smaller modules #897

Merged
merged 77 commits into from
Jan 30, 2023

Conversation

en0ma
Copy link
Contributor

@en0ma en0ma commented Jan 25, 2023

This PR changes the flow from content upload to deal-making. It decomposes the replication logic into separate smaller modules that can all work in an isolated manner making them non-blocking and overall, the platform becomes more stable.

This also brings the added advantages of non-delayed deal-making as the deal queue is now persistent, with no need to rebuild it whenever the API is restarted.

image2

Verifications

  • File upload (API and shuttle)
  • Cid upload (API and shuttle)
  • Splitting
  • Aggregation
  • Consolidation
  • Deal

# Conflicts:
#	api/v1/handlers.go
#	api/v1/pinning.go
#	api/v2/api.go
#	content/pinning.go
#	content/staging.go
#	main.go
# Conflicts:
#	api/v1/handlers.go
#	api/v1/pinning.go
#	content/content.go
#	content/gc.go
#	content/offloading.go
#	content/pinning.go
#	content/queue/queue.go
#	content/replication.go
#	content/retrieval.go
#	content/staging.go
#	shuttle/rpc/rpc.go
# Conflicts:
#	api/v1/handlers.go
#	api/v1/pinning.go
#	content/pinning.go
#	content/replication.go
#	main.go
#	pinner/pinning.go
#	shuttle/rpc/rpc.go
@en0ma en0ma changed the title Refactor/break up replication into smaller modules Refactor: break up replication into smaller modules Jan 25, 2023
@en0ma en0ma requested review from alvin-reyes, neelvirdy and 10d9e and removed request for alvin-reyes January 25, 2023 19:06
@en0ma en0ma force-pushed the refactor/break-up-replication-into-smaller-modules branch from 9f15134 to 39a274f Compare January 27, 2023 17:53
@anjor
Copy link
Contributor

anjor commented Jan 28, 2023

i tried to go through it as much as i was able to, but it's too difficult to properly review a PR of this size. The high level thought process and structure makes sense.

Copy link
Contributor

@alvin-reyes alvin-reyes left a comment

Choose a reason for hiding this comment

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

A few minor comments but everything looks good to me.

i tested the following and it work as expected

  • pinning
  • content
  • collections

Thank you @en0ma. We should target to deploy this as soon as the other reviews are done.

@alvin-reyes alvin-reyes merged commit 80ea1b4 into dev Jan 30, 2023
@en0ma en0ma deleted the refactor/break-up-replication-into-smaller-modules branch January 31, 2023 12:18
@jcace jcace mentioned this pull request Feb 2, 2023
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.

None yet

6 participants