-1

I want to know, what happend and how to implement solutions in a real scenario. When we have a closed network (without gateway from 6lowpan to ipv4 network) when we have one CoAP server and node clients are in this network. What is the correct procedure for the network and data transfer between sensors and actuators works when the CoAP server is absent?

Can I implement in the network several CoAP servers which interchange their role as an active server and another device takes over the server activity when the old one is inactive? And when setting up a new server, would a UDP package broadcast be sent to all devices in the network ‘’I am the new server, my IP is xxxx’’

drVrh
  • 37
  • 6

1 Answers1

0

There are no active announcements, but the procedure usually employed (eg. in the Resource Directory draft) is as follows; assuming that the service you want to discover we'll call my-service, and that the servers implement it on their path /s. (Path discovery comes for free in server discovery, and is ).

  • A client that comes up sends a multicast GET to the path and query /.well-known/core?rt=my-service
  • Every server (or the single server) answers with a link-format response a la </s>;rt=my-service from its own IP address. If multiple servers respond, the client picks any.
  • The clients use that address and path to do whatever they do. If that stops working, the client starts the discovery process again.

If you only ever want to have one active server (the above would give you load balancing for free), it'll be up to the servers to negotiate that among themselves, but they'll probably have some way of synchronizing themselves already.

chrysn
  • 810
  • 6
  • 19