This disclosure relates to debugging distributed software applications. A software developer typically uses an integrated development environment (IDE), also known as integrated design environment or integrated debugging environment, for developing software applications. An IDE generally provides comprehensive facilities for software development and normally includes a source code editor, a compiler and/or interpreter, build automation tools, and a debugger. Sometimes a version control system and various other development tools are integrated into the IDE to simplify the construction of a graphical user interface (GUI). Some IDEs also have a class browser, an object inspector, and a class hierarchy diagram, for use with object oriented software development.
Software applications, such as rich internet applications (RIAs), which are web applications that generally have the features and functionality of traditional desktop applications, may include client and server portions for execution on a respective client computing device and a server computing device. RIAs typically form a stateful client application with a separate services layer on the backend. RIAs typically run in a web browser, or do not require software installation on a local machine, and run locally in a secure environment called a sandbox. A sandbox is generally a security mechanism for safely running programs. Sandboxes are often used to execute untested code, or non-trusted programs from unverified third-parties, suppliers and non-trusted users. An IDE may be used to develop an RIA and to manage the client and server portions of the application. Debugging software applications, such as RIAs, that have client and server portions currently entails individually debugging and maintaining the separate client and server software application portions.
In general, in one aspect, a computer implemented method for debugging a distributed application includes receiving programming language input, translating the programming language input into a compiled application having a client portion and a server portion, and receiving a client portion testing location and a distinct server portion testing location. The method includes instantiating a client virtual machine according to the client portion testing location, instantiating a server virtual machine according to the server portion testing location, executing the compiled client application portion on the instantiated client virtual machine, and executing the compiled server application portion on the instantiated server virtual machine. The method further includes monitoring execution of the compiled client and server application portions on the respective client and server virtual machines. The monitoring execution includes communicating with the client and server virtual machines for debugging the compiled application of the programming language input.
These and other implementations can optionally include one or more of the following features. In some implementations, monitoring execution further includes at least one of: providing a input source code location related to a failure of the compiled application, executing the compiled application step-by-step of the programming language input, stopping execution of the compiled application for providing a variable state, and modifying a state of the executed compiled application. Communicating with the client and server virtual machines may include at least one of: communicating over a network and communicating within shared memory. In some examples, the client portion testing location includes at least one of a local computing device and a client computing device. The server portion testing location may include at least one of a local computing device and a cloud computing service.
The method may further include applying a criteria to the input for translating the input into the compiled client and server application portions. In some examples, applying the criteria includes translating portions of the input into the compiled client application portion that include at least one of: having an execution time on a client computing device less than a threshold client execution time, relating to a graphical user interface, metadata indicating inclusion in the compiled client application portion, source code class usage indicating inclusion in the compiled client application portion, and a combination thereof. Applying the criteria may include translating portions of the input into the compiled server application portion that include at least one of: having an execution time on a client computing device greater than a threshold client execution time, invoking services running on a server computing device, invoking an application programming interface running on a server computing device, metadata indicating inclusion in the compiled server application portion, source code class usage indicating inclusion in the compiled server application portion, and a combination thereof.
The method may further include selecting a run-time environment and translating the input into the compiled client and server application portions based on the run-time environment. In some examples, the method includes producing communication module for communication between the compiled client and server application portions.
In general, another aspect of the subject matter described in this specification can be embodied in a computer program product, encoded on a computer-readable medium, operable to cause data processing apparatus to perform operations that include receiving programming language input, translating the programming language input into a compiled application having a client portion and a server portion, and receiving a client portion testing location a server portion testing location. Operations include instantiating a client virtual machine according to the client portion testing location, instantiating a server virtual machine according to the server portion testing location, executing the compiled client application portion on the client virtual machine instantiated, and executing the compiled server application portion on the server virtual machine instantiated. Operations include monitoring execution of the compiled client and server application portions on the respective client and server virtual machines. The monitoring execution includes communicating with the client and server virtual machines for debugging the compiled application of the programming language input.
These and other implementations can optionally include one or more of the following features. In some implementations, monitoring execution includes at least one of: providing a input source code location related to a failure of the compiled application, executing the compiled application step-by-step of the programming language input, stopping execution of the compiled application for providing a variable state, and modifying a state of the executed compiled application. Communicating with the client and server virtual machines may include at least one of: communicating over a network and communicating within shared memory. In some examples, the client portion testing location comprises at least one of a local computing device and a client computing device. The server portion testing location may include at least one of a local computing device and a cloud computing service.
The operations performed by the data processing apparatus may include applying a criteria to the input for translating the input into the compiled client and server application portions. In some implementations, applying the criteria includes translating portions of the input into the compiled client application portion that include at least one of: having an execution time on a client computing device less than a threshold client execution time, relating to a graphical user interface, metadata indicating inclusion in the compiled client application portion, source code class usage indicating inclusion in the compiled client application portion, and a combination thereof. Applying the criteria may include translating portions of the input into the compiled server application portion that include at least one of: having an execution time on a client computing device greater than a threshold client execution time, invoking services running on a server computing device, invoking an application programming interface running on a server computing device, metadata indicating inclusion in the compiled server application portion, source code class usage indicating inclusion in the compiled server application portion, and a combination thereof.
The operations performed by the data processing apparatus may further include selecting a run-time environment and translating the input into the compiled client and server application portions based on the run-time environment. Operations may also include producing communication module for communication between the compiled client and server application portions.
In general, another aspect of the subject matter described in this specification can be embodied in a system comprising a computing device that includes a computer-readable medium including instructions and one or more processors configured to execute the instructions and perform operations that include a compiler and a debugger. The compiler is configured for receiving an input, translating the input into a compiled application having a client portion and a server portion. The debugger is configured for executing the compiled client application portion on a client virtual machine instantiated according to a client portion testing location, executing the compiled server application portion on a server virtual machine instantiated according to a server portion testing location, and monitoring execution of the compiled client and server application portions on the respective client and server virtual machines. The monitoring execution includes communicating with the client and server virtual machines for debugging the compiled application of the programming language input.
These and other implementations can optionally include one or more of the following features. In some implementations, monitoring execution further includes at least one of: providing a input source code location related to a failure of the compiled application, executing the compiled application step-by-step of the programming language input, stopping execution of the compiled application for providing a variable state, and modifying a state of the executed compiled application. Communicating with the client and server virtual machines may include at least one of: communicating over a network and communicating within shared memory. In some examples, the client portion testing location comprises at least one of a local computing device and a client computing device. The server portion testing location may include at least one of a local computing device and a cloud computing service.
In some implementations, the compiler is configured for applying a criteria to the input for translating the input into the compiled client and server application portions. Applying the criteria may include translating portions of the input into the compiled client application portion that include at least one of: having an execution time on a client computing device less than a threshold client execution time, relating to a graphical user interface, metadata indicating inclusion in the compiled client application portion, source code class usage indicating inclusion in the compiled client application portion, and a combination thereof. Applying the criteria may include translating portions of the input into the compiled server application portion that include at least one of: having an execution time on a client computing device greater than a threshold client execution time, invoking services running on a server computing device, invoking an application programming interface running on a server computing device, metadata indicating inclusion in the compiled server application portion, source code class usage indicating inclusion in the compiled server application portion, and a combination thereof.
In some implementations, the compiler is configured for selecting a run-time environment and translating the input into the compiled client and server application portions based on the run-time environment. The compiler may be configured for producing communication module for communication between the compiled client and server application portions. In some implementations, the system further includes a local computing device and a cloud computing service. The local computing device executes an integrated development environment having an editor, the compiler, and the debugger. The cloud computing service includes a server computing device having a service abstraction layer and a hypertext transfer protocol wrapper over the server virtual machine instantiated thereon. The server computing device is configured to parse HTTP requests and send HTTP responses.
Particular embodiments of the subject matter described in this specification can be implemented to realize one or more of the following advantages. The present disclosure provides a technique for developing an application under a single framework (e.g., single code base), such that a compiler and/or virtual machine produces the client and server portions of the application, thereby allowing a user (e.g., software developer) to develop the application as a single application (e.g., within an IDE) without managing separate client and server applications and the communications there between. Other advantages include freeing the software developer from having to worry about client capabilities since different versions of the client code can be compiled for devices with different specifications and capabilities.
The details of one or more implementations of the disclosure are set forth in the accompanying drawings and the description below. Other aspects, features, and advantages will be apparent from the description and drawings, and from the claims.
Like reference symbols in the various drawings indicate like elements.
The software development paradigm includes a compiling stage, a debugging stage, and a deploying stage. In the compiling stage, a compiler 110 (e.g., a programming language implementer, such as a compiler or interpreter), executable on the computer 100 or another computer, compiles or translate the application 150 into a compiled application 160, which may be segmented or parsed into the compiled client and server application portions 162, 164. In the debugging stage, the user uses a debugger 120, executable on the computer 100 or another computer (e.g., a computing device 302 in a cloud computer service 300), for debugging the code (e.g., to find and correct errors) so that the compiled application 160 runs or functions substantially without errors. In the deploying stage, the user utilizes a deployer 130, executable on the computer 100 or another computer, for deploying the compiled application 150 to a deployment space. For example, the client application portion 162 may be deployed to the client device 200 (e.g., portable computing device) and the compiled server application portion 164 may be deployed to the cloud computing service 300 where the compiled server application portion 164 executes on a server computing device 302, for example. The IDE 140 receives a deployment request from a user, and in response to the deployment request, executes deployment of the compiled application 160 via the deployer 130. The user may click a button (e.g., as a single user event) in the graphical user interface 141 of the IDE 140 to send the deployment request. The IDE 140 recognizes receipt of the deployment request and calls the deployer 130 to carry out deployment of the compiled application 160.
Referring to
In some implementations, the compiler 110 translates the application 150 into a compiled application 160 having a compiled client application portion 162 and a compiled server application portion 164. The compiler 110 may apply a criteria to the application 150 for producing the compiled client application portion 162 and the compiled server application portion 164. In some examples, the criteria includes selecting portions of the application 150 that have an execution time on a client computing device 200 less than a threshold client execution time and/or relate to a graphical user interface (GUI) functionality, and translating those portions into the compiled client application portion 162. In some examples, the criteria includes selecting portions of the application 150 having an execution time on the client computing device 200 greater than a threshold (e.g., a threshold client execution time), invoke services executable on a server computing device 302, and/or invoke application programming interfaces (API) executable on the server computing device 302, and translating those portions into the compiled server application portion 164.
In some implementations, the compiler 110 divides the compiled application 160 into the compiled client application portion 162 and the compiled server application portion 164 based on metadata in the application 150 (e.g., in the source code of the application 150). The user can specify a communication protocol (e.g., Action Message Format (AMF), Simple Object Access Protocol (SOAP), JavaScript Object Notation (JSON), etc.) for communications between the compiled client and server application portions 162, 164. The user may stipulate in the metadata a type of encryption and/or authentication between the compiled client and server application portions 162, 164.
During development of the application 150, the user may select specific local and remote classes of code designated for respective use in the compiled client application portion 162 and the compiled server application portion 164. During compilation of the application 150, the compiler 110 recognizes the local and remote classes and translates the source code into the respective compiled application portions 162, 164. In some examples, the compiler 110 divides the compiled application 160 into the compiled client application portion 162 and the compiled server application portion 164 based on a run-time environment (e.g., a local computing device or a remote computing device) selected by the user for the compiled application 160. The compiler 110 may be configured to provide a communication module for communication (e.g., asynchronous communication) between the compiled client application portion 162 and the compiled server application portion 164.
In some implementations, the compiler 110 translates the application 150 into a compiled application 160, which is divided or segmented into the compiled client application portion 162 and the compiled server application portion 164 at run-time, for example, by a virtual machine (VM), a native code client computing device, and/or a native code server computing device. In some examples, the user attributes metadata (e.g., a “dynamic” metadata type) to the source code of the application 150 indicating that the compiled client and server application portions 162, 164 will be produced at run-time from the compiled application 160. The same criteria for apportioning the client and server application portions 162, 164 described with respect to the compiler 110 may be used by the virtual machine.
In some implementations, the compiler 110 is configured to perform one or more of the following operations: lexical analysis, preprocessing, parsing, semantic analysis, code generation, and code optimization. The output produced by the compiler 110 may be executable on a virtual machine that may or may not reside on the same platform as the compiler 110.
Referring to
In the example illustrated in
In some examples, the cloud computing service 300 is configured to communicate with a repository 320 (e.g., database, file server, etc.) for storing and accessing at least one of the compiled application 160 and the compiled client and server application portions 162, 164. In the example shown in
Referring to
Referring to
In the example illustrated in
In the example illustrated in
A communication module 350 (shown in
Referring to
In some implementations, the debugger 120 is configured to receive a user testing preference for selecting a testing location of the compiled client and server application portions 162, 164. For example, the user may set the user testing preference for testing the compiled application 160 (both the compiled client and server application portions 162, 164) on a local computing device 100 executing the IDE 140. In the example shown in
In some examples, the user sets the testing preference for testing the compiled client application portion 162 on a local computing device 100 (e.g., the computing device executing the IDE 140), and test the compiled server application portion 164 on the cloud computing service 300. In the example shown in
In some examples, the user sets the testing preference for testing the compiled client application portion 162 on the client computing device 200, and test the compiled server application portion 164 on the cloud computing service 300. In the example shown in
Referring to
Various implementations of the systems and techniques described here (e.g., the compiler 110, the debugger 120, and the deployer 130) can be realized in digital electronic circuitry, integrated circuitry, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software, software applications or code) include machine instructions for a programmable processor, and can be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms “machine-readable medium” and “computer-readable medium” refer to any computer program product, apparatus and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term “machine-readable signal” refers to any signal used to provide machine instructions and/or data to a programmable processor.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter effecting a machine-readable propagated signal, or a combination of one or more of them. The term “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagated signal is an artificially generated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus.
A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio player, a Global Positioning System (GPS) receiver, to name just a few. Computer readable media suitable for storing computer program instructions and data include all forms of non volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the subject matter described is this specification, or any combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), e.g., the Internet.
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
While this specification contains many specifics, these should not be construed as limitations on the scope of the invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of the invention. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination.
Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the disclosure. Accordingly, other implementations are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve desirable results.