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

Run checks against protocol schemas #50

Closed
jonnor opened this issue Jun 22, 2016 · 1 comment
Closed

Run checks against protocol schemas #50

jonnor opened this issue Jun 22, 2016 · 1 comment

Comments

@jonnor
Copy link
Contributor

jonnor commented Jun 22, 2016

There now exists some JSON schemas which formally describes the protocol, at https://github.com/flowbased/fbp-protocol

We should make it hard to do things which are incompatible/wrong according to the protocol, so we should check both sent and received messages against the JSON schemas.

Initially there are likely incompatiblities between existing implementations and current schemas, either due to bugs in runtime/client following protocol spec, or due to bugs in the schemas. So probably the checks should not fail, but instead raise a warning.

Since the BaseRuntime is an EventEmitter already, I propose we emit a validation-error event. And that we log these warnings, so people are more likely to discover and fix them.

For forward compatibility, unknown messages (not existing in schema) should be ignored. We could emit a unknown-message, and allow to opt-in to log these.

@bergie
Copy link
Member

bergie commented Mar 21, 2018

We're now doing this in the higher-level fbp-client library:

https://github.com/flowbased/fbp-client

@bergie bergie closed this as completed Mar 29, 2018
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

2 participants