Hi,
I would like to clarify something about JSON-RPC protocol.
The protocol say's:
The Client is defined as the origin of Request objects and the handler of Response objects.
The Server is defined as the origin of Response objects and the handler of Request objects.
So as I understand there is no pre-defined role on a peer ?
Is it possible for a peer to be client and server (according to JSON-RPC specifications) ?
Imagine this example:
[Application A] ------------- [ IOT Gateway Daemon ] ---------- [ RF Dongle ] --- [IOT Actor/Sensor]
The application communicate with a "IOT Gateway Daemon" using JSON RPC.
The "IOT Gateway Daemon" wait for request from "Application A" to send request to the "IOT Actors" (like wall socket..) (gateway role)
But now, if the "IOT Gateway Daemon" can receive messages from the IOT Sensors (temperature sensor). Is this service allowed to transmit notifications to the application according to JSON-RPC protocol ?
If yes:
- It means that a peer can act as a server and client (in terms of JSON-RPC) (which is good)
If not:
- why not ?
Bests regards,