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

Remote access to the TestbedProxy ? #160

Open
a-sevin opened this issue Feb 27, 2024 · 4 comments
Open

Remote access to the TestbedProxy ? #160

a-sevin opened this issue Feb 27, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@a-sevin
Copy link
Collaborator

a-sevin commented Feb 27, 2024

Hi all,

This is more of a discussion thread than an issue.

I tried to define the IP of the 'Testbed' as 'INADDR_ANY' (0.0.0.0) and, at the same time, defined the variable 'testbed' as 'TestbedProxy('server_ip', 8768)'.

When I tried to access the remote camera with 'cam = testbed.science_camera', I received an error message: 'AttributeError: Something went wrong while creating shared memory.'

Is this expected behavior?

Cheers,

Arnaud

@ehpor
Copy link
Collaborator

ehpor commented Feb 27, 2024

So, the testbed proxy has to be on the same computer as the testbed server and the service itself.

I'm not sure if by "remote access" you mean accessing the camera from a separate computer or not?

@a-sevin
Copy link
Collaborator Author

a-sevin commented Feb 27, 2024

Yes, I hoped to separate the bench and its services from the client (testbedproxy).

It seemed possible since a testbedproxy requires an IP address upon creation.

It could be a very nice feature, as every user wants to have their own environment, including their preferred operating system, libraries, and custom tools. However, this would require a lot of work.

@ehpor
Copy link
Collaborator

ehpor commented Feb 27, 2024

Yes, but this would require all shared memory communication to be emulated over TCP or similar. Which is a huge undertaking. Also, fast access to datastreams would not be fast anymore.

We've thought about having a TunneledService which does exactly that. This was when we had a hardware device (our IrisAO DM) that potentially wouldn't work on a newer version of Windows. Our backup plan was to have two testbed servers running, one on computer A with all other services and one on computer B with the IrisAO. We'd have a tunneled service client that mimics the IrisAO on computer A, that communicates to the tunneled service server on computer B that in turn communicates with the IrisAO service. The only concern would be latency. It turned out that the IrisAO worked fine on the new operating system, so we never started any implementation for this. Also, this would be on a service-by-service basis. We never considered a testbed-server-wide implementation.

Now that I'm thinking about it, you could have a single tunneled server service on the server-side and many tunneled client services on the client-side. As long as they're written well (ie. threaded), the communication should be as seamless as a single server per service would be. I'm not an expert in interconnects, so I have no sense of expected latency / throughput here. I see some minor but solvable complications with how config is managed, but that'd fine.

I'm not sure if all of this makes sense.

@a-sevin
Copy link
Collaborator Author

a-sevin commented Feb 28, 2024

I think it's important to mature it a bit before to doing anything...

Have you heard of RPyC (https://rpyc.readthedocs.io/en/latest/index.html)?
It's a great solution for manipulating remote Python objects, which I think works better than Pyro.

Although I'm not entirely sure about the overall architecture, I believe it has a lot of potential. I'll definitely keep it in mind for future works.

@a-sevin a-sevin added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants