€cdocutils.nodes document q)q}q(U nametypesq}q(X0use case 21 - owner subscribe to crud operationsqNXhistoryqˆXuc21qˆuUsubstitution_defsq }q Uparse_messagesq ]q Ucurrent_sourceq NU decorationqNUautofootnote_startqKUnameidsq}q(hU.use-case-21-owner-subscribe-to-crud-operationsqhUhistoryqhUuc21quUchildrenq]q(cdocutils.nodes target q)q}q(U rawsourceqX .. _UC21:UparentqhUsourceqXj/var/lib/jenkins/jobs/API_Documentation_trunk/workspace/api-documentation/source/design/UseCases/21_uc.txtqUtagnameqUtargetqU attributesq }q!(Uidsq"]Ubackrefsq#]Udupnamesq$]Uclassesq%]Unamesq&]Urefidq'huUlineq(KUdocumentq)hh]ubcdocutils.nodes section q*)q+}q,(hUhhhhUexpect_referenced_by_nameq-}q.hhshUsectionq/h }q0(h$]h%]h#]h"]q1(hheh&]q2(hheuh(Kh)hUexpect_referenced_by_idq3}q4hhsh]q5(cdocutils.nodes title q6)q7}q8(hX0Use Case 21 - Owner Subscribe to CRUD Operationsq9hh+hhhUtitleq:h }q;(h$]h%]h#]h"]h&]uh(Kh)hh]q…q?}q@(hh9hh7ubaubcsphinx.addnodes index qA)qB}qC(hUhh+hhhUindexqDh }qE(h"]h#]h$]h%]h&]UentriesqF]qG((UsingleqHX Use Case 21Uindex-0qIUNtqJ(hHXUC21hIUNtqK(hHX subscribehIUNtqL(hHXowner subscribehIUNtqM(hHXnotifyhIUNtqN(hHXwatchhIUNtqOeUinlineqP‰uh(Kh)hh]ubh)qQ}qR(hUhh+hhhhh }qS(h"]h#]h$]h%]h&]h'hIuh(Kh)hh]ubcdocutils.nodes definition_list qT)qU}qV(hUhh+hhh-}hUdefinition_listqWh }qX(h$]h%]h#]h"]qYhIah&]uh(Nh)hh3}qZhIhQsh]q[(cdocutils.nodes definition_list_item q\)q]}q^(hX+Revisions View document revision history_. hhUhhhUdefinition_list_itemq_h }q`(h$]h%]h#]h"]h&]uh(K h]qa(cdocutils.nodes term qb)qc}qd(hX Revisionsqehh]hhhUtermqfh }qg(h$]h%]h#]h"]h&]uh(K h]qhh=X Revisionsqi…qj}qk(hhehhcubaubcdocutils.nodes definition ql)qm}qn(hUh }qo(h$]h%]h#]h"]h&]uhh]h]qpcdocutils.nodes paragraph qq)qr}qs(hX View document revision history_.hhmhhhU paragraphqth }qu(h$]h%]h#]h"]h&]uh(K h]qv(h=XView document revision qw…qx}qy(hXView document revision hhrubcdocutils.nodes reference qz)q{}q|(hXhistory_Uresolvedq}KhhrhU referenceq~h }q(UnameXhistoryq€UrefuriqX”https://redmine.dataone.org/projects/d1/repository/changes/documents/Projects/cicore/architecture/api-documentation/source/design/UseCases/21_uc.txtq‚h"]h#]h$]h%]h&]uh]qƒh=Xhistoryq„…q…}q†(hUhh{ubaubh=X.…q‡}qˆ(hX.hhrubeubahU definitionq‰ubeubh\)qŠ}q‹(hX˜Goal Data owners can subscribe to notification service for object management (create, read, update, delete, replicate) operations for objects they own. hhUhhhh_h }qŒ(h$]h%]h#]h"]h&]uh(K h)hh]q(hb)qŽ}q(hXGoalqhhŠhhhhfh }q‘(h$]h%]h#]h"]h&]uh(K h]q’h=XGoalq“…q”}q•(hhhhŽubaubhl)q–}q—(hUh }q˜(h$]h%]h#]h"]h&]uhhŠh]q™hq)qš}q›(hX’Data owners can subscribe to notification service for object management (create, read, update, delete, replicate) operations for objects they own.qœhh–hhhhth }q(h$]h%]h#]h"]h&]uh(K h]qžh=X’Data owners can subscribe to notification service for object management (create, read, update, delete, replicate) operations for objects they own.qŸ…q }q¡(hhœhhšubaubahh‰ubeubh\)q¢}q£(hXèSummary The system should support a mechanism for notifying a content owner of use of content they own. One approach may be to support a feed (e.g. RSS or Atom) whose entries indicate events related to an object or family of objects. Since object may be replicated to multiple nodes, an aggregator is necessary to provide a complete report to a user. The CNs keep aggregated logs of object access, so feeds may be generated by the CNs, however issues of scalability should be considered. hhUhhhh_h }q¤(h$]h%]h#]h"]h&]uh(Kh)hh]q¥(hb)q¦}q§(hXSummaryq¨hh¢hhhhfh }q©(h$]h%]h#]h"]h&]uh(Kh]qªh=XSummaryq«…q¬}q­(hh¨hh¦ubaubhl)q®}q¯(hUh }q°(h$]h%]h#]h"]h&]uhh¢h]q±hq)q²}q³(hXßThe system should support a mechanism for notifying a content owner of use of content they own. One approach may be to support a feed (e.g. RSS or Atom) whose entries indicate events related to an object or family of objects. Since object may be replicated to multiple nodes, an aggregator is necessary to provide a complete report to a user. The CNs keep aggregated logs of object access, so feeds may be generated by the CNs, however issues of scalability should be considered.q´hh®hhhhth }qµ(h$]h%]h#]h"]h&]uh(Kh]q¶h=XßThe system should support a mechanism for notifying a content owner of use of content they own. One approach may be to support a feed (e.g. RSS or Atom) whose entries indicate events related to an object or family of objects. Since object may be replicated to multiple nodes, an aggregator is necessary to provide a complete report to a user. The CNs keep aggregated logs of object access, so feeds may be generated by the CNs, however issues of scalability should be considered.q·…q¸}q¹(hh´hh²ubaubahh‰ubeubh\)qº}q»(hX(Actors - Subscriber - Coordinating Node hhUhhhh_h }q¼(h$]h%]h#]h"]h&]uh(Kh)hh]q½(hb)q¾}q¿(hXActorsqÀhhºhhhhfh }qÁ(h$]h%]h#]h"]h&]uh(Kh]qÂh=XActorsqÃ…qÄ}qÅ(hhÀhh¾ubaubhl)qÆ}qÇ(hUh }qÈ(h$]h%]h#]h"]h&]uhhºh]qÉcdocutils.nodes bullet_list qÊ)qË}qÌ(hUh }qÍ(UbulletqÎX-h"]h#]h$]h%]h&]uhhÆh]qÏ(cdocutils.nodes list_item qÐ)qÑ}qÒ(hX SubscriberqÓh }qÔ(h$]h%]h#]h"]h&]uhhËh]qÕhq)qÖ}q×(hhÓhhÑhhhhth }qØ(h$]h%]h#]h"]h&]uh(Kh]qÙh=X SubscriberqÚ…qÛ}qÜ(hhÓhhÖubaubahU list_itemqÝubhÐ)qÞ}qß(hXCoordinating Node h }qà(h$]h%]h#]h"]h&]uhhËh]qáhq)qâ}qã(hXCoordinating NodeqähhÞhhhhth }qå(h$]h%]h#]h"]h&]uh(Kh]qæh=XCoordinating Nodeqç…qè}qé(hhähhâubaubahhÝubehU bullet_listqêubahh‰ubeubh\)që}qì(hXTPreconditions - Content has been added to system - Subscriber has access to content hhUhhhh_h }qí(h$]h%]h#]h"]h&]uh(Kh)hh]qî(hb)qï}qð(hX Preconditionsqñhhëhhhhfh }qò(h$]h%]h#]h"]h&]uh(Kh]qóh=X Preconditionsqô…qõ}qö(hhñhhïubaubhl)q÷}qø(hUh }qù(h$]h%]h#]h"]h&]uhhëh]qúhÊ)qû}qü(hUh }qý(hÎX-h"]h#]h$]h%]h&]uhh÷h]qþ(hÐ)qÿ}r(hX Content has been added to systemrh }r(h$]h%]h#]h"]h&]uhhûh]rhq)r}r(hjhhÿhhhhth }r(h$]h%]h#]h"]h&]uh(Kh]rh=X Content has been added to systemr…r }r (hjhjubaubahhÝubhÐ)r }r (hX!Subscriber has access to content h }r (h$]h%]h#]h"]h&]uhhûh]rhq)r}r(hX Subscriber has access to contentrhj hhhhth }r(h$]h%]h#]h"]h&]uh(Kh]rh=X Subscriber has access to contentr…r}r(hjhjubaubahhÝubehhêubahh‰ubeubh\)r}r(hXKTriggers - A new subscriber joins the system by creating a feed definition hhUhhhh_h }r(h$]h%]h#]h"]h&]uh(K!h)hh]r(hb)r}r(hXTriggersrhjhhhhfh }r(h$]h%]h#]h"]h&]uh(K!h]rh=XTriggersr …r!}r"(hjhjubaubhl)r#}r$(hUh }r%(h$]h%]h#]h"]h&]uhjh]r&hÊ)r'}r((hUh }r)(hÎX-h"]h#]h$]h%]h&]uhj#h]r*hÐ)r+}r,(hX@A new subscriber joins the system by creating a feed definition h }r-(h$]h%]h#]h"]h&]uhj'h]r.hq)r/}r0(hX?A new subscriber joins the system by creating a feed definitionr1hj+hhhhth }r2(h$]h%]h#]h"]h&]uh(K!h]r3h=X?A new subscriber joins the system by creating a feed definitionr4…r5}r6(hj1hj/ubaubahhÝubahhêubahh‰ubeubh\)r7}r8(hXIPost Conditions - A new subscriber is recorded - A new feed is generated hhUhhhh_h }r9(h$]h%]h#]h"]h&]uh(K%h)hh]r:(hb)r;}r<(hXPost Conditionsr=hj7hhhhfh }r>(h$]h%]h#]h"]h&]uh(K%h]r?h=XPost Conditionsr@…rA}rB(hj=hj;ubaubhl)rC}rD(hUh }rE(h$]h%]h#]h"]h&]uhj7h]rFhÊ)rG}rH(hUh }rI(hÎX-h"]h#]h$]h%]h&]uhjCh]rJ(hÐ)rK}rL(hXA new subscriber is recordedrMh }rN(h$]h%]h#]h"]h&]uhjGh]rOhq)rP}rQ(hjMhjKhhhhth }rR(h$]h%]h#]h"]h&]uh(K$h]rSh=XA new subscriber is recordedrT…rU}rV(hjMhjPubaubahhÝubhÐ)rW}rX(hXA new feed is generated h }rY(h$]h%]h#]h"]h&]uhjGh]rZhq)r[}r\(hXA new feed is generatedr]hjWhhhhth }r^(h$]h%]h#]h"]h&]uh(K%h]r_h=XA new feed is generatedr`…ra}rb(hj]hj[ubaubahhÝubehhêubahh‰ubeubeubcdocutils.nodes comment rc)rd}re(hXu@startuml images/21_seq.png actor "User (Data Owner)" as user participant "Client" as app_client << Application >> user -> app_client note left Assume user authority for notification registration. end note participant "Register API" as c_reg << Coordinating Node >> app_client -> c_reg: registerForNotification (token, dataOwnerID) app_client <-- c_reg: ack or fail @endumlhh+hhhUcommentrfh }rg(U xml:spacerhUpreserverih"]h#]h$]h%]h&]uh(K4h)hh]rjh=Xu@startuml images/21_seq.png actor "User (Data Owner)" as user participant "Client" as app_client << Application >> user -> app_client note left Assume user authority for notification registration. end note participant "Register API" as c_reg << Coordinating Node >> app_client -> c_reg: registerForNotification (token, dataOwnerID) app_client <-- c_reg: ack or fail @endumlrk…rl}rm(hUhjdubaubcdocutils.nodes image rn)ro}rp(hX.. image:: images/21_seq.png hh+hhhUimagerqh }rr(UuriX!design/UseCases/images/21_seq.pngrsh"]h#]h$]h%]U candidatesrt}ruU*jssh&]uh(K6h)hh]ubhq)rv}rw(hX)*Figure 1.* Interactions for use case 21.rxhh+hhhhth }ry(h$]h%]h#]h"]h&]uh(K7h)hh]rz(cdocutils.nodes emphasis r{)r|}r}(hX *Figure 1.*h }r~(h$]h%]h#]h"]h&]uhjvh]rh=X Figure 1.r€…r}r‚(hUhj|ubahUemphasisrƒubh=X Interactions for use case 21.r„…r…}r†(hX Interactions for use case 21.hjvubeubhq)r‡}rˆ(hX **Notes**r‰hh+hhhhth }rŠ(h$]h%]h#]h"]h&]uh(K:h)hh]r‹cdocutils.nodes strong rŒ)r}rŽ(hj‰h }r(h$]h%]h#]h"]h&]uhj‡h]rh=XNotesr‘…r’}r“(hUhjubahUstrongr”ubaubhq)r•}r–(hXJAlthough conceptually simple, implementing a subscriber broadcast service that scales to tens of thousands of users and potentially billions of objects is non-trivial. The process for generating a feed entails processing accumulated logs to extract the relevant events, creating the feed entries, and rendering the feed on demand.r—hh+hhhhth }r˜(h$]h%]h#]h"]h&]uh(Kh)hh]r¡h=XSome observations:r¢…r£}r¤(hjŸhjubaubhÊ)r¥}r¦(hUhh+hhhhêh }r§(hÎX-h"]h#]h$]h%]h&]uh(K@h)hh]r¨(hÐ)r©}rª(hX`DataONE should be able to support at least one feed for each user, so say, about 100,000 feeds. hj¥hhhhÝh }r«(h$]h%]h#]h"]h&]uh(Nh)hh]r¬hq)r­}r®(hX_DataONE should be able to support at least one feed for each user, so say, about 100,000 feeds.r¯hj©hhhhth }r°(h$]h%]h#]h"]h&]uh(K@h]r±h=X_DataONE should be able to support at least one feed for each user, so say, about 100,000 feeds.r²…r³}r´(hj¯hj­ubaubaubhÐ)rµ}r¶(hXœRead operations should far exceed the number of other types of operations, thus supporting only non-read log events would significantly simplify reporting. hj¥hhhhÝh }r·(h$]h%]h#]h"]h&]uh(Nh)hh]r¸hq)r¹}rº(hX›Read operations should far exceed the number of other types of operations, thus supporting only non-read log events would significantly simplify reporting.r»hjµhhhhth }r¼(h$]h%]h#]h"]h&]uh(KCh]r½h=X›Read operations should far exceed the number of other types of operations, thus supporting only non-read log events would significantly simplify reporting.r¾…r¿}rÀ(hj»hj¹ubaubaubhÐ)rÁ}rÂ(hX‡Can we leverage an asynchronous messaging service such as XMPP or Twitter to hand off the logging / feed generation to other services? hj¥hhhhÝh }rÃ(h$]h%]h#]h"]h&]uh(Nh)hh]rÄhq)rÅ}rÆ(hX†Can we leverage an asynchronous messaging service such as XMPP or Twitter to hand off the logging / feed generation to other services?rÇhjÁhhhhth }rÈ(h$]h%]h#]h"]h&]uh(KGh]rÉh=X†Can we leverage an asynchronous messaging service such as XMPP or Twitter to hand off the logging / feed generation to other services?rÊ…rË}rÌ(hjÇhjÅubaubaubeubh)rÍ}rÎ(hX¡.. _history: https://redmine.dataone.org/projects/d1/repository/changes/documents/Projects/cicore/architecture/api-documentation/source/design/UseCases/21_uc.txtU referencedrÏKhh+hhhhh }rÐ(hh‚h"]rÑhah#]h$]h%]h&]rÒhauh(KJh)hh]ubeubehUU transformerrÓNU footnote_refsrÔ}rÕUrefnamesrÖ}r×h€]rØh{asUsymbol_footnotesrÙ]rÚUautofootnote_refsrÛ]rÜUsymbol_footnote_refsrÝ]rÞU citationsrß]ràh)hU current_lineráNUtransform_messagesrâ]rã(cdocutils.nodes system_message rä)rå}ræ(hUh }rç(h$]UlevelKh"]h#]Usourcehh%]h&]UlineKUtypeUINFOrèuh]réhq)rê}rë(hUh }rì(h$]h%]h#]h"]h&]uhjåh]ríh=X*Hyperlink target "uc21" is not referenced.rî…rï}rð(hUhjêubahhtubahUsystem_messagerñubjä)rò}ró(hUh }rô(h$]UlevelKh"]h#]Usourcehh%]h&]UlineKUtypejèuh]rõhq)rö}r÷(hUh }rø(h$]h%]h#]h"]h&]uhjòh]rùh=X-Hyperlink target "index-0" is not referenced.rú…rû}rü(hUhjöubahhtubahjñubeUreporterrýNUid_startrþKU autofootnotesrÿ]rU citation_refsr}rUindirect_targetsr]rUsettingsr(cdocutils.frontend Values ror}r(Ufootnote_backlinksr KUrecord_dependenciesr NU rfc_base_urlr Uhttps://tools.ietf.org/html/r U tracebackr ˆUpep_referencesrNUstrip_commentsrNU toc_backlinksrUentryrU language_coderUenrU datestamprNU report_levelrKU _destinationrNU halt_levelrKU strip_classesrNh:NUerror_encoding_error_handlerrUbackslashreplacerUdebugrNUembed_stylesheetr‰Uoutput_encoding_error_handlerrUstrictrU sectnum_xformrKUdump_transformsr NU docinfo_xformr!KUwarning_streamr"NUpep_file_url_templater#Upep-%04dr$Uexit_status_levelr%KUconfigr&NUstrict_visitorr'NUcloak_email_addressesr(ˆUtrim_footnote_reference_spacer)‰Uenvr*NUdump_pseudo_xmlr+NUexpose_internalsr,NUsectsubtitle_xformr-‰U source_linkr.NUrfc_referencesr/NUoutput_encodingr0Uutf-8r1U source_urlr2NUinput_encodingr3U utf-8-sigr4U_disable_configr5NU id_prefixr6UU tab_widthr7KUerror_encodingr8UUTF-8r9U_sourcer:hUgettext_compactr;ˆU generatorr<NUdump_internalsr=NU smart_quotesr>‰U pep_base_urlr?U https://www.python.org/dev/peps/r@Usyntax_highlightrAUlongrBUinput_encoding_error_handlerrCjUauto_id_prefixrDUidrEUdoctitle_xformrF‰Ustrip_elements_with_classesrGNU _config_filesrH]Ufile_insertion_enabledrIˆU raw_enabledrJKU dump_settingsrKNubUsymbol_footnote_startrLKUidsrM}rN(hjÍhh+hIhUhh+uUsubstitution_namesrO}rPhh)h }rQ(h$]h"]h#]Usourcehh%]h&]uU footnotesrR]rSUrefidsrT}rU(hI]rVhQah]rWhauub.