Loading ...
Sorry, an error occurred while loading the content.

19678Re: [rest-discuss] RESTful Toggle

Expand Messages
  • Erik Wilde
    Jul 9, 2014
    • 0 Attachment
      +1: as long as you're resource-oriented (meaning you're POSTing to the
      resource to be toggled, rather than a general toggle-whatever-service),
      everything is fine.

      cheers,

      dret.

      On 2014-07-09, 18:02 , Keith P Hassen wrote:
      > Definitely not a departure, as Erik mentioned I think there is a common
      > misconception around the use of POST (it offers no guarantees). You
      > wouldn't need to POST to /command, rather, you would POST to
      > /togglablethingy with a body of, for example, "toggle=true".
      >
      > K
      >
      >
      >
      > On Wed, Jul 9, 2014 at 11:47 AM, 'Simpson, Robby (GE Energy Management)'
      > robby.simpson@... <mailto:robby.simpson@...> [rest-discuss]
      > <rest-discuss-noreply@yahoogroups.com
      > <mailto:rest-discuss-noreply@yahoogroups.com>> wrote:
      >
      > __
      >
      > Hi Erik!
      >
      >
      >
      > On 7/9/14, 11:39 AM, "Erik Wilde" <dret@...
      > <mailto:dret@...>> wrote:
      >
      > >hello robby.
      > >
      > >On 2014-07-09, 17:29 , 'Simpson, Robby (GE Energy Management)'
      > >robby.simpson@... <mailto:robby.simpson@...> [rest-discuss]
      > wrote:
      > >> This particular issue has arisen in the design of home automation
      > >>systems. Specifically, I'm working in a standards body (the ZigBee
      > >>Alliance) that has classically used a binary protocol that does not
      > >>really adhere to any true architectural design (IMHO). I've been
      > >>engaged in work that started in ZigBee and has now moved to IEEE
      > >>(2030.5) that (attempts to) rigidly stick to a RESTful HTTP
      > design. One
      > >>request that has come up is to port toggle switch capability to this
      > >>standard. Home automation manufacturers have actually implemented
      > >>toggle switches this way in the past (see
      > >>http://zigbee.org/Products/ByStandard/ZigBeeHomeAutomation.aspx).
      > >
      > >it sounds like the scenario we were talking about, that all you
      > want is
      > >to tell the resource to "reverse its state". in this case, i'd POST a
      > >body that represents this request, in whatever serialization you
      > happen
      > >to prefer. the resource toggles. everybody's happy.
      >
      > OK. Still seems like a bit of a departure from typical RESTful
      > interfaces
      > I've seen and has the potential to be a catch-all tunnel for RPC-style
      > requests.
      >
      > E.g.:
      > /command, where one could POST all sorts of commands like "toggle."
      >
      >
      > >but i am confused because you wrote earlier that you were concerned
      > >about race conditions. which seems to imply that instead of just
      > >toggling, you're also assuming that you're "toggling *from* some
      > state".
      > >but that wouldn't be the "blind toggle" we discussed. could you
      > clarify
      > >a bit how exactly the operation that you're trying to design is
      > defined?
      >
      > Apologies, a blind toggle is what is desired. As it currently works, in
      > the current binary protocol, a button press on a toggle switch simply
      > sends a "toggle" command.
      >
      >
      > >
      > >cheers,
      > >
      > >dret.
      > >
      > >--
      > >erik wilde | mailto:dret@... <mailto:dret@...> -
      > tel:+1-510-2061079 <tel:%2B1-510-2061079> |
      > > | UC Berkeley - School of Information (ISchool) |
      > > | http://dret.net/netdret http://twitter.com/dret |
      >
      >
      >
      >

      --
      erik wilde | mailto:dret@... - tel:+1-510-2061079 |
      | UC Berkeley - School of Information (ISchool) |
      | http://dret.net/netdret http://twitter.com/dret |
    • Show all 36 messages in this topic