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
no atomicity guarantees for object operations #28
Comments
I should point out that in the article it specifically talks about counters . by having a counter mapped against the logical clock , it allow distributed ordering of the changes, so that files can be kept in sync everywhere . Clock skew over time of course occurs and that’s why Chronos is a separate issue . Basically google have a gps clock in all data centers and the servers and also the web client ( like when you use gmail , etc ) get their “google tine” from these gps clocks. |
Hi @gedw99,
I do not think Gose is the solution for your use case. Gose aims to provide users the easiest possible solution for sharing files. I am trying to focus on simplicity here and usability features which others file uploading tools do not provide (resuming of interrupted uploads, de-duplication, encryption, up/download limits and quotas). But in its core the usability of Gose as a file uploading/sharing tools should be as simple as possible:
Gose aims to be the tool to quickly share some files like holiday photos or attachments which are otherwise too large for mail or other messengers. |
Vector clocks are an interesting concept and I am sure distributed caches like Redis might already use them. |
I am sorry that I will need to close this issue here as I see no specific bug or feature request which I we could work on. Please feel free to contact me via other channels (see https://steffenvogel.de/#contact) |
Agree - its out of scope. But thank you for the tips and comments. |
NATS can do atomic counters via this hack: nats-io/nats-server#2656 Its also a distributed kv and object store ironically: https://docs.nats.io/nats-concepts/jetstream/obj_store/obj_walkthrough
NATS can be embedded also. So you can include it in GOSE, or run NATS JetStream anywhere. |
@gedw99 where you see a hack in the referenced issue?
|
This is a new issue but continues on from our discussion in another issue I closed.
The proposal was to add Redis as a global counter system .
Here is my Use case.
i have clients ( browsers ) that store files and do mutations on those files
I have a server running in google cloud run , that talks to google storage / s3
The server is using s3 as it’s global store. Each web client has its own file store that persists offline ( using indexeddb ).
So we have an interesting situation with a file instance existing outside s3.
The notification system is what I am really interested in so that when a file on s3 changes we can notify all servers and clients. I think gose can do that now ?
when the client or server gets this event it should then request the file so it can get up to date.
when it asks for the file however it would be much more performant if it could get a binary byte array of the file difference . Yeah this is rather hard
So regarding Redis , I think that the file change events and the file change diff could be stored on this global message bus. So essentially the notification system uses this distributed message bus and can store the binary diff of the file .
Now I know that offline clients will not really work in this architecture , in the same way that git merges don’t always work because someone else changes the same part of the file but I think it’s possible to make that crazy aspect by using be tie clocks as well as a Chronos style clock system. But that’s more of a layer thing .
The main thing is to see if you think it’s possible to store the file diff in the message bus.
As i think about it it would mean that the Clients and Servers don’t even talk to s3 for sending file mutations . They would calculate the binary diff and send that into the message bus.
Importantly creation of new files would be send directly to S3.
I know this is probably out of scope for what Gose was created but I figured it’s worth explaining to see if you or others are interested in this use case .
https://flurryhead.medium.com/vector-clock-applications-965677624b94
The text was updated successfully, but these errors were encountered: