-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Extract code into separate rpc server #27
base: main
Are you sure you want to change the base?
Conversation
You seem to have a bunch of merge conflicts. Maybe you started from an old version of main? |
Yeah I did, but I have fixed it now. I have on purpose reverted the io interface. As we discussed to much of the code and logic is around this being a file based rpc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to do: understand if it's easy to implement #21 without io.ts
Here is my version of that: |
The current Io abstraction and nativeIo implementation ensures that all direct filesystem access and use a Node modules that make filesystem-related assumptions (e.g. I've only taken a quick look at this so far, but it looks like PR loses this containment; for example I see an import of |
The purpose here is that it should not just be a file based rpc. We can definitely make an interface for the file based implementations since it appears that we have multiple of those, but the core abstraction should probably be more flexible se we can have rpc based on sockets and so on. At least that was my assumption. This needs to split into multiple packages. There should be a common package with just the interfaces and the common logic that is separate from the file based implementation. @pokey Do you feel ready for a monorepo setup again? :D |
I note that my internal Google implementation of the Io interface works entirely over stdio to a subprocess that it starts in init, so the existing interface is at least already most of the way towards supporting an RPC based on sockets. Further refactoring it's fine with me though so long as it maintains my primary objective. |
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
There's also a Talon side of this
talonhub/community#1433
The purpose of this pr is two fold
Interesting parts
RpcServer
interface. This isn't file system specific and could be implemented by sockets. Doesn't require file system or node.RpcServerFs
is a file system based implementation ofRpcServer
, but still not node specific.FileSystemNode
is basically our current implementation of node io. Accepts a path to the communication directory which means you can have multiple instances off different rpc fs clients.