# Patent

## Title
Lossy hit buffer

## Abstract

Configurations providing a configurable buffer for storing incoming event tracking data communications in a lossy manner are described. In one aspect, a server can utilize the configurable buffer for storing the incoming event tracking data communications. When the buffer becomes full, the server can transmit the accumulated tracking data communications in the configuration buffer as a batch transmission. The server can discard any new incoming requests once the buffer becomes full. Further, the server can replace data in the buffer with new incoming requests based on one or more criterion if the buffer is full.
In some implementations, the server transmits the batch of the accumulated tracking data communications in the configurable buffer after a predetermined time has elapsed.

## Background
BACKGROUND
Web site analytics involves the analysis and reporting of web site traffic data to an associated publisher. A publisher is an entity that owns and/or manages a particular web site. The publisher can monitor web site analytics data related to user visits and links to the web site by using web site analytics tools provided by third parties.
Existing web site analytics data systems work well for processing a high volume of web traffic data in order to provide interactive reports over substantial periods of time with high fidelity. However, these systems incur a high level of latency from hit occurrence to hit reporting, and also do not allow reports to segment in a fine and granular time basis. Consequently, existing web site analytics data systems have difficulty in monitoring sudden spikes or drops in traffic, or for tracking, for example, a propagation of a link to the publisher's web site over a social networking site, which can typically unfold in a time period of minutes.
Furthermore, the high latency of web site analytics reporting makes it more difficult for publishers to implement web site analytics on their web sites. Because it takes a longer period of time for reports to show up, publishers also often fail to notice any erroneous deployment of web site analytics tracking code on associated web sites.
SUMMARY
The subject technology provides for buffering incoming event tracking data communications and transmitting the buffered event tracking data communications. An event tracking data communication is received. The event tracking data communication includes event tracking data for tracking an activity associated with a source of the event tracking data communication. A buffer for storing the event tracking data communication is determined whether it is full. The event tracking data communication is stored in the buffer if the buffer is not full. The event tracking data communications stored in the buffer are transmitted to a real-time analytics server if the buffer is full or after a predetermined period of time. Further, if the buffer is full prior to transmitting the stored event tracking data communications, newly received event tracking data communications are discarded.
In another aspect of the subject technology, a system for lossy buffering of incoming event tracking data communications and transmitting the buffered event tracking data communications is provided. The system includes a logging server configured to receive one or more event tracking data communications, store the received one or more event tracking data communications in a lossy buffer, transmit the one or more event tracking data communications stored in the lossy buffer if the lossy buffer is full or after a predetermined period of time, and discard newly received event tracking data communications if the lossy buffer is full prior to transmitting the stored event tracking data communications. Each event tracking data communication includes event tracking data for tracking an activity associated with a source of the event tracking data communication.
The subject technology further provides for receiving an event tracking data communication. The event tracking data communication includes event tracking data for tracking an activity associated with a source of the event tracking data communication. The subject technology then determines whether a buffer for storing the event tracking data communication is full. The event tracking data communication is stored in the buffer if the buffer is not full. The event tracking data communication is discarded if the buffer is full. One or more event tracking data communications stored in the buffer is transmitted to a real-time analytics server if the buffer is full. The one or more event tracking data communications stored in the buffer is transmitted after a predetermined period of time if the buffer is not full before the predetermined period of time has elapsed.
It is understood that other configurations of the subject technology will become readily apparent to those skilled in the art from the following detailed description, wherein various configurations of the subject technology are shown and described by way of illustration. As will be realized, the subject technology is capable of other and different configurations and its several details are capable of modification in various other respects, all without departing from the scope of the subject technology. Accordingly, the drawings and detailed description are to be regarded as illustrative in nature and not as restrictive.



BRIEF DESCRIPTION OF THE DRAWINGS
The novel features of the subject technology are set forth in the appended claims. However, for purpose of explanation, several configurations of the subject technology are set forth in the following figures.
FIG. 1 illustrates an exemplary architecture diagram of a multi-tiered real-time analytics system of some configurations.
FIG. 2 conceptually illustrates an exemplary architecture diagram of a multi-tiered real-time analytics system with a logging server for queuing incoming event tracking data communications for transmission to a real-time analytics server of some configurations.
FIG. 3A conceptually illustrates an exemplary process for queuing incoming event tracking data communications using a lossy hit buffer and subsequently transmitting the event tracking data communications of some configurations.
FIG. 3B conceptually illustrates an exemplary process for transmitting one or more event tracking data communications stored in a lossy hit buffer after a predetermined period of time.
FIG. 4 conceptually illustrates various attributes and data structures that are included in some configurations of the multi-tiered real-time analytics system.
FIG. 5 conceptually illustrates an exemplary software architecture of an real-time server of some configurations.
FIG. 6 conceptually illustrates an electronic system in which some configurations are implemented.



DETAILED DESCRIPTION
The detailed description set forth below is intended as a description of various configurations of the subject technology and is not intended to represent the only configurations in which the subject technology may be practiced. The appended drawings are incorporated herein and constitute a part of the detailed description. The detailed description includes specific details for the purpose of providing a thorough understanding of the subject technology. However, it will be clear and apparent to those skilled in the art that the subject technology is not limited to the specific details set forth herein and may be practiced without these specific details. In some instances, well-known structures and components are shown in block diagram form in order to avoid obscuring the concepts of the subject technology.
Current analytics systems provide for aggregating and reporting of web site traffic data with high latency that can range from several hours to over a day. To address issues with high latency reporting, a real-time analytics system for receiving and reporting web site traffic data with low latency is provided. Due to the potential high volume of web site traffic data received, scalability of a real-time analytics system is important to ensure that the high volume of web traffic data can be processed with low latency.
To address scalability and latency issues, the current invention is directed to a configurable buffer that employs a lossy storage scheme for storing and transmitting incoming event tracking data communications (e.g., Hypertext Transfer Protocol (HTTP) requests that are generated from various user devices and/or clients). In some implementations, a server can utilize the configurable buffer for storing the incoming event tracking data communications. When the buffer becomes full, the server can transmit the accumulated tracking data communications in the configuration buffer as a batch transmission. Additionally, the server can adopt a policy(s) for discarding and storing any overflow requests when the buffer is full. For example, the server can discard any new incoming requests once the buffer becomes full. Alternatively, the server can replace data in the buffer with new incoming requests based on one or more criterion if the buffer is full.
Additionally, to optimize the transmission of the accumulated tracking data communications for reporting real-time analytics data, the server considers several factors, such as 1) memory requirements, 2) latency, and 3) network bandwidth. For instance, in some implementations, the server transmits the batch of the accumulated tracking data communications after a predetermined time has elapsed, while in some instances the server transmits the accumulated tracking data communications after the buffer stores at least a predetermined number of tracking data communications.
To use a web site analytics data system, a publisher typically provides tracking instructions embedded in the web site's web pages (alternatively or conjunctively, by providing code in its web page that requests the tracking instructions from an analytics server). Typically, the tracking instructions are a small region of JavaScriptTM code that the publisher includes in each page of the publisher's web site for which traffic is to be tracked. When a web page is rendered by a user device and/or client (e.g., web browsers, mobile devices, tablet devices, thin clients, thick clients, etc.), the tracking instructions are executed, which collects visitor data and sends it back to a real-time analytics server in the form of an event tracking data communication for processing. One method of sending the event tracking data communication is to send it as part of a Hypertext Transfer Protocol (HTTP) request.
Alternatively to including tracking instructions in a web page as described above, in some configurations, a web server can send web site tracking data to a real-time analytics server for processing when the web page is requested by the user's client or web browser. In some instances, embedding the tracking instructions is not feasible because of the limited capability of the user's client (e.g., mobile devices without JavaScriptTM support). Thus, the web server (or application server) can be configured to transmit a corresponding event tracking data communication to the real-time analytics server in order to report the analytics data.
Web site traffic data can be in the form of the aforementioned event tracking data communications (e.g., Hypertext Transfer Protocol (HTTP) requests that are generated from various user devices and/or clients). Each event tracking data communication can be triggered upon loading of a web page or resource (e.g., image file, banner ad, audio file, etc.) on the web site by a particular visitor to a publisher's web site. For the purpose of web site analytics reporting, the associated web site tracking data (e.g., included in associated HTTP requests) can include a web property ID (e.g., an account identifier that identifies a publisher's analytics account of a particular web site), visitor identity data (i.e., corresponding to a particular user session), an event statistic(s) (such as a timestamp of the current web page communication), and user data such as location data (i.e., geographical information) associated with the visitor to the publisher's web site. The amount and types of events/information that are reported in the tracking data can be specified by the publisher (e.g., to account for particular information that a publisher wishes to track as web site analytics data).
Although an event tracking data communication is described as including web site traffic data, an event tracking data communication is not limited to including web site traffic data. In particular, an event tracking data communication can include data from any source (e.g., application, platform, etc.) that for tracking an activity associated with the source. For example, in a mobile application platform, an event tracking data communication can include event tracking data that tracks an event associated with an activity within the mobile application platform. In this example, the event tracking data associated with the mobile application platform may not include web site traffic data because the mobile application platform does not require the use of a client such as a web browser. Aspects of the multi-tiered real-time analytics system therefore can be configured to receive and process an event tracking data communication(s) including different forms of event tracking data that are outside the scope of web site tracking data.
A multi-tiered real-time analytics system as described herein can be configured to receive and process incoming event tracking data communications as described above to enable real-time reporting of web site analytics data with low latency. As used herein and discussed in further detail below, the term “real-time” corresponds with reporting web site analytics data within a specified deadline by pushing/transmitting the web site analytics data through different tiers of the multi-tiered real-time analytics system. The expression “low latency” as used herein can be therefore understood as a measurement of time that covers a time period from the reception of an event tracking data communication to the real-time reporting of the web site analytics data included therein. As illustrated in FIG. 1 and described in further detail below, the flow of event tracking data goes through several tiers for real-time web site analytics processing and reporting according to deadlines in a real-time system.
A real-time system is subject to a “real-time constraint” that can impose operational deadlines from an event to a system response. Thus, a real-time system operates within constraints on response time. In the context of the multi-tiered real-time analytics system, the flow of event tracking data through different tiers of the system is required to meet deadlines in order to report the data within a specified period of time (e.g., in a real-time manner with low latency). In one example, the real-time analytics system imposes a respective one second deadline for processing event tracking data within each tier of the system. For instance, upon receipt of an event tracking data communication, a logging server (e.g., in a logging tier described further below) must forward the event tracking data communication within a one second deadline to a real-time server (e.g., in a real-time analytics tier described below). In the event that the logging server can not meet the one second deadline, the event tracking data communication is dropped (e.g., discarded) by the logging server and no further processing occurs for that event tracking data communication. Similarly, when the real-time server receives the event tracking data communication from the logging server, the real-time server must forward the event tracking data communication to another real-time server or a front-end server (as described below) within a one second deadline. The real-time server similarly discards the event tracking data communication if it can not meet the one second deadline. The one second deadline discussed above is just one example of the specified period of time. Other periods of time may be specified. In addition, each tier of the real-time analytics system may have a different specified period of time for processing an event tracking data communication.
FIG. 1 illustrates an exemplary architecture diagram of a multi-tiered real-time analytics system 100 for receiving and reporting web site traffic data in the form of event tracking data communications. The multi-tiered real-time analytics system 100 receives such event tracking data communications from a network 105 and routes the received communications for persistent and temporary storage to enable web analytics processing by the system. The network 105 can include, but is not limited to, a local network, remote network, or an interconnected network of networks (e.g., Internet as shown in FIG. 1).
As illustrated, the multi-tiered real-time analytics system 100 may further include a collecting tier 110, a logging tier 120, a persistent tier 130, a real-time analytics tier 140 and a front-end tier 150. Each of the aforementioned tiers can include a respective cluster of servers/computers that perform a same set of functions in a distributed and/or load balanced manner. A cluster can be understood as a group of servers/computers that are linked together to seamlessly perform the same set of functions, which can provide performance, reliability and availability advantages over a single server/computer architecture. For the sake of simplicity, each illustrated tier depicts several number of servers. However, one of ordinary skill in the art would realize that the illustrated tiers could include any number of servers and still be within the scope of the subject technology. The descriptions of the various'tiers of the system 100 are explained in further detail below.
In some configurations, the collecting tier 110 receives incoming event tracking data communications from the network 105. The collecting tier 110 includes at least one collecting server that is configured to receive and forward the event tracking data communication. Each collecting server of the collecting tier 110 can process an incoming event tracking data communication to determine a particular server in the logging tier 120 to route the event tracking data communication. In some implementations, the collecting server can utilize a load balancing technique to determine which logging server in the logging tier 120 to route the event tracking data communication. The load balancing technique can be based upon different factors such as server load, network load, and/or any other suitable computing metric for measuring resource utilization at a particular server.
The logging tier 120 can receive a routed event tracking data communication from a particular collecting server of the collecting tier 110. Upon receiving the event tracking data communication, the subsequent tasks of the logging tier 120 can be understood as being two-fold: 1) route received event tracking data communications to the persistent tier 130 for persistent storage and 2) route received event tracking data communication to the real-time analytics tier 140 for temporary storage.
To accomplish the aforementioned tasks, the logging tier 120 includes at least one logging server that is configured to receive the routed event tracking data communication from the collecting server. In some implementations, the logging server aggregates incoming event tracking data communications and then periodically routes the aggregated event tracking data communications to the persistent tier 130 for persistent storage. Each event tracking data communication is associated with a particular web site of a publisher and the aggregated event tracking data communications can originate from disparate associated web sites and/or the same web site. In some implementations, the logging server can be further configured to verify each routed event tracking data communication to guarantee delivery of the event tracking data communications to a particular long-term storage server in the persistent tier 130.
For persistent storage of the event tracking data communication, the persistent tier 130 of some configurations can include at least one long-term storage server. Each long-term storage server includes a non-volatile storage device(s), a database(s), or other similar non-volatile storage medium for persistent storage of an incoming event tracking data communication. Persistent storage as used herein can be understood as referring to a type of non-volatile storage that stores the event tracking data in a reliable manner. In some configurations, persistent storage can include lossless or near-lossless storage in which the data is stored without being deleted and/or replaced at a subsequent time period. Additionally, persistent storage can be characterized as storing event tracking data in a form of historical records so that the system can extract the stored tracking data at a later period of time. In some configurations, the stored event tracking data can be modified at a later time period. Alternatively, the stored event tracking data can be in the form of immutable records (i.e., data that is not modified after being stored).
To improve the reliability of the persistent storage, some implementations of the persistent tier 130 can replicate the stored event tracking data across another long-term storage server so that the tracking data is mirrored in at least one other long-term storage server. For instance, the long-term storage server that receives a particular event tracking data communication can then undergo a replication process (either initiated by the long-term storage server itself, a second long-term storage server, or another server in the multi-tiered system) to copy (i.e., replicate) the particular event tracking data to another long-term storage server. Data redundancy can therefore can be provided to enable fault tolerance in the event the data stored at one long-term storage server is corrupted and/or lost.
To meet the low latency requirements for a multi-tiered real-time analytics system, the system can employ a lossy scheme for reporting web site traffic data in which some loss of event tracking data is tolerated. In particular, because the event tracking data is stored in persistent storage as described above, the multi-tiered real-time analytics system can adopt certain trade-offs for the sake of minimizing latency when routing the event tracking data to the real-time analytics tier as described further below.
Each logging server of the logging tier 120 is further configured to route event tracking data communications to the real-time analytics tier 140 for temporary storage. Given the requirement of low latency (i.e., minimizing latency in the system) connected with reporting real-time analytics data, each logging server can be configured to route the event tracking data communications to the real-time analytics tier 140 at a greater frequency than routing the communications to the persistent tier 130. In some implementations, routing the tracking data communications to the real-time analytics tier 140 can be understood as occurring asynchronously with routing the communications to the persistent tier 130.
The real-time analytics tier 140 includes at least one real-time server that is configured to receive the routed event tracking data communication from the logging tier 120. The real-time server in some implementations is configured to aggregate and/or sort the event tracking data according to one or more predetermined criteria for real-time reporting of the web site analytics data to a publisher. As described before, each event tracking data communication can include visitor identity data corresponding to a user session, location data associated with the user/visitor, and a timestamp corresponding to the visitor action.
The real-time server of some implementations can process the aforementioned data to generate real-time analytics data for temporary storage. For instance, the real-time server can aggregate and sort the location data according to the timestamp of the visitor action and then temporarily store the aggregated and/or sorted real-time analytics data. One of ordinary skill in the art would appreciate that other criteria can be used for aggregating and sorting the real-time analytics data. In one aspect, the real-time server sends the aggregated and/or sorted real-time analytics data to the front-end tier 150 for reporting the real-time analytics data. Moreover, as used herein, temporary storage can be understood as providing volatile, quick access to data (in comparison to persistent storage) stored in a storage device such as volatile memory (e.g., random access memory).
Alternatively to the above, the front-end tier 150 in one aspect can run queries on the stored real-time analytics data to report to the publisher with low latency. For instance, the real-time server can be configured to process incoming queries from the front-end tier on the stored real-time analytics data. The real-time server can return matching real-time analytics data based on the queries to the front-end tier 150 for real-time presentation with low latency.
In some implementations, the system 100 includes the front-end tier 150, which includes at least one front-end server configured to report the real-time analytics data with low latency. As described above, the front-end server of some implementations is configured to receive real-time analytics data from the real-time server. By way of example, the front-end server can receive real-time web analytics data associated with a particular location (e.g., city, state, country, etc.) over a predetermined time period for presentation at a front-end interface (i.e., graphical user interface) to an end-user. One of ordinary skill in the art would understand that any set of real-time analytics data could be received for reporting the analytics data in a real-time manner.
Although the above description provides that system 100 includes several tiers, one of ordinary skill in the art would appreciate that in some configurations respective tiers could be combined to function as a single tier and still be within the scope of the subject technology. For instance, the above described collecting and logging tiers could be implemented as a single tier that perform a combined set of functions.
Moreover, to facilitate communication between the respective tiers as described above, the respective tiers can be configured to communication over a type of network, such as a local area network, a wide area network, or an interconnected network of networks (e.g., the Internet) and by using any sort of network/communications protocol (Transmission Control Protocol and Internet Protocol (TCP/IP), HTTP, etc.).
In addition, different configurations of the multi-tiered system can be organized in different ways. For instance, different tiers could be located in different geographical locations. Each geographical location can be associated with a respective data center that includes one or more servers associated with a particular tier. Alternatively or conjunctively, the respective servers in one particular tier could be located in one or more different geographical locations and/or data centers. This flexibility in organizing the multi-tiered system provides an advantage of increasing the scalability of the system to include servers across potentially disparate physical locations.
In the following section, an exemplary system for queuing incoming event tracking data communications using a lossy hit buffer before transmission to a real-time server is described in further detail. In some configurations, the system shown in FIG. 2 can be understood an another aspect of the multi-tiered system described above in FIG. 1, but for the sake of simplicity certain components/portions that could be included in the system shown in FIG. 2 are omitted to avoid obscuring the description of the subject technology.
FIG. 2 conceptually illustrates an exemplary architecture diagram of a multi-tiered real-time analytics system 200 with a logging server for queuing incoming event tracking data communications (“hit” or “hits”) for transmission to a real-time analytics server of some configurations. As used herein, the term “lossy” refers to a scheme for discarding data received by the logging server. In the context of the logging server, the lossy hit buffer can be understood as storing/buffering the incoming web site communications in a lossy manner in which not all of the incoming web site communications are guaranteed for storage in the lossy hit buffer. Further, as used herein, the term “hit” is synonymous with a particular user/visitor action corresponding to a respective event tracking data communication. As described further below, FIG. 2 will be discussed in reference to portions of FIG. 1.
As shown, the system 200 includes a network 205, a logging server 210, a lossy hit buffer 225 and a real-time analytics server 230. In some implementations, the logging server 210 is configured to receive an event tracking data communication 215 (“Hit” as shown in FIG. 2) over the network 205. The network 205 can include, but is not limited to, a local network, remote network, or an interconnected network of networks (e.g., Internet as shown in FIG. 2). Referring to FIG. 1, the logging tier 120 receives incoming event tracking data communications from the collecting tier 110, which initially received the tracking data communications over the network 105. In FIG. 2, the logging server 210 can queue incoming event tracking data communications received over the network 205 before transmitting such event tracking data communications to the real-time analytics sever 230.
In some configurations, the logging server 210 is configured to store the event tracking data communication 215 in the lossy hit buffer 225. As shown, the lossy hit buffer 225 stores 1 to N number of event tracking data communications (i.e., Hit 1-Hit N). The lossy hit buffer 225 of some configurations can be a form of non-persistent storage that provides quick access to the data stored therein. By way of example, the lossy hit buffer 225 of some implementations is a type of non-persistent volatile memory (e.g., random access memory), which provides faster access time in comparison to persistent/non-volatile memory such as a hard disk. Although the lossy hit buffer 225 is shown separate from the logging server 210 for the purpose of illustration, one of ordinary skill in the art would understand that the lossy hit buffer 225 could be implemented as part of the logging server 210 and still be within the scope of the subject technology.
In order to reduce memory requirements, the size of the lossy hit buffer 225 can be optimally configured in some implementations based on one or more different considerations. In particular, the lossy hit buffer 225 can be configured based on a latency for transmitting stored communications in the buffer, a batch size for transmitting the stored communications, and/or a rate in which incoming communications are being received by the logging server 210. For instance, a high value of latency for transmitting the stored communications in the buffer may require utilization of a larger sized lossy hit buffer in order to ensure that incoming event tracking data communications are stored in the lossy hit buffer 225 while the other communications are in the midst of being transmitted. In another example, the size of the lossy hit buffer can be configured to be at least the batch size (i.e., a number of communications stored in the lossy hit buffer 225 before being batch transmitted by the logging server 210).
Given that the logging server 210 employs a lossy data storage scheme in the lossy hit buffer 225, the logging server 210 can discard any newly received event tracking data communications prior to transmitting the communications if the lossy hit buffer 225 is full. When the lossy hit buffer 225 is full, any newly received event tracking data communications can be considered overflow requests that can be discarded. The objective of providing real-time analytics data with low latency allows the logging server 210 to discard newly received tracking data communications. Therefore, it can be understood that the logging server 210 minimizes latency in the system 200 at a cost or assumed trade-off of providing a fully accurate report of the received communications. Such a trade-off is permissible because the potential volume (i.e., a high number) of received event tracking data communications enables the system to tolerate some data loss without incurring statistically significant errors.
The logging server 210 is further configured to transmit the stored event tracking data communications in the lossy hit buffer 225 to the real-time server 230 if the lossy hit buffer 225 is determined to be full. In some configurations, the logging server 210 transmits the stored event tracking data communications as a batch transmission of all stored event tracking data communications in the lossy hit buffer 225. By transmitting the stored communications as a batch transmission, the logging server 210 improves the scalability of the system 200 by “throttling” the amount of data (i.e., setting an upper limit) sent to the real-time server 230. The logging server 210 also potentially reduces network congestion by batch transmitting the stored communications. Further, the logging server 210 enables the real-time server 230 to better manage and process the transmitted event tracking data communications because the received data is more predictable in number when sent as a batch. After transmission, the logging server 210 can flush (i.e., erase) the lossy hit buffer 225 so that lossy hit buffer 225 is empty to enable storing of newly received event tracking data communications.
Alternatively or conjunctively, the logging server 210 of some configurations can transmit the stored tracking data communications after a predetermined period of time has elapsed. For instance, the logging server 210 can set a time period of a second or half a second before the stored tracking data communications are transmitted. It can be understood that the set time period triggers a transmission of the stored tracking data communications that is irrespective of whether the lossy hit buffer 225 is full. Therefore, the logging server 210 in some instances can transmit the stored tracking data communications before the lossy hit buffer 225 is full after the predetermined period of time has elapsed.
As described before, the logging server 225 transmits all stored event tracking data communications to the real-time analytics server 230 if the logging server 225 determines that the lossy hit buffer 225 is full. Initially, the allocated size of the lossy hit buffer 225 is a predetermined size to store a set amount of respective event tracking data communications. Over time, a particular web site can have predictable web traffic patterns for different segments of a given time period (e.g., different portions of the day, different days in the week, different months of the year, etc.). To accommodate for a fluctuating number of received event tracking data communication over the network 205, the logging server 210 of some configurations can subsequently adjust the size of the lossy hit buffer 225 to increase or decrease its size. Adjusting the size of the lossy hit buffer 225 can have an inverse relation with the frequency in which the stored event tracking data communications are transmitted. For instance, increasing the size of the lossy hit buffer 225 potentially decreases the frequency of transmitting the stored communications because the lossy hit buffer 225 takes a longer period of time to fill up. Conversely, decreasing the size of the lossy hit buffer 225 potentially increases the frequency of transmitting the stored communications because a short time period elapses before the lossy hit buffer 225 is full.
In some instance, the logging server 210 is further configured to transmit each received event tracking data communication to the persistent storage 220 for persistent storage. In some configurations, the persistent storage 220 can be understood as a form of local or remote non-volatile storage such as a local or remote hard disk. Referring to FIG. 1, a logging server in the logging tier 120 can transmit received communications to a long term storage server in the persistent tier 130 for long-term persistent storage. Thus, in FIG. 2, the persistent storage 220 can also represent a local or remote server that includes non-volatile storage for storing the received event tracking data communications. As described before, the logging server 210 discards newly received tracking data communications when the lossy hit buffer 225 is full, but also ensures that such discarded tracking data communications are transmitted to the persistent storage 220 to provide a fully accurate historical record of the received event tracking data communications.
As further shown, the real-time analytics server 230 is configured to receive the transmitted tracking data communications from the logging server 210. In some configurations, the real-time analytics server 230 is arbitrarily selected by the logging server 210 to receive the transmitted tracking data communications. By arbitrarily selecting a particular real-time server, the logging server 210 reduces latency in reporting real-time analytics data because the logging server 210 does not rely on any particular real-time server to process the tracking data communications.
The following section describes an exemplary process that a logging server can employ to queue and transmit incoming event tracking data communications in a lossy manner as similarly described above in connection with the logging server 210.
FIG. 3A conceptually illustrates an exemplary process 300 for queuing incoming event tracking data communications using a lossy hit buffer and subsequently transmitting the event tracking data communications of some configurations. In some configurations of the subject technology, a logging server can implement the process 300 to utilize a lossy hit buffer that employs a lossy data storage scheme for buffering/queuing incoming event tracking data communications. FIG. 3A will be discussed with reference to portions of FIG. 2.
The process 300 begins when an event tracking data communication is received at 305. Referring to FIG. 2, the logging server 210 can receive an incoming event tracking data communication over the network 205. The process 300 determines at 310 whether a lossy hit buffer for storing the event tracking data communication is full. Referring to FIG. 2, the logging server 210 can determine whether the lossy hit buffer 225 is full by determining whether the buffer has available space for storing the event tracking data communication. By way of example, the process 300 can perform a suitable memory operation such as consulting a table or list to return available (if any) memory locations in the lossy hit buffer. One of ordinary skill in the art would appreciate that determining available memory space in the lossy hit buffer could be accomplished in different ways and be within the scope of the subject technology.
Based on the determination at 310, the process 300 at 315 can decide whether the lossy hit buffer is full. In an instance in which the lossy hit buffer is not full, the process 300 can store the event tracking data communication at 340 in the lossy hit buffer. Next, the process 300 continues to 345 to determine whether a batch limit has been met. The batch limit can be understood as defining an upper limit for a number of communications that will stored before being transmitted as a batch (e.g., as a group or simultaneously). For example, the process 300 can determine a number of stored communications in the lossy hit buffer. In the event that the number of stored communications meets the batch limit, the process 300 at 355 can transmit the stored event tracking data communications as a batch transmission to an arbitrarily selected real-time analytics server. Referring to FIG. 2, after the batch limit has been met, the logging server 210 of some configurations can transmit the stored event tracking data communications in the lossy hit buffer 225 to the arbitrarily selected real-time analytics server 230. In this exemplar, it can be understood that the lossy hit buffer may not be full in some instances when the communications are transmitted. After transmission, the process 300 then ends.
In an instance in which the batch limit has not been met, the process 300 at 345 restarts as illustrated in FIG. 3A to repeat the above operations for a newly received event tracking data communication. The process 300 can continue to store one or more event tracking data communications) in the lossy hit buffer until a predetermined amount of communications are stored according to the batch limit. In some implementations, the batch limit can be configured to be any number of stored communications that is equal or less than a total number of communications that could be stored based on the size of the lossy hit buffer.
In an instance in which the lossy hit buffer is full at 315, the process 300 continues to 320 to decide whether to replace one of the existing stored event tracking data communications in the lossy hit buffer. In this manner, the process 300 can store the received event tracking data communication if the lossy hit buffer is full. In the event that the process 300 does not replace one of the stored event tracking data communication, the process 300 continues to 350 to discard any newly received tracking data communications prior to transmitting the stored event tracking data communications in the lossy hit buffer. The discarded event tracking data communications are considered a type of data loss that is tolerated in order to maintain the low latency requirements in reporting real-time analytics data.
In some configurations, the process 300 can track a total number of the discarded event tracking data communications. By tracking the total number of discarded tracking data communications, the process 300 can generate statistics to communicate quality of service for a particular web site or track data in order to maintain statistical guarantees on the low latency information reported for a web site. In another aspect, the process 300 can track a count of the number of communications discarded for one or more specific web sites being tracked. Hence, the process 300 enables a publisher to quantitatively assess whether the configuration of the lossy hit buffer is optimal for reporting the real-time web site analytics data based on the number of discarded tracking data communications. The lossy hit buffer can be optimized in different ways as set forth further below.
In an instance in which the process 300 decides to replace one of the stored event tracking data communications if the buffer is full, the process 300 at 325 determines a particular stored event tracking data communication in the lossy hit buffer for replacement. This determination can be made in different ways. For instance, the process 300 can select a stored communication that is considered the least used data according to a time (i.e., the oldest data) in which the communication was stored in the lossy hit buffer. In another aspect, the process 300 can select the stored communication for replacement based on a heuristics analysis of the stored data in the lossy hit buffer. An example of such a heuristics analysis can include determining a least “important” entry in the lossy hit buffer based on a combination of one or more different factors (e.g., time stamp, the corresponding publisher, expected volume of web traffic of the associated web site, the type of visitor action, etc.). After selecting the stored communication in the lossy hit buffer for replacement, the process 300 at 330 stores the received event tracking data communication to replace the stored event tracking data communication. At 355, the process 300 transmits the stored event tracking data communications as a batch transmission to an arbitrarily selected real-time server and the process 300 then ends.
Alternatively to replacing the one of the stored event tracking data communications, the process 300 of some configurations can dynamically adjust the size of the lossy hit buffer to increase its size. Dynamically adjusting the size of the lossy hit buffer can be triggered based on one or more different factors. By way of example, the size of the buffer is dynamically adjusted based on a frequency in which the web site tracking data is transmitted to the real-time analytics server. In particular, the process 300 can determine that the size of the lossy hit buffer needs to be increased because memory space in the lossy hit buffer fills up too quickly. A quickly filled lossy hit buffer can potentially cause the process 300 to transmit the stored event tracking data communications to the real-time server at a rate that 1) increases network congestion and 2) exceeds the computational resources in which the real-time server may process the received tracking data communications. Although the above discussion relates to increasing the size of the lossy hit buffer, one of ordinary skill in the art would understand that the process 300 can also decrease the size of the lossy hit buffer. A decrease in the size of the lossy hit buffer could occur, for example, if the process 300 determines that the lossy hit buffer is infrequently full before the predetermined time period has elapsed for transmitting the stored event tracking data communications.
Further, the process 300 of some configurations can optimize the transmission of the stored event tracking data communications based one or more factors such as memory requirements, a measurement of network latency to the real-time analytics server, and an availability of network bandwidth for transmitting the stored event tracking data communications in the lossy hit buffer. For instance, the process 300 can conduct a measurement of the network latency for transmitting the stored event tracking data communications and determine that the transmission should occur more or less frequently in order to meet low latency requirements for reporting real-time analytics data. Additionally, the process 300 can determine that the network bandwidth is congested and opt to transmit the stored communications less frequently in order to relieve the network congestion. By way of example, the process 300 can dynamically adjust the predetermined time period to a different time period (e.g., longer or shorter) for transmitting the stored communications in the lossy hit buffer. Alternatively or conjunctively, the process 300 can transmit the stored communications after a predetermined number are stored in the lossy hit buffer. Lastly, as discussed above, the process 300 can dynamically adjust the size of the lossy hit buffer according to memory requirements dictated by the number of received tracking data communications to optimize the usage of the lossy hit buffer.
Conjunctively to the process 300 described above, the logging server can implement a process to transmit the stored event tracking data communications in the lossy hit buffer after a predetermined period of time has elapsed. In some configurations, the logging server can execute this process in parallel (e.g., as a background process) with the aforementioned process 300 illustrated in FIG. 3A. Given the low latency requirements for the multi-tiered analytics system, transmission of the stored communications in the lossy hit buffer should occur irrespective of whether the batch limit or buffer size has been met/filled. FIG. 3B conceptually illustrates an exemplary process 370 for transmitting one or more event tracking data communications stored in a lossy hit buffer after a predetermined period of time.
The process 370 begins with a determination at 380 whether a predetermined period of time has elapsed. The process 370 can be configured to keep track of a predetermined period of time that can be set to any time interval (e.g., milliseconds, seconds, minutes, etc.). In some configurations, the process 370 can measure the period of time (e.g., using a system clock or time counter) from a previous transmission of stored communications to determine the time elapsed. If no prior transmission of stored communications has occurred, the process 370 can keep track of the elapsed time since a first communication was stored in the lossy hit buffer. If the predetermined period of time has not elapsed, the process 370 can continue to track the elapsed period of time and make another determination at 380 as illustrated in FIG. 3B by looping back to the start of process 370.
If the predetermined period of time has elapsed at 380, the process 370 continues to 390 to transmit the one or more event tracking data communications stored in the lossy hit buffer to an arbitrarily selected real-time analytics server. Referring to FIG. 3A, the process 300 can receive an incoming event tracking data communication and perform subsequent operations in parallel with the execution of process 370. In this fashion, the process 370 can implemented as an auxiliary process to the aforementioned process 300.
The following section describes exemplar attributes and data structures of the real-time analytics data. An associated real-time server can temporarily store such attributes and data structures illustrated in FIG. 4 for reporting real-time analytics data.
FIG. 4 conceptually illustrates different attributes and data structures that are included in some configurations of the multi-tiered real-time analytics system. More specifically, FIG. 4 depicts exemplar attributes and data structures of a real-time analytics data structure 465 that are based on event tracking data communications. For instance, an event tracking data communication can include data for identifying a user session of a visitor, a location of the visitor, and other real-time analytics attributes. A real-time server can temporarily store the real-time analytics attributes and data structures shown in FIG. 4 based on the aforementioned data included in the event tracking data communication.
In some implementations, the real-time analytics data structure 465 can be understood as a container that is a collection of the various attributes and data structures based on one or more event tracking data communication(s). As shown in FIG. 4, the real-time analytics data structure 465 includes an associated web property identity (WPID) data structure 470, associated WPID attribute 475, hit data structure 480, hit data element 485 and hit real-time data attributes 490. Although these attributes and data structures are represented as included in a single data structure, some implementations can store each of the attributes and data structures in separate data structures that include any combination of data attributes. The aforementioned attributes and data structures are described in further detail as set forth below.
As illustrated, the associated web property identity (WPID) data structure 470 includes one or more associated WPID attributes. Each associated WPID attribute can represent a publisher of a web site which is associated with the real-time server. As shown, the associated WPID attribute 475 corresponds with a publisher with a “WPID 1” that represents a unique string ID for the publisher. One of ordinary skill in the art would understand that the unique string ID could be formed from any combination of alphanumeric characters and/or symbols.
In some implementations, each associated WPID attribute can include a reference to the hit data structure 480. The hit data structure 480 includes attributes for each event tracking data communication for the publisher. As shown, the hit data structure 480 includes hit data element 485 corresponding to a particular event tracking data communication “X” for the publisher corresponding with associated WPID attribute 475. The hit data element 485 is shown in more detail in breakout section 490.
As further shown in FIG. 4, the hit data element 485 can include the real-time data attributes 490 corresponding to a visitor ID, a last timestamp, location data and campaign data. The visitor ID attribute represents a unique ID string associated with a unique visitor session. The visitor ID attribute does not necessarily identify a particular end-user but instead corresponds with a particular user session on the publisher's web site. For example, the visitor ID can be a randomized identifier that is determined based on different information such as the visitor's web browser or client, the timestamp associated with the visitor's session, and/or the visitor's hostname, etc. Additionally, the location data does not identify the visitor's personal address, but is related to a geographical location (e.g., city) that can be determined based on the IP address assigned to the visitor (e.g., by an Internet service provider).
Next, the last timestamp attribute of the real-time data attributes 490 represents the most recent timestamp in which the unique visitor visited the publisher's web site. A timestamp in some implementations is a sequence of alphanumeric characters that denotes the date and/or time in which a particular event occurred. The location data attribute represents the geographical location of the unique visitor, such as a specified city, state, county, country, zip code, global positioning system coordinates, and/or geographical coordinates (e.g., latitude, longitude, elevation), etc. Lastly, the campaign attribute identifies a particular marketing campaign corresponding with a set of associated marketing activities. For instance, the associated marketing activities can respectively correspond to a set of web pages on the publisher's web site. Any visitor activity/action related to the set of web pages on the publisher's web page can then be associated with the marketing campaign. In this manner, the campaign attribute can identify the marketing campaign associated with the visitor action.
Different implementations can implement and organize the above described attributes and data structures in different ways. For instance, the real-time analytics data structure 465 of some configurations can be implemented as a collection of tree data structures, otherwise known as a “forest.” In this exemplar, a root node of a particular tree corresponds with a particular WPID (i.e., publisher identity) and each direct child of the root node can represent multiple visitor nodes that are associated with respective visitors to the publisher's web site. For each visitor node, visitor specific attributes are stored. Each visitor node can have multiple direct child nodes that represent the associated visitor's actions based on a timestamp. The timestamp of the last action for the associated visitor can also be stored with the parent associated visitor node described above. Alternatively or conjunctively, certain visitor attributes can be implemented as discrete nodes, such as a node including a city identifier with respective direct child nodes corresponding to a city name and geographical coordinates (e.g., latitude, longitude, etc.).
The following section describes a software architecture of a real-time server that can implement the above described processes and data structures as a computer program running on a particular machine, such as a computer, or stored as instructions in a computer readable medium.
FIG. 5 conceptually illustrates an exemplary software architecture of a real-time server 505 of some configurations. In particular, FIG. 5 shows various modules and components of the real-time server 505 for implementing the above described processes in FIGS. 3A and 3B and data structures in FIG. 4. In some configurations, the software architecture of the real-time server is part of a server-based implementation running a particular machine connected to a network.
As illustrated in FIG. 5, the real-time server 505 can include a request router module 510 for parsing and routing web site tracking data, a hit accumulator module 520 for buffering and querying real-time analytics data, and a real-time analytics data storage 530 for temporarily storing real-time analytics data. The real-time analytics data storage 530 in some implementations is a type of volatile and non-persistent storage (e.g., RAM). The operation of the aforementioned modules of the real-time server 505 are discussed in the following description.
The real-time server 505 can receive web site tracking data 502 in a request router module 510. The web site tracking data 502 can be in the form of an event tracking data communication that is received over a network 550. As shown, the request router module 510 includes a parser module 512 and an ownership module 514. The parser module 512 of some implementations can parse the web site tracking data to extract real-time analytics data and to subsequently transmit the real-time analytics data to the ownership module 514. The ownership module 514 determines a set of associated real-time servers that are owners of the web site tracking data corresponding with a publisher's web site. In an instance where the ownership module 514 determines that the web site tracking data 502 is not associated with the real-time server 505, the request router module 510 can route the web site tracking data 502 over the network 550 to other associated real-time servers. As shown in FIG. 5, additional real-time servers 560 and 570 are connected to the network 550. Alternatively, in the event that the ownership module 514 determines that the real-time server 505 is associated with the web site tracking data 502, the request router module 510 routes (i.e., sends) the web site tracking data to the hit accumulator module 520 for further processing and temporary storage.
The hit accumulator module 520 receives the web site tracking data routed from the request router module 510. In some implementations, the hit accumulator module 520 includes a buffer module 522 as shown for queuing/aggregating the web site tracking data. The buffer module 522 can be implemented in different ways. For instance, the buffer module 522 could utilize a first-in first-out (FIFO) scheme in which the earliest received web site tracking data is transferred out before later received data. In other instances, the buffer module 522 could employ a last-in first-out (LIFO) scheme that is analogous to a stack in which the later received data is transferred out before earlier received data.
As shown in FIG. 5, the buffer module 522 then sends web site tracking data to a real-time analytics query engine 524 in the hit accumulator module 520. The real-time analytics query engine 524 of some configurations performs query processing and data management of the real-time analytics data storage 530. By way of example, the real-time analytics query engine 524 can perform write and/or update operations to temporarily store the web site tracking data to the real-time analytics data storage 530. Given the requirements of low latency involved with reporting real-time analytics data, the real-time analytics data storage 530 can be implemented to provide fast access to stored real-time analytics data. In particular, the real-time analytics data storage 530 can be implemented as fast non-persistent/volatile memory that is periodically flushed and/or overwritten with more recent web site tracking data. In this manner, the overhead of managing the data in the real-time analytics data storage 530 is reduced because longevity of the data is not a primary objective.
In some implementations, the hit accumulator module 520 can execute queries for sorting and/or aggregating the received web site tracking data for temporary storage in the real-time analytics data storage 530. For instance, referring back to FIG. 1, a real-time server from the real-time analytics tier 140 can aggregate and sort the real-time analytics data according to one or more predetermined queries for temporary storage and then send the aggregated and/or sorted real-time analytics data to the front-end tier 150 for reporting the real-time analytics data. As shown in FIG. 5, the real-time analytics query engine 524 of hit accumulator module 520 can execute the queries in order to sort and/or aggregate the received web site tracking data before temporarily storing the real-time analytics data in the real-time analytics data storage 530. The real-time server 505 can then send the stored aggregated and/or sorted real-time analytics data to a front-end server for reporting and/or presenting real-time analytics data to an end-user.
The following section describes an exemplary system that implements aspects of the above described invention.
Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium). When these instructions are executed by one or more processing unit(s) (e.g., one or more processors, cores of processors, or other processing units), they cause the processing unit(s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, RAM chips, hard drives, EPROMs, etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.
In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage, which can be read into memory for processing by a processor. Also, in some implementations, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some implementations, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the invention. In some implementations, the software programs, when installed to operate on one or more systems, define one or more specific machine implementations that execute and perform the operations of the software programs.
A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, object, or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
FIG. 6 conceptually illustrates a system 600 with which some implementations of the subject technology may be implemented. The system 600 can be a computer, phone, PDA, or any other sort of electronic device. Such a system includes various types of computer readable media and interfaces for various other types of computer readable media. The system 600 includes a bus 605, processing units) 610, a system memory 615, a read-only memory 620, a storage device 625, an optional input interface 630, an optional output interface 635, and a network interface 640.
The bus 605 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the system 600. For instance, the bus 605 communicatively connects the processing unit(s) 610 with the read-only memory 620, the system memory 615, and the storage device 625.
From these various memory units, the processing unit(s) 610 retrieves instructions to execute and data to process in order to execute the processes of the invention. The processing unit(s) can be a single processor or a multi-core processor in different implementations.
The read-only-memory (ROM) 620 stores static data and instructions that are needed by the processing unit(s) 610 and other modules of the system 600. The storage device 625, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when the system 600 is off. Some implementations of the invention use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the storage device 625.
Other implementations use a removable storage device (such as a flash drive, a floppy disk, and its corresponding disk drive) as the storage device 625. Like the storage device 625, the system memory 615 is a read-and-write memory device. However, unlike storage device 625, the system memory 615 is a volatile read-and-write memory, such a random access memory. The system memory 615 stores some of the instructions and data that the processor needs at runtime. In some implementations, the invention's processes are stored in the system memory 615, the storage device 625, and/or the read-only memory 620. For example, the various memory units include instructions for processing multimedia items in accordance with some implementations. From these various memory units, the processing unit(s) 610 retrieves instructions to execute and data to process in order to execute the processes of some implementations.
The bus 605 also connects to the optional input and output interfaces 630 and 635. The optional input interface 630 enables the user to communicate information and select commands to the system. The optional input interface 630 can interface with alphanumeric keyboards and pointing devices (also called “cursor control devices”). The optional output interface 635 can provide display images generated by the system 600. The optional output interface 635 can interface with printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD). Some implementations can interface with devices such as a touchscreen that functions as both input and output devices.
Finally, as shown in FIG. 6, bus 605 also couples system 600 to a network interface 640 through a network adapter (not shown). In this manner, the computer can be a part of a network of computers (such as a local area network (“LAN”), a wide area network (“WAN”), or an Intranet, or an interconnected network of networks, such as the Internet. Any or all components of system 600 can be used in conjunction with the invention.
These functions described above can be implemented in digital electronic circuitry, in computer software, firmware or hardware. The techniques can be implemented using one or more computer program products. Programmable processors and computers can be included in or packaged as mobile devices. The processes and logic flows can be performed by one or more programmable processors and by one or more programmable logic circuitry. General and special purpose computing devices and storage devices can be interconnected through communication networks.
Some implementations include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media). Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM), recordable compact discs (CD-R), rewritable compact discs (CD-RW), read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a variety of recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.), flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.), magnetic and/or solid state hard drives, read-only and recordable Blu-Ray® discs, ultra density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media can store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.
While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some implementations are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs). In some implementations, such integrated circuits execute instructions that are stored on the circuit itself.
As used in this specification and any claims of this application, the terms “computer”, “server”, “processor”, and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms display or displaying means displaying on an electronic device. As used in this specification and any claims of this application, the terms “computer readable medium” and “computer readable media” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral signals.
To provide for interaction with a user, implementations of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's client device in response to requests received from the web browser.
Configurations of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), an inter-network (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks).
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. In some configurations, a server transmits data (e.g., an HTML page) to a client device (e.g., for purposes of displaying data to and receiving user input from a user interacting with the client device). Data generated at the client device (e.g., a result of the user interaction) can be received from the client device at the server.
It is understood that any specific order or hierarchy of steps in the processes disclosed is an illustration of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged, or that all illustrated steps be performed. Some of the steps may be performed simultaneously. For example, in certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the configurations described above should not be understood as requiring such separation in all configurations, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein, but is to be accorded the full scope consistent with the language claims, wherein reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more.” Unless specifically stated otherwise, the term “some” refers to one or more. Pronouns in the masculine (e.g., his) include the feminine and neuter gender (e.g., her and its) and vice versa. Headings and subheadings, if any, are used for convenience only and do not limit the invention.
A phrase such as an “aspect” does not imply that such aspect is essential to the subject technology or that such aspect applies to all configurations of the subject technology. A disclosure relating to an aspect may apply to all configurations, or one or more configurations. A phrase such as an aspect may refer to one or more aspects and vice versa. A phrase such as a “configuration” does not imply that such configuration is essential to the subject technology or that such configuration applies to all configurations of the subject technology. A disclosure relating to a configuration may apply to all configurations, or one or more configurations. A phrase such as a configuration may refer to one or more configurations and vice versa.
The word “exemplary” is used herein to mean “serving as an example or illustration.” Any aspect or design described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs.
All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims.

## Claims

1. A machine-implemented method for buffering incoming event tracking data communications and transmitting the buffered event tracking data communications, the method comprising:
receiving over a network, at a logging server, an event tracking data communication, wherein the event tracking data communication originated from a web site associated with a publisher and includes event tracking data for tracking an activity associated with a source of the event tracking data communication;
determining whether a buffer for storing the event tracking data communication is full, wherein the logging server is configured to queue the event tracking data communication in the buffer or transmit to a real-time analytics server;
if the buffer is not full, storing the event tracking data communication in the buffer; and
if the buffer is full, transmitting the event tracking data communication stored in the buffer to the real-time analytics server within a predetermined period of time, and if the event tracking data communication cannot be transmitted to the real-time analytics server within the predetermined period of time, then discarding the event tracking data communication.

2. The method of claim 1, wherein the event tracking data includes web site traffic data included in a Hypertext Transfer Protocol (HTTP) request associated with the web site.

3. The method of claim 1, wherein transmitting the stored event tracking data communications after the predetermined period of time occurs when the buffer is not full.

4. The method of claim 1, wherein transmitting the stored event tracking data communications occurs when a predetermined number of event tracking data communications are stored in the buffer.

5. The method of claim 1, wherein a total number of the discarded newly received event tracking data communications is maintained.

6. The method of claim 5, wherein a number of event tracking data communications discarded for one or more specific web sites is maintained.

7. The method of claim 1, wherein transmitting the event tracking data communications stored in the buffer comprises a batch transmission of all of the event tracking data communications stored in the buffer.

8. The method of claim 1, further comprising optimizing the transmission of the stored event tracking data communications based on at least one of memory requirements, a measurement of network latency to the real-time analytics server, and an availability of network bandwidth for transmitting the stored event tracking data communications.

9. The method of claim 1, wherein the real-time analytics server is arbitrarily selected to receive the event tracking data communications stored in the buffer.

10. The method of claim 1, wherein if the buffer is full, determining a particular stored event tracking data communications to respectively replace with the received event tracking data communication.

11. The method of claim 10, wherein the one or more stored event tracking data communications for replacement comprises the least used data in the buffer.

12. The method of claim 10, wherein determining the one or more stored event tracking data communications to replace is based on a heuristics analysis.

13. The method of claim 1, further comprising dynamically adjusting a size of the buffer by increasing or decreasing the size of the buffer.

14. The method of claim 1, further comprising dynamically adjusting the predetermined period of time to a second period of time for transmitting the event tracking data communications stored in the buffer.

15. A system for lossy buffering of incoming event tracking data communications and transmitting the buffered event tracking data communications, the system comprising:
a logging server, in connection with a network and a real-time analytics server, the logging server:
receiving, over the network, an event tracking data communication, wherein the event tracking data communication originated from a web site associated with a publisher and includes event tracking data for tracking an activity associated with a source of the event tracking data communication;
determining whether a buffer for storing the event tracking data communication is full, wherein the logging server is configured to queue the event tracking data communication in the buffer or transmit to the real real-time analytics server;
if the buffer is not full, storing the event tracking data communication in the buffer; and
if the buffer is full, transmitting the event tracking data communication stored in the buffer to the real-time analytics server within a predetermined period of time, and if the event tracking data communication cannot be transmitted to the real-time analytics server within the predetermined period of time, then discarding the even tracking data communication.

16. The system of claim 15, wherein the event tracking data includes web site traffic data included in a Hypertext Transfer Protocol (HTTP) request associated with the web site.

17. The system of claim 15, further comprising:
the real-time analytics server configured to receive the transmitted one or more event tracking data communications stored in the lossy buffer from the logging server.

18. The system of claim 17, wherein the real-time analytics server is arbitrarily selected by the logging server to receive the transmitted event tracking data communications.

19. The system of claim 15, wherein the logging server is further configured to transmit each received event tracking data communications to a persistent storage for storage.

20. The system of claim 19, wherein the logging server is further configured to discard at least one of the newly received event tracking data communications in response to the lossy buffer being full and transmit each of the newly received event tracking data communications to the persistent storage for storage.

21. The system of claim 15, wherein the logging server is further configured to transmit the stored one or more event tracking data communications as a batch transmission of all of the stored event tracking data communications.

22. The system of claim 15, wherein the logging server is further configured to flush the lossy buffer after transmitting the stored event tracking data communications.

23. The system of claim 15, wherein the lossy buffer comprises non-persistent storage.

24. A non-transitory machine-readable medium comprising instructions stored therein, which when executed by a machine, cause the machine to perform operations comprising:
receiving over a network, at a logging server, an event tracking data communication forwarded from a collecting server, wherein the event tracking data communication originated from a web site associated with a publisher and includes event tracking data for tracking an activity associated with a source of the event tracking data communication;
determining whether a buffer for storing the event tracking data communication is full, wherein the logging server is configured to queue the event tracking data communication in the buffer or transmit to a real-time analytics server;
if the buffer is not full, storing the event tracking data communication in the buffer or transmitting the event tracking data communication stored in the buffer after a predetermined period of time before the predetermined period of time has elapsed; and
if the buffer is full, transmitting one or more event tracking data communications stored in the buffer to a real-time analytics server within a predetermined period of time, and if the event tracking data communication cannot be transmitted to the real-time analytics server within the predetermined period of time, then discarding the event tracking data communication.

25. The non-transitory machine-readable medium of claim 24, wherein the event tracking data includes web site traffic data included in a Hypertext Transfer Protocol (HTTP) request associated with the web site.