Giter VIP home page Giter VIP logo

Comments (11)

ThGarnier avatar ThGarnier commented on May 18, 2024

These points will be addressed (and solved :-) ) in August.
According to my view :
a) For the execute : if the spec fixes (Appendix D) the fact that the operations a resource can support are R(Read only), W(Write only), RW (REad and Write) or E (Execute)
then a POST on a resource is not ambiguous any more : a POST on a Resource supporting 'E' operation is an EXECUTE, a POST on a Resource which doesn't support 'E' operation is a WRITE
b) my proposal is to remove the OBJECT INSTANCE ID of the LWM2M CREATE command (the ID must be assigned by the Client, not by the SERVER which is more in the REST spirit)
In that case no ambiguity any more :
POST objectID is a CREATE
POST Object_ID Object_Instance ID is a WRITE
Make sense ?

from oma_lwm2m_for_developers.

sbernard31 avatar sbernard31 commented on May 18, 2024

a) This is a possibility, but I really don't like that 1 thing at CoAP level means 2 potential things at LwM2m level. A model desynchronization between server and client could involve strange behavior. A server could sent a Write request and the client should take this for an execute instead of returning an METHOD_NOT_ALLOWED

b) Make a create without ID avoid to try to create an object with an ID which already exists.
Make a request with ID avoid we create several objects if the request is sent several time.
I don't know what is the best one. But I still think that the Write request should be a PUT as it is idempotent.

So I prefer :
POST for create and execute. (POST is neither safe nor idempotent.)
PUT for write with an option for replace ( PUT is not safe but is idempotent.)
source : https://tools.ietf.org/html/rfc7252#section-5.8.3

from oma_lwm2m_for_developers.

sbernard31 avatar sbernard31 commented on May 18, 2024

Finally, I think the right solution should be to use the PATCH or IPATCH method defined in : https://tools.ietf.org/html/draft-vanderstok-core-patch-02

POST for create and execute. (POST is neither safe nor idempotent.)
PUT for write/replace ( PUT is not safe but is idempotent.)
IPATCH for write/partial update (iPATCH is not safe but idempotent)

This seems to be the more elegant way to solve this issue.

(As I understand the spec the partial update is idempotent but if I'm wrong we should use PATCH instead)

from oma_lwm2m_for_developers.

ThGarnier avatar ThGarnier commented on May 18, 2024

Has been addressed and fixed in OMA-TS-LightweightM2M-V1_0-20150910-D
=> to be closed

from oma_lwm2m_for_developers.

sbernard31 avatar sbernard31 commented on May 18, 2024

For the conflict create/write on objectInstance, sounds good.

But for excute/write, as I explained previously I think that having 1 thing at CoAP level meaning 2 potential things at LwM2m level is a mistake ...

So for me, this should not be closed.

from oma_lwm2m_for_developers.

ThGarnier avatar ThGarnier commented on May 18, 2024

Yes, after verification, you are right : thanks for this !! in the meander of this fix & discussions (CR)
few points unlikely disappeared. For instance the fact that operations 'R,W' from one side and 'E'
on other side MUST be exclusive (only E, R,W, RW are acceptable operations in Object Template) .
So, yes this issue must be kept open :-) on that aspect.

from oma_lwm2m_for_developers.

jvermillard avatar jvermillard commented on May 18, 2024

From an implementer point of view this is not practical, we don't want to look at the object model for knowing if we need to call the EXEC routine or the WRITE routine.

from oma_lwm2m_for_developers.

sbernard31 avatar sbernard31 commented on May 18, 2024

Maybe this one #83 should be taking in account too.

from oma_lwm2m_for_developers.

jvermillard avatar jvermillard commented on May 18, 2024

addressed by OMA-DM-LightweightM2M-2016-0007-CR_Partial_Update

from oma_lwm2m_for_developers.

ThGarnier avatar ThGarnier commented on May 18, 2024

So all aspects are now covered in (even before) the TS1.0 20160407 :-) => to be closed

from oma_lwm2m_for_developers.

Megan-OMA avatar Megan-OMA commented on May 18, 2024

Issue closed per Thierry's latest comment.

from oma_lwm2m_for_developers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.