Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piotrmaslanka/dziendobry
Yet another service discovery protocol
https://github.com/piotrmaslanka/dziendobry
Last synced: 7 days ago
JSON representation
Yet another service discovery protocol
- Host: GitHub
- URL: https://github.com/piotrmaslanka/dziendobry
- Owner: piotrmaslanka
- License: bsd-3-clause
- Created: 2015-02-18T17:09:20.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-21T13:49:26.000Z (over 9 years ago)
- Last Synced: 2023-03-12T09:41:52.068Z (over 1 year ago)
- Language: Python
- Size: 133 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
DZIENDOBRY
==========_DZIENDOBRY_ is a simple but robust service discovery protocol. Service discovery is initiated by sending a specific UDP packet onto either port 5000, 6000 or 7000, and waiting for server's response. Particular services are identified by their UUID's. _DZIENDOBRY_ can also store a string associated with a given service, that will be included in the response.
Use *server.py* to advertise services, use *client.py* to detect them.
The Protocol
------------The protocol is very simple. Client initiates by sending a UDP broadcast packet to either port 5000, 6000 or 7000 (it's advisable to send on all three) with content (everything is in network byte order!):
```
byte[] 'DZIENDOBRY'
sequence of
byte OptionType
byte OptionLength
byte[OptionLength] OptionValue
```Option 0 is "respond only if you have a service of particular UUID". OptionLength is 16, and OptionValue will be the binary representation of service's UUID. The server will respond only if it declares a service with this UUID.
Option 1 is "respond to another port". OptionValue (2 bytes) will code a network port that UDP response will arrive on.
Server, after deciding to respond, will respond with a UDP unicast response to IP address that send the request, and the same port from which it was send (barring Option 1 usage). It's format will be:
```
byte[] 'WITAMUPRZEJMIE'
sequence of
byte RecordLength
byte[16] ServiceUUID
byte[RecordLength-16] AdditionalServiceInfo
```This will enumerate all services present on this server. Extra data can be specified by AdditionalServiceInfo field, but this is service-dependent.
See file COPYING for license information.