CN103888517B - Caching method for publishing and subscription system to achieve historical event subscription - Google Patents

Caching method for publishing and subscription system to achieve historical event subscription Download PDF

Info

Publication number
CN103888517B
CN103888517B CN201410075650.2A CN201410075650A CN103888517B CN 103888517 B CN103888517 B CN 103888517B CN 201410075650 A CN201410075650 A CN 201410075650A CN 103888517 B CN103888517 B CN 103888517B
Authority
CN
China
Prior art keywords
event
buffer
caching
agent node
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410075650.2A
Other languages
Chinese (zh)
Other versions
CN103888517A (en
Inventor
曹健
于润胜
徐钱元
许文星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangyin Daily Information Technology Co., Ltd.
Original Assignee
Shanghai Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiaotong University filed Critical Shanghai Jiaotong University
Priority to CN201410075650.2A priority Critical patent/CN103888517B/en
Publication of CN103888517A publication Critical patent/CN103888517A/en
Application granted granted Critical
Publication of CN103888517B publication Critical patent/CN103888517B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a caching method for a publishing and subscription system to achieve historical event subscription. The method includes the following steps of extending a route table, wherein cache routing information is added to the route table; processing events and calculating a caching point reference value through a hash function; publishing the events, wherein whether a current agent node serves as a cache point and carries out caching is judged through the caching point reference value, and cache routing information is updated synchronously; caching subscription; obtaining caches. The caching method has the advantages that subscription of historical events of subscribers is achieved, storage space of agents or neighbor agents on an event dispatching path are fully used, the utilization rate of storage resources is improved, caching capacity of the publishing and subscription system is enhanced, cache redundancy is simplified, and balance between visit and storage efficiency and the storage occupancy rate is achieved.

Description

The caching method realizing historical events subscription for distribution subscription system
Technical field
The present invention relates to distribution subscription system technology is and in particular to a kind of realize the caching method that historical events are subscribed to.
Background technology
Distribution subscription system comprises a distributed communication network, i.e. event agent's network, and a series of is in communication with each other End points, i.e. subscriber and publisher.Pass through event agent's network interconnection, using a kind of asynchronous between subscriber and publisher Publish-subscribe mode is completing data exchange.Subscriber passes through to state that a filtercondition expression formula submits subscription to, works as publisher Issue an event meeting its subscription condition, this event is routed to subscriber via agency network.In time, content Subscription with to issue be asynchronous, and spatially, subscriber and publisher also need not be concerned about that other side is located at where, therefore issues It is full decoupled in space, time and controlling stream that ordering system achieves communicating pair.
In traditional distribution subscription system, event notifies to be able to ensure that and eventually arrives at each subscriber interested, but Premise is each subscriber all in presence and respective subscription is known to whole system.This precondition is for dynamic It is then one to limit greatly for network environment, because client often continually adds or leaves network, the new subscriber adding An event issued before it adds network may be asked.In traditional distribution subscription system, this request is Cannot respond, thus how using event buffer mechanism so that new user can know that historical events just become issue and order System of readding needs the big problem solving.
Content of the invention
In order to overcome subscriber present in prior art cannot subscribe to the defect of historical events, the present invention provides a kind of real The caching method that existing historical events are subscribed to.The specific technical scheme of the present invention is as follows:
A kind of caching method realizing historical events subscription for distribution subscription system, comprises the steps:
Routing table expands step: sets up buffering route information in the routing table of each agent node, described cache routing letter Cease for providing the routing iinformation that can navigate to buffer;
Event processing steps: when a certain agent node sends an event, calculated by hash function, obtain one and delay Deposit a reference value;Add a message header for described event, have recorded buffer information in described message header and subscribe to path letter Breath;Described buffer information includes described buffer reference value;
Event issuing steps: according to the subscription routing information of record in described message header, described event is ordered to corresponding Read node to be issued;For each agent node in issuing path, current agent is judged according to described buffer reference value Whether node goes forward side by side row cache as buffer, and meanwhile, current agent node synchronized update corresponds to the cache way of described event By information;
Caching subscription step: a certain agent node sends a cache request, comprises subscription condition in described cache request;Will Described subscription condition is mated with the filtercondition prestoring in the routing table of current agent node, determines caching event;Described Caching event refers to, event corresponding with the subscription condition filtercondition that the match is successful;
Caching obtaining step: if comprising described caching event corresponding cache routing letter in the routing table of current agent node Breath, then directly find the corresponding buffer of described caching event according to this buffering route information, cache request be forwarded to caching Point, obtains caching;If not comprising the corresponding buffering route information of described caching event, root in the routing table of current agent node According to the corresponding subscription routing iinformation of described caching event, cache request is sent to next agent node, revolution executes caching Obtaining step.
As prioritization scheme, shown in described hash function such as formula (1):
The domain of definition of this hash function is the span (a, b) of event e, and codomain is [0, max_hop];Wherein max_ Hop is the ultimate range to its root node for the agent node on case distribution path.
Calculated buffer reference value is an integer value.
As prioritization scheme, judge current agent node whether as buffer and carry out according to described buffer reference value Caching particularly as follows:
Described buffer reference value t is first subtracted 1 after receiving event by current agent node, is then entered according to buffer reference value Row judges, if t=0, by current agent node as buffer.
As prioritization scheme, described routing table expand step particularly as follows:
Increase cache_nexthops field so that the structure of described routing table is in the routing table of each agent node:
<filter|sub_nexthops|cache_nexthops>
Wherein, filter refers to filtercondition, and sub_nexthops have recorded with the filter event that the match is successful to ordering Read the next-hop agency of node direction forwarding, cache_nexthops have recorded with the filter cache request that the match is successful to slow Deposit the next-hop agency of a direction forwarding.
As prioritization scheme, in described event issuing steps, for current agent node in issuing process for the event, its The update method of buffering route information particularly as follows:
If current agent node, at the rear of buffer, the next-hop in buffering route information is set to the generation of forerunner Reason node;
If current agent node is just buffer, the next-hop in buffering route information is set to current agent section Point itself;
If current agent node, in the front of buffer, the next-hop in buffering route information is set to follow-up generation Reason node.
As prioritization scheme, in described caching obtaining step, cache request is forwarded to the method that buffer obtains caching Particularly as follows:
Record, during cache request is forwarded to buffer, the agent node passing through on the way successively, be designated as cache request Path;Cache request reach buffer after, buffer by ask caching along cache request path backward be sent to send slow Deposit the agent node of request.
As prioritization scheme, in described event issuing steps, if current agent node as buffer go forward side by side row cache when, Judged: if the memory space of current agent node exhausts, inquire immediate neighbor outside this event issuing path whether Still there is free memory;If this neighbour has free memory, event forwarding is entered row cache to this neighbour.
As prioritization scheme, described buffer information also includes buffer position, cached copies number and cache-time Stamp, the initial value of described buffer position, cached copies number and cache-time stamp is sky;For each in issuing path Agent node, if current agent node as buffer go forward side by side row cache when, in the message header of update event record buffer Position, cached copies number and cache-time stamp, the buffer position, the caching that update the storage of current agent node memory secondary simultaneously This number and cache-time stamp.
As prioritization scheme, in event in issuing process, the cache-time stamp of more each agent node, obtains the most on the way The position of old caching, when event arrives at subscription node, if the memory space on whole piece issuing path exhausts, transfers back to oldest Oldest caching is deleted in the position of caching.
As prioritization scheme, in described event issuing steps, for each agent node, using redundancy reduction method to thing Part enters row cache, described redundancy reduction method particularly as follows:
If agent node is bi, it comprises some child nodes bijIf, gijFor each child node bijCorresponding subtree;According to Object functionDetermined which subtree that the copy of caching is assigned to buffer, such as shown in formula (2):
Wherein, dijRepresent agent node btApart from subtree gijThe ultimate range of terminal temperature difference, rijRepresent agent node btConnect Receive from subtree gijUser's request sum, sijRepresent subtree gijIn the total storage idleness of all nodes, t be buffer Reference value;Object functionMolecule represent a Replica placement of event in subtree gijWhen upper, user obtains this copy Overhead;Wherein, the Section 1 of molecule is subtree gijExpense during this copy of the user's request of end, the Section 2 then table of molecule Show remaining subtreeOn this copy of user's request when overhead;
Agent node btFor each child node bijRespectively calculate a targetSelect its value minimum m=min { k, ni} Stalk tree gt1, gt2..., gtmAssign copy, and correspondingly will be sent to child node bt1, bt2..., btmEvent copy number K modifies according to formula (3):
Other child nodes b will be sent tottCopy number k of event be set to ki=0 (m < l≤nt), corresponding t value returns 0.
Compared with prior art, the method have the advantages that
(1) caching method that the present invention provides achieves the subscription to historical events for the subscriber;
(2) present invention takes full advantage of the memory space of all agencies and its neighbours agency on case distribution path, improves Utilization ratio of storage resources, enhances the caching capabilities of distribution subscription system;
(3) present invention simplifies to caching redundancy, balances between memory access efficiency and storage occupancy.
Brief description
The general flow chart of the caching method that Fig. 1 provides for the present invention;
Fig. 2 is the network diagram of distribution subscription system in embodiment 1.
Specific embodiment
Describe the present invention below in conjunction with the accompanying drawings by way of example in detail.
Embodiment 1:
As shown in figure 1, a kind of caching method realizing historical events subscription for distribution subscription system, walk including following Rapid:
Step s1, routing table expands step: sets up buffering route information in the routing table of each agent node, described caching Routing iinformation is used for providing the routing iinformation that can navigate to buffer.
In traditional distribution subscription system, comprise in the routing table of each agent node to subscribe to routing iinformation, for positioning To the corresponding subscriber of event;In order that distribution subscription system supports caching, on this basis, set up buffering route information, right Routing table is extended.
Existing router-table structure is < filter | sub_nexthops >, wherein filter is filtercondition, sub_ Nexthops then have recorded with the filter event that the match is successful to the next-hop agent node subscribing to node direction forwarding;Should Sub_nexthops field corresponds to and subscribes to routing iinformation.
Increase cache_nexthops field so that the structure of described routing table is in existing router-table structure:
< filter | sub_nexthops | cache_nexthops >
Wherein, cache_nexthops have recorded with the filter cache request that the match is successful to buffer direction forwarding Next-hop is acted on behalf of, and this cache_nexthops field corresponds to buffering route information.This cache_nexthops field is in thing Construct along distribution path hop-by-hop in part issuing process, effect is that the cache request for user provides routing iinformation so as to can look for To buffer, as sub_nexthops helps event to find subscriber.
Step s2, event processing steps: when a certain agent node sends an event, calculated by hash function, Obtain a buffer reference value;Add a message header for described event, have recorded buffer information in described message header and order Read routing information;Described buffer information includes described buffer reference value.
This step be publisher to before subscriber's transmission event, in order to realize caching and the process that carries out.Hypothesis event e Span be e, value ∈ (a, b), publisher is determined which on path of event buffer by following hash function A little nodes, such as shown in formula (1):
Wherein, the domain of definition of this hash function is event e span (a, b), and codomain is then [0, max_hop], its Middle max_hop is that the ultimate range of the agent node on case distribution path to its root node (can be disappeared by prior transmission exploration Breath obtains), in terms of jumping figure.When event e does not have distribution path, it is mapped to the 0th jump, i.e. root node.
It is calculated buffer reference value, this buffer reference value is an integer value.The result of Hash mapping obtains The agent identifier of buffer reference value not buffer, but the jumping figure variable t of a similar subtraction count device, record be The buffer of this event and the distance of current agent node.After carrying out Hash operation, which agency's section can not be determined at once Point is buffer, needs, in event issuing process, to be determined according to buffer reference value by each agent node on issuing path Whether itself is as buffer.By the buffer calculating reference value record in the message header of event, issue with event. Subscription routing information have recorded event and is sent to subscriber's routing information to be passed through from publisher.
Step s3, event issuing steps: according to the subscription routing information of record in described message header, by described event to right The subscription node answered is issued;For each agent node in issuing path, judge to work as according to described buffer reference value Whether front agent node goes forward side by side row cache as buffer, and meanwhile, current agent node synchronized update corresponds to described event Buffering route information.
In this step, judge that whether current agent node goes forward side by side row cache tool as buffer according to buffer reference value Body is:
Buffer reference value t is first subtracted 1 after receiving event by current agent node, is then judged according to its value, if t= 0, then current agent node is i.e. as buffer.
When entering row cache it is possible to current agent node occurs the full situation of memory space, in order to make full use of Memory space in network, before entering row cache, makes the following judgment: if the memory space of current agent node exhausts, Inquire whether the immediate neighbor outside this event issuing path still has free memory;If this neighbour has free memory, Then event forwarding is entered row cache to this neighbour.The utilization rate of the memory space of whole system can be improved using the method.
, after completing buffer and judging, needing should in the routing table of synchronized update current agent node for current agent node The corresponding buffering route information of event.The update method of buffering route information is specifically, include three kinds of situations: and relative configurations are slow Deposit route:
Situation one: if t < 0, that is, through buffer, current agent node is located at the downstream of buffer for the forwarding of event, Then the next-hop in buffering route information is set to the agent node of forerunner;
Situation two: if t=0, that is, current agent node is just buffer, then set the next-hop in buffering route information It is set to current agent node itself;
Situation three: if t > 0, i.e. the forwarding of event does not also reach buffer, current agent node in the front of buffer, Then the next-hop in buffering route information is set to follow-up agent node.
All carry out judgement and the buffering route information of above-mentioned buffer in each of event issuing process agent node The operation updating.When event is sent to subscriber, all of buffer all has determined that row cache of going forward side by side, the institute in issuing path Agent node is had all to update buffering route information.
Step s4, caches subscription step: a certain agent node sends a cache request, comprises to subscribe in described cache request Condition;Described subscription condition is mated with the filtercondition prestoring in the routing table of current agent node, is determined caching thing Part;Described caching event refers to, event corresponding with the subscription condition filtercondition that the match is successful.
In this step, when subscriber access distribution subscription system after, to subscribe to historical events, that is, be intended to from Required content is subscribed in the event of caching.The subscription request sending during similar to the event of subscription, subscribes to during caching by sending One cache request is realized.If cache request is requset (δ f), δ f therein is subscription condition.
Step s5, caches obtaining step: if it is corresponding slow to comprise described caching event in the routing table of current agent node Deposit routing iinformation, then directly the corresponding buffer of described caching event is found according to this buffering route information, cache request is turned It is dealt into buffer, obtain caching;If not comprising the corresponding cache routing of described caching event in the routing table of current agent node Information, then according to the corresponding subscription routing iinformation of described caching event, cache request is sent to next agent node, revolution Execution caching obtaining step.
Specifically, in this step, the two kinds of situations that include that cache are obtained:
(1) comprise the corresponding buffering route information of caching event in routing table, that is, the user subscribing to historical events occurs in In the distribution path of its interesting event.At this moment cache request can find event buffer point with direct basis cache_nexthops. Record, during cache request forwarded hop-by-hop to buffer, the agent node passing through on the way successively, be designated as cache request road Footpath;After cache request reaches buffer, the caching asked is sent to and sends caching along the backward in cache request path by buffer The agent node of request.
(2) do not comprise the corresponding buffering route information of caching event in routing table, that is, the user subscribing to historical events does not exist In the distribution path of its interesting event.According to the caching corresponding sub_nexthops of event, cache request is sent to the next one Agent node.Next agent node repeats aforesaid operations, until finding event buffer point.
The caching method that the present embodiment is provided that cites an actual example below is described in detail, and Fig. 2 gives issue and orders Read the network diagram of system, wherein, a~e represents 5 agent nodes, p represents the agent node at publisher place, s1Represent The agent node that user (subscriber) is located.
Assume user s1Filtercondition be f1, publisher p issued one and met filtercondition f1Event e1And select Act on behalf of d as buffer, e1Take this buffer information to be mated to subscriber's hop-by-hop along distribution path a → b → d → e from publisher Forward.Act on behalf of a by event and f1The match is successful, reads the buffer information in event message head and finds that its buffer is located at certainly Own downstream, then adds subscription route next jump node (acting on behalf of b) that the match is successful to cache_nexthops field, shows The cache lookup request receiving in the future can be transmitted to b.B also can carry out similar operation and look into descendant node d as caching The next-hop looked for.D finds after receiving event oneself to be chosen as buffer, then by event be stored in local and by oneself add to Cache routing next-hop.Act on behalf of e and then e is learnt according to the buffer information in event message head1It has been buffered in case distribution road Upstream in footpath, then using precursor node d as cache routing next-hop.Thus hop-by-hop completes the structure of buffering route information Make.
Assume a new user s2It is connected to and act on behalf of e request event e1, due to new user s2Occur in event e1Issue On path, e searches routing table and f1After the match is successful, forward a request to cache next-hop according to cache_nexthops (acting on behalf of d), thus finding event buffer, is (1st) the kind situation mentioned in step s5.
If s2Acting on behalf of at c, due to new user s2Not in event e1Issuing path on, the c f that the match is successful1Table There is not buffering route information (nil), at this moment cache request can be turned to subscriber direction by it according to sub_nexthops in Send out, that is, be transmitted to and act on behalf of b, and b is just at e1Distribution path on, will be able to be asked according to cache routing cache_nexthops Ask and be transmitted to d, so finally also have found caching, be (2nd) the kind situation mentioned in step s5.Request message forwards During can record successively on the way id through node, the cache request of user eventually arrives at when acting on behalf of d, wherein contains one Node link: s2→ c → b, i.e. cache request path.Act on behalf of d to seal the event content that user is asked together with this link Dress up response message response (e1, s2→ c → b), along link reverse back to user, complete the response of cache request.
Embodiment 2:
The present embodiment is with the difference of embodiment 1, the buffer information in event message head also include buffer position, Cached copies number and cache-time stamp, each event buffer corresponding cache-time stamp.
Before event is issued, the initial value of described buffer position, cached copies number and cache-time stamp is sky. In event issuing process, for each agent node in issuing path, if current agent node as buffer and is carried out During caching, in the message header of update event, the buffer position of record, cached copies number and cache-time stamp, update simultaneously The buffer position of current agent node memory storage, cached copies number and cache-time stamp.
In actual applications it is possible to situation that memory space in distribution subscription network exhaust occurs, therefore, now Need to delete some old cachings, discharge memory space and be supplied to new caching.In the present embodiment, specifically using as lower section Method: in event in issuing process, the cache-time stamp of more each agent node, obtains the position of oldest caching, work as thing on the way When part arrives at subscription node, if the memory space on whole piece issuing path exhausts, the position transferring back to oldest caching is deleted Old caching.
Embodiment 3:
In order to simplify to caching redundancy, it is balanced between memory access efficiency and storage occupancy, the present embodiment exists The method that caching is simplified is added, concrete grammar is as follows on the basis of embodiment 1:
In event issuing steps, for each agent node, row cache is entered to event using redundancy reduction method, described Redundancy reduction method particularly as follows:
OrderRepresent the set of all agent nodes in case distribution tree,Represent one of case distribution tree Agent node, wherein, Represent node biAll child node set, wherein, Each agent node is to comprise some child nodes bij, gijFor each child nodeA corresponding stalk tree, wherein j =1,2 ..., ntRepresent niThe b that stalk tree collectively formstSubtree collection.
According to object functionDetermined which subtree that the copy of caching is assigned to buffer, such as shown in formula (1):
Wherein, dijRepresent agent node btApart from subtree gijThe ultimate range of terminal temperature difference, rijRepresent agent node biConnect Receive from subtree gijUser's request sum, sijRepresent subtree gijIn the total storage idleness of all nodes, t be buffer Reference value;Object functionMolecule represent a Replica placement of event in subtree gijWhen upper, user obtains this copy Overhead;Wherein, the Section 1 of molecule is subtree gijExpense during this copy of the user's request of end, the Section 2 then table of molecule Show remaining subtreeOn this copy of user's request when overhead.
Here apart from dtj- t and dti+ t is an approximation, and each agent node cannot learn definitely opening up of subtree Flutter structure, so it is equivalent to buffer distance to be approximately considered each user.The overhead of cache request is less, or always deposits in subtree Storage space idleness is bigger, then target function value is less.
Agent node btFor each child node bijRespectively calculate a targetSelect its value minimum m=min { k, nt} Stalk tree gt1, gt2..., gtmAssign copy, and correspondingly will be sent to child node bt1, bt2..., btmEvent copy number K modifies according to formula (2):
Other child nodes b will be sent tottCopy number k of event be set to ki=0 (m < l≤nt), corresponding t value returns 0.
Each carries out above-mentioned process as the agent node of buffer, thus being completed in a distributed manner by each agent node The depositing of cached copies.
A specific embodiment being only the application disclosed above, but the application is not limited to this any this area What technical staff can think change, all should fall in the protection domain of the application.

Claims (10)

1. a kind of caching method realizing historical events subscription for distribution subscription system is it is characterised in that include following walking Rapid:
Routing table expands step: sets up buffering route information in the routing table of each agent node, described buffering route information is used The routing iinformation of buffer can be navigated in offer;
Event processing steps: when a certain agent node sends an event, calculated by hash function, obtain a buffer Reference value;Add a message header for described event, have recorded buffer information in described message header and subscribe to routing information;Institute State buffer information and include described buffer reference value;
Event issuing steps: according to the subscription routing information of record in described message header, described event is subscribed to section to corresponding Point is issued;For each agent node in issuing path, current agent node is judged according to described buffer reference value Whether go forward side by side row cache as buffer, meanwhile, current agent node synchronized update corresponds to the cache routing letter of described event Breath;
Caching subscription step: a certain agent node sends a cache request, comprises subscription condition in described cache request;Will be described Subscription condition is mated with the filtercondition prestoring in the routing table of current agent node, determines caching event;Described caching Event refers to, event corresponding with the subscription condition filtercondition that the match is successful;
Caching obtaining step: if comprising the corresponding buffering route information of described caching event in the routing table of current agent node, Then directly the corresponding buffer of described caching event is found according to this buffering route information, cache request is forwarded to buffer, Obtain caching;If not comprising the corresponding buffering route information of described caching event, basis in the routing table of current agent node The corresponding subscription routing iinformation of described caching event, cache request is sent to next agent node, and revolution execution caching obtains Take step.
2. caching method according to claim 1 is it is characterised in that described hash function such as formula (1) is shown:
The domain of definition of described hash function is the span (a, b) of event e, and codomain is [0, max_hop];Wherein max_hop It is the ultimate range to its root node for the agent node on case distribution path.
3. caching method according to claim 2 is it is characterised in that judge current agent according to described buffer reference value Node whether as buffer go forward side by side row cache particularly as follows:
Described buffer reference value t is first subtracted 1 after receiving event by current agent node, is then sentenced according to buffer reference value Disconnected, if t=0, by current agent node as buffer.
4. caching method according to claim 1 it is characterised in that described routing table expand step particularly as follows:
Increase cache_nexthops field so that the structure of described routing table is in the routing table of each agent node:
<filter|sub_nexthops|cache_nexthops>
Wherein, filter refers to filtercondition, and sub_nexthops have recorded with the filter event that the match is successful to subscription section The next-hop agency of point direction forwarding, cache_nexthops have recorded with the filter cache request that the match is successful to buffer The next-hop agency of direction forwarding.
5. caching method according to claim 4 is it is characterised in that in described event issuing steps, sending out for event Current agent node during cloth, the update method of its buffering route information particularly as follows:
If current agent node, at the rear of buffer, the next-hop in buffering route information is set to agency's section of forerunner Point;
If current agent node is just buffer, the next-hop in buffering route information is set to current agent node certainly Body;
If current agent node, in the front of buffer, the next-hop in buffering route information is set to follow-up agency's section Point.
6. caching method according to claim 5 is it is characterised in that in described caching obtaining step, cache request is turned Be dealt into buffer obtain caching method particularly as follows:
Record, during cache request is forwarded to buffer, the agent node passing through on the way successively, be designated as cache request road Footpath;After cache request reaches buffer, the caching asked is sent to and sends caching along the backward in cache request path by buffer The agent node of request.
7. caching method according to claim 1 is it is characterised in that in described event issuing steps, if current agent section Point as buffer go forward side by side row cache when, judged: if the memory space of current agent node exhausts, inquire that this event is sent out Whether the immediate neighbor outside cloth path still has free memory;If this neighbour has free memory, by event forwarding Enter row cache to this neighbour.
8. caching method according to claim 1 it is characterised in that described buffer information also include buffer position, Cached copies number and cache-time stamp, the initial value of described buffer position, cached copies number and cache-time stamp is equal For sky;For each agent node in issuing path, if current agent node as buffer go forward side by side row cache when, update thing In the message header of part, the buffer position of record, cached copies number and cache-time stamp, update current agent node simultaneously The buffer position of memory storage, cached copies number and cache-time stamp.
9. caching method according to claim 8 is it is characterised in that in event in issuing process, more each generation on the way The cache-time stamp of reason node, obtains the position of oldest caching, when event arrives at subscription node, if on whole piece issuing path Memory space exhausts, then oldest caching is deleted in the position transferring back to oldest caching.
10. caching method according to claim 1 is it is characterised in that in described event issuing steps, act on behalf of for each Node, enters row cache using redundancy reduction method to event, described redundancy reduction method particularly as follows:
If agent node is bi, it comprises some child nodes bijIf, gijFor each child node bijCorresponding subtree;According to target letter NumberDetermined which subtree that the copy of caching is assigned to buffer, such as shown in formula (2):
Wherein, dijRepresent agent node biApart from subtree gijThe ultimate range of terminal temperature difference, rijRepresent agent node biReceive From subtree gijUser's request sum, sijRepresent subtree gijIn the total storage idleness of all nodes, t be buffer reference Value;Object functionMolecule represent a Replica placement of event in subtree gijWhen upper, user obtains always opening of this copy Pin;Wherein, the Section 1 of molecule is subtree gijExpense during this copy of the user's request of end, the Section 2 of molecule then represents it Minor treeOn this copy of user's request when overhead;
Agent node biFor each child node bijRespectively calculate a targetSelect its value minimum m=min { k, niStalk Tree gi1, gi2..., gimAssign copy, and correspondingly will be sent to child node bl1, bl2..., blmEvent copy number k root Modify according to formula (3):
Other child nodes b will be sent toiiCopy number k of event be set to kl=0 (m < l≤ni), corresponding t value returns 0.
CN201410075650.2A 2014-03-04 2014-03-04 Caching method for publishing and subscription system to achieve historical event subscription Active CN103888517B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410075650.2A CN103888517B (en) 2014-03-04 2014-03-04 Caching method for publishing and subscription system to achieve historical event subscription

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410075650.2A CN103888517B (en) 2014-03-04 2014-03-04 Caching method for publishing and subscription system to achieve historical event subscription

Publications (2)

Publication Number Publication Date
CN103888517A CN103888517A (en) 2014-06-25
CN103888517B true CN103888517B (en) 2017-01-18

Family

ID=50957233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410075650.2A Active CN103888517B (en) 2014-03-04 2014-03-04 Caching method for publishing and subscription system to achieve historical event subscription

Country Status (1)

Country Link
CN (1) CN103888517B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9733995B2 (en) * 2014-12-17 2017-08-15 Intel Corporation Scalable synchronization mechanism for distributed memory
CN106790402B (en) * 2016-11-29 2020-10-23 苏州浪潮智能科技有限公司 Parallel distribution method and system for middleware data of information system structure
CN112835911B (en) * 2021-03-10 2022-12-02 四川大学华西医院 Master data management system suitable for medical information platform
CN113904979A (en) * 2021-10-09 2022-01-07 南京工业职业技术大学 Content-based routing service method supporting flow regulation of publish-subscribe system
CN114844948B (en) * 2021-12-14 2024-05-31 合肥哈工轩辕智能科技有限公司 Client cache optimization method and device of real-time distribution system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170522A (en) * 2007-12-03 2008-04-30 华为技术有限公司 A method and system for distributing history events
CN102891797A (en) * 2012-07-02 2013-01-23 上海交通大学 Publishing and subscription method capable of supporting message duration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170522A (en) * 2007-12-03 2008-04-30 华为技术有限公司 A method and system for distributing history events
CN102891797A (en) * 2012-07-02 2013-01-23 上海交通大学 Publishing and subscription method capable of supporting message duration

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Caching in content-based publish/subscribe systems";V.Sourlas等;《Proc. 28th IEEE Conference on Global Telecommunications》;20091204;第1-8页 *
"Caching Mechanism In Publish Subscribe Network";Hongjie Tan , Jian Cao , Minglu Li;《The 7th International Conference on Intelligent Systems and Knowledge Engineering》;20131123;第641-652页 *
"Controlling historical information dissemination in publish/subscribe";Singh J., Eyers D. M., Bacon J.;《proceedings of the 2008 Workshop on Middleware Security (MidSec2008)》;20081230;第34–39页 *
"Historic data access in publish/subscribe";Li G., Cheung A., Hou S., Hu S.等;《Proceedings of the 2007 inaugural international Conference on Distributed Event-Based Systems(DEBS 2007)》;20071230;第80–84页 *

Also Published As

Publication number Publication date
CN103888517A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
CN103888517B (en) Caching method for publishing and subscription system to achieve historical event subscription
CN107317842B (en) Block chain synchronous method and device based on NDN
CN102045252B (en) Self adaptation multiplex roles for content networking uses
CN101529809B (en) Distributed storage of routing information in a link state protocol controlled network
US5881246A (en) System for generating explicit routing advertisements to specify a selected path through a connectionless network to a destination by a specific router
JP2017069950A (en) Information centric network by small multi-pass or single-pass transfer state
KR20160076445A (en) System and method for efficient name-based content routing using link-state information in information-centric networks
CN100464531C (en) Bus protocol
CN100372347C (en) 4 over 6 tunnel packing and depacking method for extending boundary gateway protocol
CN106533733B (en) The CCN collaboration caching method and device routed based on network cluster dividing and Hash
JP6544401B2 (en) PACKET TRANSFER DEVICE, CONTROL DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND PROGRAM
Scherb et al. Resolution strategies for networking the IoT at the edge via named functions
JP2004507159A (en) Method of high performance addressing and routing of data packets with semantic descriptive labels in computer networks
CN105872008A (en) System and method for on-demand content exchange with adaptive naming in information-centric networks
CN105683929A (en) Method and equipment for sensing router by database and memory
CN100566292C (en) Radio network group relationship routing system and method that part connects
CN113810287B (en) Data retrieval and pushing method based on NDN and SDN
US7930379B2 (en) Interface for a delay-tolerant network
CN106059921A (en) Content routing system of network layer based on software defined networking (SDN) technology and content-centric networking (CCN) frame and working mode thereof
CN108111410A (en) Deadlock freedom routing in lossless multidimensional Cartesian Topology Structure with minimum number virtual buffering region
KR20090110916A (en) Method, bridge and computer network for calculating a spanning tree based on link state advertisementlsa
CN104508651A (en) Connection mesh in mirroring asymmetric clustered multiprocessor systems
CN104380289A (en) Service-aware distributed hash table routing
US10536368B2 (en) Network-aware routing in information centric networking
CN108141463A (en) For Internet of Things resource discovering and the distributive resources list based on ICN of routing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200116

Address after: Room 1709, Building No. 8, Binjiang West Road, Jiangyin City, Wuxi City, Jiangsu Province

Patentee after: Jiangyin Daily Information Technology Co., Ltd.

Address before: 200240 Dongchuan Road, Shanghai, No. 800, No.

Patentee before: Shanghai Jiaotong University