Source: https://patents.google.com/patent/US20170244657A1/en
Timestamp: 2019-12-08 14:16:44
Document Index: 729565026

Matched Legal Cases: ['art1', 'art1', 'art1', 'art1', 'art1', 'art1', 'art1', 'art1']

US20170244657A1 - Message delivery in a message system - Google Patents
Message delivery in a message system Download PDF
US20170244657A1
US20170244657A1 US15/049,252 US201615049252A US2017244657A1 US 20170244657 A1 US20170244657 A1 US 20170244657A1 US 201615049252 A US201615049252 A US 201615049252A US 2017244657 A1 US2017244657 A1 US 2017244657A1
US15/049,252
US10225219B2 (en
2016-02-22 Priority to US15/049,252 priority Critical patent/US10225219B2/en
2016-02-22 Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: JOHNSON, ANDREW, JOHNSON, PETER J., BALDWIN, TIMOTHY J., XU, FENGLIAN
2016-03-24 Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: XU, FENGLIAN, JOHNSON, ANDREW, JOHNSON, PETER J., BALDWIN, TIMOTHY J.
2017-08-24 Publication of US20170244657A1 publication Critical patent/US20170244657A1/en
2019-03-05 Publication of US10225219B2 publication Critical patent/US10225219B2/en
108020004254 SET2 subfamily Proteins 0 description 14
102100007585 SETD1A Human genes 0 description 14
102100000940 SETD2 Human genes 0 description 14
108060005170 MYT1 family Proteins 0 description 11
102100017128 MYT1 Human genes 0 description 10
102100006830 PKMYT1 Human genes 0 description 10
101700077014 AMPP2 family Proteins 0 description 2
101700070809 GYL1 family Proteins 0 description 2
Control of message delivery from publisher devices to a subscriber application of a messaging system is provided. The subscriber application has a subscription registered with a broker application of the messaging system and is only permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices. The method includes: altering a topic identifier of a message from a publisher device to a modified topic identifier, and altering a subscription identifier from a subscriber application to a modified subscription identifier; analyzing the modified topic identifier and the modified subscription identifier to determine if the message is to be communicated to the subscriber application, and if so, information is removed from the modified topic identifier to form a reverted topic identifier, and the message and reverted topic identifier are communicated to the subscriber application.
The present invention relates to the field of message delivery in a message system, and more specifically, to controlling message delivery from publisher devices to a subscriber application.
Publish/subscribe is a messaging mechanism by which subscriber applications (hereinafter referred to as “subscribers”) may receive information, in the form of messages, from publisher devices (hereinafter referred to as “publishers”). In this context, a message is a unit of data (such as one or more bits or a string of data). A typical publish/subscribe system has more than one publisher and more than one subscriber.
According to one or more aspects, a computer-implemented method is provided for controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices. The method includes: altering a topic identifier of a message from a publisher device to a modified topic identifier comprising a description of the topic of the message, and a set of one or more publisher devices that the publisher device belongs to; altering a subscription identifier from a subscriber application to a modified subscription identifier comprising a description of the topic of the subscription, and a predetermined set of one or more publisher devices that a message is permitted to be received from; analyzing the modified topic identifier and the modified subscription identifier to determine if the message is to be communicated to the subscriber application, and if the message is to be communicated to the subscriber application, removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier to form a reverted topic identifier, communicating the message and reverted topic identifier to the subscriber application.
According to one or more other aspects, a computer program product is provided for controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices, wherein the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions being executable by a processing unit to cause the processing unit to perform a method comprising: altering a subscription identifier from a subscriber application to a modified subscription identifier comprising a description of the topic of the subscription, and a predetermined set of one or more publisher devices that a message is permitted to be received from; analyzing the modified topic identifier and the modified subscription identifier to determining if the message is to be communicated to the subscriber application; and where the message is to be communicated to the subscriber application, removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier to form a reverted topic identifier, and communicating the message and reverted topic identifier to the subscriber application.
In one or more further aspects, a system is provided for controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices. The system includes a memory, and a processor communicatively coupled to the memory, wherein the system performs a method comprising: altering a subscription identifier from a subscriber application to a modified subscription identifier comprising a description of the topic of the description, and a predetermined set of one or more publisher devices that a message is permitted to be received from; analyzing the modified topic identifier and the modified subscription identifier to determine if the message is to be communicated to the subscriber application, and if the message is to be communicated to the subscriber application, removing the description of the set of one or more publisher devices that the publisher device bellows to from the modified topic identifier to form a reverted topic identifier, communicating the message and reverted topic identifier to the subscriber application.
Several embodiments of the present invention are described below, by way of example only, with reference to the drawings, in which:
FIG. 1 is a block diagram of an example embodiment of a messaging system according to an embodiment wherein the example of a first publisher device of a first set of devices publishing a message is illustrated, in accordance with one or more aspects of the present invention;
FIG. 2 illustrates a modification to the embodiment of FIG. 1, wherein the example of a second publisher device of a second set of devices publishing a message is illustrated, in accordance with one or more aspects of the present invention;
FIG. 3 is a flow chart of a method, in accordance with one or more aspects of the present invention; and
FIG. 4 is a schematic block diagram of a system, in accordance with one or more aspects of the present invention.
It should be understood that the figures are merely schematic and are not drawn to scale. It should also be understood that the same reference numerals used throughout different figures designate the same or similar parts.
Interactions between publishers and subscribers may be controlled by components of a general purpose messaging system, such as a queue manager or by a component known as a message broker (or broker application). A messaging system is a service to which applications may connect, and a queue is an ordered list of messages maintained by the messaging system. Applications may place a message on a queue or request a message from a queue. The distinction between a queue manager and a message broker/broker application is not relevant to the present subject matter and these terms may be used interchangeably within the following description.
Publishers (such as publisher devices) supply information about a subject, without needing to know anything about the applications that are interested in that information. Publishers generate this information in the form of messages, called publications, that they want to publish, and define the topic of these messages. Typically, the controlling component (e.g. broker application) receives messages from publishers and subscriptions identifying subscribers on one or more topics. It then routes the published messages to the subscribers that have a registered interest in the topic(s).
Subscribers create subscriptions that describe the topic that the subscriber is interested in. Thus, the subscription determines which publications are forwarded to the subscriber. Subscribers may make multiple subscriptions and may receive information from many different publishers.
For example, Message Queuing Telemetry Transport (MQTT) is a known message publish/subscribe system. MQTT employs topic strings to separate the space of messages (rather like directories and subdirectories in hierarchical file systems). Messages are published to topics, and subscribers subscribe to topics so they only receive messages they are interested in. By way of example, a message published to a topic string of: “mytopic1/sect1/part1/type3/data” would match a subscribe to: “mytopic1/sect1/part1/type3/data”
MQTT employs the concept of wild cards in topic strings for subscriptions, with “+” matching one level and a trailing “#” matching any number of levels below. Wild card # matches any number of topic levels, so the following subscriptions would match to the published topic string above (of: “mytopic1/sect1/part1/type3/data”):
“mytopic1/sect1/part1/type3/#”
“mytopic1/sect1/part1/#”
“mytopic1/sect1/#”
“mytopic1/#”
“mytopic1/+/part1/type3/data”
“mytopic1/sect1/+/type3/data”
“mytopic1/sect1/+/+/data”
“mytopic1/+/part1/+/data”.
Conversely, the subscription “mytopic1/sect1/+/type2/data” would not match to the published topic string above (of: “mytopic1/sect1/part1/type3/data”).
A drawback is that publication of a message may be a costly operation for the publisher and/or the broker. For example, if the publisher is a low-powered sensor which requires the use of a radio to publish a message, publication of a message will consume much-needed battery power. Also, if a message to be published is very large, a large amount of resources may be required to publish the message.
It is therefore desirable for a publisher to avoid unnecessary publication of messages, such as when there are no subscribers for the topic of the message for example. One possible approach to address this is for the publisher to transmit information about the message topic to the broker and ask whether there are any subscriptions matching the topic. However, this approach requires a request/response conversation between the publisher and broker. Also, if the publisher is publishing messages about many different topics, many conversations may be required.
Further, subscriber applications may only be authorized to receive published messages from certain publisher devices. For example, since publisher devices can be grouped into ‘bunches’ or ‘sets’, and a subscriber application can be authorized to subscribe to a particular set of publisher devices, the subscriber application will then only receive data from devices in that set of publisher devices. Publisher devices may however be members of (e.g. belong to, or be included in) more than one set. Republishing each message to every set a device is a member of is therefore sub-optimal in terms of resource usage or efficiency. Also, another approach may be to have multiple subscriptions, one for each device in a set. This, however, exhibits a similar problem in that each subscription by a subscriber application is then converted to multiple subscriptions, one for each device. The broker application then needs to handle all the different subscriptions and match each device message with a subscription, which is again sub-optimal in terms of resource usage or efficiency.
Detailed herein is a concept for enabling flexible subscriptions such that different subscriber applications can use different topic strings to subscribe to the messages from sets of devices. The concept may be employed in a messaging system comprising sets of publisher devices, a broker (e.g. broker application) and a subscriber application. It may be such that the subscriber application is only permitted to receive messages relating to a topic of the subscription from a predetermined set of publisher devices.
As disclosed herein, modified topic identifiers and modified subscriber identifiers may be generated, which may then be used (e.g. processed or analysed by a broker application) to control the delivery of published messages to the subscriber application(s). Prior to delivery to a subscriber application, the modified topic identifier may be reverted back to its original form. In this way, new capabilities may be added to existing messaging systems.
For instance, an embodiment may not involve changing a MQTT broker, but instead a proxy application may be inserted between (i) the broker and (ii) the publisher devices and subscriber applications. Such a proxy application may, for example, intercept messages from a publisher device and undertake modification of the topic identifiers before communicating the modified topic identifiers to the broker. Similarly, the proxy application may intercept subscriptions from a subscriber application and undertake modification of the subscription identifiers before communicating the modified subscription identifiers to the broker. The proxy application may also then intercept messages from the broker and revert the modified topic identifiers back to their original form before communicating the message to the intended/target subscriber application.
One or more embodiments may therefore employ MQTT matching and wildcards to efficiently subscribe to messages from different sets of devices and perform message authorization and filtering. Also, an existing MQTT broker, like Really Small Message Broker (RSMB), may inject and remove topic prefixes, but only for separate end points. The publisher can determine if there is any need to publish the message and thereby avoid publishing messages for which there is no subscription.
Referring to FIGS. 1 and 2, a messaging system is depicted according to a proposed embodiment of the present invention. The messaging system 5 comprises a first set 11 of publisher devices 10, a second set 13 of publisher devices 12, a message broker 14, first 16 and second 18 subscriber applications, and a proxy 20. Interactions such as communication of messages from the publisher device 10, 12 to the subscriber applications 16, 18 are controlled by the message broker 14, but are routed via (for example, through) the proxy 20.
The messaging system 5 is a service to which applications may connect and a queue is an ordered list of messages maintained by the messaging system 5. Applications may place a message on a queue or request a message from a queue. The distinction between a queue manager and a message broker is not relevant to the present subject matter and these terms may be used interchangeably within the following description.
Each publisher device 10,12 is adapted to supply information about a subject, without needing to know anything about the applications that are interested in that information. The publisher devices 10, 12 generate the information in the form of messages, or publications, and define the topic(s) of these messages in a topic identifier. The message broker 14 is adapted to receive messages from the publisher devices 10, 12 via the proxy 20, in addition to subscriptions from subscribers of one or more topics. The message broker 14 is adapted to route published messages to subscribers that have a registered interest in the topic(s) of the published messages.
The subscriber applications 16, 18 create subscriptions that describe the topic(s) that the subscriber is interested in. Thus, a subscription determines which publications are of interest to a subscriber application. The subscriber applications 16, 18 may make multiple subscriptions and may receive information from different publisher devices.
To receive publications, a subscriber application 16, 18 creates a subscription to selected publication topics. The subscriber applications 16, 18 generate the subscription information and define the topic of the subscription using a subscription identifier. The message broker 14 is adapted to receive subscription identifier from the subscriber applications 16, 18 via the proxy 20.
However, in this example, each subscriber application is only permitted (for example, authorized) to receive publications relating to a topic of the subscription from a predetermined set of publisher devices. For example, in the embodiment of the FIGS. 1-2, the first subscriber application 16 may only be authorized to receive publications from the first set 11 of publisher devices, and the second subscriber application 18 may only be authorized to receive publications from the second set 13 of publisher devices.
The message broker 14 is adapted to deliver publications to subscribers that have subscriptions which match the publication topic and authorized to receive the publications.
Thus, it will be appreciated that the proxy 20 of FIGS. 1-2 is inserted between (i) the broker 14 and (ii) the sets 11,13 of publisher devices and subscriber applications 16,18. The proxy 20 is adapted to intercept messages from the publisher devices and alter the topic identifiers of the messages before communicating the messages (along with their modified topic identifiers) to the broker 14. The proxy 20 is also adapted to intercept subscriptions from the subscriber applications 16, 18 and alter the subscription identifiers before communicating the subscriptions (and their modified subscription identifiers) to the broker 14. Also, the proxy 20 is adapted to intercept outgoing messages from the broker 14 and alter the modified topic identifiers back to their original form (for instance, remove the information that the proxy previously added into a topic identifier) before communicating the message, along with its reverted topic identifier, to the intended/target subscriber application.
A topic can be implemented as a text string describing an area of interest on which applications may wish to exchange messages (e.g., “topic1”). Subjects may be organized hierarchically, such as into a topic tree, using the forward slash (“/”) character to create subtopics in the topic string (e.g., “topic1/myt1”). Topics are nodes in the topic tree that is the total space of all topics used within the messaging infrastructure. Topics may be leaf-nodes with no further subtopics, or intermediate nodes with subtopics. Topic strings that are created to represent subscriptions may contain wildcard schemes to pattern match against the topics of publications.
A subscription may be represented by a regular expression such as text string for example. Thus, more generally, a representation of a subscription may be represented using regular grammar. In the field of computer science, a regular grammar is a formal grammar that describes a regular language. Also, as has already been mentioned above in the description, a subscription description may employ wild cards in topic strings. For example, the character “+” may be used to matching one level, and the trailing character “#” may be used to match any number of levels below.
Subscriptions may be, by way of example, of two types: durable and non-durable. Non-durable subscriptions exist only as long as the subscribing application's connection to the broker 14 remains active. The subscription is removed when the subscribing application disconnects from the broker 14 deliberately or by loss of connection. Durable subscriptions continue to exist when a subscribing application's connection to the broker 14 is closed. If a subscription is durable, then when the subscribing application disconnects, the subscription remains in place and may be used by the subscribing application when it reconnects.
Thus, the messaging system 5 employs a selective publication concept, wherein the system is adapted to determine whether or not to communicate a publication (e.g. message) to a subscriber application. The messaging system 5 may, in some embodiments, push (that is, communicate without request) publications in response to registration of a new subscriber application for a specified topic. The system 5 may also push (that is, communicate without request) communications to the publisher devices in response to registration of a new subscriber application for a specified topic.
A subscriber application 16, 18 that is already connected to the system 5 may register a new subscription for a topic in which it is interested with the broker 14. Subscriber applications 16, 18 may do this on a durable basis (once registered, the subscription remains until explicitly deleted) or a non-durable basis (when the application disconnects, the subscription is removed).
Referring to FIG. 1 in particular, a first publisher device 10 may be a member of the first set 11 (or “SET1”) of publisher devices, and a second publisher device 12 may be a member of the second set 13 (or “SET2) of the publisher devices.
First subscriber application 16 (or “APP1”) is authorized to receive all messages from the first set 11 (i.e. SET1). In this example, it subscribes to all messages relating to “TOPIC1” using the subscription identifier “TOPIC1/+”
The proxy 20 receives (for example, intercepts) the subscription identifier from the first subscriber application 16 (that is, APP1) and alters the subscription identifier to create a modified subscription identifier comprising a description of: the topic of the subscription (for instance, “TOPIC1/+”); and the set (i.e., SET1) of subscriber devices that the first subscriber application 16 is permitted to receive publications/messages from (e.g. “C1/SET1/”). As a result, the subscription identifier is modified from the original subscription identifier “TOPIC1/+” to create modified subscription identifier “C1/SET1/TOPIC1/+”.
The proxy 20 then communicates the modified subscription identifier “C1/SET1/TOPIC1/+” to the broker 14.
Second subscriber application 18 (or “APP2”) is authorized to receive all messages from the second set 13 (i.e. SET2). In this example, it also subscribes to all messages on relating to “TOPIC1” using the subscription identifier “TOPIC1/+”
The proxy 20 receives (e.g. intercepts) the subscription identifier from the second subscriber application 18 (i.e. APP2) and alters the subscription identifier to create a modified subscription identifier comprising a description of the topic of the subscription (e.g. “TOPIC1/+”), and the set (i.e. SET2) of subscriber devices that the second subscriber application 18 is permitted to receive publications/messages from (e.g. “C1/SET2/”). As a result, the subscription identifier is modified from the original subscription identifier “TOPIC1/+” to create modified subscription identifier “C1/SET2/TOPIC1/+”.
The proxy 20 then communicates the modified subscription identifier “C1/SET2/TOPIC1/+” to the broker 14.
Subsequently, the first publisher device 10 publishes a message relating to “MYT1” which is sub-topic of “TOPIC1”. Thus, in this example, the first publisher device 10 publishes a message with the topic identifier “TOPIC1/MYT1”.
The proxy 20 receives (e.g. intercepts) the topic identifier from the first publisher device 10 and alters the topic identifier to create a modified topic identifier comprising a description of: the topic of the message (e.g. “TOPIC1/MYT1”); and the set (i.e. SET1) of publisher devices that the first publisher device 10 belongs to (e.g. “C1/SET1/”). As a result, the topic identifier is modified from the original topic identifier “TOPIC1/MYT1” to create modified topic identifier “C1/SET1/TOPIC1/MYT1”.
The proxy 20 then communicates the modified topic identifier “C1/SET1/TOPIC1/MYT1” to the broker 14.
The broker 14 analyzes the modified topic identifier against the modified subscription identifiers it has received from the first 16 and second 18 subscriber applications (via the proxy 20) to determine if the published message is to be communicated to a subscriber application.
Here, in this example, the broker 14 matches the modified topic identifier “C1/SET1/TOPIC1/MYT1” to the modified subscription identifier “C1/SET1/TOPIC1/+” from the first subscriber application 16. Thus, the broker 14 determines that the message from the first publisher device 10 is to be communicated to the first subscriber application 16.
Accordingly, the broker 14 sends the message with the modified topic identifier “C1/SET1/TOPIC1/MYT1” to the first subscriber application 16 via the proxy 20.
The proxy 20 removes the description (i.e. “C1/SET1/”) of the set of devices that the publisher device belongs to from the modified topic identifier, thereby forming a reverted topic identifier (which is identical to the original topic identifier “TOPIC1/MYT1” of the message published by the first publisher device 10).
The proxy 20 then communicates the published message with the reverted topic identifier to the first subscriber application 16.
By way of further example, and referring to FIG. 2, an example of the second publisher device subsequently publishing a message is described below. Here, the second publisher device 12 publishes a message relating to “MYT2”, which is sub-topic of “TOPIC1” (but different from the sub-topic “MYT1”). Thus, in this example, the second publisher device 12 publishes a message with the topic identifier “TOPIC1/MYT2”.
The proxy 20 receives (e.g. intercepts) the topic identifier from the second publisher device 12 and alters the topic identifier to create a modified topic identifier comprising a description of the topic of the message (e.g. “TOPIC1/MYT2”), and the set (i.e. SET2) of publisher devices that the second publisher device 12 belongs to (e.g. “C1/SET2/”). As a result, the topic identifier is modified from the original topic identifier “TOPIC1/MYT2” to create modified topic identifier “C1/SET2/TOPIC1/MYT2”.
The proxy 20 then communicates the modified topic identifier “C1/SET2/TOPIC1/MYT2” to the broker 14.
The proxy 20 analyzes the modified topic identifier against the modified subscription identifiers it has received from the first 16 and second 18 subscriber applications to determine if the published message is to be communicated to a subscriber application.
Thus, in this example, the broker 14 matches the modified topic identifier “C1/SET2/TOPIC1/MYT2” to the modified subscription identifier “C1/SET2/TOPIC1/+” from the second subscriber application 18. The broker 14 therefore determines that the message from the second publisher device 12 is to be communicated to the second subscriber application 18.
Accordingly, the broker 14 sends the message with the modified topic identifier “C1/SET2/TOPIC1/MYT2” to the second subscriber application 18 via the proxy 20.
The proxy 20 removes the description (i.e. “C1/SET2/”) of the set of devices that the publisher device belongs to from the modified topic identifier, thereby forming a reverted topic identifier (which is identical to the original topic identifier “TOPIC1/MYT2” of the message published by the second publisher device 12).
The proxy 20 then communicates the published message with the reverted topic identifier to the second subscriber application 18.
In view of the above-described examples of FIGS. 1-2, one may now consider an example wherein messages are published by cars of different types. In such an example, an administrator may have decided the group the cars into the follow twelve sets: Model1; Model2; diesel; petrol; GB; France; Germany; USA; Canada; Europe; North America; and satellite_radio. Subscriber application may then be authorized to receive published messages from just any one of these twelve sets.
By inspection, there are the following exclusive groups:
Model: Model1; Model2;
Engine: diesel; petrol (gasoline);
Country: GB; France; Germany; USA; Canada;
Continent: Europe; NorthAmerica;
Satellite radio: satellite_radio.
Any combination may be possible, but in this example it is considered that: there are no diesel cars in USA; there are no Model2 in USA or Canada; and that satellite radio is only in USA.
One may then identify the sets using a conventional graph coloring algorithm, wherein nodes are sets, and wherein links occur if any device is a member of the two sets concerned. Slots may then be identified in the subscription string according to the colors, wherein one slot is for each color.
For example, graph coloring could give the following groups:
Slot 1—Model1, Model2
Slot 2—diesel, petrol
Slot 3—Europe, NorthAmerica
Slot 4—GB, France, Germany, USA, Canada
Slot 5—satellite_radio, none.
Alternatively, graph coloring could give the following groups:
Slot 2—petrol, none
Slot 5—satellite_radio, diesel, none.
By way of example, one may then consider vehicles having the following Vehicle Identification Numbers (VINs) with associated properties and set identifiers:
WVWZZZ1JZWB040695—Model1, Europe, GB, petrol—Prefix: conv5/model1/petrol/Europe/GB/none
WVWZZZ6NZXW064342—Model2, Europe, GB, diesel—Prefix: conv5/model2/none/Europe/GB/diesel
WVWAB7AJ9CW201735—Model1, North America, USA, petrol—Prefix: conv5/model1/petrol/North America/USA/none
WVWDB7AJ5EW008921—Model1, North America, USA, petrol, sat radio—Prefix: conv5/model1/petrol/North America/USA/sat
WVWZZZ1KZCW261460—Model1, Europe, GB, diesel—Prefix: conv5/model1/none/Europe/GB/diesel
With the original topic string format being as follows: “iot-2/type/<type>/id/<myThingId>/evt/<myEvent>/fmt/json”, the following example transformations of message topic identifiers from the publisher devices (undertaken by the proxy for example) may be obtained:
iot-2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json --> conv5/model1/petrol/Europe/GB/none/iot- 2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json iot-2/type/car/id/WVWZZZ1JZWB040695/evt/location/fmt/json --> conv5/model1/petrol/Europe/GB/none/iot- 2/type/car/id/WVWZZZ1JZWB040695/evt/location/fmt/json iot-2/type/car/id/WVWDB7AJ5EW008921/evt/engine_info/fmt/json --> conv5/model1/petrol/NorthAmerica/USA/sat/iot- 2/type/car/id/WVWDB7AJ5EW008921/evt/engine_info/fmt/json iot-2/type/car/id/WVWZZZ1KZCW261460/evt/engine_info/fmt/json --> conv5/model1/none/Europe/GB/diesel/iot- 2/type/car/id/WVWZZZ1KZCW261460/evt/engine_info/fmt/json iot-2/type/car/id/WVWZZZ6NZXW064342/evt/engine_info/fmt/json --> conv5/model2/none/Europe/GB/diesel/iot- 2/type/car/id/WVWZZZ6NZXW064342/evt/engine_info/fmt/json iot-2/type/car/id/WVWAB7AJ9CW201735/evt/engine_info/fmt/json --> conv5/model1/petrol/NorthAmerica/USA/none/iot- 2/type/car/id/WVWAB7AJ9CW201735/evt/engine_info/fmt/json
Subscriptions of a subscriber application authorized to the set of ‘petrol’ vehicles for engine_info may then be transformed by the proxy as follows:
iot-2/type/car/id/+/engine_info/fmt/json --> conv5/+/petrol/+/+/+/iot-2/type/car/id/+/evt/engine_info/fmt/json
As a result, messages received from the broker via the proxy are transformed (e.g. reverted) by the proxy before they are forwarded to the subscriber application as follows:
conv5/model1/petrol/Europe/GB/none/iot- 2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json --> iot-2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json conv5/model1/petrol/NorthAmerica/USA/sat/iot- 2/type/car/id/WVWDB7AJ5EW008921/evt/engine_info/fmt/json - -> iot-2/type/car/id/WVWDB7AJ5EW008921/evt/engine_info/fmt/json conv5/model1/petrol/NorthAmerica/USA/none/iot- 2/type/car/id/WVWAB7AJ9CW201735/evt/engine_info/fmt/json --> iot-2/type/car/id/WVWAB7AJ9CW201735/evt/engine_info/fmt/json
Also, subscriptions of a subscriber application authorized to the set of ‘GB’ vehicles for all information may be transformed by the proxy as follows:
iot-2/type/car/id/+/+/fmt/json --> conv5/+/+/+/GB/+/iot-2/type/car/id/+/evt/engine_info/fmt/json
conv5/model1/petrol/Europe/GB/none/iot- 2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json --> iot-2/type/car/id/WVWZZZ1JZWB040695/evt/engine_info/fmt/json conv5/model1/petrol/Europe/GB/none/iot- 2/type/car/id/WVWZZZ1JZWB040695/evt/location/fmt/json --> iot-2/type/car/id/WVWZZZ1JZWB040695/evt/location/fmt/json conv5/model1/none/Europe/GB/diesel/iot- 2/type/car/id/WVWZZZ1KZCW261460/evt/engine_info/fmt/json --> iot-2/type/car/id/WVWZZZ1KZCW261460/evt/engine_info/fmt/json conv5/model2/none/Europe/GB/diesel/iot- 2/type/car/id/WVWZZZ6NZXW064342/evt/engine_info/fmt/json --> iot-2/type/car/id/WVWZZZ6NZXW064342/evt/engine_info/fmt/json
It is to be understood that there could be variations where the topic components are injected in different places.
An embodiment of a method of controlling 100 message delivery from publisher devices to a subscriber application of a messaging system may be readily understood with reference to FIG. 3. FIG. 3 is a flow chart of an exemplary implementation of a method according to an embodiment, wherein the steps of the method carried out by a messaging system, such as the system in FIGS. 1-2, according to a proposed embodiment of the present invention are depicted. In this regard, it is noted that the subscriber may only be permitted to receive messages relating to a topic of subscription from a predetermined set of publisher devices.
First, in step 105, the broker obtains a data structure describing a plurality of different sets publisher devices and/or the devices or sets that subscriber applications are permitted/authorized to receive messages from. By way of example, the data structure may be provided to the broker from an external device and/or a user. Alternatively, and/or additionally, the broker may generate (at least portions of) the data structure. The data structure may comprise a list, table, tree or other suitable representation of sets of publisher devices and/or permissions. These sets may be predefined, e.g. via an external entity or user, or they may be determined by the broker. By way of example, using the data structure, the broker may identify a set of publisher devices that the publisher device belongs to, and/or identify a set of publisher devices that a subscriber application is permitted to receive a message from.
Next, in step 110, the subscriber application registers a subscription to a topic by generating and communicating a subscription identifier intended for the broker. By way of example, the subscription identifier comprises a string representing the subscription topic.
The broker then intercepts the communicated subscription identifier and alters it in step 115. In this example, the proxy receives the subscription identifier from the subscriber and alters the subscription identifier to create a modified subscription identifier comprising a description of the topic of the subscription, and the set of subscriber devices that the subscriber application is permitted to receive publication/messages from. As a result, the broker generates a modified subscription identifier.
The modified subscription identifier is then transmitted from the proxy to the broker in step 120, and the broker subsequently receives and stores the modified subscription identifier in step 135.
When a new message is to be published to a topic by a publisher device, the method proceeds to step 130, wherein the publisher generates and communicates a message relating to the topic. The message includes (or is associated with) a topic identifier. By way of example, the topic identifier comprises a string representing the topic of the message.
The proxy then intercepts the communicated message and topic identifier and alters it in step 135. In this example, the proxy receives the message and topic identifier from the publisher device and alters the topic identifier to create a modified topic identifier comprising a description of the topic of the message, and the set of publisher devices that the publisher device belongs to. As a result, the broker generates a modified topic identifier.
The modified topic identifier is then transmitted from the proxy to the broker in step 140, and the broker subsequently receives the modified subscription identifier in step 145.
Next, in step 150, the broker analyzes the modified topic identifier against the modified subscription identifiers it has received from subscriber applications (via the proxy) to determine if the published message is to be communicated to one or more subscriber applications. By way of example, the broker compares the modified topic identifier (received in step 145) with previously received modified subscription identifier (as in step 125 for example). Thus, the broker determines whether the message from the publisher device is to be communicated to a subscriber application and, if so, to which subscriber application.
Based on the result of the determination in step 150, the broker transmits the message towards the appropriate target/intended subscriber application in step 155. Of course, if as a result of the determination step 150, the broker determines that no subscriber application should be sent the message (e.g. because no match between subscription topic and message topic is identified), the broker would not transmit any message. However, for the purpose of this example, it is assumed that the broker determines that the message should be communicated to the subscriber application and thus transmits the message (along with its modified topic identifier) in step 155.
The proxy then intercepts the transmitted message and modified topic identifier and alters it in step 160. In this example, the proxy receives the message and modified topic identifier from the broker and alters the modified topic identifier. More specifically, the proxy removes the description of the set of devices that the publisher device belongs to from the modified topic identifier, thereby forming a reverted topic identifier (which is identical to the original topic identifier of the message published by the publisher device).
The proxy then communicates the published message with the reverted topic identifier to the subscriber application and it is received by the subscriber application in step 165.
FIG. 4 is a schematic block diagram of a messaging system 400 according to an embodiment of the present subject matter. The messaging system 400 comprises publisher devices 410, a message server 420 (adapted to implement a proxy application and a broker application), and a plurality of subscriber terminals 430 (adapted to implement subscriber applications). The publishers 410, message broker server 420, and subscriber terminals 430 are all connected to a communication network 450 (such as the Internet for example).
The subscribers create subscriptions to selected publication topics and register the subscriptions with the message broker server 420. Permissions information (relating to the what publisher devices 410 the subscribers are authorized to receive messages/publications from) are also provided to the message broker server 420, for example by the subscribers, an input interface to the message broker server, and/or terminals connected to the communication network (such as the publishers 410 for example).
The proxy application of the message broker server 420 is adapted to
The message broker server 420 is adapted to generate modified topic identifiers and modified subscriber identifier which may then be used (e.g. processed or analysed by a broker application) to control the delivery of published messages to the subscriber application(s). Prior to delivery to a subscriber terminal 430, the modified topic identifier may be reverted back to its original form.
The proxy application may, for example, intercept messages from a publisher device 410 and undertake modification of the topic identifier before communicating the modified topic identifier to the broker application of the message broker server 420. Similarly, the proxy application may intercept subscriptions from the subscriber applications and undertake modification of the subscription identifiers before communicating the modified subscription identifiers to the broker application of the message broker server 420. The proxy application may also then intercept messages from the broker application of the message broker server 420 and revert the modified topic identifiers back to their original form before communicating the message to the intended/target subscriber terminal(s) 430 via the communication network 450.
It will be appreciated that the messaging system 400 enables a selective publication concept for enabling flexible subscriptions such that different subscriber applications can use different topic strings to subscribe to the messages from sets of devices. The proposed concepts may be employed in existing messaging system comprising sets of publisher devices, a broker (e.g. broker application) and a subscriber application.
It will be equally clear to one of skill in the art that all or part of a logic arrangement according to one embodiment of the present invention may suitably be embodied in a logic apparatus comprising logic elements to perform the steps of the method, and that such logic elements may comprise components such as logic gates in, for example a programmable logic array or application-specific integrated circuit. Such a logic arrangement may further be embodied in enabling elements for temporarily or permanently establishing logic structures in such an array or circuit using, for example, a virtual hardware descriptor language, which may be stored and transmitted using fixed or transmittable carrier media.
1. A computer-implemented method of controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices, the method comprising:
altering a topic identifier of a message from a publisher device to a modified topic identifier comprising a description of the topic of the message, and a set of one or more publisher devices that the publisher device belongs to;
altering a subscription identifier from a subscriber application to a modified subscription identifier comprising a description of the topic of the subscription, and a predetermined set of one or more publisher devices that a message is permitted to be received from;
analyzing the modified topic identifier and the modified subscription identifier to determine if the message is to be communicated to the subscriber application; and
if the message is to be communicated to the subscriber application, removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier to form a reverted topic identifier, and communicating the message and reverted topic identifier to the subscriber application.
2. The computer-implemented method of claim 1, wherein the removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier is undertaken such that the reverted topic identifier is identical to the topic identifier of the message from the publisher device.
3. The computer-implemented method of claim 1, wherein at least one of the altering the topic identifier or the altering the subscription identifier is undertaken by a proxy application adapted to intercept at least one of messages or subscription identifiers being communicated to or from the broker application.
communicating the message and the modified topic identifier from the proxy application to the broker application;
communicating the modified subscription identifier from the proxy application to the broker application;
and wherein the analyzing the modified topic identifier and the modified subscription identifier is undertaken by the broker application.
5. The computer-implemented method of claim 1, wherein the description of the topic of the subscription comprises a string supporting wildcard entries, and wherein the description of the topic of the message comprises a string.
6. The computer-implemented method of claim 5, wherein the broker application is a Message Queuing Telemetry Transport, MQTT, broker application.
obtaining a data structure describing a plurality of different sets of one more publisher devices; and
wherein the altering the topic identifier comprises analyzing the obtained data structure to identify the set of one or more publisher devices that the publisher device belongs to.
8. The computer-implemented method of claim 7, wherein the altering the subscription identifier comprises analyzing the obtained data structure to identify the set of one or more publisher devices that a message is permitted to be received from.
9. A computer program product for controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices, the computer program product comprising:
a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processing unit to cause the processing unit to perform a method comprising:
wherein the message is to be communicated to the subscriber application, removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier to form a reverted topic identifier, and communicating the message and reverted topic identifier to the subscriber application.
10. The computer program product of claim 9, wherein the removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier is undertaken such that the reverted topic identifier is identical to the topic identifier of the message from the publisher device.
11. The computer program product of claim 9, wherein at least one of the altering the topic identifier or the altering the subscription identifier is undertaken by a proxy application adapted to intercept at least one of messages or subscription identifiers being communicated to or from the broker application.
13. The computer program product of claim 9, wherein the description of the topic of the subscription comprises a string supporting wildcard entries, and wherein the description of the topic of the message comprises a string.
14. The computer program product of claim 13, wherein the broker application is a Message Queuing Telemetry Transport, MQTT, broker application.
16. The computer program product of claim 15, wherein the altering the subscription identifier comprises analyzing the obtained data structure to identify the set of one or more publisher devices that a message is permitted to be received from.
17. A system for controlling message delivery from publisher devices to a subscriber application of a messaging system, the subscriber application having a subscription registered with a broker application of the messaging system and only being permitted to receive messages relating to a topic of the subscription from a predetermined set of one or more publisher devices, the system comprising:
18. The system of claim 17, wherein the removing the description of the set of one or more publisher devices that the publisher device belongs to from the modified topic identifier is undertaken such that the reverted topic identifier is identical to the topic identifier of the message from the publisher device.
19. The system of claim 17, wherein at least one of the altering the topic identifier or the altering the subscription identifier is undertaken by a proxy application adapted to intercept at least one of messages or subscription identifiers being communicated to or from the broker application.
20. The system of claim 17. further comprising:
US15/049,252 2016-02-22 2016-02-22 Message delivery in a message system Active 2036-10-18 US10225219B2 (en)
US15/049,252 US10225219B2 (en) 2016-02-22 2016-02-22 Message delivery in a message system
US16/102,222 US10257142B2 (en) 2016-02-22 2018-08-13 Message delivery in a message system
US16/102,222 Continuation US10257142B2 (en) 2016-02-22 2018-08-13 Message delivery in a message system
US20170244657A1 true US20170244657A1 (en) 2017-08-24
US10225219B2 US10225219B2 (en) 2019-03-05
ID=59630368
US15/049,252 Active 2036-10-18 US10225219B2 (en) 2016-02-22 2016-02-22 Message delivery in a message system
US16/102,222 Active US10257142B2 (en) 2016-02-22 2018-08-13 Message delivery in a message system
US (2) US10225219B2 (en)
US10257142B2 (en) 2016-02-22 2019-04-09 International Business Machines Corporation Message delivery in a message system
KR102022602B1 (en) 2017-11-20 2019-11-04 아주대학교산학협력단 Publish-Subscribe message service method
WO2019212914A1 (en) * 2018-05-04 2019-11-07 Microsoft Technology Licensing, Llc Event domains
CN104424555B (en) 2013-08-30 2018-01-02 国际商业机器公司 For the control method and equipment in publish/subscribe system
US20150081798A1 (en) 2013-09-17 2015-03-19 Electronics And Telecommunications Research Institute Process-based inter-thing collaboration apparatus and method in web of things environment
EP3111621A4 (en) 2014-02-28 2017-12-13 Tyco Fire & Security GmbH Rules engine combined with message routing
2016-02-22 US US15/049,252 patent/US10225219B2/en active Active
2018-08-13 US US16/102,222 patent/US10257142B2/en active Active
US10225219B2 (en) 2019-03-05
US10257142B2 (en) 2019-04-09
US20190014066A1 (en) 2019-01-10
US20150319143A1 (en) 2015-11-05 Secure mobile app connection bus
EP1872510A4 (en) 2008-06-18 System topology for secure end-to-end communications between wireless device and application data source
US7590713B2 (en) 2009-09-15 Presenting a merged view of remote application shortcuts from multiple providers
KR20040077549A (en) 2004-09-04 Name resolution server and packet transfer device
EP3053323B1 (en) 2019-06-05 Systems and methods for caching content with notification-based invalidation
CN102713926B (en) 2016-05-11 Confidential information is revealed and is prevented system and method
US10229274B2 (en) 2019-03-12 Systems and methods for assessing the compliance of a computer across a network
US8195789B2 (en) 2012-06-05 System, apparatus and method for characterizing messages to discover dependencies of services in service-oriented architectures
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:BALDWIN, TIMOTHY J.;JOHNSON, ANDREW;JOHNSON, PETER J.;AND OTHERS;SIGNING DATES FROM 20160219 TO 20160222;REEL/FRAME:037784/0594
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:BALDWIN, TIMOTHY J.;JOHNSON, ANDREW;JOHNSON, PETER J.;AND OTHERS;SIGNING DATES FROM 20160219 TO 20160311;REEL/FRAME:038090/0841