The present invention generally relates to data access from a server, and more particularly relates to coarse-grained data retrieval from a server having data buffers configured to store the data.
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Computer systems that provide data hosting and applications that operate on hosted data are becoming increasingly popular. Businesses, government entities, and other organizations (generally referred to as users herein) with relatively large bodies of data are increasingly using such computer systems to host their data. Such computer system are typically maintained and operated by businesses that are independent from users, which contract with the businesses for the use of such computer systems for hosting data. Computer systems configured to host data and provide applications for the hosted data provide numerous advantages for users, such as: reducing user-overhead costs, providing reliable access to hosted data via a variety of computer platforms (e.g., desktop computers, laptop computers, tablet computers, etc.), global access to hosted data, a large variety of applications available for the hosted data, and the like.
Users generally have a desire to have relatively quick access to the user's hosted data hosted on a computer system, such as a server. Traditional servers are configured to provide for a user, via a user computer, to send data requests for hosted data stored in the server's data buffers and return the hosted data requested to the user computer. For hosted data stored in the form of a data structure, such as a tree data structure, in a data buffer of a server, a user computer typically sends a data request for hosted data stored in each node of the tree. That is, one data request is sent to a traditional server for each node from which hosted data is requested. Therefore, to retrieve data from a plurality of nodes, a corresponding plurality of data requests are sent from a user computer to a server. After each data request is sent by the user computer, the server computer typically responds by sending the hosted data at the node from which the hosted data is requested and sends an identifier that identifies the next node of the tree so that the computer system might then request additional hosted data at the next node. The user computer and server continue this back-and-forth process for retrieving hosted data stored in a data structure until the relevant nodes of the data structure have been accessed and hosted data retrieved therefrom. This process of a user computer issuing a request for hosted data from each node of a data structure is relatively slow.
Thus, there is a need for providing an improved computer system and an improved computer method for retrieval of hosted data stored in a data structure in a data buffer of the server computer to reduce the number of communications between a user computer and the server computer for retrieving the hosted data.
The present invention generally relates to data retrieval from a server, and more particularly relates to coarse grained data retrieval from a server having data buffers configured to store the data.
According to one embodiment of the present invention, a computerized method for retrieval of coarse-grained business object data stored in a data buffer of a server computer includes providing via a computer system an application program interface (API) having a function for specifying a set of paths through a business object stored as a data structure in a data buffer of a server computer. Each of the paths included in the set of paths specifies a plurality of nodes of the business object for accessing hosted data at the plurality of nodes. The method further includes receiving via the computer system a set of parameters for the function of the API, wherein the set of parameters specify the set of paths, and issuing via the computer system the set of parameters to the server computer. The method further includes retrieving via the computer system hosted data from the plurality of nodes for each path in the set of paths, and transmitting via the computer system to a client the hosted data retrieved from the plurality of nodes.
According to a specific embodiment, the method further includes presenting via the computer system on the client the hosted data according to a tree structure specified by the set of paths.
According to another specific embodiment, the retrieving step includes parsing via the computers system the set of parameters for each path.
According to a specific embodiment, the retrieving step includes traversing each path in the set of paths for the business object stored in the data buffer.
According to a specific embodiment, the set of parameters includes a first parameter for specifying a business object node instance and an association from the business instance to sub-nodes of the instance.
According to a specific embodiment, the level of the instance is an arbitrary node for the instance.
According to a specific embodiment, the association is a name of the sub-node or a modeled or implemented relationship to the sub-node.
According to a specific embodiment, the set of parameters includes a name for the instance from which the association specifies the sub-node of the instance.
According to a specific embodiment, each of the associations is a name for one of the sub-nodes or a modeled or implemented relationship to the sub-node.
According to a specific embodiment, the association specifies an association between the instance and the sub-nodes of the instance.
According to a specific embodiment, the set of parameters includes a name for the instance from which the association specifies the sub-node of the instance.
According to a specific embodiment, the set of parameters includes a sub-set of parameters for specifying the inclusion of link information in the hosted data retrieved from the plurality of nodes and transmitted to the client.
According to another embodiment of the present invention, a non-transitory computer readable medium includes a computer program product, which includes steps for retrieving coarse-grained data for a computerized method including providing via a computer system an application program interface (API) having a function for specifying a set of paths through a business object stored as a data structure in a data buffer of a server computer. Each of the paths included in the set of paths specifies a plurality of nodes of the business object for accessing hosted data at the plurality of nodes. The method further includes receiving via the computer system a set of parameters for the function of the API, wherein the set of parameters specify the set of paths, and issuing via the computer system the set of parameters to the server computer. The method further includes retrieving via the computer system hosted data from the plurality of nodes for each path in the set of paths, and transmitting via the computer system to a client the hosted data retrieved from the plurality of nodes.
According to another embodiment of the present invention, a computer system configured for accessing retrieving coarse-grained data business object data stored in a data buffer of a server computer includes a set of processors configured to execute computer code. The computer system further includes a set of memories respectively coupled to the set of processors and configured to store computer code and transfer the computer code to the set of processors for execution, wherein the computer code includes computer code for providing via a computer system an application program interface (API) having a function for specifying a set of paths through a business object stored as a data structure in a data buffer of a server computer. Each of the paths included in the set of paths specifies a plurality of nodes of the business object for accessing hosted data at the plurality of nodes. The set of memories further includes computer code for receiving via the computer system a set of parameters for the function of the API, wherein the set of parameters specify the set of paths, and computer code for issuing via the computer system the set of parameters to the server computer. The set of memories further includes computer code for retrieving via the computer system hosted data from the plurality of nodes for each path in the set of paths, and computer code for transmitting via the computer system to a client the hosted data retrieved from the plurality of nodes.
The following detailed description and accompanying drawings provide a better understanding of the nature and advantages of the present invention.
The present invention generally provides a computer system and a computer method for retrieval of hosted data stored on a server, and more particularly provides for coarse-grained data retrieval from a server having a data buffer configured to store the hosted data.
In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention as defined by the claims may include some or all of the features in these examples alone or in combination with other features described below, and may further include modifications and equivalents of the features and concepts described herein.
Server computer 105 may be configured to operate a server operating system and may include set of processors 106 and a non-transitory memory 107. Non-transitory memory 107 may be configured to store computer code 109, which may be executable by the set of processors 106 of server computer 105 or executable by other server computers. Each user computer may be a desktop computer, a laptop computer, a tablet computer, a smartphone, a personal digital assistant, or the like. Further, each user computer may include a set of processors 121 (the sets of processors are labeled 121a, 121b, 121c . . . 121n in
According to one embodiment, server computer 105 is a business-objects server configured to store, modify, and access data objects 116 (referred to herein as business objects) in database 115. According to a further embodiment, server computer 105 is an advanced business application programming (ABAP) application server, which is a specific type of business-objects server. ABAP is a high-level programming language created by SAP AG of Germany, and is a language that may be used for programming the server computer for building applications that provide services, such as building business applications. More specifically, server computer 105 may be a Business By Design Server of SAP AG of Germany.
According to one embodiment, server computer 105 further includes a data buffer 130 configured to store a set of business objects 135. The set of business objects 135 may be stored in data buffer 130 as a business-object data structure, such as a tree data structure. The set of business objects 135 may be a copy of business objects 116 stored in database 115 or may be a subset of business objects 116. The set of business objects 135 may alternatively be based on business objects 116 and may be a modification thereof. For example, business objects 116 may initially be retrieved from database 115 and stored in data buffer 130 and may thereafter be modified, possibly for subsequent storage back into database 115.
The user computers in the set of user computer 120 may be configured for operating a set of clients 140 (each client is labeled with the base reference numeral 140 and an alphabetic suffix). The clients operating on the user computers may be configured for use by different users controlling the different clients. For example, computer 120a may be configured for operating a development tool client 140a for developing new applications within a development framework or the like. According to a further example, user computer 120b may be configured to operate a front-end client 140b, such as a browser or other dedicated client, for use by user computer 120b for accessing a user's hosted data stored in data buffers 130. According to a further example, user computer 120c may be configured to operate a client 120c for generic consumers, such as agents, extensions, etc.
Traditionally, LCP APIs have provided functions for clients 122 where the clients interact with a server computer and data buffers (via the provided functions) for node by node requests for hosted data stored in business-object data structure in the data buffers. As described briefly above, according to one embodiment of the present invention, the LCP API 210 is configured to provide the request function for accessing the hosted data stored in data buffer 130 according a set of paths in the business-object data structure. Specifically, the set of paths specified (via the request function and function parameters of the LCP API) define a composition of a tree data structure starting at a first specified node of the tree data structure, for example a root node. The set of paths may also specify the sub-nodes of the root node, sub-sub nodes of the root node, etc. for retrieval of hosted data from the root node, the sub-nodes, the sub-sub nodes, etc. In addition to specifying the nodes from which hosted data is to be retrieved, the set of paths may also specify the associates between nodes (e.g., root node, sub-nodes, sub-sub-nodes, etc.) in the tree data structure. The associations provide that the BOPF (after receiving a course-grained data request for hosted data) and may traverse the sets of paths in the business-object data structure by parsing the associations provided in coarse-grained data request. That is, the associations map the set of paths for the BOPF for retrieval of the hosted data at the nodes (e.g., root item data from a root node, sub-item data from sub-nodes, sub-sub-item data from sub-sub nodes, etc.). See step 315. For convenience herein, root item data is sometimes referred to as an item, sub-item data is sometimes referred to as a sub-item, etc.
According to one embodiment of the present invention, the BOPF is further configured to construct a formulation of the hosted data requested in a coarse-grained data request and return the formulation of the hosted data to the client that requested the hosted data (step 320). The formulation of the hosted data prepared by the BOPF for transfer to the client requesting the hosted data may be organized according to the set of paths (i.e., according to the tree data structure specified by the sets of paths). That is, the formulation of the hosted data provides for the hosted data to be organized from to a first specified node (e.g., the root node) in the coarse-grained data request, to the sub-node (e.g., specified by a first association in the course-grained data request), to the sub-sub node (e.g., specified by a second association in the course-grained data request), etc.
The parameters of the request function, which is provided by the LCP API, for specifying the set of paths in the business-object data structure for the hosed data stored in the buffer memory is described in further detail immediately below. The parameters for the request function may be entered into a requesting program, a requesting script, etc. via a user interface of a client (e.g., client 122b), via another program generating the requesting program, the requesting script, etc. where the requesting program, the requesting script, etc. may include a request function call for the request function and may generate the coarse-grained data request 124. According to one embodiment, the parameters may be entered by a human user using the user interface of one of the clients to generate a requesting program, a requesting script, etc. for generating the course-grained data request 124. The entry of parameters for a request function provided by an API, such as LCP API 210, is generally well understood by those of skill in the art and will not be described in further detail herein.
Specifically, a first parameter 400a “IN_BO_NODE_NAME” specifies the initial node of a business object from which hosted data is requested. For example, the business object node may be for sales order items or the like. A second parameter 400b “IN_NODE_IDS” specifies instances of this business object node. For example, the identifier may be for a specific sales order item node instance of the business object. The set of parameters 410, labeled “IN_REQUESTED_PATH”, provides the definition of the sub-path starting from the node instances provided in the set of parameters 400. The first parameter 410a is a table definition of paths which refer to each other. Parameter 410b “LEVEL” and 410d “SOURCE_BO_NODE_NAME” define the tree structure of the paths.
The second parameter 410b “LEVEL” specifies the level of the path definition from which hosted data may be retrieved. Each level refers to an entry of the level above with the parameter 410d “SOURCE_BO_NODE_NAME”. For the first level there is no level above and it refers to the node instances defined by the set of parameters 400.
The third parameter 410c “ASSOCIATION” specifies the association of a sub-node of the node specified by the level. That is, the association specifies a connection between the node specified by the level (e.g., the root node for the specific item in the specific sales order business object) and the sub-node. As described briefly above, the association may be the name of the sub-node. According to the sales order example being considered, for the specific item of the specific sales order, a sub-node may be for a delivery date of the specific item, for example, or may be other information for the specific item, such as a material list, a build itinerary, etc. See the example associations in the text 440b shown in
To specify further sub-nodes of a node specified by the LEVEL parameter, the LCP API may be configured to provide additional parameters for additional ASSOCIATIONS 410c for the further sub-nodes and for additional SOURCE_BO_NODE_NAMEs 410d. An additional association lengthens the specified path by a node.
According to an alternative embodiment, to specify a further sub-node (e.g., a sub-sub-node of the root node) specified by the LEVEL parameter an additional function call to the request function may be made in the requesting program, the requesting script, etc. The LEVEL 410b for the additional call to the request function entry for the IN_REQUESTED_PATH 410a may be the first sub-node of the node specified by the level parameter in the first call to the request function. The ASSOCIATION 410c for the additional function call may be for the further sub-node.
According to one embodiment, to specify additional specific instances (e.g., additional items) of a business-object data structure (e.g., the specific sales order) of hosted data for retrieval of the hosted data, a requesting program, a requesting script, etc., includes additional function calls to the request function for specifying a path for the additional specific instance.
According to a further embodiment of the present invention, the LCP API may provide optional parameters for specifying the type of hosted data that is retrieved from the data buffers. The LCP API may include an optional parameter “ASSOCIATION_FILTER” 410e for filtering out from the hosted data, which is returned to the client by the server computer, the data for the sub-node (e.g., do not return the data for the delivery date for an item). The LCP API may include an optional parameter “FILL_DATA” 410f, which if included in the function call of the requesting program, requesting script, etc., specifies to the BOPF to return the links between the nodes of the path. The LCP API may include an optional parameter “REQUESTED_ATTRIBUTES” 410g, which if included in the function call in the requesting program, requesting script, etc., specifies specific portions of hosted data at the nodes to be retrieved. The LCP API may include an optional parameter “FILL_LINKS” 410h, which if included in the function call in the requesting program, the requesting script, etc., further specifies to the BOPF how the links are to be retrieved and reported. Specifically, the BOPF may be directed to report the links between nodes (e.g., the links between a specific item and the specific item's sub-items. For example, the reported link may inform a human user of the client that a specific delivery data (i.e., data of a sub-node) is for a specific item (i.e., data of the root node).
According to a further embodiment, the LCP API may provide a third set of parameters 415 for specifying the reporting of hosted data returned from server computer 105 to the client operating on a user computer. A first line 415a “OUT_PATH” is substantially similar to the first line 410a “IN_REQUETS_PATH” and specifies that the hosted data is to be reported based on level and associations. Second parameter 415b “LEVEL,” third parameter 415c “ASSOCIATION,” and fourth parameter 415d “SOURCE_BO_NODE_NAME” specify a path in a tree for reporting data. A fifth parameter 415e “DATA_REF” returns the requested data for this path. A sixth parameter 415f “LINKS” provides on option for having the links between nodes for the specified path reported.
While the foregoing embodiments are described for retrieval of hosted data, alternative embodiments for specifying a set of paths for a tree data structure of hosted data stored in the data buffer provide for writing data according to the set of paths. For example, the LCP API may be configured to provide a write function for writing data according to a set of path for a tree data structure.
The above description illustrates various embodiments of the present invention along with examples of how aspects of the present invention may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the present invention as defined by the following claims. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations and equivalents will be evident to those skilled in the art and may be employed without departing from the spirit and scope of the invention as defined by the claims.