主权项 |
1. A system for providing a publish and subscribe server that includes a channels-based means to allow clients to send and receive asynchronous messages, comprising:
an application server; a publish and subscribe server that executes on the application server, and that
provides channels that enable clients to use a hypertext transfer protocol to request subscriptions to one or more message producers at a message service distinct from the publish and subscribe server, andenables the one or more message producers at the message service to communicate messages to the publish and subscribe server; an index that associates a channel-based hierarchy of the channels used for the subscriptions requested by the clients, with a message-based hierarchy of message destinations at the message service, and enables messages that are produced by the message producers to be published to the clients using the channels, including wherein
each client is associated with a client identifier,when the client requests a subscription, the client specifies a channel pattern to be associated with that subscription, andthe system uses the channel pattern specified by the client to build or update a subscriber index that associates subscribed channels with the client; and wherein messages that are subsequently published by the message service to a particular message destination are targeted to one or more subscribed clients by including one or more channel patterns in those messages, and are delivered by the publish and subscribe server as hypertext transfer protocol responses to those one or more subscribed clients. |