bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
674 stars 88 forks source link

NATS Object Store as Source and Publisher storage #3742

Open HeCorr opened 6 months ago

HeCorr commented 6 months ago

Since this project is now embracing NATS I believe it would be quite interesting to see added support for NATS Object Store, eliminating the need to setup an S3 server which could greatly simplify small projects that use Bacalhau.

However, keep in mind that Object Store is still in Experimental Preview.

wdbaruni commented 5 months ago

Hey @HeCorr, thanks for the suggestion. How do you see NATS Object Store fit in a bacalhau network?

Today we are embedding NATS servers within the requester/orchestrator nodes. An option would be for the requesters to host the object store, but I'll be concerned about adding an additional and heavy responsibility to the orchestrators

Another option would be to add a separate cluster of NATS servers to form their own RAFT group to replicate and store the objects. Kind of a super cluster of two cluster types, one for orchestration and others for storage. Though I am not sure if this can actually work and if NATS will route get and put requests across clusters.

What are your thoughts?

HeCorr commented 3 months ago

Hello! My apologies for the delay.

I just think it could be practical to have a built-in object storage instead of having to deploy a separate S3 service, specially for very small projects.

I am not sure if this can actually work and if NATS will route get and put requests across clusters.

I personally haven't tested that myself, but IIRC Object Store is just an abstraction on top of JetStream streams, so I don't see how it wouldn't work.

What are your thoughts?

To be honest, I do realize this might not make a lot of sense to implement. I just thought I might as well suggest it and see what other people think. :)