US20150067138A1 - Optimize data exchange for mvc-based web applications - Google Patents

Optimize data exchange for mvc-based web applications Download PDF

Info

Publication number
US20150067138A1
US20150067138A1 US14/011,124 US201314011124A US2015067138A1 US 20150067138 A1 US20150067138 A1 US 20150067138A1 US 201314011124 A US201314011124 A US 201314011124A US 2015067138 A1 US2015067138 A1 US 2015067138A1
Authority
US
United States
Prior art keywords
computer
webpage
data
program instructions
changed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US14/011,124
Inventor
Andrea Gianfelici
Marco Lerro
Vito Losacco
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to US14/011,124 priority Critical patent/US20150067138A1/en
Assigned to INTERNATIONAL BUSINESS MACHINES CORPORATION reassignment INTERNATIONAL BUSINESS MACHINES CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: GIANFELICI, ANDREA, LERRO, MARCO, LOSACCO, VITO
Priority to US14/475,947 priority patent/US10169478B2/en
Publication of US20150067138A1 publication Critical patent/US20150067138A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/15Flow control; Congestion control in relation to multipoint traffic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the present invention relates generally to the field of software development, and more particularly to client-server application development.
  • the model-view-controller (MVC) design pattern assigns objects in an application one of three roles: (i) model, (ii) view, or (iii) controller.
  • the design pattern defines the roles objects play in the application and the way objects communicate with each other. Each of the three types of objects is separated from the others by abstract boundaries.
  • One way to easily envision MVC is as follows: (i) the model object is the data; (ii) the view object is the window on the screen; and (iii) the controller object is the glue between the two.
  • Several enterprise web applications running on multi-tier level architectures implement the MVC design pattern where the view layer is usually placed on the server-side. Such an implementation was preferred in the past because the processors lacked power to host view logic. Over the years, the vast improvements in processor performance have opened opportunities to split the implementation between client and servers. Such opportunities for new solutions increase both usability and performance.
  • Model objects in a MVC architecture, encapsulate data specific to an application.
  • Model objects encapsulate the logic to manipulate and process data.
  • Model objects usually represent concrete items, such as a contact in a phone's address book.
  • a view object or known simply as a view, is an object in an application that users can observe. Two major purposes of view objects are to display data from the application's model objects and to enable the editing of that data. A view object knows how to draw itself. A view object can respond to user actions. A view for a contact in a phone's address book would know how to display the contact and allow editing of it.
  • a controller object acts as an in-between from one or more of an application's view objects to one or more of its model objects; they are conduits.
  • a controller object interprets user's actions made within view objects and communicates new or updated data to the model layer.
  • Embodiments of the present invention disclose a method, computer program product, and system for reducing network traffic.
  • the method comprises a first computer receiving a request for an update for a webpage from a second computer.
  • the first computer determines a portion of the webpage that has changed.
  • the first computer determines that an amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than an amount of data to be transmitted to update the entire webpage.
  • FIG. 1 depicts distributed data processing system 100 in accordance with one embodiment of the present invention.
  • FIG. 2 is a flowchart depicting operational steps of a web container (WC) module in accordance with one embodiment of the present invention.
  • FIG. 3 depicts a block diagram of components of user computers and application server computer, as in accordance with an illustrative embodiment of the present invention
  • FIG. 4 depicts a block diagram of the components of a user agent program and a WC program, as in accordance with an illustrative embodiment of the present invention.
  • FIG. 5 is a listing of attributes and values that reflect a user's action on business data in accordance with an illustrative embodiment of the present invention.
  • FIG. 6 lists extendable markup language (XML) representation for a multi-part textbox, as in accordance with an embodiment of the present invention.
  • XML extendable markup language
  • FIG. 7 shows rendered content for a browser at run-time, as in accordance with an embodiment of the present invention.
  • FIG. 8 shows the mapping process, as in accordance with an embodiment of the present invention.
  • aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer-readable medium(s) having computer readable program code/instructions embodied thereon.
  • Computer-readable media may be a computer-readable signal medium or a computer-readable storage medium.
  • a computer-readable storage medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but is not limited to, electro-magnetic, optical, or any suitable combination thereof.
  • a computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but is not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages.
  • the program code may execute entirely on a user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
  • LAN local area network
  • WAN wide area network
  • Internet Service Provider for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
  • the computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • FIG. 1 depicts distributed data processing system 100 in accordance with one embodiment of the present invention.
  • Distributed data processing system 100 includes user computer 110 , user computer 121 , user computer 130 and application server 140 , all interconnected over network 120 .
  • User computers 110 , 121 , and 130 , and application server 140 may each include components as depicted in further detail with respect to FIG. 3 .
  • Distributed data processing system 100 may include additional servers, or other devices not shown.
  • Network 120 may be a local area network (LAN), a wide area network (WAN) such as the Internet, any combination thereof, or any combination of connections and protocols that will support communications between user computers 110 , 121 , and 130 , and application server 140 in accordance with embodiments of the invention.
  • Network 120 may include wired, wireless, or fiber optic connections.
  • User computers 110 , 121 , and 130 may be desktop computers, notebooks, laptop computers, tablet computers, handheld devices, smart-phones, thin clients, or any other electronic devices capable of requesting and receiving information from a server computer, such as application server 140 .
  • User computer 110 , 121 , and 130 include user agent 112 , 122 , and 132 , respectively.
  • User agent programs 112 , 122 , and 132 are software applications capable of requesting information from a server computer. User agent programs 112 , 122 , and 132 add additional information to the request.
  • the additional information includes details about the user action and about the graphical controls that are involved in the request. For example, a user can request information on airline reservations. The user will use the graphical controls provided on the webpage, such as text boxes, dropdown boxes, combo boxes, and alike, to enter pertinent information.
  • the user action in this example, is the submittal of that information to an airline reservation database in the form of a request. Requests are in the form of a communication protocol, such as hypertext transfer protocol (HTTP).
  • HTTP hypertext transfer protocol
  • Application server 140 may be a management server, a web server, or any other electronic device or computing system capable of receiving and sending data, and communicating with other devices, such as user computer 110 , user computer 121 , and user computer 130 , via network 120 .
  • application server 140 may represent a server computing system utilizing multiple computers as a server system, such as in a cloud computing environment. Additionally, application server 140 may perform other conventional services, not shown in FIG. 1 , that include, but is not limited to: (i) web page delivery; (ii) mail server; (iii) print server; and (iv) gaming server.
  • Application server 140 contains WC program 142 and a communications manager.
  • the communication manager facilitates application programs to interact with each connection type on a consistent and predictable manner.
  • the communication manager isolates the implementation details of the different connection types from the application programs, such as WC program 142 .
  • the connection manager enables software, such as WC program 142 , to send or receive files using hypertext transfer protocol.
  • a connection is analogous to a word processing program connecting to a printer to print a document.
  • WC program 142 is software capable of analyzing and producing an optimized response to a request from a client.
  • An optimized response (sometimes referred to as an optimized view) is one that attempts to produce less network traffic than the normal traffic that is generated without executing WC program 142 (a non-optimized view).
  • Both the optimized view and the non-optimized view contain information on the website content that has changed.
  • Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view.
  • WC program 142 determines the view that would generate the least amount of network traffic by determining which view is less, the optimized view or the non-optimized view.
  • WC program 142 receives the data (the user request) and creates a response containing information on the aspects of the webpage that has changed, plus information about the portion of the webpage that remains the same. More specifically, WC program 142 optimizes a response by exploiting the following data: (i) request data, such as, changed user-control, next focus; (ii) business-logic information, such as, meta-data, runtime information; and (iii) request response history. Additionally, WC program 142 is also capable of inspecting client requests to determine the content and the target of the user interaction, for example a combo-box selection. Client requests are routed to the normal flow. WC program 142 works in concert with user agent programs 112 , 122 , and 132 .
  • Embodiments of the invention recognize that applying such transformation to legacy architectures, usually based on the MVC pattern, is difficult.
  • Embodiments of the invention provide an architecture, which allows MVC based architectures to gain benefits in a transparent way.
  • Embodiments of the invention provide an intermediate layer, which allows efficiency without changes to the legacy architectures.
  • FIG. 2 is a flowchart depicting operational steps of WC program 142 in accordance with one embodiment of the present invention.
  • an event triggers a request to update webpage data.
  • requests may be in the form of hypertext transfer protocol (HTTP).
  • HTTP hypertext transfer protocol
  • An event includes, but certainly not limited to: (i) changing a value in the user's entry object, such as changing text in a text box; (ii) a button request, such as the user pressing a soft-button; (iii) selecting a value from a value list; (iv) opening a dialog; (v) tabbing from one field to another; and (vi) any user interaction with the web browser which causes the server to analyze it and produce a new hypertext markup language (HTML) response to reflect the user action.
  • HTML hypertext markup language
  • a user may use a dropdown box to choose the city of destination. This can trigger an event (a request) to update the webpage with airline flights to the destination.
  • the user agent program 112 inserts details in the request relating to the user action and the graphical control.
  • MVC implementations map UI controls with IDs which in turn are mapped to the business data.
  • the UI control is setting a dropdown box graphic control (using a setvalue event) to a destination city.
  • the ID is mx762, which labels the specific dropdown box in which the destination city is set.
  • the user agent program 112 provides enough details to embodiments of the present invention to determine changes in the user's view. For example, a user of a view fills four text boxes.
  • a UA program such as user agent program 112 , sends a request to the server to get the updated view for presentation to the user.
  • the user of the view eventually fills all four text boxes, and consequently, the UA program produces four requests.
  • User agent 112 program sends the request to application server 140 for servicing. Without any further action from the user, which would generate another request, user agent program 112 awaits a service response from application server 140 .
  • WC program 142 receives requests from user agent program 112 .
  • WC program 142 extracts relevant information from the request and is subsequently stored.
  • the relevant information can be stored in any memory, including on or off application server 140 , as long as, the memory provides data integrity and is accessible, such as computer-readable storage medium, formerly discussed.
  • Relevant information includes, but is not limited to: (i) the graphical control identification that generated the event; (ii) the generated event; and (iii) attributes associated with the generated event, such as, a value is given to an attribute of a “set value” event.
  • the information grabbed from the request is used to efficiently produce the optimized response.
  • specific optimization patterns could be implemented by simply leveraging parameters in the request, based on the MVC implementation being optimized.
  • Such specific optimization patterns relate to user events. In such cases where there are no changes to business data, however, there are changes that affect the presentation. For instance, a user clicks on a calendar show button.
  • the current view would be enriched by the presentation of the calendar pop-up.
  • the extraction of such delta from the canonical response is optimized depending on the specific scenario. For example the extraction of the calendar representation can be implemented looking at specific pieces in the response using the calendar control id.
  • WC program 142 forwards the request to a web container for normal processing.
  • Normal processing updates the old view (a view, as some form of visualization of the state of the model) with new information which can include, but not limited to: (i) business logic updates, possibly using a database; (ii) controls, such as drop down; and (iii) any other presentation elements or controls, mixed by the MVC schema, to produce the updated view.
  • WC program 142 may receive the updated view from a business application.
  • Business applications are software applications that utilize databases for specific purposes, for example engineering data or economic models, library systems, flight reservation systems, and computerized parts inventory systems.
  • One example of the business application is the airline reservation example previously discussed.
  • the business application is generating a full updated view of the webpage.
  • WC program 142 generates a view that is optimized.
  • An optimized view is a view that would generate less network traffic.
  • WC program 142 analyzes objects that contribute to the updated view. Objects are collections of data structured in a predefined manner. Objects hold data and routines that operating on that data.
  • WC program 142 collects and analyzes the changed attributes associated with each of the objects. More specifically, WC program 142 compares the list of changed attributes with the history of changes collected in the past. Keeping the history allows WC program 142 to determine the differences between the old view and the updated view.
  • An example of an object is a dropdown box. Both the optimized view and the non-optimized view contain information on the website content that has changed.
  • Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view.
  • a view that contains 100 dropdown boxes (100 objects that correspond to 100 dropdown boxes) in which only one dropdown box is changed (99 dropdown boxes remain the unchanged) the optimized view would only contain information on the one changed dropdown, while the non-optimized full view would contain information on the 100 dropdown boxes.
  • Each time an attribute (linked to a dropdown box) changes WC program 142 simply provides the associated modified dropdown box presentation. WC program 142 does not send updates related to previously unchanged dropdown boxes.
  • WC program 142 determines that only a dropdown box data has changed, therefore sending only an optimal data response back to the appropriate UA program.
  • a destination city was entered into a dropdown box. Given this information WC program 142 returns flight information associated with the destination city. However, any information that was entered previously on the webpage and remains intact will not be returned; as there is no need to generate network traffic for non-changing webpage data. For instance, if a date of travel was entered before the destination city was entered, there is no need to return the date of travel information as the date of travel did not change.
  • WC program 142 starts from a complete view, produced by the request at time t0. Following requests at time t1, t2, and so on, until tN, WC program 142 builds partial views (known as deltas), until the optimized is complete. In other words, starting from the complete response collected at time t0, the WC program 142 produces the optimized response at time tN.
  • Different embodiments of WC program 142 may utilize different strategies to produce the optimized response. Examples of two strategies include, but are not limited to: (i) extract differences from a complete response at t0, or (ii) extract differences from response at time tN ⁇ 1 for data actually changed from time tN ⁇ 1.
  • One embodiment to implement the second choice is to provide a history of changed from time t0 to tN ⁇ 1.
  • WC program 142 determines which view to send to user agent program 112 .
  • the optimized view is compared to the non-optimized view (normal view) in order to determine which would generate the least amount of network traffic.
  • Both the optimized view and the non-optimized view contain information on the website content that has changed.
  • Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view. There are times the optimized view produces little benefit, and may even add content data, such as meta-data, that would increase the transmission.
  • the comparison determines which view generates the least amount of data and consequently the least amount of network traffic.
  • the view that generates less network traffic is sent to the appropriate user agent, such as user agent program 112 .
  • the increase in optimized view size is the results of adding additional information for the appropriate UA program to correctly manage the missing information.
  • WC program 142 would need to send a significant amount of information for the appropriate UA program to manage all the changed objects.
  • step 245 WC program 142 , depending upon step 240 , sends the optimized content to user agent program 112 .
  • WC program 142 stores the updated history records.
  • the history records can be stored in any memory, on or off the application server 140 , as long as the memory provides data integrity and is accessible, such as computer-readable storage medium, formerly described.
  • step 255 WC program 142 , depending upon step 240 , sends the non-optimized content to user agent program 112 .
  • User agent program 112 receives the view content sent from WC program 142 and updates the user's presentation data, accordingly.
  • user agent program 112 receives the view content containing information on destination city plus information about the portion of the webpage that remains the same, such as date of travel.
  • User agent program 112 communicates with the document object model (DOM) application programming interface (which possess software to update webpages using hypertext markup language) on how to display the destination city plus date of travel.
  • the view will be either the optimized view or the non-optimized view.
  • User agent program 112 contains the software to construct a view for display, for the DOM, that would be identical to a non-optimized view.
  • user agent program 112 constructs a view for display using the DOM. Whenever a non-optimized view is received user agent program 112 can pass the non-optimized view to the DOM with minimal manipulation. In one embodiment, user agent program 112 works in concert with a web browser to display the view received from WC program 142 .
  • FIG. 3 depicts a block diagram of components of user computers 110 , 121 , 130 , and application server 140 , as in accordance with an illustrative embodiment of the present invention. It should be appreciated that FIG. 3 provides only an illustration of one implementation and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made.
  • Distributed data processing environment computers include communications fabric 302 , which provides communications between computer processor(s) 304 , memory 306 , persistent storage 308 , communications unit 310 , and input/output (I/O) interface(s) 312 .
  • Communications fabric 302 can be implemented with any architecture designed for passing data and/or control information between processors (such as microprocessors, communications and network processors, etc.), system memory, peripheral devices, and any other hardware components within a system.
  • processors such as microprocessors, communications and network processors, etc.
  • Communications fabric 302 can be implemented with one or more buses.
  • Memory 306 and persistent storage 308 are computer-readable storage media.
  • memory 306 includes random access memory (RAM) 314 and cache memory 316 .
  • RAM random access memory
  • cache memory 316 In general, memory 306 can include any suitable volatile or non-volatile computer-readable storage media.
  • persistent storage 308 includes a magnetic hard disk drive.
  • persistent storage 308 can include a solid state hard drive, a semiconductor storage device, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, or any other computer-readable storage media that are capable of storing program instructions or digital information.
  • the media used by persistent storage 308 may also be removable.
  • a removable hard drive may be used for persistent storage 308 .
  • Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer-readable storage medium that is also part of persistent storage 308 .
  • Communications unit 310 in these examples, provides for communications with other data processing systems or devices, including resources of enterprise grid (not shown) and distributed data processing environment computers.
  • communications unit 310 includes one or more network interface cards.
  • Communications unit 310 may provide communications through the use of either or both physical and wireless communications links.
  • WC program 142 may be downloaded to persistent storage 308 of application server 140 through communications unit 310 of application server 140 .
  • I/O interface(s) 312 allows for input and output of data with other devices that may be connected to distributed data processing environment computers.
  • I/O interface 312 may provide a connection to external devices 318 such as a keyboard, keypad, a touch screen, and/or some other suitable input device.
  • External devices 318 can also include portable computer-readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards.
  • Software and data used to practice embodiments of the present invention, e.g. WC program 142 can be stored on such portable computer-readable storage media and can be loaded onto persistent storage 308 via I/O interface(s) 312 .
  • I/O interface(s) 312 also connect to a display 320 .
  • Display 320 provides a mechanism to display data to a user and may be, for example, a computer monitor.
  • FIGS. 1 to 3 have been fully discussed, some additional discussion and embodiments of the present invention will be discussed in the following paragraphs.
  • FIG. 4 depicts a block diagram of the components of user agent program 112 and WC program 142 , as in accordance with an illustrative embodiment of the present invention.
  • the user interacts with user interface 405 , thus triggering an action, by changing values: (i) editing value inside a text box; (ii) invoking a command, for example clicking a button; or (iii) any typical user action that invokes a change in the user's presentation.
  • User agent program 112 produces a request inserting details about the user action and about the graphical controls that are involved.
  • User agent program 112 sends a request, one such request is in the form of a hypertext transfer protocol (HTTP) request, to web container 414 .
  • HTTP hypertext transfer protocol
  • WC program 142 intercepts the request coming from UA module 411 .
  • Request analyzer adapter 420 grabs relevant information from the request and temporary stores the relevant information, which includes, but not limited to: (i) the graphical control identification which generated the event; (ii) the generated event; and (iii) specific event's attributes (e.g. for a typical “set value” event the attribute is the value set by the user). Request analyzer adapter 420 forwards the request to the web container 414 .
  • Business logic 423 running within the EJB container 426 is executed.
  • Business data 429 is potentially changed due to the executed business logic 423 .
  • the new view based on the updated business data 429 is produced by business logic 423 .
  • WC program 142 optimizes response.
  • Request analyzer adapter 420 gets the view.
  • Controller 432 analyzes objects which contribute to the view content. For each object data 438 and metadata 441 is queried through business data adapter 435 and metadata adapter 444 to get changed attributes. Controller 432 retrieves the list of changed attributes. In order to figure out what is actually changed during the current request, controller 432 compares the whole list of changed attributes (since the last commit) with the history of changes collected in the past through history module 447 . Controller 432 figures out the attributes actually changed in the current interaction. When the results of a number of changes for a response greater than the original entire view, the updated view is transmitted. Controller 432 extracts the “view” chunks that have been changed. Controller 432 evaluates how many attributes have been changed.
  • Controller 432 evaluates how big are the fragments (to be sent) compared the entire view.
  • History module 447 updates the history by storing the attributes changed during this request. If the changes are being committed the history is cleaned-up.
  • WC program 142 packs the response.
  • metadata adapter 444 reverse maps the attributes to their presentation id;
  • controller 432 creates a response by providing a list of couples composed of the graphic control id and the view fragment; and
  • WC program 142 sends back the response.
  • the response cannot be optimized WC program 142 sends back the entire view.
  • UA module 411 receives the response.
  • UA module 411 iterates the list of couples and updated the document object model (DOM) 450 , accordingly; otherwise, UA module 411 updates the entire view.
  • DOM document object model
  • FIG. 5 is a listing of attributes and values that reflect a user's action on business data in accordance with an illustrative embodiment of the present invention.
  • the user interacts with the user-agent and triggers an event which produces a request, one such request is in the form of hypertext transfer protocol (HTTP).
  • HTTP hypertext transfer protocol
  • the request contains detailed information about the control, such as attributes (parameters) and associated values, which lets the server to reflect user action on business data. For example, the attributes listed show the info sent to an application framework when setting a value to a text-box control.
  • FIG. 6 lists extendable markup language (XML) representation for a multi-part textbox, as in accordance with an embodiment of the present invention.
  • XML extendable markup language
  • An application framework allows the definition of application layouts, usually through an XML representation which defines both view structure and binding to underlined data.
  • FIG. 7 shows rendered content for a browser at run-time, as in accordance with an embodiment of the present invention.
  • FIG. 8 shows the mapping process, as in accordance with an embodiment of the present invention.
  • the process to get deltas is based on the following data-structures: (i) request info details: the id of the user-agent control is used to figure-out who is triggering the change; (ii) business-data: the underling objects are evaluated to figure-out what has been changed by the server-side frame-work; (iii) frame-work metadata: based on what has been changed on the business-data, a reverse look-up up to the run-time application is done to understand what potentially has been changed; and (iv) request/response history: the history is leveraged to figure out changes that have been already managed in previous interaction which do not need to be re-sent.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s).
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.

Abstract

Embodiments of the present invention disclose a method, computer program product, and system for reducing network traffic. In one embodiment, a computer determines that a webpage has changed and that an amount of data to be transmitted to update the portion of the webpage that has changed is smaller than an amount of data to be transmitted to update the entire webpage.

Description

    FIELD OF THE INVENTION
  • The present invention relates generally to the field of software development, and more particularly to client-server application development.
  • BACKGROUND OF THE INVENTION
  • The model-view-controller (MVC) design pattern assigns objects in an application one of three roles: (i) model, (ii) view, or (iii) controller. The design pattern defines the roles objects play in the application and the way objects communicate with each other. Each of the three types of objects is separated from the others by abstract boundaries. One way to easily envision MVC is as follows: (i) the model object is the data; (ii) the view object is the window on the screen; and (iii) the controller object is the glue between the two. Several enterprise web applications running on multi-tier level architectures implement the MVC design pattern where the view layer is usually placed on the server-side. Such an implementation was preferred in the past because the processors lacked power to host view logic. Over the years, the vast improvements in processor performance have opened opportunities to split the implementation between client and servers. Such opportunities for new solutions increase both usability and performance.
  • Model objects, in a MVC architecture, encapsulate data specific to an application. Model objects encapsulate the logic to manipulate and process data. Model objects usually represent concrete items, such as a contact in a phone's address book.
  • A view object, or known simply as a view, is an object in an application that users can observe. Two major purposes of view objects are to display data from the application's model objects and to enable the editing of that data. A view object knows how to draw itself. A view object can respond to user actions. A view for a contact in a phone's address book would know how to display the contact and allow editing of it.
  • A controller object acts as an in-between from one or more of an application's view objects to one or more of its model objects; they are conduits. A controller object interprets user's actions made within view objects and communicates new or updated data to the model layer.
  • SUMMARY
  • Embodiments of the present invention disclose a method, computer program product, and system for reducing network traffic. The method comprises a first computer receiving a request for an update for a webpage from a second computer. The first computer determines a portion of the webpage that has changed. The first computer determines that an amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than an amount of data to be transmitted to update the entire webpage.
  • BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
  • FIG. 1 depicts distributed data processing system 100 in accordance with one embodiment of the present invention.
  • FIG. 2 is a flowchart depicting operational steps of a web container (WC) module in accordance with one embodiment of the present invention.
  • FIG. 3 depicts a block diagram of components of user computers and application server computer, as in accordance with an illustrative embodiment of the present invention
  • FIG. 4 depicts a block diagram of the components of a user agent program and a WC program, as in accordance with an illustrative embodiment of the present invention.
  • FIG. 5 is a listing of attributes and values that reflect a user's action on business data in accordance with an illustrative embodiment of the present invention.
  • FIG. 6 lists extendable markup language (XML) representation for a multi-part textbox, as in accordance with an embodiment of the present invention.
  • FIG. 7 shows rendered content for a browser at run-time, as in accordance with an embodiment of the present invention.
  • FIG. 8 shows the mapping process, as in accordance with an embodiment of the present invention.
  • DETAILED DESCRIPTION
  • As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer-readable medium(s) having computer readable program code/instructions embodied thereon.
  • Any combination of computer-readable media may be utilized. Computer-readable media may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of a computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • A computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but is not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but is not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on a user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
  • Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • These computer program instructions may also be stored in a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
  • The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
  • The present invention will now be described in detail with reference to the Figures. The following Figures provide an illustration of one embodiment. The embodiment, taken in part or in whole, does not imply any limitations with regard to the environments in which different embodiments may be implemented.
  • FIG. 1 depicts distributed data processing system 100 in accordance with one embodiment of the present invention. Distributed data processing system 100 includes user computer 110, user computer 121, user computer 130 and application server 140, all interconnected over network 120. User computers 110, 121, and 130, and application server 140 may each include components as depicted in further detail with respect to FIG. 3. Distributed data processing system 100 may include additional servers, or other devices not shown.
  • Network 120 may be a local area network (LAN), a wide area network (WAN) such as the Internet, any combination thereof, or any combination of connections and protocols that will support communications between user computers 110, 121, and 130, and application server 140 in accordance with embodiments of the invention. Network 120 may include wired, wireless, or fiber optic connections.
  • User computers 110, 121, and 130 may be desktop computers, notebooks, laptop computers, tablet computers, handheld devices, smart-phones, thin clients, or any other electronic devices capable of requesting and receiving information from a server computer, such as application server 140. User computer 110, 121, and 130 include user agent 112, 122, and 132, respectively.
  • User agent programs 112, 122, and 132 are software applications capable of requesting information from a server computer. User agent programs 112, 122, and 132 add additional information to the request. The additional information includes details about the user action and about the graphical controls that are involved in the request. For example, a user can request information on airline reservations. The user will use the graphical controls provided on the webpage, such as text boxes, dropdown boxes, combo boxes, and alike, to enter pertinent information. The user action, in this example, is the submittal of that information to an airline reservation database in the form of a request. Requests are in the form of a communication protocol, such as hypertext transfer protocol (HTTP).
  • Application server 140 may be a management server, a web server, or any other electronic device or computing system capable of receiving and sending data, and communicating with other devices, such as user computer 110, user computer 121, and user computer 130, via network 120. In other embodiments, application server 140 may represent a server computing system utilizing multiple computers as a server system, such as in a cloud computing environment. Additionally, application server 140 may perform other conventional services, not shown in FIG. 1, that include, but is not limited to: (i) web page delivery; (ii) mail server; (iii) print server; and (iv) gaming server.
  • Application server 140 contains WC program 142 and a communications manager. The communication manager facilitates application programs to interact with each connection type on a consistent and predictable manner. The communication manager isolates the implementation details of the different connection types from the application programs, such as WC program 142. In one embodiment, the connection manager enables software, such as WC program 142, to send or receive files using hypertext transfer protocol. A connection is analogous to a word processing program connecting to a printer to print a document.
  • WC program 142 is software capable of analyzing and producing an optimized response to a request from a client. An optimized response (sometimes referred to as an optimized view) is one that attempts to produce less network traffic than the normal traffic that is generated without executing WC program 142 (a non-optimized view). Both the optimized view and the non-optimized view contain information on the website content that has changed. Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view. WC program 142 determines the view that would generate the least amount of network traffic by determining which view is less, the optimized view or the non-optimized view. WC program 142 receives the data (the user request) and creates a response containing information on the aspects of the webpage that has changed, plus information about the portion of the webpage that remains the same. More specifically, WC program 142 optimizes a response by exploiting the following data: (i) request data, such as, changed user-control, next focus; (ii) business-logic information, such as, meta-data, runtime information; and (iii) request response history. Additionally, WC program 142 is also capable of inspecting client requests to determine the content and the target of the user interaction, for example a combo-box selection. Client requests are routed to the normal flow. WC program 142 works in concert with user agent programs 112, 122, and 132.
  • The development of web infrastructures over the last several years has produced powerful browsers. This condition triggered a transformation of web based architectures by moving a portion of the business logic closer to the user interface (UI) presentation and therefore towards the clients. The great benefit of such a shift is in distributing the load onto the clients, thus reducing loads on the server and reducing network latency issues. Embodiments of the invention recognize that applying such transformation to legacy architectures, usually based on the MVC pattern, is difficult. Embodiments of the invention provide an architecture, which allows MVC based architectures to gain benefits in a transparent way. Embodiments of the invention provide an intermediate layer, which allows efficiency without changes to the legacy architectures.
  • FIG. 2 is a flowchart depicting operational steps of WC program 142 in accordance with one embodiment of the present invention.
  • In one embodiment, initially, the user interacts with user computer 110 and triggers an event within an application. An event triggers a request to update webpage data. Such requests may be in the form of hypertext transfer protocol (HTTP). An event includes, but certainly not limited to: (i) changing a value in the user's entry object, such as changing text in a text box; (ii) a button request, such as the user pressing a soft-button; (iii) selecting a value from a value list; (iv) opening a dialog; (v) tabbing from one field to another; and (vi) any user interaction with the web browser which causes the server to analyze it and produce a new hypertext markup language (HTML) response to reflect the user action. For example, in an airline reservation system a user may use a dropdown box to choose the city of destination. This can trigger an event (a request) to update the webpage with airline flights to the destination.
  • The user agent program 112 inserts details in the request relating to the user action and the graphical control. MVC implementations map UI controls with IDs which in turn are mapped to the business data. In the aforementioned airline reservation example, the UI control is setting a dropdown box graphic control (using a setvalue event) to a destination city. In one embodiment, the ID is mx762, which labels the specific dropdown box in which the destination city is set. The user agent program 112 provides enough details to embodiments of the present invention to determine changes in the user's view. For example, a user of a view fills four text boxes. Each time a text box is filled, and focus is moved away from the filled text box, a UA program, such as user agent program 112, sends a request to the server to get the updated view for presentation to the user. In this case, the user of the view eventually fills all four text boxes, and consequently, the UA program produces four requests.
  • User agent 112 program sends the request to application server 140 for servicing. Without any further action from the user, which would generate another request, user agent program 112 awaits a service response from application server 140.
  • In step 215, WC program 142 receives requests from user agent program 112. WC program 142 extracts relevant information from the request and is subsequently stored. The relevant information can be stored in any memory, including on or off application server 140, as long as, the memory provides data integrity and is accessible, such as computer-readable storage medium, formerly discussed. Relevant information includes, but is not limited to: (i) the graphical control identification that generated the event; (ii) the generated event; and (iii) attributes associated with the generated event, such as, a value is given to an attribute of a “set value” event. In some embodiments, the information grabbed from the request is used to efficiently produce the optimized response. In some embodiments, specific optimization patterns could be implemented by simply leveraging parameters in the request, based on the MVC implementation being optimized. Such specific optimization patterns relate to user events. In such cases where there are no changes to business data, however, there are changes that affect the presentation. For instance, a user clicks on a calendar show button. Some embodiments will have the following parameters: control_id=calendar_xxx, action=show_calendar_popup. The current view would be enriched by the presentation of the calendar pop-up. The extraction of such delta from the canonical response is optimized depending on the specific scenario. For example the extraction of the calendar representation can be implemented looking at specific pieces in the response using the calendar control id.
  • In step 220, WC program 142 forwards the request to a web container for normal processing. Normal processing updates the old view (a view, as some form of visualization of the state of the model) with new information which can include, but not limited to: (i) business logic updates, possibly using a database; (ii) controls, such as drop down; and (iii) any other presentation elements or controls, mixed by the MVC schema, to produce the updated view.
  • In step 225, WC program 142 may receive the updated view from a business application. Business applications are software applications that utilize databases for specific purposes, for example engineering data or economic models, library systems, flight reservation systems, and computerized parts inventory systems. One example of the business application is the airline reservation example previously discussed. The business application is generating a full updated view of the webpage.
  • In step 230, WC program 142 generates a view that is optimized. An optimized view is a view that would generate less network traffic. WC program 142 analyzes objects that contribute to the updated view. Objects are collections of data structured in a predefined manner. Objects hold data and routines that operating on that data. WC program 142 collects and analyzes the changed attributes associated with each of the objects. More specifically, WC program 142 compares the list of changed attributes with the history of changes collected in the past. Keeping the history allows WC program 142 to determine the differences between the old view and the updated view. An example of an object is a dropdown box. Both the optimized view and the non-optimized view contain information on the website content that has changed. Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view. A view that contains 100 dropdown boxes (100 objects that correspond to 100 dropdown boxes) in which only one dropdown box is changed (99 dropdown boxes remain the unchanged), the optimized view would only contain information on the one changed dropdown, while the non-optimized full view would contain information on the 100 dropdown boxes. Each time an attribute (linked to a dropdown box) changes WC program 142 simply provides the associated modified dropdown box presentation. WC program 142 does not send updates related to previously unchanged dropdown boxes. In order to determine what has changed in the current request, a comparison is performed between changes in the previous steps and the current changes. In such a comparison, WC program 142 determines that only a dropdown box data has changed, therefore sending only an optimal data response back to the appropriate UA program. In the aforementioned airline reservation example, a destination city was entered into a dropdown box. Given this information WC program 142 returns flight information associated with the destination city. However, any information that was entered previously on the webpage and remains intact will not be returned; as there is no need to generate network traffic for non-changing webpage data. For instance, if a date of travel was entered before the destination city was entered, there is no need to return the date of travel information as the date of travel did not change.
  • Detailing the above embodiment is as follows. WC program 142 starts from a complete view, produced by the request at time t0. Following requests at time t1, t2, and so on, until tN, WC program 142 builds partial views (known as deltas), until the optimized is complete. In other words, starting from the complete response collected at time t0, the WC program 142 produces the optimized response at time tN. Different embodiments of WC program 142 may utilize different strategies to produce the optimized response. Examples of two strategies include, but are not limited to: (i) extract differences from a complete response at t0, or (ii) extract differences from response at time tN−1 for data actually changed from time tN−1. One embodiment to implement the second choice is to provide a history of changed from time t0 to tN−1.
  • In decision step 240, WC program 142 determines which view to send to user agent program 112. The optimized view is compared to the non-optimized view (normal view) in order to determine which would generate the least amount of network traffic. Both the optimized view and the non-optimized view contain information on the website content that has changed. Both the optimized view and the non-optimized view contain information on the website content that has not changed, however the optimized view determines how to package the information differently from the non-optimized view to possible create less traffic differently from the non-optimized view. There are times the optimized view produces little benefit, and may even add content data, such as meta-data, that would increase the transmission. The comparison determines which view generates the least amount of data and consequently the least amount of network traffic. The view that generates less network traffic is sent to the appropriate user agent, such as user agent program 112. The increase in optimized view size is the results of adding additional information for the appropriate UA program to correctly manage the missing information. When a webpage page substantially changes program WC program 142 would need to send a significant amount of information for the appropriate UA program to manage all the changed objects.
  • In step 245, WC program 142, depending upon step 240, sends the optimized content to user agent program 112.
  • In step 250, WC program 142, depending upon step 240, stores the updated history records. When WC program 142 determines to send the non-optimized view the history is refreshed with the new non-optimized view to prepare for future comparisons. The history records can be stored in any memory, on or off the application server 140, as long as the memory provides data integrity and is accessible, such as computer-readable storage medium, formerly described.
  • In step 255, WC program 142, depending upon step 240, sends the non-optimized content to user agent program 112.
  • User agent program 112 receives the view content sent from WC program 142 and updates the user's presentation data, accordingly. Returning to the aforementioned airline reservation example, user agent program 112 receives the view content containing information on destination city plus information about the portion of the webpage that remains the same, such as date of travel. User agent program 112 communicates with the document object model (DOM) application programming interface (which possess software to update webpages using hypertext markup language) on how to display the destination city plus date of travel. The view will be either the optimized view or the non-optimized view. User agent program 112 contains the software to construct a view for display, for the DOM, that would be identical to a non-optimized view. Whenever an optimized view is received user agent program 112 constructs a view for display using the DOM. Whenever a non-optimized view is received user agent program 112 can pass the non-optimized view to the DOM with minimal manipulation. In one embodiment, user agent program 112 works in concert with a web browser to display the view received from WC program 142.
  • FIG. 3 depicts a block diagram of components of user computers 110, 121, 130, and application server 140, as in accordance with an illustrative embodiment of the present invention. It should be appreciated that FIG. 3 provides only an illustration of one implementation and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made.
  • Distributed data processing environment computers include communications fabric 302, which provides communications between computer processor(s) 304, memory 306, persistent storage 308, communications unit 310, and input/output (I/O) interface(s) 312. Communications fabric 302 can be implemented with any architecture designed for passing data and/or control information between processors (such as microprocessors, communications and network processors, etc.), system memory, peripheral devices, and any other hardware components within a system. For example, communications fabric 302 can be implemented with one or more buses.
  • Memory 306 and persistent storage 308 are computer-readable storage media. In this embodiment, memory 306 includes random access memory (RAM) 314 and cache memory 316. In general, memory 306 can include any suitable volatile or non-volatile computer-readable storage media.
  • WC program 142 is stored in persistent storage 308 for execution by one or more of the respective computer processors 304 via one or more memories of memory 306. In this embodiment, persistent storage 308 includes a magnetic hard disk drive. Alternatively, or in addition to a magnetic hard disk drive, persistent storage 308 can include a solid state hard drive, a semiconductor storage device, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, or any other computer-readable storage media that are capable of storing program instructions or digital information.
  • The media used by persistent storage 308 may also be removable. For example, a removable hard drive may be used for persistent storage 308. Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer-readable storage medium that is also part of persistent storage 308.
  • Communications unit 310, in these examples, provides for communications with other data processing systems or devices, including resources of enterprise grid (not shown) and distributed data processing environment computers. In these examples, communications unit 310 includes one or more network interface cards. Communications unit 310 may provide communications through the use of either or both physical and wireless communications links. WC program 142 may be downloaded to persistent storage 308 of application server 140 through communications unit 310 of application server 140.
  • I/O interface(s) 312 allows for input and output of data with other devices that may be connected to distributed data processing environment computers. For example, I/O interface 312 may provide a connection to external devices 318 such as a keyboard, keypad, a touch screen, and/or some other suitable input device. External devices 318 can also include portable computer-readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention, e.g. WC program 142, can be stored on such portable computer-readable storage media and can be loaded onto persistent storage 308 via I/O interface(s) 312. I/O interface(s) 312 also connect to a display 320.
  • Display 320 provides a mechanism to display data to a user and may be, for example, a computer monitor.
  • Now that the embodiment(s) of FIGS. 1 to 3 have been fully discussed, some additional discussion and embodiments of the present invention will be discussed in the following paragraphs.
  • FIG. 4 depicts a block diagram of the components of user agent program 112 and WC program 142, as in accordance with an illustrative embodiment of the present invention.
  • The user interacts with user interface 405, thus triggering an action, by changing values: (i) editing value inside a text box; (ii) invoking a command, for example clicking a button; or (iii) any typical user action that invokes a change in the user's presentation. User agent program 112 produces a request inserting details about the user action and about the graphical controls that are involved. User agent program 112 sends a request, one such request is in the form of a hypertext transfer protocol (HTTP) request, to web container 414. When the user agent program 112 initiates a request UA module 411 intercepts the request, forwards it to web container 414, and waits for a response from WC program 142.
  • WC program 142 intercepts the request coming from UA module 411.
  • Request analyzer adapter 420 grabs relevant information from the request and temporary stores the relevant information, which includes, but not limited to: (i) the graphical control identification which generated the event; (ii) the generated event; and (iii) specific event's attributes (e.g. for a typical “set value” event the attribute is the value set by the user). Request analyzer adapter 420 forwards the request to the web container 414.
  • Business logic 423 running within the EJB container 426 is executed. Business data 429 is potentially changed due to the executed business logic 423. The new view based on the updated business data 429 is produced by business logic 423.
  • WC program 142 optimizes response. Request analyzer adapter 420 gets the view. Controller 432 analyzes objects which contribute to the view content. For each object data 438 and metadata 441 is queried through business data adapter 435 and metadata adapter 444 to get changed attributes. Controller 432 retrieves the list of changed attributes. In order to figure out what is actually changed during the current request, controller 432 compares the whole list of changed attributes (since the last commit) with the history of changes collected in the past through history module 447. Controller 432 figures out the attributes actually changed in the current interaction. When the results of a number of changes for a response greater than the original entire view, the updated view is transmitted. Controller 432 extracts the “view” chunks that have been changed. Controller 432 evaluates how many attributes have been changed. Controller 432 evaluates how big are the fragments (to be sent) compared the entire view. History module 447 updates the history by storing the attributes changed during this request. If the changes are being committed the history is cleaned-up. WC program 142 packs the response. When the response can be optimized: (i) metadata adapter 444 reverse maps the attributes to their presentation id; (ii) controller 432 creates a response by providing a list of couples composed of the graphic control id and the view fragment; and (iii) WC program 142 sends back the response. When the response cannot be optimized WC program 142 sends back the entire view.
  • UA module 411 receives the response. When the response is optimized UA module 411 iterates the list of couples and updated the document object model (DOM) 450, accordingly; otherwise, UA module 411 updates the entire view.
  • FIG. 5 is a listing of attributes and values that reflect a user's action on business data in accordance with an illustrative embodiment of the present invention.
  • The user interacts with the user-agent and triggers an event which produces a request, one such request is in the form of hypertext transfer protocol (HTTP). The request contains detailed information about the control, such as attributes (parameters) and associated values, which lets the server to reflect user action on business data. For example, the attributes listed show the info sent to an application framework when setting a value to a text-box control.
  • FIG. 6 lists extendable markup language (XML) representation for a multi-part textbox, as in accordance with an embodiment of the present invention.
  • An application framework allows the definition of application layouts, usually through an XML representation which defines both view structure and binding to underlined data. Such definition contains a unique id for the text-box control (id=“new_multiparttextbox”) and a binding to the underlying object attribute (dataattribute=“grinres”).
  • FIG. 7 shows rendered content for a browser at run-time, as in accordance with an embodiment of the present invention.
  • The input HTML tag is identified by its unique run-time id (id=“mx762”) which is server-side mapped with the application definition id (id=“new_multiparttextbox”). When the browser sends a request, it refers to the run-time id (id=“mx762) which will be mapped by the server frame-work to the application definition id (id=“new_multiparttextbox”). At this point is possible to get the bound attribute (dataattribute=“grinres”) and run the business-logic actions.
  • FIG. 8 shows the mapping process, as in accordance with an embodiment of the present invention. The process to get deltas is based on the following data-structures: (i) request info details: the id of the user-agent control is used to figure-out who is triggering the change; (ii) business-data: the underling objects are evaluated to figure-out what has been changed by the server-side frame-work; (iii) frame-work metadata: based on what has been changed on the business-data, a reverse look-up up to the run-time application is done to understand what potentially has been changed; and (iv) request/response history: the history is leveraged to figure out changes that have been already managed in previous interaction which do not need to be re-sent.
  • The programs described herein are identified based upon the application for which they are implemented in a specific embodiment of the invention. However, it should be appreciated that any particular program nomenclature herein is used merely for convenience, and thus the invention should not be limited to use solely in any specific application identified and/or implied by such nomenclature.
  • The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (14)

1-7. (canceled)
8. A computer program product for reducing network traffic, the computer program product comprising:
one or more computer-readable storage media and program instructions stored on the one or more computer-readable storage media, the program instructions comprising:
program instructions, on a first computer, to receive a request for an update for a webpage from a second computer;
program instructions, on a first computer, to determine a portion of the webpage has changed;
program instructions, on a first computer, to determine that an amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than an amount of data to be transmitted to update the entire webpage.
9. The computer program product of claim 8, wherein the program instructions to determine that the amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than the amount of data to be transmitted to update the entire webpage comprises:
program instructions, on the first computer, to generate a webpage data that represents the portion of the webpage that has changed;
program instructions, on the first computer, to determine an amount of network traffic that the webpage data will generate when sent to the second computer;
program instructions, on the first computer, to compare the amount of network traffic that the webpage data generates to the amount of data to be transmitted to update the entire webpage.
10. The computer program product of claim 8, further comprising program instructions to send to the second computer the amount of data to be transmitted to update the portion of the webpage has changed.
11. The computer program product of claim 9, wherein the program instructions, on the first computer, to generate the webpage data that represents the portion of the webpage has changed further comprises program instructions to analyze changed attributes which contribute to the update of the webpage data.
12. The computer program product of claim 9, wherein the program instructions, on the first computer, to generate the webpage data that represents the portion of the webpage has changed further comprises program instructions to add additional information that describes the portion of the webpage that is unchanged.
13. The computer program product of claim 8, further comprising program instructions, on the first computer, to create a history that includes changes of the portion of the webpage has changed.
14. The computer program product of claim 8, further comprising program instructions, on the first computer, to compare a history with changes of the portion of the webpage has changed.
15. A computer system for performing a computer action for reducing network traffic, the computer system comprising:
one or more computer processors;
one or more computer-readable storage media;
program instructions stored on the computer-readable storage media for execution by at least one of the one or more processors, the program instructions comprising:
program instructions, on a first computer, to receive a request for an update for a webpage from a second computer;
program instructions, on a first computer, to determine a portion of the webpage has changed;
program instructions, on a first computer, to determine that an amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than an amount of data to be transmitted to update the entire webpage.
16. The computer system of claim 15, wherein the program instructions to determine that the amount of data to be transmitted to update the portion of the webpage that has changed is smaller in size than the amount of data to be transmitted to update the entire webpage comprises:
program instructions, on the first computer, to generate a webpage data that represents the portion of the webpage that has changed;
program instructions, on the first computer, to determine an amount of network traffic that the webpage data will generate when sent to the second computer;
program instructions, on the first computer, to compare the amount of network traffic that the webpage data generates to the amount of data to be transmitted to update the entire webpage.
17. The computer system product of claim 15, further comprising program instructions, stored on the computer-readable storage media for execution by at least one of the one or more processors, to send to the second computer the amount of data to be transmitted to update the portion of the webpage that has changed.
18. The computer system product of claim 16, wherein the program instructions, on the first computer, to generate the webpage data that represents the portion of the webpage that has changed further comprises program instructions to analyze changed attributes which contribute to the update of the webpage data.
19. The computer system product of claim 16, wherein the program instructions, on the first computer, to generate the webpage data that represents the portion of the webpage that has changed further comprises program instructions to add additional information that describes the portion of the webpage that is unchanged.
20. The computer system product of claim 15, further comprising program instructions, stored on the computer-readable storage media for execution by at least one of the one or more processors, on the first computer, to create a history that includes changes of the portion of the webpage has changed.
US14/011,124 2013-08-27 2013-08-27 Optimize data exchange for mvc-based web applications Abandoned US20150067138A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US14/011,124 US20150067138A1 (en) 2013-08-27 2013-08-27 Optimize data exchange for mvc-based web applications
US14/475,947 US10169478B2 (en) 2013-08-27 2014-09-03 Optimize data exchange for MVC-based web applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US14/011,124 US20150067138A1 (en) 2013-08-27 2013-08-27 Optimize data exchange for mvc-based web applications

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/475,947 Continuation US10169478B2 (en) 2013-08-27 2014-09-03 Optimize data exchange for MVC-based web applications

Publications (1)

Publication Number Publication Date
US20150067138A1 true US20150067138A1 (en) 2015-03-05

Family

ID=52584840

Family Applications (2)

Application Number Title Priority Date Filing Date
US14/011,124 Abandoned US20150067138A1 (en) 2013-08-27 2013-08-27 Optimize data exchange for mvc-based web applications
US14/475,947 Expired - Fee Related US10169478B2 (en) 2013-08-27 2014-09-03 Optimize data exchange for MVC-based web applications

Family Applications After (1)

Application Number Title Priority Date Filing Date
US14/475,947 Expired - Fee Related US10169478B2 (en) 2013-08-27 2014-09-03 Optimize data exchange for MVC-based web applications

Country Status (1)

Country Link
US (2) US20150067138A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10356156B2 (en) * 2016-03-17 2019-07-16 Delta Electronics (Shanghai) Co., Ltd Method and device for loading webpage

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109819005B (en) * 2017-11-22 2021-12-10 腾讯科技(深圳)有限公司 Information acquisition method and equipment, system, terminal and server thereof
CN108881373B (en) * 2018-04-27 2021-07-06 安徽四创电子股份有限公司 MVC (model view controller) framework based front-end data stream processing method

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243761B1 (en) * 1998-03-26 2001-06-05 Digital Equipment Corporation Method for dynamically adjusting multimedia content of a web page by a server in accordance to network path characteristics between client and server
US20020069204A1 (en) * 2000-09-28 2002-06-06 Roger Kahn System and method for in-context editing
US6442748B1 (en) * 1999-08-31 2002-08-27 Accenture Llp System, method and article of manufacture for a persistent state and persistent object separator in an information services patterns environment
US6593944B1 (en) * 2000-05-18 2003-07-15 Palm, Inc. Displaying a web page on an electronic display device having a limited display area
US6715145B1 (en) * 1999-08-31 2004-03-30 Accenture Llp Processing pipeline in a base services pattern environment
US6742015B1 (en) * 1999-08-31 2004-05-25 Accenture Llp Base services patterns in a netcentric environment
US20050216421A1 (en) * 1997-09-26 2005-09-29 Mci. Inc. Integrated business systems for web based telecommunications management
US7225249B1 (en) * 1997-09-26 2007-05-29 Mci, Llc Integrated systems for providing communications network management services and interactive generating invoice documents
US20070220106A1 (en) * 1994-05-31 2007-09-20 Twintech E.U., Limited Liability Company Method for Distributing Content to a User Station
US20090049120A1 (en) * 2004-12-27 2009-02-19 Takashi Sakairi Adding personalized value to web sites
US7640512B1 (en) * 2000-12-22 2009-12-29 Automated Logic Corporation Updating objects contained within a webpage
US20100306366A1 (en) * 2009-06-02 2010-12-02 International Business Machines Corporation System for enabling rich network applications
US20110161400A1 (en) * 2009-11-17 2011-06-30 Vladimir Silyaev Method and system for providing complete internet anywhere with full server assisted processing
US20110246826A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Collecting and aggregating log data with fault tolerance
US20110246460A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Collecting and aggregating datasets for analysis
US20110246528A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Dynamically processing an event using an extensible data model
US20120084346A1 (en) * 2010-10-05 2012-04-05 Microsoft Corporation Page Loading Optimization Using Page-Maintained Cache
US20120254292A1 (en) * 2011-03-31 2012-10-04 Cloudera, Inc. User interface implementation for partial display update
US20130185337A1 (en) * 2012-01-18 2013-07-18 Cloudera, Inc. Memory allocation buffer for reduction of heap fragmentation
US20130204948A1 (en) * 2012-02-07 2013-08-08 Cloudera, Inc. Centralized configuration and monitoring of a distributed computing cluster
US20130254740A1 (en) * 2012-03-20 2013-09-26 Infosys Limited Composition studio to develop and maintain surveillance and compliance scenarios
US9021348B1 (en) * 2011-01-11 2015-04-28 Google Inc. Composition of templates using transclusion that guarantee a valid HTML document
US9026903B1 (en) * 2011-01-11 2015-05-05 Google Inc. Abstract syntax tree interpreter for generating a valid HTML document

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5490088A (en) * 1994-02-28 1996-02-06 Motorola, Inc. Method of handling data retrieval requests
US20030145305A1 (en) 2001-11-16 2003-07-31 Mario Ruggier Method for developing and managing large-scale web user interfaces (WUI) and computing system for said WUI
WO2004019160A2 (en) 2002-08-23 2004-03-04 Jway Group, Inc. Extensible user interface (xui) framework and development environment
US8001456B2 (en) * 2005-02-28 2011-08-16 International Business Machines Corporation Methods for maintaining separation between markup and data at a client
US20070100844A1 (en) 2005-10-28 2007-05-03 International Business Machines Corporation System and method for dynamically updating web pages using messaging-oriented middleware
US7934191B2 (en) 2007-04-10 2011-04-26 Sap Portals IL Method and modules for generating client-server applications
KR20080109361A (en) 2007-06-13 2008-12-17 (주)아이비즈소프트웨어 Framework
CN101232505B (en) 2008-01-17 2012-07-18 中山大学 Interface system of RIA laminate frame based on MVC architecture
US20110321010A1 (en) 2010-06-24 2011-12-29 Yifei Wang Web application framework based on object oriented class mapping
CN102830973A (en) 2012-08-14 2012-12-19 无锡哲勤科技有限公司 Method and layered structure for double-layer MVC (model, view and controller) developed by Web application with mass data

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070220106A1 (en) * 1994-05-31 2007-09-20 Twintech E.U., Limited Liability Company Method for Distributing Content to a User Station
US20050216421A1 (en) * 1997-09-26 2005-09-29 Mci. Inc. Integrated business systems for web based telecommunications management
US7225249B1 (en) * 1997-09-26 2007-05-29 Mci, Llc Integrated systems for providing communications network management services and interactive generating invoice documents
US6243761B1 (en) * 1998-03-26 2001-06-05 Digital Equipment Corporation Method for dynamically adjusting multimedia content of a web page by a server in accordance to network path characteristics between client and server
US6442748B1 (en) * 1999-08-31 2002-08-27 Accenture Llp System, method and article of manufacture for a persistent state and persistent object separator in an information services patterns environment
US6715145B1 (en) * 1999-08-31 2004-03-30 Accenture Llp Processing pipeline in a base services pattern environment
US6742015B1 (en) * 1999-08-31 2004-05-25 Accenture Llp Base services patterns in a netcentric environment
US6593944B1 (en) * 2000-05-18 2003-07-15 Palm, Inc. Displaying a web page on an electronic display device having a limited display area
US20020069204A1 (en) * 2000-09-28 2002-06-06 Roger Kahn System and method for in-context editing
US7640512B1 (en) * 2000-12-22 2009-12-29 Automated Logic Corporation Updating objects contained within a webpage
US20090049120A1 (en) * 2004-12-27 2009-02-19 Takashi Sakairi Adding personalized value to web sites
US20100306366A1 (en) * 2009-06-02 2010-12-02 International Business Machines Corporation System for enabling rich network applications
US20110161400A1 (en) * 2009-11-17 2011-06-30 Vladimir Silyaev Method and system for providing complete internet anywhere with full server assisted processing
US20110246826A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Collecting and aggregating log data with fault tolerance
US20110246460A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Collecting and aggregating datasets for analysis
US20110246528A1 (en) * 2010-03-31 2011-10-06 Cloudera, Inc. Dynamically processing an event using an extensible data model
US20120084346A1 (en) * 2010-10-05 2012-04-05 Microsoft Corporation Page Loading Optimization Using Page-Maintained Cache
US9021348B1 (en) * 2011-01-11 2015-04-28 Google Inc. Composition of templates using transclusion that guarantee a valid HTML document
US9026903B1 (en) * 2011-01-11 2015-05-05 Google Inc. Abstract syntax tree interpreter for generating a valid HTML document
US20120254292A1 (en) * 2011-03-31 2012-10-04 Cloudera, Inc. User interface implementation for partial display update
US20130185337A1 (en) * 2012-01-18 2013-07-18 Cloudera, Inc. Memory allocation buffer for reduction of heap fragmentation
US20130204948A1 (en) * 2012-02-07 2013-08-08 Cloudera, Inc. Centralized configuration and monitoring of a distributed computing cluster
US20130254740A1 (en) * 2012-03-20 2013-09-26 Infosys Limited Composition studio to develop and maintain surveillance and compliance scenarios

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Barron C. Housel, George Samaras, and David B. Lindquist. 1998. WebExpress: a client/intercept based system for optimizing Web browsing in a wireless environment. Mob. Netw. Appl. 3, 4 (December 1998), 419-431. DOI=http://dx.doi.org/10.1023/A:1019109823270 *
Dongsong Zhang. 2007. Web content adaptation for mobile handheld devices. Commun. ACM 50, 2 (February 2007), 75-79. DOI=http://dx.doi.org/10.1145/1216016.1216024 *
I. Khoury, R. M. El-Mawas, O. El-Rawas, E. F. Mounayar and H. Artail, "An Efficient Web Page Change Detection System Based on an Optimized Hungarian Algorithm," in IEEE Transactions on Knowledge and Data Engineering, vol. 19, no. 5, pp. 599-613, May 2007.doi: 10.1109/TKDE.2007.1014 keywords: {Internet;computational complexity;iterative methods;op *
Sindhura Chava et al., IEEE Pervasive Computing, 2012. Cost-aware Mobile Web Browsing, cs.nyu.edu *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10356156B2 (en) * 2016-03-17 2019-07-16 Delta Electronics (Shanghai) Co., Ltd Method and device for loading webpage

Also Published As

Publication number Publication date
US20150067157A1 (en) 2015-03-05
US10169478B2 (en) 2019-01-01

Similar Documents

Publication Publication Date Title
EP3593254B1 (en) Editing a database during preview of a virtual web page
US9921892B2 (en) Techniques to modify a document using a latent transfer surface
CN108984714B (en) Page rendering method and device, electronic equipment and computer readable medium
US8510371B2 (en) Method and system for creating IT-oriented server-based web applications
AU2012271774B2 (en) Automated user interface object transformation and code generation
US8949378B2 (en) Method and system for providing a state model of an application program
US9122658B2 (en) Webpage display system leveraging OSGi
US8700691B2 (en) Minimal download and simulated page navigation features
US9208122B2 (en) Client application integration for workflows
AU2012271774A1 (en) Automated user interface object transformation and code generation
TWI536240B (en) Client application and web page integration
US20110022943A1 (en) Document object model (dom) application framework
US20170031877A1 (en) Web Page Design System
US10417317B2 (en) Web page profiler
US10742764B2 (en) Web page generation system
US20120317488A1 (en) Techniques for adapting an interpretive run time application to multiple clients
EP3142025B1 (en) Generating and distributing interactive documents
AU2012271775A1 (en) Techniques for adapting an interpretive run time application to multiple clients
US10503365B2 (en) Deep hierarchy navigation
US10169478B2 (en) Optimize data exchange for MVC-based web applications
US10324600B2 (en) Web page generation system
US20100287292A1 (en) Method, apparatus and computer program product for generating a content website in a data communications network
US20230060787A1 (en) System and Method for Real-Time, Dynamic Creation, Delivery, and Use of Customizable Web Applications
US20210342130A1 (en) Systems and methods for software application generation and delivery
CN112130811A (en) Data processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
AS Assignment

Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:GIANFELICI, ANDREA;LERRO, MARCO;LOSACCO, VITO;REEL/FRAME:031092/0323

Effective date: 20130827

STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION