unoconv / unoserver

MIT License
496 stars 69 forks source link

example rpc server implementation, addressing #29 #32

Closed hottwaj closed 10 months ago

hottwaj commented 2 years ago

This is a v quick example of changes needed to make converter.py optionally provide an rpc server so that Converter.convert can be called from remote processes in virtualenvs

A separate rpc client module is needed, and that would be the module that users need to install into their virtualenv

regebro commented 2 years ago

I'll talk with the rest of the people involved if we want to maintain this or not.

regebro commented 1 year ago

The conclusion was basically that this is a good idea, and we would like to see a version where the client exclusively talks to the backend this way, so the client doesn't need to import uno at all, and that the server does that instead.

hottwaj commented 1 year ago

Thanks & great - sounds like a plan! What would you like to see next (in terms of changes to the code in this PR) to progress?

regebro commented 1 year ago

Well, the unoserver should start the server, and always start it, in a separate process or thread. I guess async could be used? We also will have to make a specification/documentation of the protocol, and tests. We also need to account for other commands except converting, a compare command has been proposed in another PR, and that's an interesting idea.

After that a client that uses that protocol could be made.

I think the easiest for that is to let the UnoConverter reside in the converter.py class and make a new client in a client module.

regebro commented 10 months ago

2.0a1 is out now

hottwaj commented 10 months ago

Nice!