ACTIVITY-BASED CLIENT REMISSION

By categorizing clients based on their activity levels and dynamically re-allocating them to different servers, the method addresses the challenge of excessive server loads in publish/subscribe environments, enhancing processing efficiency and resource allocation.

DE112011103498B4Active Publication Date: 2025-05-22KYNDRYL INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
DE112011103498
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2010-12-15
Filing Date
2011-12-13
Publication Date
2025-05-22
Estimated Expiration
2031-12-13

AI Technical Summary

Technical Problem

In publish/subscribe environments, servers face excessive loads due to non-consecutive and randomly distributed client messages, leading to processing delays and resource allocation challenges.

Method used

A method that categorizes clients based on their activity levels by calculating a ratio of selection operations to monitoring time, allowing for dynamic re-allocation of clients to different servers and adjusting message queuing intervals accordingly.

Benefits of technology

This approach optimizes server connections by distributing client loads more efficiently, reducing processing delays, and improving resource allocation in publish/subscribe environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A data processing system (100) for optimizing a server connection in a permanently connected publish / subscribe environment, the data processing system comprising: - one or more processors, one or more computer-readable memories, and one or more computer-readable physical storage units for executing program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories, - to assign (303) a first activity category to a client (231, 233, 235); - to log (307) one or more selection operations of a connection between the client and a first server (201) in a log file; - to calculate a ratio of the number of the one or more selection operations to a monitoring time of the first server (311), wherein the monitoring time is a time interval that has elapsed since a previous check of the logged data; - to determine a second activity category for the client based on reading the ratio from a ratio range list in a control file (313), wherein the second activity category is not the first category; - to connect the client to a second server (203) instead of the first server in response to determining the second activity category; - to determine that more than 50% of the clients are assigned to the low-activity category; and to reassign the client to the low-activity category; - to queue one or more initial client messages during a longer interval; - to process the one or more first client messages in response to the expiration of the longer interval; - in response to the client being reassigned to the low activity category, to queue one or more second client messages during a standard interval, the standard interval being of shorter duration than the longer interval; and - to process the one or more second client messages in response to the expiration of the default interval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present invention relates generally to a computer-implemented data processing system for disconnecting clients subscribing to a service. More particularly, the present invention relates to disconnecting client / server connections based on client behavior. Description of the state of the art

[0002] Over the past few decades, computers have evolved from a tool largely used in academia, with occasional personal use, to a personal tool for users who want to stay informed. Since then, computer users have increasingly relied on them to receive reports on special events or the latest on various topics that interest them. These computer users can use clients embedded in computers to subscribe to current events and other various topics. In one particular example, thousands of subscribers can receive updates within seconds about a stock reaching a new 12-month high. Servers operating on a network provide subscribers with reports in real time, for example, on any increase in the price of one stock among the many traded on a stock exchange.Social media is another scenario where clients, especially mobile clients, can subscribe to various topics. Hundreds of thousands of clients can subscribe to topics such as a celebrity, using social media platforms such as Twitter® or Facebook®.

[0003] A client contains resources of a data processing system allocated to execute computer instructions to provide a user with information about messages and topics through any suitable user interface. To support messaging, a client can perform other functions, such as allowing a user to configure the client's language, setting power-saving modes, and informing the user about errors and the status of the client. Client software, on the other hand, consists of the client's commands serialized for storage or transmission.

[0004] A server represents an allocation of time and physical resources of a computing system to execute instructions that respond to messages received from one or more clients and / or servers. The server may be present and defined by the hardware thus allocated and by the state determined by memories, registers, and the like. As is obvious, a computing system may host multiple servers simultaneously. The resources may be memory and at least one processor allocated to perform a task.

[0005] US Patent No. 6,173,312 B1 describes a system for reliably connecting a client computer. A network system is provided with network monitoring means for monitoring operations of a plurality of server computers connected to the network.

[0006] US Patent No. 7,437,461 B2 describes a device and method for load balancing. The method comprises detecting a failure in a first server among a plurality of servers, and selecting a second server from the plurality of servers, different from the first server, as a new transmission destination for a new processing request from a user terminal whose processing request is sent to the first server.

[0007] US Patent No. 7,730,190 B2 describes a system for distributing load across multiple servers on a website. All connections are established to a single IP address, and a local director selects the server to which the connection is established from among the multitude of servers. Thus, the distribution of connections is independent of the DNS server, and the connection distribution scheme is taken into account when bypassing DNS.

[0008] The patent application US 2002 / 0 116 258 A1 describes a method of commercial communication comprising generating a reference data set based on a set of responses from a set of reference users to a number of alternative Internet communications.

[0009] The English Wikipedia article on “Message Queue”, accessed at https: / / en.wikipedia.org / w / index.php?title=Message queue&oldid=395890253 on August 2, 2024, describes message queues as communication protocols used for inter-process communication or for inter-thread communication within the same process. SUMMARY

[0010] In view of a first aspect, the present invention provides a method, data processing system, and computer program product for optimizing a server connection in a permanently connected publish / subscribe environment. A computer assigns a first activity category to a client. The computer logs one or more selection operations of a connection between a client and a first server in a log file. The computer calculates a ratio of a number of the one or more selection operations to a monitoring time of the first server, where the monitoring time is a time interval that has elapsed since a previous review of the logged data.Based on a reading of the ratio from a ratio range list in a control file, the computer sets a second activity category for the client, where the second activity category is different from the first activity category. In response to setting the second activity category, the computer connects the client to a second server instead of the first server.

[0011] The present invention preferably provides a method wherein the computer logging the one or more selection operations of the connection between the client and the first server in the log file is responsive to the server determining that the client was connected to the first server during a probe interval.

[0012] The present invention preferably provides a method wherein the first server has a first network address, the second server has a second network address, and the second server and the first server are logical partitions on a virtualized server.

[0013] The present invention preferably provides a method wherein the first activity category is a high activity category, and wherein the computer, which determines the second activity category for the client based on reading the ratio from the ratio range list in the control file, comprises reassigning the client to a low activity category by the computer, and wherein the method further comprises: queuing, by the computer, one or more first client messages during an extended interval; in response to the expiration of the extended interval, processing, by the computer, the one or more first client messages;in response to the client being reassigned to the low activity category, the computer queuing one or more second client messages during a standard interval, the standard interval being of shorter duration than the longer interval; and in response to the standard interval expiring, the computer processing the one or more second client messages.

[0014] The present invention preferably provides a method wherein the computer reassigning the client to the low activity category is responsive to the computer determining that more than 50% of the clients are assigned to the low activity category.

[0015] The present invention preferably provides a method wherein the first activity category is a high activity category, wherein the computer determining the second activity category for the client based on reading the ratio from the ratio range list in the control file comprises reassigning the client to a low activity category by the computer corresponding to a first ratio range of ratios that is smaller than a second ratio range in the ratio range list, and wherein the method further comprises: receiving, by the computer, a first message from the client while the client is assigned to the high activity category; in response to receiving the first message, executing, by the computer, an I / O request associated with the first message;Receiving, by the computer, a second message from the client while the client is assigned to the low activity category; and in response to receiving the second message, performing, by the computer, an I / O request associated with the second message.

[0016] According to an illustrative embodiment, a computer program product for optimizing a server connection in a persistently connected publish / subscribe environment is disclosed. A computer program product comprises one or more computer-readable physical storage devices. When the program instructions are executed, they associate a first activity category with a client. When the program instructions are executed, they log one or more selection operations of a connection between a client and a first server in a log file. When the program instructions are executed, they calculate a ratio of a number of the one or more selection operations to a monitoring time of the first server, where the monitoring time is a time interval that has elapsed since a previous review of the logged data.When the program instructions are executed, they specify a second activity category for the client based on a ratio read from a ratio range list in a control file, where the second activity category is not the first category. When the program instructions are executed, they connect the client to a second server instead of the first server in response to the second activity category being specified.

[0017] The present invention preferably provides a computer program product further comprising program instructions stored in at least one of the one or more storage units for determining whether the client was connected to the first server during a probe interval; and wherein the program instructions logging the one or more selection operations of the connection between the client and the first server in the log file are responsive to the program instructions for determining whether the client was connected to the first server during the probe interval.

[0018] The present invention preferably provides a computer program product wherein the first activity category is a high activity category, wherein the program instructions for determining the second activity category for the client based on reading the ratio from the ratio range list in the control file reassign the client to a low activity category, and wherein the computer program product further comprises: program instructions stored in at least one of the one or more storage devices for queuing one or more first client messages during an extended interval; program instructions stored in at least one of the one or more storage devices for processing the one or more first client messages in response to the expiration of the extended interval;Program instructions stored in at least one of the one or more storage devices to, in response to the client being reassigned to the low activity category, queue one or more second client messages during a standard interval, the standard interval being of shorter duration than the longer interval; and program instructions stored in at least one of the one or more storage devices to, in response to the expiration of the standard interval, process the one or more second client messages.

[0019] The present invention preferably provides a computer program product further comprising program instructions stored in at least one of the one or more storage units for determining that more than 50% of the clients are assigned to the low activity category; and wherein the program instructions are operative to determine the second activity category for the client based on reading the ratio from the ratio range list in the control file, reassign the client to the low activity category, and are responsive to the program instructions for determining that more than 50% of the clients are assigned to the low activity category.

[0020] The present invention preferably provides a computer program product wherein the first activity category is a high activity category, wherein the program instructions for determining the second activity category for the client based on reading the ratio from the ratio range list in the control file reassign the client to a low activity category corresponding to a first ratio range of ratios that is smaller than a second ratio range in the ratio range list, and wherein the computer program product further comprises: program instructions stored in at least one of the one or more control units for receiving a first message from the client while the client is assigned to the high activity category;Program instructions stored in at least one of the one or more control units to execute an I / O request associated with the first message in response to receiving the first message; program instructions stored in at least one of the one or more control units to receive a second message from the client while the client is assigned to the low activity category; and program instructions stored in at least one of the one or more storage units to execute an I / O request associated with the second message in response to receiving the second message.

[0021] In another aspect, the present invention provides a method for batch processing ping responses. A computer transmits a scheduled ping to each of a plurality of clients. The computer queues a client message with at least one other client message. The computer processes a plurality of queued client messages to classify a subset of the plurality of clients as responding clients. The computer determines that the timeout has expired. The computer disconnects at least one client that has not responded to the scheduled ping during the timeout.

[0022] According to an illustrative embodiment, a method for batch processing ping responses is disclosed. A computer transmits a scheduled ping to each of a plurality of clients, the scheduled ping specifying a return address associated with ping responses. The computer receives a plurality of ping responses to the return address. In response to receiving the plurality of ping responses to the return address, the computer updates a data structure of candidate clients for disconnection. The computer determines that a timeout has expired. In response to the timeout expiring, the computer disconnects one or more clients located in the candidate clients for disconnection data structure.

[0023] In another aspect, the present invention provides a data processing system for optimizing a server connection in a persistently connected publish / subscribe environment, the data processing system comprising: one or more processors, one or more computer-readable memories, and one or more computer-readable physical storage devices; program instructions stored in at least one of the one or more memory devices for execution by at least one of the one or more processors via at least one of the one or more memories to assign a first activity category to a client;Program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories to log one or more selection operations of a connection between the client and a first server in a log file; Program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories to calculate a ratio of a number of the one or more selection operations to a monitoring time of the first server, wherein the monitoring time is a time interval that has elapsed since a previous review of the logged data;Program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories to determine a second activity category for the client based on reading the ratio from a ratio range list in a control file, wherein the second activity category is not the first category; and program instructions stored in at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories to connect the client to a second server instead of the first server in response to determining the second activity category;

[0024] The present invention preferably provides a data processing system wherein the second activity category is a medium activity category having a ratio range with a lower threshold of at least one selection operation per 60 seconds and an upper threshold of at most ten selection operations per 60 seconds.

[0025] The present invention preferably provides a data processing system further comprising program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to determine whether the client was connected to the first server during a probe interval; and wherein the program instructions that log the one or more selection operations of the connection between the client and the first server in the log file are responsive to the program instructions to determine whether the client was connected to the first server during the probe interval.

[0026] The present invention preferably provides a data processing system wherein the first activity category is a high activity category, wherein the program instructions for determining the second activity category for the client based on reading the ratio from the ratio range list in the control file reassign the client to a low activity category, and wherein the data processing system further comprises: program instructions stored in at least one of the one or more storage units for execution by at least one of the one or more processors via at least one of the one or more memories to queue one or more first client messages for an extended interval;Program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to process the one or more first client messages in response to the expiration of the longer interval; Program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to queue one or more second client messages during a standard interval in response to the client being reassigned to the low activity category, the standard interval being of shorter duration than the longer interval;and program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to process the one or more second client messages in response to the expiration of the standard interval;

[0027] The present invention preferably provides a data processing system further comprising program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to determine that more than 50% of the clients are assigned to the low activity category; and wherein the program instructions are operative to set the second activity category for the client based on reading the ratio from the ratio range list in the control file, reassign the client to the low activity category, and are responsive to the program instructions to determine that more than 50% of the clients are assigned to the low activity category.

[0028] The present invention preferably provides a data processing system wherein the first activity category is a high activity category, wherein the program instructions for determining the second activity category for the client based on reading the ratio from the ratio range list in the control file reassign the client to a low activity category corresponding to a first ratio range of ratios that is smaller than a second ratio range in the ratio range list, and wherein the data processing system further comprises: program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to receive a first message from the client while the client is assigned to the high activity category;Program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to execute an I / O request associated with the first message in response to receiving the first message; Program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to receive a second message from the client while the client is assigned to the low activity category;and program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to execute an I / O request associated with the second message in response to receiving the second message;

[0029] In another aspect, the present invention provides a method for batch processing ping responses, the method comprising: transmitting, by a computer, a scheduled ping to each of a plurality of clients; queuing, by the computer, a client message with at least one other client message; processing, by the computer, a plurality of queued client messages to classify a subset of the plurality of clients as responding clients; determining, by the computer, that a time limit has expired; and in response to determining that the time limit has expired, disconnecting, by the computer, at least one client that has not responded to the scheduled ping during the time limit.

[0030] The present invention preferably provides a method wherein the computer processing a plurality of queued client messages comprises processing a selection operation by the computer, and wherein the queued client messages include the client message and the at least one other client message.

[0031] The present invention preferably provides a method wherein the computer transmitting the scheduled ping to each of the plurality of clients comprises establishing an indication by the computer in the scheduled ping informing each of the plurality of clients to respond to the scheduled ping using the User Datagram Protocol.

[0032] In another aspect, the present invention provides a method for batch processing ping responses, the method comprising: transmitting, by the computer, a scheduled ping to each client of a plurality of clients, the scheduled ping specifying a return address associated with ping responses; receiving, by the computer, a plurality of ping responses to the return address; in response to receiving the plurality of ping responses to the return address, updating, by the computer, a data structure of one or more candidate clients for disconnection; determining, by the computer, that a timeout has expired; and in response to determining that the timeout has expired, disconnecting, by the computer, one or more clients present in the data structure of the one or more candidate clients for disconnection. BRIEF DESCRIPTION OF THE DIFFERENT VIEWS OF THE DRAWINGS

[0033] A preferred embodiment of the present invention will now be described, by way of example only, with reference to the accompanying drawings in which: Fig. 1 is a block diagram of a data processing system according to a preferred embodiment of the present invention; Fig. 2 is a block diagram of a network environment according to a preferred embodiment of the present invention; Fig. 3 is a flowchart of steps for classifying a client into one of at least two activity categories according to a preferred embodiment of the present invention; Fig. 4A is a table of client identifiers and corresponding activity category assignments according to a preferred embodiment of the present invention; Fig.4B is a flowchart of delay scaling to discriminatory queue clients assigned to a high activity category according to a preferred embodiment of the present invention; Fig. 4C is a flowchart of delay scaling to discriminatory queue clients assigned to a low activity category according to a preferred embodiment of the present invention; Fig. 5A is a flowchart of thread selection including current thread control according to a preferred embodiment of the present invention; Fig. 5B is a flowchart of thread selection applying different strategies regarding work distribution among threads in response to client classification, according to a preferred embodiment of the present invention; Fig.6 is a flowchart of ping aggregation based on time according to a preferred embodiment of the present invention; and Fig. 7 is a flowchart of ping aggregation based on aggregated ping responses to an associated address or using a non-standard mode according to a preferred embodiment of the present invention. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[0034] With reference now to the figures and with particular reference to Fig.1 shows a block diagram of a data processing system according to an illustrative embodiment of the invention, in which aspects of an illustrative embodiment may be implemented. Data processing system 100 is an example of a computer in which code or instructions for implementing the processes of the present invention may be included. In the illustrated example, data processing system 100 employs a hub architecture including a northbridge memory controller hub (NB / MCH) 102 and a southbridge input / output (I / O) controller hub (SB / ICH) 104. Processor 106, main memory 108, and graphics processor 110 are connected to northbridge memory controller hub 102. Graphics processor 110 may be connected to the NB / MCH, for example, via an Accelerated Graphics Port (AGP).

[0035] In the illustrated example, a local area network (LAN) adapter 112 is connected to the southbridge I / O controller hub 104, and the audio adapter 116, keyboard and mouse adapter 120, modem 122, read-only memory (ROM) 124, hard disk drive (HDD) 126, CD-ROM drive 130, universal serial bus (USB) and other data ports 132, and PCI / PCIe devices 134 are connected to the southbridge I / O controller hub 104 via bus 138 or bus 140. PCI / PCIe devices can include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a Cardbus controller, while PCIe does not. For example, ROM 124 may be a flash basic input / output system (BIOS).For example, hard disk drive 126 and CD-ROM drive 130 may utilize an Integrated Drive Electronics (IDE) or Serial Advanced Technology Attachment (SATA) interface. A Super I / O (SIO) unit 136 may be connected to the southbridge I / O controller hub 104.

[0036] An operating system runs on the processor 106 and coordinates and provides control of various components in the data processing system 100 of Fig.1. The operating system may be a commercially available operating system such as UNIX® or Microsoft® Windows®. Unix is ​​a registered trademark of The Open Group in the United States and other countries. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. An object-oriented programming system such as the Java™ programming system may execute in conjunction with the operating system and provide the operating system with calls to Java™ programs or applications executing on the data processing system 100. Java™ is a trademark or registered trademark of Oracle Corporation and / or its subsidiaries in the United States, other countries, or both.

[0037] Commands for the operating system, the object-oriented programming system and applications or programs such as the one described here with reference to Fig. 3 described user interface program and the one described here with reference to Fig. 4 are located in at least one of the one or more computer-readable physical storage devices, such as the hard disk drive 126 or the CD-ROM 130, for execution by at least one of the one or more processors, such as the processor 106, via at least one of the one or more computer-readable memories, such as the main memory 108, the read-only memory 124, or in one or more peripheral devices.

[0038] Experts can see that the hardware in Fig.1 may vary depending on the version. Other internal hardware or peripheral devices such as flash memory, functionally equivalent non-volatile memory, and the like may be used in addition to or instead of the Fig. 1. The processes of the illustrative embodiments may also be applied to a multiprocessor data processing system.

[0039] In some illustrative examples, data processing system 100 may be a personal digital assistant (PDA) configured with flash memory to provide non-volatile storage for storing operating system files and / or user-generated data. A bus system may include one or more buses, such as a system bus, an I / O bus, and a PCI bus. The bus system may, of course, be implemented using any type of data transfer structure or architecture that provides for transfer of data between various components or devices associated with the structure or architecture. A data transfer device may include one or more devices used to transmit and receive data, such as a modem or a network adapter.A memory may be, for example, main memory 108 or a cache memory such as in the northbridge memory controller hub 102. A processing unit may include one or more processors or CPUs. The memory illustrated in . Fig. The example shown in Figure 1 is not intended to imply any architectural limitations. Data processing system 100 may be a tablet computer, laptop computer, or telephone unit in addition to a PDA.

[0040] Servers that publish messages about topics do so in response to clients subscribing to those topics. In this publish / subscribe environment, a server performs various functions, including registering that a client is subscribed to a topic, registering that a client is unsubscribed to a topic, registering that a client has logged in to establish a client connection, or detecting that a client has stopped responding to pings, among other messages. In traditional systems, many of the messages received by the server occur randomly. The asynchronous nature of client messaging can require a server to handle each message ad hoc.These non-consecutive and randomly distributed messages can result in excessive load on a server, especially when processor-intensive messages arrive at a processor without adequate resources allocated to respond to the messages in a timely manner. Some clients also transmit messages that result in high-frequency server responses. These frequent transmissions can place an additional burden on a server.

[0041] When such messages are delivered in a publish / subscribe environment, potentially slow or disabled clients can also cause processing delays on the server. During the development of the invention, the inventors discovered that many users have very different habits regarding data access. The mixing of older devices with newer devices and different network infrastructures can result in publish / subscribe message delivery following patterns within certain user groups, with these patterns differing among those groups. For example, some users may be particularly careful to switch among subscribed topics in a publish / subscribe environment. These frequent topic switches can therefore potentially burden a server and cause undesirable processing delays on poorly configured servers.

[0042] The illustrative embodiments enable separating a plurality of clients into groups based on the frequency of message delivery from the plurality of clients. High-volume messaging servers may further be controlled to handle loads from high-activity clients by batching incoming messages over delay intervals to efficiently handle message volumes that are comparatively larger for a group of high-activity clients than for low-activity clients. One or more illustrative embodiments further enable a server to control clients to batch ping responses, either based on short time intervals, or to send ping responses to a specific network address, or based on a specific network protocol.

[0043] Fig.2 is a block diagram of a network environment according to an illustrative embodiment of the invention. Fig.Figure 2 describes a publish / subscribe environment, which is an environment in which clients can encounter one or more servers that can, for example, asynchronously transmit messages about a topic. A publish / subscribe client is a client configured to subscribe and maintain a persistent connection in a publish / subscribe environment. Clients 231, 233, and 235 are examples of publish / subscribe clients. Message delivery server 201 is connected to network 210 to exchange packets with clients such as clients 231, 233, and 235. A packet is a unit into which information is divided for transmission over a network. A packet may include management information such as source, destination, serial number, protocol type, and the like.A secondary server such as server 203 may also be connected to network 210 to exchange packets with clients such as clients 231, 233 and 235.

[0044] In one illustrative embodiment, both messaging server 201 and server 203 may be logical partitions, each sharing resources of a common computing system, although many resources are allocated for exclusive use by messaging server 201 or server 203. In other words, this illustrative embodiment allows both servers to reside on a virtualized server. A virtualized server is a server in which resources, such as memory, are separated and available exclusively to an operating system running on top of those resources. A virtualized server may still provide access to a network interface card among servers, in which case each server may access the card asynchronously.In another illustrative embodiment, messaging server 201 and server 203 may be arranged to include some or all of the components of data processing system 100 of FIG. Fig. Use 1.

[0045] In the publish / subscribe environment of Fig. 2, a client such as client 231, 233 or 235 may subscribe to a set of topics that a messaging server 201 regularly updates or publishes. The client may be arranged to use some or all components of the data processing system 100 from Fig.1. Initially, the client may initialize a persistent connection to a messaging server 201. The client may first read a configuration file that may specify a default set of subscriptions and / or a server hosting topics. The client may rely on the network 210, which may be a combination of wired and wireless connections. In this way, the client may establish a persistent connection to a messaging server 201.

[0046] Next, the client may transmit a request for a connection to messaging server 201 using the transport control protocol (TCP). The TCP connection request may include a subscription message using a publish-subscribe protocol. The subscription message may include, for example, a description of a topic, such as "Stocks at new 12-month high." At this point, a persistent connection may be established between the client and messaging server 201.A persistent connection is a connection between two computing systems using a link, which may include a network, so that each computing system can maintain state information about the connection until one computing system disconnects the persistent connection or one computing system fails to acknowledge a message from its counterpart within a timeout period. A client connection is a persistent connection in which at least one of the computing systems is a client. Although an occasional exchange of packets may occur between the client and server, the persistent connection remains active until both the client and server have received messages within acceptable tolerances, such as timeout periods.

[0047] A connection method or connection mechanism is a specific protocol that uses specific Uniform Resource Identifiers to establish a connection. The initial connection mechanism used by the client may be TCP, transmitted to an IP address of the server. In this case, TCP is the specific protocol, and the IP address is the Uniform Resource Identifier.

[0048] The messaging server 201 may host several software components, such as Java objects. The software components may include the acceptor 204, the thread pool 205, and the selector threads 206 and 208. Additional software components in the messaging server 201 may control the receipt of environmental data relating, for example, to topics of interest to the users of the clients. An example of environmental data may be current stock quotes. The messaging server 201 may collect environmental data locally or remotely.

[0049] Acceptor 204 may first process newly established client persistent connections to messaging server 201. Thread pool 205 may assign an activity category to a client, such as client 231, 233, or 235, based on observed selection operation behavior. A thread pool is a group of threads that can perform any task assigned to the thread pool by a thread inside or outside the thread pool. A thread is a processor's state, resources allocated to a processor, and machine instructions allocated processing time in the processor until the last step of the machine instructions is executed. A thread may be one of multiple threads that compete for processor time or clock cycles while the processor executes one instruction at a time.An activity category is a category of one or more clients that exhibit selection operation activity within a ratio range, as described in more detail later. Example activity categories are high activity clients 251, medium activity clients 253, and low activity clients 255.

[0050] A "select operation" is a request to a select thread, such as select thread 206 or 208, to provide a list of clients ready to receive messages. In other words, in a select operation, the select thread selects a set of clients whose corresponding TCP / IP buffers on a server are ready for I / O operations. A select operation may occur in response to a new client being added to a select thread, such as select thread 206 or 208, or in response to a client, such as client 231, 233, or 235, sending a message to a server, such as messaging server 201. Another reason for a select operation may be a status of a TCP / IP buffer on a server. A TCP / IP buffer may be full for a client, such as client 231, 233, or 235.Messages being processed from a full TCP / IP buffer may therefore cause an outgoing message from the server to be queued. Queuing is a function by which the server collects messages in a buffer so that the messages can be processed together, thereby achieving performance improvements. Possible reasons for select operations include select operation reason 243, which may be one or more packets sent from a client such as client 231, 233, or 235 to a server such as messaging server 201. Alternatively, a select operation may be indirectly caused by a client such as client 231, 233, or 235 not acknowledging a message.

[0051] Messaging server 201 may log the selection operation behavior or other record of the number of selection operations caused by a TCP buffer full of messaging server 201 associated with a client, such as client 231, 233, or 235. For example, 20 seconds between two selection operations caused by a client may be above a threshold previously set in messaging server 201 for the activity category to which the client is assigned. A threshold is a frequency of selection operations that messaging server 201 may support before the client is classified into a new activity category.The threshold may be set by an administrator of the messaging server 201, set as a default by a manufacturer of the messaging server 201, adjusted based on the load of the messaging server 201, or it may be a combination of the foregoing. For example, when the messaging server 201 is lightly loaded, the threshold may be higher than when the messaging server 201 is heavily loaded. A "load" is a processor utilization of the processors of the referenced server. The threshold is a limit or boundary condition for a series of numbers that characterize a category of activity.

[0052] Table 1 shows an example ratio range list with multiple thresholds, where "X" represents a ratio. A ratio range specifies the criteria that excludes a selection operation behavior from an activity category if the selection operation behavior falls outside the ratio range. In an example embodiment, an administrator or the messaging server 201 itself can flexibly set criteria or ratio ranges based on past experience, so that, for example, more than 50% of clients are assigned to a low activity category when more than 100 clients are active. Each ratio in Table 1 is a relation of the number of times a client causes a selection operation per monitoring time. A monitoring time may be, for example, 60 seconds. TABLE 1 Lower limit of the ratio range Upper limit of the ratio range Activity category No X < 2 Low activity category 2 ≤ X X < 5 Medium activity category 5 ≤ X No High activity category

[0053] In an exemplary embodiment, thread pool 205 may classify clients, such as clients 231, 233, or 235, into three activity categories accordingly: high-activity clients 251, medium-activity clients 253, and low-activity clients 255. It will be appreciated that the medium-activity category, e.g., medium-activity clients 253, may be defined, depending on the situation, by an upper threshold and a lower threshold selected from a variety of thresholds. The thresholds applicable to the low-activity category, e.g., low-activity clients 255, and the high-activity category, e.g., high-activity clients 251, may therefore be adjusted accordingly such that no ratio range overlaps with an adjacent range.The medium activity category can thus be defined by lower thresholds of at least more than one client message per 60 seconds and upper thresholds of less than ten client messages per 60 seconds.

[0054] Each of the selection threads 206 and 208 is assigned to process messages of a different activity category. In one illustrative embodiment, the selection thread 206 may be assigned to process messages from clients associated with a specific activity category, for example, the low-activity clients 255. In another illustrative embodiment, the selection thread 208 may be similarly assigned to process messages from clients, for example, the high-activity clients 251. The messages may arrive via the network address 207 or the network address 209. The network address 207 and the network address 209 may be TCP / IP addresses and port numbers.

[0055] It will be appreciated that the thresholds in a table such as Table 1 may be adjusted depending on the availability of one or more servers, such as messaging server 201 and server 203, which may be advantageous in that the selection threads 206 and 208 may use the table to move a subset of clients, where moving refers to connecting the clients to another server so that they interact (or are connected) exclusively with an associated server based on the clients in the subset that are associated with a specific activity category or categories. The associated server may be hosted on a data processing system that hosts the server to which the subset of clients is connected prior to the move, e.g., messaging server 201 or server 203.The associated server may alternatively be hosted in another remote second data processing system, but connected via, for example, a network to the server to which the subset of clients is connected prior to relocation, for example, messaging server 201 or server 203.

[0056] To further illustrate, a client such as client 231, 233, or 235 may determine whether it has received a message from a server such as messaging server 201. Once the client has received a message such as scheduled ping 241 from the server, the client may acknowledge the message. A scheduled ping is a ping that repeats on a scheduled basis. In other words, the ping is part of a group of pings that are repeated regularly and can be set by the system administrator. The client may acknowledge the message by sending a reply ping to the source of the message. A reply ping is a response transmitted to a source specified in the scheduled ping. The client may take further steps in accordance with the message.For example, if the message refers to a topic to which the client has subscribed, a corresponding change can be made to a user interface in the client, e.g. a dashboard.

[0057] In response to receiving messages from the client, the server allocates resources to process the messages. For example, the server may allocate resources by connecting the client to a second server, such as server 203.

[0058] Fig.3 is a flowchart of steps for classifying a client into one of at least two activity categories according to an illustrative embodiment of the invention. A server may initially add a client connection (step 301). Adding a client connection involves the server and the client jointly exchanging and / or generating status information about the connection to establish a persistent connection. In other words, in response to the exchange of packets according to a network protocol, the client and the server generate or otherwise record the data about the one or more exchanged packets and, optionally, the packets still to be exchanged. The client may be, for example, client 231, 233, or 235 of Fig. 2. The server may be, for example, the messaging server 201 or the server 203 of Fig. 2 act.

[0059] Next, the server may classify the client into a first activity category (step 303). The first activity category is the category assigned to a client connection in response to the client connection being established. In one illustrative embodiment, the first activity category may be a high activity category. A high activity category is any activity category specified by any ratio range that is not a ratio range in the lowest activity category. Next, the server determines whether the client caused a selection operation (step 305). If the client did not cause a selection operation, the server repeatedly performs step 305. In response to the server determining that the client caused a selection operation, the server logs the selection operation to a log file (step 307).A log file is a file stored in a log buffer, for example, in memory. The log file can be arranged as a circular buffer, in which case the oldest entries can be overwritten by newer entries. Each log entry can contain a time stamp and a client identifier. The server can use one or more selection operations recorded in a log to characterize client behavior.

[0060] Watchdogs may be periodically repeated intervals used by the server to collect and log client behavior. In response to the termination of the watchdog, the server may check the log for activity during the watchdog period and perform one or more calculations related to the client. Next, the server may determine whether a watchdog period has expired for a probe interval (step 309). A probe interval is a period of time following the addition of a client connection in step 301 during which either the logged data or the usual client behavior is unclear or otherwise unsuitable for characterization. Watchdogs may be repeated during and after the probe interval.The server can then use the periodically repeated monitoring times to evaluate possible new changes in the client's behavior and respond accordingly. If no monitoring time has expired for the sample interval, processing can continue at step 305.

[0061] When a monitoring time for the trial interval has elapsed, the server may calculate a first ratio of a number of selection operations to a time interval (step 311). In other words, if the time interval is set to 5 minutes, the server counts the number of selection operations found in the log file for the client during the last 5 minutes, divides this by 5, and thereby calculates a ratio for the client expressed in selection operations per minute. It is obvious that a ratio may be a number that simply refers to a passage of time based on default system settings, and for which no division operation needs to be performed to calculate the ratio.

[0062] Next, the server may rank the client based on the first ratio (step 313). The ranking may be based on a comparison of one or more current ratios to a ratio range list with respect to monitoring times, such as described in Table 1 above. The ratio range list with respect to monitoring times may define two or more ranges, each bounded by at least one threshold that establishes the criteria for client behavior to be classified into one of at least two activity categories, for example, a high activity category and a low activity category. Examples of three ratio ranges include fewer than 2 selection operations per 60 seconds, 2 or more selection operations and fewer than 5 selection operations per 60 seconds, and 5 or more selection operations and fewer than 10 selection operations per 60 seconds.Clients that have initiated selection operations based on these ratio ranges can therefore be classified into a low-activity category, a medium-activity category, or a high-activity category, respectively. As an illustrative example, the server can store the ratio range list in terms of monitoring times in a control file. A control file is a data structure in memory that the server can read or access.

[0063] The server can next iteratively check and potentially reassign the client because the client has left the probe interval and entered a mature phase. Once the server has maintained a persistent connection to the client for longer than one probe interval, the client is said to be mature. Potential reassignments include reassigning the client to an activity category to which the client has not previously been assigned. In other words, an activity category to which the client has not been assigned means all remaining activity categories to which the client has not been assigned since the most recent addition of the connection for the client described in step 301. The server determines whether the client causes a selection operation (step 315). If so, the server logs the selection operation to the log file (step 317).Next, the server may determine whether a watchdog time for the mature client has expired (step 319). If not, processing continues at step 315. If so, the server calculates the ratio of the number of selection operations to the watchdog time (step 321). Although the watchdog time may be set to 60 seconds, it is understood that many alternative time intervals for the watchdog time may be set.

[0064] After determining the ratio, the server reads the ratio with respect to the monitoring times from the ratio range list. The server then determines whether the ratio is incompatible with an activity category currently assigned to the client (step 323). If no incompatibility is found, the server may proceed to step 315. However, if the server determines that the ratio, based on reading the ratio with respect to the monitoring times from the ratio range list, is incompatible with the activity category currently assigned to the client (positive result at step 323), the server changes or redefines the assigned activity category (step 325). In other words, the server may assign the client to a different activity category than the one to which it is currently assigned.For example, if a client is classified in the highest activity category after the server determines the first ratio at step 311, but the client's recently logged selection operation behavior matches the lowest activity category, the server may change the client's assigned activity category to the medium activity category. In other words, the server may, at least for the current monitoring time, assign a client to an activity category that corresponds to a ratio range adjacent to a current assignment for that client.

[0065] In response to the client changing or setting the assigned activity category, the server may review the service provided to the client (step 327). The server may, for example, connect the client to a second server in response to the re-setting of the category. The second server may be hosted on a data processing system that hosts the first server. Alternatively, the second server may be hosted on another remote second data processing system that is connected to the first server, for example, via a network. The moving may be performed by a messaging server, such as the messaging server 201 of Fig. 2, which sends a move-to or disconnect message with a move-to field. The server can thus specify a new IP address or host name to which the client can connect.

[0066] Fig. Figure 4A is a table of client identifiers and the corresponding activity category assignments according to an illustrative embodiment of the invention. A server, such as messaging server 201 or server 203 of Fig.2 may use a client's identifier, which is the source of a message, to read the activity category associated with the client. The server may use table 450 to determine that a match exists when a particular client identifier matches a preferred activity category. If no match is found when using a client's identifier in reading the activity category, then the determination that the client is in such an activity category is negative. It will be appreciated that each activity category may be represented in the table with a unique string such as "high" as shown in row 451, or a unique serial number that corresponds to the category on a one-to-one basis.Table 450 may include a row for each client connected to the server, regardless of the current connection state, or alternatively, only for those clients that have active connections to the server. If table 450 is configured to assign categories to all clients regardless of connection status, then unconnected clients may be recorded as not having an assignment to an activity category, for example, by not including data in the corresponding activity category field for the client. Table 450 may be stored in volatile or non-volatile memory of the server, for example, main memory 108, hard disk drive 126, or CD-ROM 130. Fig. 1.

[0067] Fig.4B is a flowchart of delay scaling to discriminatory queue clients assigned to a high activity category according to an illustrative embodiment of the invention. The steps of Fig. 4B may be selected by a selection thread such as the selection thread 206 of the messaging server 201 of Fig.2. The selection thread first determines whether it has received a message that causes a selection operation (step 401). If no message has been received, the selection thread may repeatedly check whether messages have been received. If a message has been received, the selection thread determines whether a client from which the message was received is in the high activity category (step 403). The determination of step 403 may be performed by referring to table 450 or another data structure that has a category descriptor associated with an identifier of each client. In other words, an identifier of the client that is the source of the message is used as a key to read the corresponding activity category of the client. Step 401 may be repeated while waiting for a message that meets the criterion.

[0068] If the client is in the high activity category, the selection thread queues the message with other messages for a longer interval and then continues processing the message (step 405). A longer interval is an interval longer than a standard interval. An example of a longer interval might be around 300 milliseconds. An example of a standard interval might be around 200 milliseconds. The longer interval and the standard interval are periods of time during which messages are batched, for example, in a queue associated with an activity category, to collectively process all messages in the queue in response to the termination of the longer interval and / or standard interval.Processing messages in a batched form allows the server to achieve greater performance compared to processing each message individually. Differentiating messages based on the client's classification of an activity is one way to provide a different service in response to an activity category assigned to the client, as described in connection with step 327 of FIG. Fig. 3 was described.

[0069] Fig. 4C is a flowchart of delay scaling to discriminatory queue clients assigned to a low activity category according to an illustrative embodiment of the invention. The steps of Fig. 4C may be selected by a selection thread such as the selection thread 208 of the messaging server 201 of Fig.2. The selection thread first determines whether a message is received that causes a selection operation (step 411). Step 411 may be repeated until it is determined that no message is received that meets the criteria. If no message is received, the selection thread may repeatedly check whether messages have been received. In response to receiving a message, the selection thread may determine whether a client from which the message was received is in the low activity category (step 413). The determination of step 413 is performed by referring to the table 450 or other data structure that has a category descriptor associated with an identifier of each client. In other words, an identifier of the client that is the source of the message is used as a key to read the corresponding activity category of the client.

[0070] If the client is not in the low activity category, processing continues at step 411. If the client is in the low activity category, the selection thread queues the message with other messages for a default interval and then continues processing the message (step 417). Further processing occurs at step 411.

[0071] Fig. Figure 5A is a flowchart of thread selection incorporating current thread control according to an illustrative embodiment of the invention. The approach is referred to as thread selection. Incoming messages are received by a message delivery server selection thread, such as selection thread 206 or 208 of Fig.2. The selection thread first determines whether it has received a message that causes a selection operation (step 501). If such a message has been received, the selection thread may determine whether a client that sent the message to the server is classified in a high activity category (step 503). In one illustrative embodiment, the selection thread may query table 450 of Fig.4A to determine whether the client that sent the message to the server is classified in the high activity category. If the message did not originate from a client classified in the high activity category, the selection thread may repeat step 501. If the client is classified in the high activity category, the selection thread may continue the specific operations on the message and the replies to it (step 505). These operations include, for example, changing topic operations, detaching and releasing resource operations, and clearing ping counts associated with client operations.

[0072] Fig.Figure 5B is a flowchart of thread selection that applies different strategies regarding work distribution among threads in response to client classification, according to an illustrative embodiment of the invention. Incoming messages are received by a message delivery server selection thread, such as selection thread 206 or 208 of Fig. 2. The selection thread first determines whether it has received a message that causes a selection operation (step 511). If such a message has been received, the selection thread may determine whether a client that sent the message to the server is classified in a low or high activity category (step 513). In one illustrative embodiment, the selection thread may query table 450 of Fig.4A to determine whether the client that sent the message to the server is classified in the low or medium activity category. If the message does not originate from a client classified in either of these categories, the selection thread may repeat step 511. If the client is classified in either activity category, the selection thread may perform an I / O request of the message using a thread pool (step 515). The thread pool may be, for example, thread pool 205 of Fig. 2. The allocation of threads in the thread pool can reduce the latency of the request. The latency is shorter, at least in multi-core systems, compared to the allocated use of the selection thread. Both in Fig. In both 5A and 5B, the first steps 501 and 511 are repeated as long as their respective criteria are not met.

[0073] Some performance improvements can be achieved by having a server routinely test a client's responsiveness through pings. A server can assign a non-responsive client to a null or other inactive state. Importantly, the server can skip sending updates to clients known to be non-responsive. Pings and the resulting processing load of waiting to collect ping responses are inherently taxing on the server. This load can be reduced if the responses can be processed in batches. The following Fig. 6 and Fig.Figure 7 illustrates two ways to batch or otherwise allocate server resources for incoming ping responses from clients. By customizing ping responses to specific time intervals or otherwise matching these ping responses to a server address, the server can achieve performance improvements that would not otherwise be possible. One way to customize ping responses is to issue pings to all connected clients at approximately the same time, for example, at the end of every other minute. Because clients on most networks tend to respond to pings within a few hundred milliseconds, most of the time between pings will be few ping responses once the initial batch of ping responses is received.

[0074] Fig.6 is a time-based ping aggregation flowchart according to an illustrative embodiment of the invention. Ping aggregation is one of a number of techniques for separating ping responses. One way to separate ping responses is to cluster the occurrence of the responses at specific time intervals. Since the timing of the ping response correlates with the issuance of the ping, ping responses can be caused to occur primarily in an interval after the ping. Rapidly issuing pings from a server to all clients currently connected to the server within, for example, one second can therefore result in the formation of a mass ping. A mass ping phase is the scheduled duration of pings issued by the server to all clients currently connected to the server.A mass ping phase can be scheduled at specified intervals, allowing the server to select its list of connected clients without causing unnecessary server utilization or network congestion. For example, a mass ping phase can be scheduled to occur for all client connections every two minutes. Fig. 6 explains a first possibility for performing ping bundling.

[0075] A server initially establishes a plurality of client connections (step 601). The server may be, for example, the messaging server 201 or the server 203 of Fig.2. Next, the server determines whether a bulk ping phase has been reached (step 603). If the bulk ping phase has not been reached, the server may continue normal processing of received messages, for example, by separating client messages based on the client's activity categories (step 615).

[0076] Otherwise, if the bulk ping phase is reached, the server pings all connected clients (step 605). The connected clients can be one or more of clients 231, 233, and 235 from Fig. 2. Next, the server queues ping response messages with other messages and sends processing of the queued messages to a selection thread such as selection thread 206 or 208 of Fig.2 (step 607). The processing of the selection thread can be scheduled for a specified time after the bulk ping phase, for example, using the longer interval defined above. A queued client message is a client message that is queued in this way. Next, the server, via the selection thread, executes the I / O requests for the queued messages (step 609). A common timeout can be used for all pings from step 605. A timeout is a specified time after which the server can change the state of a connection with a particular client after the server does not receive a response to the corresponding ping.The specified time may be set to expire based on an event that occurs concurrently with a ping to a particular client, for example, the bulk ping phase, which is initiated within seconds of a ping being issued to the particular client. The server may thus use a common timeout value for all pinged clients in a bulk ping to determine whether the ping response timeout for a particular client has expired. The server may then repeatedly determine whether this timeout value has been reached (step 611). In other words, the server may perform the queuing of step 607 and the execution of the I / O request of step 609 multiple times before the timeout value is reached. As part of step 611, the server may update a data structure of candidate clients of the connected clients for disconnection.In other words, for each response ping received, the server may mark the client as connected, and for each response ping not yet received, the server may indicate the client as a candidate for disconnection. If the timeout is not reached, steps 607 and 609 may be repeated.

[0077] However, if the time limit is reached, the server may disconnect clients that have not yet responded to the ping (step 613). Step 613 may be modified for some embodiments to allow a client to be recorded as connected by the server until the client does not respond to a specified number of consecutive pings. Processing ends after steps 613 or 615.

[0078] Fig.7 is a flowchart of ping aggregation based on aggregated ping responses to an associated address or using a non-default mode according to an illustrative embodiment of the invention. Fig. Figure 7 explains a second way to perform ping aggregation. Another way to separate ping responses is to define a special return address port in a ping message that is assigned to handle ping responses. A server initially establishes a plurality of client connections (step 701). The server can be, for example, the messaging server 201 or the server 203 of Fig. 2. If no mass ping phase has occurred (step 703), the server may continue normal processing of received messages, for example, by separating client messages based on the client activity categories (step 711).

[0079] Otherwise, when the bulk ping phase is reached, the server pings all client connections (step 705). For example, a bulk ping can be scheduled for all client connections every two minutes. One way to ping clients, which could be, for example, clients 231, 233, or 235 of Fig. 2 is that the server specifies a special return address in the ping message that is different from the server address used for persistent connections between the clients and the server. The server can use a common timeout for all pings from step 705. The server can thus repeatedly determine whether this timeout has been reached (step 707). As in Fig.6, the server measures the time limit based on a start or end of the pings issued during the bulk ping phase. If the time limit is not reached, the server may repeatedly determine whether the time limit has occurred. In response to the time limit being reached, the server may disconnect clients that have not yet responded to the ping (step 709). Processing ends after steps 709 or 711.

[0080] An alternative way to perform step 705 is for the server to indicate to clients that a User Datagram Protocol (UDP) is used for ping responses. In other words, the server may add a non-standard bit to a ping message informing the client to use a non-standard response mode, namely UDP. The server may set the bit to one when using the non-standard mode for ping responses and to zero when sending a routine ping response to the TCP source.

[0081] The above description presents several ways to schedule, address, or use division of labor among threads to handle incoming messages or other reasons for selection operations in a publish / subscribe environment. One way to characterize client connection behavior is first disclosed. Once client connections are classified into categories such as high activity or low activity, a server can distinguish between incoming messages and incoming messages that cause selection operations and can queue or not queue these selection operations for a longer interval. This can result in server performance improvements.The server can further separate high-activity clients and process the high-activity clients by sharing a selection thread for both receiving messages from high-activity clients and further responsively processing the messages. Furthermore, various methods for concentrating ping responses are disclosed.

[0082] Suitable data processing systems for storing and / or executing program code may include at least one processor connected directly or indirectly to storage elements via a system bus. The storage elements may include local memory used during actual execution of the program code, mass storage, and cache memory that provides temporary storage of at least a portion of the program code to reduce the frequency with which code must be retrieved from mass storage during execution.

[0083] Input / output or I / O devices (including, but not limited to, keyboards, displays, pointing devices, etc.) can be connected to the system either directly or through intermediate I / O controllers.

[0084] Network adapters may also be connected to the system to enable the data processing system to connect to other data processing systems or remotely located printers or computer-readable physical storage devices through intermediate private or public networks. Modems, cable modems, and Ethernet cards are just some of the types of network adapters currently available.

[0085] It will be appreciated by those skilled in the art that aspects of the present invention may be embodied as a system, method, or computer program product. Aspects of the present invention may therefore take the form of an entirely hardware implementation, an entirely software implementation (including firmware, resident software, microcode, etc.), or an embodiment combining hardware and software aspects, which may be generally referred to herein as a "circuit," "module," or "system." Aspects of the present invention may further take the form of a computer program product embodied in one or more computer-readable media having computer-readable program code embodied therein.

[0086] Any combination of one or more computer-readable media may be used. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or unit, or any suitable combination thereof.More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable computer floppy disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the context of this document, a computer-readable storage medium can be any physical medium that can contain or store a program used by or in connection with a system, apparatus, or device to execute instructions.

[0087] A computer-readable signal medium may comprise a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take a variety of forms, including, but not limited to, electromagnetic, optical, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium, other than a computer-readable storage medium, that can transmit, convey, or transport a program for use by or in connection with an instruction-executing system, apparatus, or device.

[0088] Program code embodied in a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wired, fiber optic cable, RF, etc., or any suitable combination thereof.

[0089] Computer program code for performing the operations associated with aspects of the present invention may be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, Smalltalk, C++, or the like, as well as conventional procedural programming languages ​​such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.In the latter scenario, the remote computer may be connected to the user's computer over any network, for example, a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet through an Internet service provider).

[0090] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to form a machine, such that the instructions, executing via the processor of the computer or other programmable data processing apparatus, produce means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0091] These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner such that the instructions stored in the computer-readable medium produce a product of manufacture including instructions that implement the function / act specified in the flowchart and / or block diagram block or blocks.

[0092] The computer program instructions may be further loaded into a computer, other programmable data processing apparatus, or other devices to initiate a series of functional steps performed on the computer, other programmable device, or other devices to produce a computer-implemented process, such that the instructions executing on the computer or other programmable device provide processes to implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0093] The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that includes one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions specified in the block may execute in a different order than illustrated in the figures. For example, two consecutively illustrated blocks may actually execute substantially concurrently, or the blocks may sometimes execute in reverse order depending on the applicable functionality.It should also be understood that each block of the block diagram and / or flowchart illustration, and combinations of blocks in the block diagram and / or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or by combinations of special purpose hardware and computer instructions.

[0094] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a" and "an" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It is further understood that the terms "comprising" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0095] The corresponding structures, materials, measures, and equivalents of all means or step-plus-function elements in the following claims are intended to include any structure, material, or measure for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. It will be apparent to those skilled in the art that many changes and modifications are possible without departing from the scope and spirit of the invention.The embodiment was chosen and described in order to best explain the principles of the invention and its practical application, and to enable others skilled in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims

[1] A data processing system (100) for optimizing a server connection in a permanently connected publish / subscribe environment, the data processing system comprising: - one or more processors, one or more computer-readable memories, and one or more computer-readable physical storage units for executing program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories, - to assign (303) a first activity category to a client (231, 233, 235); - to log (307) one or more selection operations of a connection between the client and a first server (201) in a log file; - to calculate (311) a ratio of a number of the one or more selection operations to a monitoring time of the first server, wherein the monitoring time is a time interval that has elapsed since a previous review of the logged data; - to determine (313) a second activity category for the client based on reading the ratio from a ratio range list in a control file, the second activity category not being the first category; - in response to the second activity category being determined, to connect the client to a second server (203) instead of to the first server; - to determine that more than 50% of clients are assigned to the low activity category; and to reassign the client to the low activity category; - to queue one or more initial client messages during a longer interval; - to process the one or more first client messages in response to the expiration of the longer interval; - in response to the client being reassigned to the low activity category, to queue one or more second client messages during a standard interval, the standard interval being of shorter duration than the longer interval; and - to process the one or more second client messages in response to the expiration of the default interval. [2] The data processing system (100) of claim 1, wherein the second activity category is a medium activity category having a ratio range with a lower threshold of at least one selection operation per 60 seconds and an upper threshold of at most ten selection operations per 60 seconds. [3] The data processing system (100) of claim 1, further comprising program instructions stored in at least one of the one or more memory units for execution by at least one of the one or more processors via at least one of the one or more memories to determine whether the client (231, 233, 235) was connected to the first server (201) during a probe interval; and wherein the program instructions are responsive to the program instructions for logging the one or more selection operations of the connection between the client and the first server in the log file (231, 233, 235) to determine whether the client was connected to the first server during the probe interval.

Citation Information

Patent Citations

  • Method for selecting and directing internet communications

    US20020116258A1

  • System for reliably connecting a client computer to a server computer

    US6173312B1

  • Load balancing apparatus and method

    US7437461B2

  • System for distributing load over multiple servers at an internet site

    US7730190B2