Refactor green mode for client and server APIs
This PR unifies the interface for client and server green modes by defining an abstract executor class.
This PR unifies the interface for client and server green modes by defining an abstract executor class.