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

replication #30

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

replication #30

wants to merge 3 commits into from

Conversation

gmkohler
Copy link
Collaborator

@gmkohler gmkohler commented May 8, 2024

Idea is to launch the cmd/orchestrator, which will spawn a primary and a replica and run the routing layer. Then you can connect to the orchestrator with cmd/client

Seeking feedback on general design and whether I'm being naïve about interfacing with the sockets.

We want to put all the replica files in the same directory so it
makes sense just to specify a directory for storage and let the
program figure out what to do from there.
Want to adjust how this is orchestrated but right now I see data
going into both files
@@ -1,6 +1,8 @@
package client

import "distributed/pkg/storage"
import (
"distributed/pkg/server/storage"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

might want to make client key/values.

orchestrationLogger.Printf("error closing socket %s: %v", socket, err)
}
}
wg.Done()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't think I need this anymore now that I have Router.Run(). had it installed when the orchestrator wasn't waiting for client connections.

@ozan
Copy link

ozan commented May 14, 2024

Should I be able to just run cmd/orchestrator/main.go with nothing else running first? Looks like I get an error trying to dial /tmp/distkv/orchestration.sock and I don't see a prior Listen

@gmkohler
Copy link
Collaborator Author

gmkohler commented May 20, 2024

@ozan Seeing the same issue when running this from the root. In particular spawning the servers is failing:

2024/05/19 17:45:05 [orchestration] error executing command: fork/exec /var/folders/0k/rtb491v54sl1h33h1qq3dtx80000gn/T/go-build1542618319/b001/server/server: no such file or directory

I had been relying on being in orchestration's directory. I'll make this easier to run and add a bit of docs about how to run and how the coordination works before requesting another view.

regarding:

I don't see a prior Listen

I had a server process open the socket and the orchestrator connect to it, because the orchestrator was meant to send messages to the server to accept primaries, but perhaps I'm too tied to the web request/response pattern here and can have the orchestrator wait for the (primary) server to connect to a socket the orchestrator opened.

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.

2 participants