Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Cache method for implementing historical event subscription for publish-subscribe system

A publish-subscribe and cache technology, applied in transmission systems, electrical components, etc., can solve the problem that subscribers cannot subscribe to historical events, and achieve the effect of improving storage resource utilization, enhancing cache capacity, and simplifying cache redundancy.

Active Publication Date: 2017-01-18
江阴逐日信息科技有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to overcome the defect that subscribers cannot subscribe to historical events in the prior art, the present invention provides a caching method for realizing historical event subscription

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Cache method for implementing historical event subscription for publish-subscribe system
  • Cache method for implementing historical event subscription for publish-subscribe system
  • Cache method for implementing historical event subscription for publish-subscribe system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0045] Such as figure 1As shown, a caching method for implementing historical event subscription for a publish-subscribe system includes the following steps:

[0046] Step S1, routing table expansion step: adding cached routing information in the routing table of each proxy node, the cached routing information is used to provide routing information that can locate the cached point.

[0047] In the traditional publish-subscribe system, the routing table of each proxy node already contains subscription routing information, which is used to locate the subscribers corresponding to the event; The table is extended.

[0048] The existing routing table structure is , where filter is the filter condition, and sub_nexthops records the next-hop proxy node that forwards the event that matches the filter successfully to the direction of the subscription node; the sub_nexthops field corresponds to the subscription routing information .

[0049] Add the cache_nexthops field in the existi...

Embodiment 2

[0077]The difference between this embodiment and Embodiment 1 is that the cache point information in the event message header also includes the cache point location, the number of cache copies, and the cache timestamp, and each event cache corresponds to a cache timestamp.

[0078] Before the event is released, the initial values ​​of the location of the cache point, the number of cache copies, and the cache timestamp are all empty. During the event publishing process, for each proxy node in the publishing path, if the current proxy node is used as a cache point and cached, update the cache point location, the number of cache copies, and the cache timestamp recorded in the message header of the event, and update The location of the cache point, the number of cache copies, and the cache timestamp stored in the current proxy node.

[0079] In practical applications, the storage space in the publish-subscribe network may be exhausted. Therefore, at this time, some old caches need...

Embodiment 3

[0081] In order to streamline cache redundancy and balance between memory access efficiency and storage occupancy, this embodiment adds a cache streamlining method on the basis of Embodiment 1. The specific method is as follows:

[0082] In the event publishing step, for each proxy node, a redundancy reduction method is used to cache the event, and the redundancy reduction method is specifically:

[0083] make Represents the collection of all agent nodes in the event distribution tree, Represents an agent node in the event distribution tree, where, represents node b i The collection of all child nodes of , where, Each proxy node contains several child nodes b ij , g ij for each child node A corresponding subtree, where j=1, 2, ..., n t ; means n i b t set of subtrees.

[0084] According to the objective function Determines which subtrees of cache points to dispatch cached copies to, as shown in equation (1):

[0085]

[0086] Among them, d ij Indicate...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

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

technical field [0001] The invention relates to a publish-subscribe system technology, in particular to a caching method for realizing historical event subscription. Background technique [0002] A publish-subscribe system consists of a distributed communication network, the event broker network, and a series of endpoints communicating with each other, namely subscribers and publishers. Subscribers and publishers are interconnected through an event proxy network, and an asynchronous publish-subscribe method is used to complete data exchange. Subscribers submit subscriptions by declaring a filter condition expression. When a publisher publishes an event that meets its subscription conditions, the event is routed to the subscriber through the proxy network. In terms of time, subscription and publication of content are asynchronous, and in terms of space, subscribers and publishers do not need to care about where each other is located. Therefore, the publish-subscribe system r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08
Inventor 曹健于润胜徐钱元许文星
Owner 江阴逐日信息科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products