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

Introduce a better protocol for single-message-based communication between Connector app and the client apps #40

Open
emaxx-google opened this issue Aug 30, 2016 · 1 comment

Comments

@emaxx-google
Copy link
Collaborator

The existing protocol has several issues, mainly:

  • Client restart handling is bad. Connector app may start processing the commands from the restarted app in the same environment as it was before the restart, but then, after some time, it will realize that the client app has been restarted - and it will clean up and destroy all handles and start with a clean environment after this point - which really puts the client into a weird state. The commit 215d5ba has a temporary workaround for this, allowing the client to wait until the full "handshake" finishes before sending the commands.
  • The timeouts for sending ping messages and for considering the Connector app as dead have to be hardcoded based on the sources of the Connector app.
  • There's no way in the protocol to send a generic error from the Connector app to the client (like "permission denied" or "received message has invalid format").
  • Asymmetry between "ping" requests and "pong" responses is a complication that brings not many benefits.
@emaxx-google
Copy link
Collaborator Author

One more item:

  • The current protocol requires the 'data' field to be specified in all messages even there's no additional data to be passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant