Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm very interested in this subject too. This post has a few links to papers that discuss some of the troubles with poorly-designed RPC:</p> <p><a href="http://thomasdavis.github.com/2012/04/11/the-obligatory-refutation-of-rpc.html" rel="nofollow">http://thomasdavis.github.com/2012/04/11/the-obligatory-refutation-of-rpc.html</a></p> <p>I am not saying Meteor is poorly designed, because I do not know much about Meteor.</p> <p>In any case, I think I want the best of both "world". I want to benefit from REST and all that it affords with the constrained generic interface, addressability, statelessness, etc.</p> <p>And, I don't want to get left behind in this "real-time" web revolution either! It's definitely very awesome.</p> <p>I am wondering if there is not a hybrid approach that can work:</p> <p>RESTful endpoints can allow a client to enter a space, and follow links to related documents as HATEOAS calls for. But, for the "stream of updates" to a resource, perhaps the "subcription name" could itself be a URI, which when browsed to in a point-in-time single request, like through the web browser's address bar or curl, would return either a representation of the "current state", or a list of links with the href for prior states of the resource and/or a way to query the discrete "events" that have occured against the object. </p> <p>In this way, if you state with the "version 1" of the entity, and then replay each of the events against it, you can mutate it up to its "current state", and this events could be streamed into a client that does not want to get complete representations just because one small part of an entity has changed. This is basically the concept of an "event store", which is covered in lots of the CQRS info out there.</p> <p>As far as being REST-compatible, I believe this approach has been done (though I'm not sure about the streaming side of this), I cannot remember if it was in this book <a href="http://shop.oreilly.com/product/9780596805838.do" rel="nofollow">http://shop.oreilly.com/product/9780596805838.do</a> (REST in Practice), or in a presentation I heard by Vaughn Vernon at this recorded talk in QCon 2010: <a href="http://www.infoq.com/presentations/RESTful-SOA-DDD" rel="nofollow">http://www.infoq.com/presentations/RESTful-SOA-DDD</a>.</p> <p>He talked about a URI design something like this (I don't remember exactly)</p> <p>host/entity &lt;-- current version of a resource host/entity/events &lt;-- list of events that have happened to mutate the object into its current state</p> <p>Example:</p> <p>host/entity/events/1 &lt;-- this would correspond to the creation of the entity host/entity/events/2 &lt;-- this would correspond to the second event ever against the entity</p> <p>He may have also had something there for history, the complete monent-in-time state, like:</p> <p>host/entity/version/2 &lt;-- this would be the entire state of the entity after the event 2 above.</p> <p>Vaughn recently published a book, Implementing Domain-Driven Design, which from the table of contents looks like it covers REST and event-driven architecture: <a href="http://rads.stackoverflow.com/amzn/click/0321834577" rel="nofollow">http://www.amazon.com/gp/product/0321834577</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload