onem2m

How should a onem2m CSE treat a retransmitted AE create request


Suppose an AE uses CoAP to register with a CSE (AE Create request). The CSE receives the request, creates the AE resource, and sends the response in an ACK. The ACKs are lost, and the AE cancels its request by virtue of a timeout or restart, and then transmits a new Create request. Since a matching AE resource exists (assuming AE-ID or resourceName attributes are included in the request), should the CSE return CONFLICT? If so, the registering AE will only see a CONFLICT response, never having received a SUCCESS response to its registration request. Is there a better way? If the CSE considers the sender authenticated, should it simply send an CREATED response with the existing AE resource content?


Solution

  • There are different strategies in oneM2M. The best practice in such a case (assuming that the AE runs on a constrained device and is using therefore CoAP) could be that not the AE registers itself but a management system does this for the AE, and perhaps create the whole data structure beneath it.

    If, however, this is not possible or convenient to do, this might not be a big problem. Let's take the scenario you described:

    So, is this really a problem? I think it is not because the used AE-ID is uniquely assigned/known to the AE (if running in a managed deployment). If an <AE> resource exists with this AE-ID it can safely assume that this is its "own" <AE> resource and continue with its normal operation.