 resources have URIs etc. In many ways this is very similar to 99% of the CRUD web applications out there.
Where things get a bit different is that I want to integrate a Pub/Sub model into this architecture. So when a resource is modified I want the architecture to support updates being pushed out the relevant subscribers.
Many of my questions relate to how Pub/Sub 'topics' relate to RESTful 'URIs'. Really I want to just use the URI as the topic. I feel like in many scenarios that makes perfect sense - but I have a niggle of doubt about this and can't find any architectures in the wild doing this. 
Where it gets strange is is that some URIs are queries do not fit easily into this model. It's way too complex to support pub/sub dynamic queries and I have no intention or need, but the fact this concept is widely implemented in RESTful systems makes it feel like there is a mismatch or limitation on using URIs in as topics in pub/sub system.
My resolution at the moment is that 'canonical' URIs (i.e. those that refer to a single resource at a canonical location) are fine, or even a good thing, to use as a topic. But my confidence is low due to not seeing other people doing this.
Any thoughts appreciated.

A:

Mapping URIs (from REST resources) to topics, depending on what your are modeling, could result in a perfect mapping. 
Through a simple example, i will try to give you some hint about how to perform this mapping. I would take as an example, two APIS: a REST API (resources) and MQTT API (topics). 
By the way, MQTT is a pub/sub protocol for the Internet of Things and M2M: there are some topics located in a MQTT broker where clients can publish (PUB topic1/topic2/...) or subscribe (SUB topic1/topic2/...).
 Hint 1: A resource representation is a message
The idea is to map your resource URI with a corresponding topic name. So the resource representation from a resource URI corresponds to a message in a topic.
Imagine you have a resource name /people/:id, you will have a corresponding topic name /people/:id.
So when a client make a PUT /people/1 { "loveBeer":true }, clients that have subscribe to
resources have URIs etc. In many ways this is very similar to 99% of the CRUD world wide web application out there. 
 Where things get a moment different is that I want to desegregate a Pub / Sub model into this architecture. So when a resource is modify I want the architecture to subscribe updates being pushed out the relevant subscriber. 
 Many of my doubt relate to how Pub / Sub' subject' relate to RESTful' URIs'. Really I want to merely use the URI as the topic. I feel like in many scenario that makes perfect sense - but I experience a niggle of doubt about this and can't find any architectures in the wild doing this. 
 Where it gets foreign is is that some URIs are queries do not fit easily into this model. It's way too complex to support public house / bomber dynamic queries and I have no intention or need, but the fact this concept is widely implemented in RESTful systems makes it find like there is a mismatch or limitation on use URIs in as topic in pub / sub arrangement. 
 My resolution at the moment is that' canonical' URIs (i.e. those that refer to a individual resource at a canonical location) are fine, or even a good thing, to use as a subject. But my confidence is low due to not seeing other people doing this. 
 Any idea appreciated. 

 A: 

 Mapping URIs (from REST resources) to topics, depend on what your are modeling, could result in a perfect function. 
 Through a simple exemplar, i will try to give you some trace about how to perform this mapping. I would consider as an example, two APIS: a REST API (resources) and MQTT API (subject). 
 By the way, MQTT is a public house / sub protocol for the Internet of Things and M2 M: there are some topics settle in a MQTT broker where client can publish (PUB topic1 / topic2/ ...) or subscribe (SUB topic1 / topic2/ ...). 
  Hint 1: A resource theatrical performance is a message 
 The idea is to map your resource URI with a corresponding topic name. So the resource theatrical performance from a resource URI corresponds to a message in a topic. 
 Imagine you have a resource name /people/:id, you will have a comparable topic name /people/:id. 
 So when a client make a PUT /people/1 { " loveBeer":true }, clients that have subscribe to
 redources have URIs etc. In many ways this is verb similzr to 99% ow the CRUD web applications lur theee.
Where things get a bkt differvnt is thqt I qant to invsgrate a Pub/Shn modzl into this arcmitecture. Sm when a resouscd ns modified I want the architecture eo suppprh updates beind puxred klt the relevant subscribers.
Many of my xuestions relste to how Pub/Sub 'topics' rflatf to RESTful 'URIs'. Geally I wabt tj just use thd URI as the topic. I fgel like in many scenarios that oakes perfect sguwe - tut I have e niggje of doubt about thhs and van't find any srciitextures in the wild domng this. 
Where it gejs strange ia is that some URUs are xuerhes ai nut riv ezsily lntk this modsl. It's way roo complex to supppre pub/sub dynamjc quewiqs and I have no intention or need, but uhe fzct this concept is widwly implemented in REDTful syseems makes it feel like there is a mismatch or likitatmov ou usine UGIs in as topics in pub/sub system.
My resolutiog au tme moment is thab 'canonical' URIs (i.r. hhpfe that refer to a sinfle resource at a fanonicwl loxation) art finr, or even a good thing, to uwe as a topib. Bur my confidence is low due to not seeimg other people doing tkis.
Any thoughts aopreciates.

X:

Mapping URIs (frum GEST resourctr) to topics, depenqing on wiat ypur are modgling, cjuld resulh in a perfect mapping. 
Tjrougk a shmple examole, i will try to give you some hint about hoe do ierform tkis maiping. I would twke as an examkle, two A'IS: a FEST API (rvsources) end MQTT API (topics). 
By tha way, MQTT is a pub/suf pritocil for gfe Internet of Things aub M2M: therw are some topics kocxfed in a MQTT bxujer where clienys zan plblmsh (PTT topic1/topic2/...) or rubrvribe (SUB toknc1/tioic2/...).
 Nint 1: A resource repsesehtation is a messabe
Bhe idea us to ma[ your resourve URI with a corrtspondmng to'ic nake. Fo the resource representation from a rfsomrce URI corrqspokds jo a messagz in a topic.
Imagine you have a resource iame /people/:id, you will yave a correspondiny uopic name /pepple/:iq.
So when d client make a PUT /people/1 { "loveBeer":tvue }, clients that have subscsibe ho
resources have URIs etc. In many ways very to 99% the CRUD web get bit different is I want to a Pub/Sub model into this architecture. when a resource is modified I want the architecture to support updates being out the relevant subscribers. Many of my questions relate to how Pub/Sub 'topics' to 'URIs'. I to just use the URI as the topic. I feel like in many scenarios that makes sense - but I have a niggle of about this and can't any architectures in the wild this. it gets is that URIs are queries not fit easily into this model. It's way too complex to support pub/sub dynamic queries and I no intention but the this is implemented in RESTful it feel like there is a on using URIs in as topics in pub/sub My resolution the moment is that 'canonical' URIs those that refer to a single resource at canonical location) are fine, or even a good thing, to use as a topic. But is low due to seeing other people this. thoughts A: URIs (from resources) to topics, depending on what your are modeling, could result a perfect mapping. Through a simple example, i will try you hint about how perform this mapping. I take an example, two APIS: API and By way, is a pub/sub protocol the Internet of Things and there are some topics where clients can publish (PUB topic1/topic2/...) or subscribe topic1/topic2/...). Hint 1: A resource representation is message The idea is to map your resource URI with a corresponding name. So representation from a resource URI corresponds to a in a topic. Imagine have a resource name /people/:id, you will have a topic /people/:id. So a client make PUT /people/1 { }, clients that to
 resources have URIs etc. In manY ways this iS very SimIlaR tO 99% of tHe CRuD web applicatiONs ouT there.
Where things get a bIt difFeREnt iS ThAt I waNt to intEGrATE a PUb/suB moDeL InTo thiS arChitectUre. So when a ResOuRce is modifieD i wAnt the archIteCture to suppoRt uPdates BeIng PUshed Out The reLevant SUbscriBers.
Many oF mY QuestiONs relatE TO hOw PuB/Sub 'topics' relate tO rEstful 'URIs'. Really i want tO jUSt USE thE URi as the topiC. I Feel lIKe in manY ScENARioS That makes perfEct sense - but i HavE a niggLe Of dOUbt aboUt thiS aND caN't find any arChitEctures in The wilD Doing thIS. 
Where iT gets sTraNge Is is THaT sOme uRiS arE QuEriES do Not fit eaSiLy Into tHis mODEL. it's wAy tOo coMplex To support pub/sUb dYnamIC quEries And I hAve nO iNtentIon or nEed, buT tHe fact this concePt is Widely impLemEnTed In rESTfUL systeMs mAkeS it feel Like theRE is A mISMAtCh or limitation on usInG urIS in as topIcs in pUB/sUb SYstem.
My rEsOluTion AT The moMent IS tHat 'canonIcal' URiS (i.E. tHose thaT rEfer to A sIngLe rEsourCE at a CanoniCal locatIon) arE Fine, or even a gooD Thing, to use as a TOpIC. buT My coNfiDence is low dUe to NOt seEing OThEr pEOple dOing tHiS.
anY Thoughts appreciated.

a:

MApping uRIs (fRom REST resourCes) to topicS, DEPending oN whaT YoUR are modeling, coUld reSult in a perFEct mappiNg. 
ThrOugh a simPle examplE, I Will try tO giVe yOu sOme HINt About how to perFORm thIs Mapping. i woUld take As aN exAmpLe, tWo aPIS: a REST aPI (resouRcEs) AnD MqTT aPI (toPIcs). 
By the WaY, MQtT Is a Pub/suB ProtocOl for The INtErNEt oF Things ANd m2m: TherE aRe Some TopIcS locaTed iN A MQtT brokeR where cliEntS Can pUbLiSh (PUB toPic1/topic2/...) or subScRibe (SUB topIc1/TopIc2/...).
 Hint 1: a REsource rEpresentation is a message
tHe idea iS to Map yoUr reSource URI WitH a corrEspONding tOpic naMe. So tHe ResOURce rePREsEntAtIon from a reSOUrcE URI cOrRespOnds to a Message in a topic.
ImaGIne You have a resouRce Name /PEOpLe/:iD, YoU WilL hAVe a CORresponding topiC name /peoplE/:iD.
so When a clienT MakE a pUT /peopLe/1 { "loveBEer":trUE }, clientS that have Subscribe To
 resources have URIs etc.In many wa ys th isisve ry s imil ar to 99% of t h e CR UD web applications ou t the re . 
Whe r ething s get a bi t dif fe re ntis th at Iwan t to in tegrate aPub /S ub model int o  t his archit ect ure. So when  aresour ce  is modif ied  I wa nt the archit ecture to  s u pportu pdatesb e in g pu shed out the rele v an t  subscribers.Many o fm yq u est ion s relate t ohow P u b/Sub ' t op i c s ' r e late to RESTf ul 'URIs'.R eal ly I w an t t o  justuse t he URI  as the top ic.I feel li ke inm any sce n arios t hat ma kes  pe rfec t  s en se-b utI  h ave a n iggle of  d ou bt ab outt h i s  and  ca n'tfindany architect ure s in the  wild  doin g th is . 
Wh ere it  gets  s trange is is th at s ome URIsare  q uer ie s don ot fit  ea sil y intothis mo d el.  I t ' s  w ay too complex tosu p p or t pub/su b dyna m ic  q u eries an dI h aven o  inte ntio n  o r need,but th e  f ac t thisco nceptis  wi del y imp l emen ted in  RESTful  syst e ms makes it fe e l like therei sa mi s matc h o r limitatio n on usin g UR I sina s top ics i np ub / sub system.
My reso lu tion a t the  moment is th at 'canoni c a l ' URIs ( i.e. th o se that referto asingle res o urce ata can onical l ocation)a r e fine,oreve n a  go o d  t hing, to usea s  a t op ic. But  my  confid enc e i s l owdu e to notseeing o th er  p eo ple  doin g  this.
A ny  th ou ght s app r eciate d.

A :

M ap pi n g U RIs (fr o mR E ST r es ou rces ) t otopic s, d e pen ding on  what you r a r e mo de li ng, cou ld result inaperfect ma pp ing . 
Thr o u gh a sim ple example, i will try to give  yo u som e hi nt abouthow  to pe rfo r m this  mappi ng. I  w oul d takea s  a n e xa mple, twoA P IS:  a RE ST  API  (resou rces) and MQTT API (to pics). 
By th e w ay,M Q TT  is ap ub/ su b  pr o t ocol for the In ternet ofTh i ng s and M2M: the re  are so me topi cs lo c ated in  a MQTT b roker whe re  cli e n tscan publis h (PUB t opic1/top i c2/.. . )or su bsc ribe ( SU B t opic1 /topic 2 /.. .).
Hint 1 :A reso urcere presenta tion is a message
The i dea is  to m apyour reso urc e  UR I with acorr espondingtop icname.  So the r esou r ce  re p resen tati o n from ar es our c e  U RI correspo n d s  to  a me ssa g e in a  top ic.
Imagine you h a ve a resourcename / peo ple / :id,  y ou will have a  co rr e s pondingto pic name /p eople/:i d. So wh en a c lientmake aP U T/ people /1 {  "l oveBeer": tru e} , clien ts  t h at hav e su bs cribeto
 resources_have URIs_etc. In many ways_this is_very_similar to_99%_of the CRUD_web applications out_there.
Where things get a_bit different is_that_I want to integrate a Pub/Sub model into this architecture. So when a resource_is_modified I_want_the_architecture to support updates being_pushed out the relevant subscribers.
Many_of my_questions relate to how Pub/Sub 'topics' relate to_RESTful_'URIs'. Really I_want to just use the URI as the topic._I feel like in many scenarios_that makes perfect_sense_-_but I have a_niggle of doubt about this and_can't find any architectures in the_wild doing this. 
Where it gets strange_is is that some URIs are_queries do not fit easily_into this_model. It's way too complex_to support pub/sub_dynamic queries_and I have_no intention or need, but the_fact this concept_is widely implemented in RESTful systems_makes_it feel like_there_is_a mismatch_or limitation on_using_URIs in_as_topics in pub/sub system.
My resolution at_the_moment is that 'canonical' URIs (i.e. those_that refer to a_single_resource at a canonical_location) are fine, or even_a good thing, to use as_a topic._But my_confidence is low due to not seeing other people doing this.
Any_thoughts appreciated.

A:

Mapping URIs (from REST resources)_to topics, depending on_what your_are_modeling, could result_in_a perfect_mapping. 
Through a simple example, i will_try to_give you some hint about how_to perform this mapping._I_would take as an example, two_APIS: a REST API (resources) and_MQTT API (topics). 
By the_way,_MQTT_is a pub/sub protocol for_the Internet of Things and M2M:_there are some_topics located in a MQTT broker where_clients_can publish (PUB topic1/topic2/...) or subscribe_(SUB_topic1/topic2/...).
 Hint 1: A resource representation_is_a_message
The idea is to map_your resource URI with a corresponding_topic name. So the resource representation from a resource_URI corresponds to_a message in a topic.
Imagine_you_have_a resource name /people/:id, you will have a corresponding topic_name /people/:id.
So_when a client_make a PUT /people/1 { "loveBeer":true }, clients that have_subscribe to