Abstract:
The present invention is directed to methods and systems for rendering perceivable stimuli representative of information processing by a multi-tenant architecture that pre-fetches a portion of a subset of data on a multi-tenant architecture and emulates a result set of data in accordance with a report definition. To that end the method comprises identifying a subset of data on the multi-tenant architecture that is subject to a report definition. A portion of the subset is pre-fetched and analyzed to emulate a result. The emulated result is transmitted to a computer system of a user of the multi-tenant architecture. Perceivable stimuli is generated on the user computer system, in response to receiving the emulated result. In this manner, a user may have the perception of real-time processing of information in accordance with the report definition white affording the owner of the multi-tenant architecture flexibility to processes the data as desired while minimizing the user&#39;s awareness that real-time processing is not occurring.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    The present application claims priority to U.S. provisional patent application No. 61/330,776 filed May 3, 2010, entitled PATENT APPLICATION REPORT PREVIEW CACHE IN A MULTI-TENANT DATABASE and identifying Guillaume Le Stum as inventor. 
     
    
     COPYRIGHT NOTICE 
       [0002]    A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. 
       BACKGROUND 
       [0003]    The present invention relates generally to user interaction of a multi-tenant database and more particularly to providing real-time experience to a user running a query of the multi-tenant database. 
         [0004]    During computational processing it is not uncommon for the resources of a computer system to become unavailable to a user. This typically occurs upon a request by the user to have a computer system implement a task that is computationally intensive. Historically, a user has been apprised of such a situation by a busy cursor. The expressions of the busy cursor are as numerous as there are companies that produce computer programs. Early APPLE® computers used a symbol of a wristwatch, spinning beach ball and the like. MICROSOFT® employs a spinning hour glass while other companies have included a running dog, tapping fingers and the like. The busy cursors typically appears when the computation resources are performing a lengthy operation indicating that computer system is temporarily unresponsive, a state from which it may recover. The busy cursor, however, has also become indicative of the computer system entering into an unrecoverable state. The resultant ambiguity in meaning leaves a user to speculate as to whether to continue to wait for the computational resources to become available or to attempt to recover computer system operation. 
         [0005]    Techniques have been developed to provide information to a user concerning the status of operations that render computational resources unavailable. U.S. Pat. No. 7,441,233 to Orndorff et al. discloses a system and method of providing status information about a task being processed on a computer system. The task comprises an operation that blocks user activity, such as a modal task. Status information about the task is obtained during processing of the task on an event thread of a computer system. A status display is generated based upon this status information. The task yields time on the event thread, enabling the status information to be displayed in the user interface of the computer system. 
         [0006]    A need exists, however, to provide a user with a real-time experience of accessing computational resources of a computer system processing a computationally intensive task. 
       BRIEF SUMMARY 
       [0007]    The present invention features methods and systems for rendering perceivable stimuli representative of information processing by a multi-tenant architecture that pre-fetches a portion of a subset of data on a multi-tenant architecture and emulates a result set of data in accordance with a report definition. To that end, the method comprises identifying a subset of data on the multi-tenant architecture that is subject to a report definition. A portion of the subset is pre-fetched and analyzed to emulate a result. The emulated result is transmitted to a computer system of a user of the multi-tenant architecture. Perceivable stimuli is generated on the user computer system, in response to receiving the emulated result. In this manner, a user may have the perception of real-time processing of information in accordance with the report definition white affording the owner of the multi-tenant architecture flexibility to processes the data as desired while minimizing the user&#39;s awareness that real-time processing is not occurring. These and other embodiments are discussed more fully below. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0008]      FIG. 1  is a simplified plan view of a computer network in which the current invention is practiced; 
           [0009]      FIG. 2  is a plan view showing a representative architecture in which a multi-tenant database system, shown in  FIG. 1 , is employed; 
           [0010]      FIG. 3  is a detailed view of a computer drive shown in  FIG. 2  showing the arrangement of data stored thereon; 
           [0011]      FIG. 4  is a plan view of a computer system employed by a user to communicate with the multi-tenant database shown in  FIG. 2 ; and 
           [0012]      FIG. 5  is a plan view of a report builder rendered on a display shown in  FIG. 4  in accordance with the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0013]    Referring to  FIG. 1 , a computer network  10  includes a multi-tenant database architecture  12  in data communication with client side facilities  14 . Components of computer network  10  may be in data communication over any type of known data communication network  18  or combination of networks of devices that communicate with one another. Data communication network  18  can be any one or any combination of a LAN (local area network), WAN (wide area network), telephone network, wireless network, point-to-point network, star network, token ring network, hub network, or other appropriate configuration. As the most common type of computer network in current use is a TCP/IP (Transfer Control Protocol and Internet Protocol) network, such as the global inter-network of networks often referred to as the “Internet”, it will be used in many of the examples herein. However, it should be understood that the networks that the present invention might use are not so limited, although TCP/IP is a frequently implemented protocol. As a result the components of network  10  may be co-located in a common geographic area and/or building or spread across a diverse area of the globe, e.g., on several different continents. Typically, client side facilities  14  and STS  16  are in data communication with architecture  12  over the Internet using suitable computer systems. Architecture  12  includes a multi-tenant database system (MTS) in which various elements of hardware and software are shared by one or more multiple users  20 ,  22  and  24  associated with client side facilities  14 . 
         [0014]    A given application server of MTS may simultaneously process requests for a great number of users, and a given database table may store rows for a potentially much greater number of users. To that end, and as shown in  FIG. 2 , architecture  12  includes a processor sub-system  28 , memory space  30 , in data communication therewith, and network interface resources  32  in data communication with both memory space  30  and processor sub-system  28 . Processor sub-system  28  may be any known processor sub-system in the art, e.g., the CORE DUO® or the CORE 2 DUO® from Intel Corporation of Santa Clara, Calif. Memory space  30  includes drive storage  34 , shown as one or more hard drives  36  and  38 , as well as data and instruction registers, shown as  40 , and volatile and non-volatile memory shown as  42 . 
         [0015]    Architecture  12  provides access to a database  44  by multiple users  20 ,  22  and  24  of client side facilities  14  over data communication network  18  using standard computer systems (not shown). To that end, network interface resources  32  include a plurality of virtual portals  45 - 47 . Each virtual portal  45 - 47  provides an “instance” of a portal user interface coupled to allow access to database  44 . Typically, tenants obtain rights to store information, referred to as tenant information  48  and  50 , on database  44  and make the same accessible to one or more users  20 ,  22  and  24  to whom the tenant provides authorization. This is typically achieved by rental agreements between the tenant and an owner/provider of architecture  12 . In this manner, architecture  12  provides an on-demand database service to users  20 ,  22  and  24  that is not necessarily concerned with building and/or maintaining the database system; rather, these functions are addressed between the tenant and the owner/provider. 
         [0016]    With architecture  12 , multiple users  20 ,  22  and  24  may access database  44  through a common network address, in this example a universal resource locator (URL). In response, web-pages and other content may be provided to users  20 ,  22  and  24  over data communication network  18 . The resources of database  44  that users  20 ,  22  and  24  may access can be different, depending on user&#39;s  20 ,  22  and  24  security or permission level and/or tenant association. As a result, data structures included in tenant information  48  and  50  are managed so as to be allocated at the tenant level, while other data structures might be managed at the user level. Because architecture  12  supports multiple tenants including possible competitors, security protocols  52  and other system software  54 , stored for example on hard drive  38 , maintain applications and applications&#39; use to only those users  20 ,  22  and  24  with proper access rights. Also, because many tenants may desire access to architecture  12  rather than maintain their own system, redundancy, up-time, and backup are additional functions that may be implemented in architecture  12 . 
         [0017]    Referring to both  FIGS. 2 and 3 , to facilitate web-based CRM, a user system  55  employed by one of users  20 ,  22  and  24  typically communicates with architecture  12  using TCP/IP and, at a higher network level, use other common Internet protocols to communicate, such as HTTP, FTP, AFS, WAP, etc. To that end, user system  55  may be any computing device capable of interfacing directly or indirectly to the Internet or other network connection, such as desktop personal computer, workstation, laptop, PDA, cell phone, or any wireless access protocol (WAP) enabled device and the like running an HTTP client. An example of a user system  55  includes a processor system  56 , a memory system  57 , an input system  58 , and output system  59 . Processor system  56  may be any combination of one or more processors. Memory system  57  may be any combination of one or more memory devices, volatile, and/or non-volatile memory. A portion of memory system  57  is used to run operating system  60  in which an HTTP client  61  executes. Input system  58  may be any combination of input devices, such as one or more keyboards, mice, trackballs, scanners, cameras, and/or interfaces to networks. Output system  59  may be any combination of output devices, such as one or more displays  63 , printers, and/or interfaces to networks. HTTP client  61  allows users  20 ,  22  and  24  of users systems  55  to access, process and view information, pages and applications available to it from server system architecture  12  over network  18 . Examples of HTTP client  61  include various browsing applications, such as Microsoft&#39;s Internet Explorer browser, Netscape&#39;s Navigator browser, Opera&#39;s browser, or a WAP-enabled browser in the case of a cell phone, PDA or other wireless device, or the like. Access is gained to requisite tenant information  48  and  50  by entering the URL (not shown) into the URL box  62  of HTTP client  61 . The URL directs users  20 ,  22  and  24  to the appropriate virtual portal for to determine authorization and permission level to access the requisite tenant information  48  and  50 . 
         [0018]    Referring to both  FIGS. 2 and 4 , one challenge presented by having large numbers of users accessing architecture concurrently is providing a user experience that avoids the perception of functional latency. This my arise, for example, when a user requests computationally intensive queries of tenant information  48  and  50  on database  44 . Tenant information  48  and  50  is typically compatible with SQL methodologies. As a result, tenant information  48  and  50  may be viewed as a collection of objects, such as a set  63 - 68  of logical tables, containing data fitted into predefined categories. This is shown as rows, referred to as data objects  69 - 75  and columns  76 - 84  with respect to table  65 . A “table” is one representation of a data object, and may be used herein to simplify the conceptual description of objects and custom objects according to the present invention. It should be understood that “table” and “object” may be used interchangeably herein. Thus, it is not unlikely that a user can request a report, in accordance with a report definition, that would require processing of hundreds of thousands if not millions of rows  69 - 75  and columns  76 - 84 . Coupled with the realization that multiple users associated with multiple tenants may concurrently make such requests this may be problematic in that architecture  12  may become bogged-down so as to provide users thereof with a less than desirable experience, e.g., undue latency. 
         [0019]    Referring to  FIGS. 2 ,  3  and  5 , the instant invention provides flexibility to the owner of architecture  12  to control the resource consumption by users  20 ,  22  and  24  while providing users  20 ,  22  and  24  the perception of real-time processing of reports and other queries for access to tenant information  48  and  50 . To that end, architecture  12  includes a report preview cache  86  and associated report preview software  88  to provide flexibility to the owner of architecture to process a report query at a desired time while providing information to one of users  20 ,  22  and  24  that emulates a result of a query. Specifically, one of users  20 ,  22  and  24  employs computer system  55  to transmit a query, request for a report to architecture  12  that includes a report definition, discussed more fully below. In response an emulated result of report definition  102  is rendered on a report builder  94  that is present on display  63 . As can be seen report builder  94  renders a table of information in rows  96  and columns  98  that includes results that are in response to a report definition transmitted to database  44 . 
         [0020]    Report preview software  88  interprets report definition  102  received from one of users  20 ,  22  and  24 . Specifically, report preview software  88  instantiates a reporting layer  100  in which a report definition  102 , received from one of users  20 ,  22  and  24 , is interpreted. A query builder  104  is instantiated by the Report preview software  88  to check the security associated with tenant information  48  and  50  against access afforded to user  20 ,  22  or  24  that transmitted report definition  102 . In this manner, report preview software  88  determines whether access my be granted to the user  20 ,  22  and  24  to the portions of tenant information  48  and  50  that is provided in response to report definition  102 , ResultSet. Specifically, the ResultSet is generated in response to processing tenant information  48  and  50  in accordance with report definition  102 . As a result, report definition  102  may call several methods and filter functions to process tenant information  48  and  50 , as desired. A query builder  104  checks the information in cache  86  to determine whether data, i.e., a table of objects, related to the ResultSet is present in cache  86 . If this is the case, then a subset of objects are identified and retrieved, i.e., pre-fetched, from cache  86 . The subset of objects defines an emulated ResultSet (ERS)  108  and may be retrieved randomly or based upon any one or more of criteria pre-defined by either the owner of architecture  12  and/or the tenant corresponding to the data in ERS  108 . For example, ERS  108  may consist of the first 50 rows of data in cache  86 , or every other row, or every third row, or odd rows or even rows and the like. ERS  108  is transmitted to user  20 ,  22  or  24 , in response to report definition  102  and is rendered by report builder  94  on display  63 . 
         [0021]    To facilitate quickly identifying objects that correspond to report definition  102 , metadata  110  is stored in cache  86  along with the tenant information  48  and  50  that is included in ERS  108  and generated in response to processing tenant information  48  and  50  in accordance with report definition  102  received in response to an earlier report request. Metadata  110  includes information related to the ReportInfo, which includes a logical definition of the report that facilitates determining whether the information is related to report definition  102 . To minimize the time required to read the information, metadata  110  will be stored in cache  86  as a serialized JSON object that contain identifiers unique to each object. Other information contained in each JSON object includes ResultSet columns information that identifies the type of information and the location within cache  86  where the information is stored, the version of the report definition, as well as Context information. Context information is information that is user specific, such as the organization within tenant with which user is associated and other user preferences. 
         [0022]    It is desired that the data stored in cache  86  be able to be streamed. To that end, ERS  108  data is stored as a stream of serialized java objects. An example of information that may be contained in a data object is as follows: i) String: release version+changelist level, e.g.  160 . 2 . 2 ; ii) Object[ ]; resultset row; and iii) End of Stream marker. Resultsetmetadata, metadata  110 , to be stored in cache  86  is retrieved through a specific method call returning a java class that can be serialized to JSON, as discussed above. These objects are then stored in cache  86  in the manner discussed above. In this fashion, upon receipt of another request for a report from a user  22 ,  24  or  26 , report preview software  88  compares report definition  102  associated with the request and information in cache  86 , as mentioned above. Metadata  110  is loaded from JSON into a java object. 
         [0023]    If it is determined that metadata  110  matches report definition  102 , referred to as a cache hit, then a sub-portion of ERS  108  is transmitted to system  55  to be rendered in report builder  94 . Data stream is the transmitted to the report builder  94 , as if it was based upon input of a jdbc resultset. Were a match between report definition  102  found not to exist, or otherwise correspond to, metadata  110 , referred to as a cache miss, then report preview software  88  would locate the corresponding information on database  44  to generate ERS  108 , using well known techniques. This information would then be recorded in cache  86  and transmitted to user system  55 , with the understanding that the full report set would be generated as desired by the owner of architecture, typically at a later time. It is desired to fetch as many rows of corresponding data on database  44  up to the maximum limit. The maximum limit is typically set by the owner of architecture  12  and may be any desired. 
         [0024]    The typical lifecycle of cache  86  is approximately fifteen minutes. As a result, it is possible that many queries of database  44  may occur in response to report requests. To ameliorate the computational requirements to generate ERS  108  in view of a cache miss, ERS  108  is generated from tenant information  48  and  50  recorded in database  44  for only those tables that have already undergone processing that are part of the report definition  102 . For example, were report definition  102  to require a join operation between multiple tables to generate a ResultSet, report preview software  88  would only look to tenant information  48  and  50  that has already been generated as a result of the join operation and that corresponded to the report definition  102 . 
         [0025]    In this manner, report preview software  88  reduces the amount of resources consumed by architecture to satisfy a request for a report from users  22 ,  24  and  26 , white providing users with a real time experience with architecture. ERS  108 , however, is temporary. Eventually, a Final ResultSet (FRS) is produced and transmitted to the requesting user  22 ,  24  and  26 . The FRS replaces the information in ERS  108  and is rendered upon the report builder  94 . The timing of generation of the FRS may be dependent upon many factors and is typically a result of contractual arrangement between the owner of architecture and the tenant associated with users  20 ,  22  and  24 . For example, users  20 ,  22  and  24  associated with one tenant may have a maximum latency, e.g., maximum number of computation cycles, which will be tolerated between request for the report and transmission of the FSA to the report builder. This maximum latency may be for a predetermined number of report requests during a given period of time, after which there is no upper limit on the magnitude of latency between the request and transmission of the FSA. 
         [0026]    It is desired that security be maintained for the pre-fetch data that is commensurate with the security implemented on database  44 . To that end, data in cache  86  is keyed by user so that only the user associated with the tenant may have access to the data. This may be optimized for incremental report modifications and implemented so as to minimize, if not avoid, swapping the entire cache  86  with full history. Security among the tenants is facilitated by defining within memory space  28  a cache unique to each tenant. As shown, typically architecture  12  will have multiple caches, three of which are shown as  86 ,  112  and  114 . Each cache  86 ,  112  and  114  associated with a tenant that is different than the cache  86 ,  112  and  114  associated with the remaining tenants. As a result, each tenant has a cache  86 ,  112  and  114  uniquely assigned to it. 
         [0027]    The Computer code for operating and configuring network  10  to intercommunicate and to process web pages, applications and other data and media content as described herein are preferably downloaded and stored on a hard disk, but the entire program code, or portions thereof, may also be stored in any other volatile or non-volatile memory medium or device as is well known, such as a ROM or RAM, or provided on any media capable of storing program code, such as any type of rotating media including floppy disks, optical discs, digital versatile disk (DVD), compact disk (CD), microdrive and magneto-optical disks, and magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data. Additionally, the entire program code, or portions thereof, may be transmitted and downloaded from a software source over a transmission medium, e.g., over the Internet, or from another server, as is well known, or transmitted over any other conventional network connection as is well known (e.g., extranet, VPN, LAN, etc.) using any communication medium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as are well known. It will also be appreciated that computer code for implementing embodiments of the present invention can be implemented in any programming language that can be executed on a client system and/or server or server system such as, for example, C, C++, HTML, any other markup language, Java™, JavaScript, ActiveX, any other scripting language, such as VBScript, and many other programming languages as are well known may be used. (Java™ is a trademark of Sun Microsystems, Inc.). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.