Subject: [core] COAP/CORE application definitions?

From: David Ryan <[email-masked]>
Date: Tue, 13 Apr 2010 00:00:58 +1000

Following my recent implementation of the COAP protocol I started to
think about the application layer specifications.  Has anyone
developed any RESTful application examples of how common functions
will be implemented on COAP?  I also realize that a DTLS
implementation will be required and I'm wondering how stateless and
RESTful the server can be when security is introduced.

This question also relates back to the discussion regarding
compatibility with HTTP and HTTP based specifications.  If there is no
compatibility it will mean that there will also be no compatibility
with WADL or WSDL 2.0 based specifications.  Does this mean we fall
back on to textual specifications for the application layer?  Seems
like 2 steps forward and 3 back.

If anyone has done any work on a RESTful application layer for a home
automation or metering it would be useful if you could share it.  I
find without a real application layer to work with many of the
protocol choices are academic.

Regards,
David.

---

From: Zach Shelby <[email-masked]>
Date: Wed, 14 Apr 2010 09:00:12 +0300

David,

> RESTful the server can be when security is introduced.

That is an interesting point, I am not sure how DTLS/TLS affect the REST model really. Anybody have experience on that from the HTTP world? DTLS is surely not required, it is something that MAY be applied if needed. IPSec is another alternative e.g.

> like 2 steps forward and 3 back.

CoAP will be 100% REST compatible, and it seems that we are leaning towards using GET, POST, PUT, DELETE method names. So you should be able to fully re-use WADL and even WSDL with CoAP.

> protocol choices are academic.

In the WG meeting the ZigBee SE 2.0 people said they were working on a draft about their application patterns, which should be what you are looking for. The SENSEI project has also designed RESTful APIs which make use of WADL together with a protocol somewhat like CoAP. You can find public deliverables from that project here:

http://www.ict-sensei.org/index.php?option=com_content&task=view&id=14&Itemid=31

Cheers,
Zach 

> 
> Regards,
> David.
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core

-- 
http://www.sensinode.com
http://zachshelby.org - My blog "On the Internet of Things"
http://6lowpan.net - New book - "6LoWPAN: The Wireless Embedded Internet"
Mobile: +358 40 7796297

Zach Shelby
Head of Research
Sensinode Ltd.
Kidekuja 2
88610 Vuokatti, FINLAND

This e-mail and all attached material are confidential and may contain legally privileged information. If you are not the intended recipient, please contact the sender and delete the e-mail from your system without producing, distributing or retaining copies thereof.

---

From: Mark Baker <[email-masked]>
Date: Wed, 14 Apr 2010 10:41:46 -0400

On Mon, Apr 12, 2010 at 10:00 AM, David Ryan <[email-masked]> wrote:
> with WADL or WSDL 2.0 based specifications.

WADL and WSDL have no role to play in a RESTful architecture because
they tightly couple the client and server in a manner which REST is
specifically designed to avoid.

Mark.

---

From: "Don Sturek" <[email-masked]>
Date: Wed, 14 Apr 2010 07:50:23 -0700

Hi Mark (and David),

I think what CoAP/CoRE is going to face is this:
1)  CoRE assumes a REST environment.  This is fundamentally at odds with a
SOA based solution
2)  Attempts to make CoRE transparently address SOA will fail or make CoRE
useless
3)  WSDLs, WADLs, etc. can be addressed by implementers that have legacy
deployments (NOT the standard)

I think it would be in the groups interest to note that REST is not SOA and
won't be.

Industry wise, I believe there has been a shift towards REST so I think we
are making the right choice.  I also think for constrained devices REST is
the appropriate choice.

Don

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Mark
Baker
Sent: Wednesday, April 14, 2010 7:42 AM
To: David Ryan
Cc: core
Subject: Re: [core] COAP/CORE application definitions?

Mark.

---

From: Rafik Dammak <[email-masked]>
Date: Thu, 15 Apr 2010 00:00:55 +0900

Hello all,

my understanding is that for SOA people will think more to implement it in
middelware, in server side for wireless sensor network case to provide web
services. when REST architecture will make the devices looking as resources
that we can access through HTTP requests. maybe I am misunderstanding.

Regards

Rafik

PS well it is first mail here :)
2010/4/14 Don Sturek <[email-masked]>

---

From: Zach Shelby <[email-masked]>
Date: Wed, 14 Apr 2010 19:20:47 +0300

> 1)  CoRE assumes a REST environment.  This is fundamentally at odds with a

Actually, as a transfer protocol CoAP is perfectly suited for misuse by SoA just as HTTP is misused by SoA. So in a way you are right, but we should be aware that some people will use it this way. Anyways - it doesn't require us to change our RESTful architecture. 

> 2)  Attempts to make CoRE transparently address SOA will fail or make CoRE

I agree, we shall not try to address SoA (nor do we need to).

> deployments (NOT the standard)

RIght, CoAP does not need to take formal interface description languages into account. I think there is a misunderstanding about WADL however, it happens to be designed to describe RESTful interfaces and will surely be used to describe CoAP interfaces by many designers (I am using it at least). So nothing to do with legacy anything. Nor does WADL in any way break the REST architecture...

WSDL is aimed at designing SoA interactions, but the newest version could be used to describe RESTful interfaces (yuck, not sure why a sane person would do that though)... So we can basically ignore this. 

Anyways, you can describe a REST interface in any number of ways, so we shouldn't worry about it. As long as we have similar semantics to HTTP (we do) then you can just re-use things like WADL if needed. 

> I think it would be in the groups interest to note that REST is not SOA and

+1

> are making the right choice.  I also think for constrained devices REST is

Definitely!

Zach

Zach Shelby
Head of Research
Sensinode Ltd.
Kidekuja 2
88610 Vuokatti, FINLAND

---

From: Mark Baker <[email-masked]>
Date: Wed, 14 Apr 2010 14:29:28 -0400

On Wed, Apr 14, 2010 at 12:20 PM, Zach Shelby <[email-masked]> wrote:
> Anyways, you can describe a REST interface in any number of ways,

No, you can't.  For the Web, the "RESTful interface" is specified by a
set of standard protocols such as RFCs 2616, 3986, 2617, HTML, etc..
Anything WADL describes is just a snapshot of a subset of that
interface for a given resource at a given point in time.  It doesn't
accommodate change and therefore encourages tight coupling and brittle
code.  That is the antithesis of REST.

Mark.

---

From: Zach Shelby <[email-masked]>
Date: Wed, 14 Apr 2010 23:23:47 +0300

> code.  That is the antithesis of REST.

;-) I was waiting for someone to shoot me. Let's just agree that interface description languages are out of scope for CoRE and thus we don't care here. 

Zach

Zach Shelby
Head of Research
Sensinode Ltd.
Kidekuja 2
88610 Vuokatti, FINLAND