Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Unify tray servers #651

Closed
mkolar opened this issue Oct 19, 2020 · 4 comments
Closed

Unify tray servers #651

mkolar opened this issue Oct 19, 2020 · 4 comments
Assignees
Labels
type: enhancement Enhancements to existing functionality

Comments

@mkolar
Copy link
Member

mkolar commented Oct 19, 2020

We have multiple small services currently running from tray. With recent implementation of websocket server, it seems that we can unify all or most of these into just one.

Rest API - currently only serves static images to ftrack actions, this could be handled by the websocket server
Adobe communicator - not used at all as all adobe products are being switched to websockets. Can be deleted

There might be a problem with communication with the websockets from hosts that only support python2 like maya and nuke. For that purpose we can temporarily leave in a service that will act as a translator between simple requests to our websocket server running in the tray. This should be deprecated once we get rid of python2 for good (considering how keen Foundry is on switching nuke to py3, it might be around the year 2055)

A more robust and unified server in the tray should open paths for various other features dependent on it, like automatic timer switching based on context changes. #21

@mkolar mkolar added the type: enhancement Enhancements to existing functionality label Oct 19, 2020
@FuzzkingCool
Copy link

@mkolar you might want to look into Pyro to communicate between interpreters with shared objects or kicking off methods from the specific interpreter in a dcc to the pype virtual env. I've had a lot of success with it in the past with Ironpython and vanilla python.

@create-issue-branch
Copy link

Branch feature/651-unify-tray-servers created!

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Feb 16, 2021

Required steps

1.) Current Websocket server implementation from Websocket module add to avalon tools as websocket server for non python hosts, each host implementation would have own handlers (stubs) for the tool.

  • Expected result: Host implementation won't use pype's server from pype's module.

2.) Rename Websocket module to Webserver module as it can handle more than websocket protocol. Remove host implementation specific parts from server and prepare interface to register route handlers from other modules.

3.) Find/Implement Rest api module for aiohttp and prepare base rest api interface for modules to easily add rest api callbacks.

4.) Convert current rest api handlers to new interface.

5.) Remove Rest api module.

@iLLiCiTiT
Copy link
Member

Resolved with #1119

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants