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

Support a single client connecting to multiple servers/processes #134

Open
dwilliamson opened this issue Mar 22, 2018 · 2 comments · May be fixed by #248
Open

Support a single client connecting to multiple servers/processes #134

dwilliamson opened this issue Mar 22, 2018 · 2 comments · May be fixed by #248

Comments

@dwilliamson
Copy link
Collaborator

dwilliamson commented Mar 22, 2018

Should be fairly straight-forward, requiring steps:

  1. Server increments base port number on failure to bind.
  2. Client continuously polls a range of ports for connection.
  3. Create a time sync between all connections.
@VelorumS
Copy link

What could be the UI for that? Maybe an URL with the bash-like brace expansions: ws:/127.0.0.1:1781{5,6}/rmt?

What's about the time sync? The measured times use the same CLOCK_REALTIME, times should be fine as they are?

Thread name clashes may be an issue: like multiple Remotery threads from different processes.

Alternatively, is it more straightforward to run the Remotery thread in one process and collect samples via a shared memory? Could it just work if some objects are moved into the shared memory? Or use a Remotery thread per process writing into a common pipe?

@dwilliamson
Copy link
Collaborator Author

dwilliamson commented Jun 22, 2023

What could be the UI for that? Maybe an URL with the bash-like brace expansions: ws:/127.0.0.1:1781{5,6}/rmt?

That seems as good as any. Maybe ws://127.0.0.1:{1780...1790}. Or alternatively the port assignment is hidden from the user and fixed and we set a max number of connected servers. That way it doesn't matter at all.

What's about the time sync? The measured times use the same CLOCK_REALTIME, times should be fine as they are?

CLOCK_REALTIME is system-wide and can be compared between processes (I've done this even between language environments before, e.g. C++/C#/Python). Although in general I think we need to switch to CLOCK_MONOTONIC_RAW anyway.

Thread name clashes may be an issue: like multiple Remotery threads from different processes.

These can be namespaced, I think we already grab the process name somewhere.

Alternatively, is it more straightforward to run the Remotery thread in one process and collect samples via a shared memory? Could it just work if some objects are moved into the shared memory? Or use a Remotery thread per process writing into a common pipe?

Tricky. I don't want any dependencies between processes or require people to launch a separate process just to get timing results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants