open-rpc / spec

The OpenRPC specification
https://spec.open-rpc.org
Apache License 2.0
167 stars 49 forks source link

Specifying different transports for servers ? #304

Closed natcl closed 4 years ago

natcl commented 4 years ago

One of the beauty of JSON RPC is that it can be used over almost any kind of transports, was reading the server spec here: https://spec.open-rpc.org/#server-object And it seems specific to HTTP. I think it would be nice to have a way to specify other transports like UDP, TCP, WebSockets, MQTT, AMQP, etc.

github-actions[bot] commented 4 years ago

Welcome to OpenRPC! Thank you for taking the time to create an issue. Please review the guidelines

natcl commented 4 years ago

Seems like a stale issue already has a proposal: https://github.com/open-rpc/spec/issues/242

BelfordZ commented 4 years ago

@natcl Hey there! thanks for the issue.

You are indeed correct - some love is needed around the specifcation of transports. Its being worked on, but will be a little while yet before that comes to light.

Until then, I can recommend that you experiment with using specification extensions to implement this how you would like. Please do come back here and detail your ffindings. One example:

servers: {
  host: ''...',
  x-transport: "MQTT"
}
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.