MULTI-FLAVORED SOFTWARE EXECUTION FROM A SINGULAR CODE BASE

Embodiments of the present invention provide a method, system and computer program product for multi-flavored software execution from a singular code base. In an embodiment of the invention, a method for multi-flavored software execution from a singular code base is provided. The method includes receiving a request in an interpreter to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by a virtual machine. The method thereafter includes responding to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to software versioning and more particularly to deploying different versions of a computer program to different end users.

Description of the Related Art

Traditional software deployment refers to the development and distribution of a computer program that provides one or more functional features upon execution in the memory of a computer. As different functional features are developed, new versions of same computer program are deployed, either as an upgrade for an existing end user or a new purchase for a new or existing end user. At any given moment, the developer distributes only a single, most recent version of the computer program, though prior versions of the computer program remain deployed for existing end users.

Oftentimes, it is desirable to deploy multiple different versions of the same computer program at the same time, each of the versions incorporating a different selection of functional features. In many instances, a basic and advanced version of the same computer program is provided, the cost of both versions varying according to the number and nature of the selection of the functional features. To deploy multiple versions of the same computer program, however, requires multiple different builds of the same computer based upon a single code base.

To address the complexity and inefficiency of deploying multiple different versions of the same computer program, developers build a single deployable computer program with certain functions disabled. Responsive to internal programmatic directives, different ones of the functional features can be enabled or disabled so as to customize the set of functional features. Thus, essentially different versions of the computer program may exist with but a single deployed computer program. Consequently, the size of the executable computer program can be massive in that all possible functional features must be present in the executable object at run-time irrespective of the number of features ultimately selected for use by the end user.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art in respect to application versioning and provide a novel and non-obvious method, system and computer program product for multi-flavored software execution from a singular code base. In an embodiment of the invention, a method for multi-flavored software execution from a singular code base is provided. The method includes receiving a request in an interpreter to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by a virtual machine. The method thereafter includes responding to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version. In one aspect of the embodiment, the interpreter is a PHP hypertext processor interpreter. In another aspect of the embodiment, the source code includes multiple portions, each portion having an annotation indicating a particular corresponding version of the computer program.

In another embodiment of the invention, a data processing system is configured for multi-flavored software execution from a singular code base. The system includes a host computing system having at least one computer with memory and at least one processor. The system also includes a virtual machine executing in the memory of the host computing system and an interpreter executing in the virtual machine. The interpreter includes program code enabled to receive a request to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by the virtual machine, and to respond to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version.

Additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The aspects of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. The embodiments illustrated herein are presently preferred, it being understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for multi-flavored software execution from a singular code base;

FIG. 2 is a schematic illustration of a data processing system configured for multi-flavored software execution from a singular code base; and,

FIG. 3 is a flow chart illustrating a process for multi-flavored software execution from a singular code base.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for multi-flavored software execution from a singular code base. In accordance with an embodiment of the invention, an instruction is received in an interpreter to interpret source code of a computer program into object code suitable for execution by an underlying operating system. The source code includes programmatic instructions grouped by functionality with selected ones of the grouped functionality being annotated with a tag corresponding to a particular version of the computer program. In response, the interpreter parses the source code and interprets only those portions of the source code with an annotation matching a specified version. In this way, a single code base of the computer program is maintained while still allowing for multiple versioning without requiring a large executable.

In further illustration, FIG. 1 pictorially shows a process for multi-flavored software execution from a singular code base. As shown in FIG. 1, one or more source code files 110 of interpretable source code for a multi-version application are provided. Each of the source code files 110 includes different portions, annotated according to a specified version. Multi-flavored software execution logic 120 receives from an end user a provisioning request 130 to execute a particular version of the multi-version application. The provisioning request 130 particularly specifies a version of the multi-version application.

Thereafter, the multi-flavored software execution logic 120 parses the source code files 110. In doing so, the multi-flavored software execution logic 120 permits the interpreter 160 to interpret only those portions of the source code files 110 that have been annotated with a version consistent with the version specified in the provisioning request 130. Thereafter, the interpreter produces byte code objects 140 corresponding to the interpreted portions of the source code files 110. The resultant byte code objects 140 are then provided to a virtual machine 150 in which the objects 140 are executed in order to present the requested version of the application 170.

The process described in connection with FIG. 1 is implemented in a data processing system. In yet further illustration, FIG. 2 schematically illustrates a data processing system configured for multi-flavored software execution from a singular code base. The system includes a host computing system 210 that includes one or more computers, each with memory and at least one processor. The host computing system 210 is coupled to a source code repository 230 of source code files for a multi-version application. A PHP interpreter 220 executes in the memory of the host computing system 210 utilizing the computing resources both physical and logical of the host computing system 210, and is configured to interpret different specified portions of source code files in the source code repository 230 and to provide resulting byte code over computer communications network 240 to requesting virtual machines 260 executing in respectively different client computers 250.

Of note, the system includes a multi-flavored execution extension 300 to the PHP interpreter 220. The multi-flavored execution extension 300 is included either as part of the program code of the PHP interpreter 220 thereby forming a customized interpreter, or the multi-flavored execution extension 300 is coupled to the PHP interpreter 220 as an extension to the PHP interpreter 220. In either circumstance, the multi-flavored execution extension 300 includes program code that when executed within the memory of the host computing system 210, is enabled to identify a particular version of the multi-version application, to load the source code files in the repository 230 for the application, to select only those portions of the source code files pertinent to the identified version, and to provide those selected portions to the PHP interpreter 220 for interpretation into resultant byte code to be transmitted to a requesting one of the virtual machines 260.

In even yet further illustration of the operation of the multi-flavored execution extension 300, FIG. 3 is a flow chart illustrating a process for multi-flavored software execution from a singular code base. Beginning in block 310, a deployment request is received to provision a version of a multi-version application into a virtual machine of a communicatively coupled client computer. In block 320, the requested version is identified and in block 330, an interpreter is invoked to interpret only those portions of the source code of the multi-version application relating to the specified version in order to produce byte code specified to the specified version of the multi-version application. In block 340, the resultant byte code is selected and provided to the virtual machine in block 350.

The present invention may be embodied within a system, a method, a computer program product or any combination thereof. The computer program product may include a computer readable storage medium or media having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.

A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: 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), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.

Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.

Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the 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). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.

Aspects of the present invention are described herein 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 readable program instructions.

These computer readable 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 readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.

The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.

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 instructions, which comprises one or more executable instructions for implementing the specified logical function(s). 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 carry out combinations of special purpose hardware and computer instructions.

Finally, the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Having thus described the invention of the present application in detail and by reference to embodiments thereof, it will be apparent that modifications and variations are possible without departing from the scope of the invention defined in the appended claims as follows:

Claims

1.-10. (canceled)

11. A method for multi-flavored software execution from a singular code base, the method comprising:

receiving a request in an interpreter to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by a virtual machine;
responding to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version, while other portions of the source code in the interpretable programming language that are annotated by different tags corresponding to different versions of the source code are excluded from interpretation into byte code; and,
passing the byte code produced during interpretation to the virtual machine for execution.

12. The method of claim 11, wherein the interpreter is a PHP hypertext processor interpreter.

13. The method of claim 11, wherein the request is received from an end user to execute the version of a multi-version computer program over a communications network.

14. A data processing system configured for multi-flavored software execution from a singular code base, the system comprising:

a host computing system comprising at least one computer with memory and at least one processor;
a virtual machine executing in the memory of the host computing system;
an interpreter executing in the virtual machine, the interpreter comprising program code enabled to receive a request in an interpreter to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by a virtual machine, to respond to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version, while other portions of the source code in the interpretable programming language that are annotated by different tags corresponding to different versions of the source code are excluded from interpretation into byte code and to pass the byte code produced during interpretation to the virtual machine for execution.

15. The system of claim 14, wherein the interpreter is a PHP hypertext processor interpreter.

16. The system of claim 14, wherein the request is received from an end user to execute the version of a multi-version computer program over a communications network.

17. The system of claim 14, wherein the program code is included as an extension to the interpreter.

18. A computer program product for multi-flavored software execution from a singular code base, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a device to cause the device to perform a method comprising:

receiving a request in an interpreter to interpret a version of source code of a computer program the interpreting transforming the source code into byte code executable by a virtual machine;
responding to the request by performing in the interpreter source code interpretation only of selected portions of the source code being annotated by tags corresponding to the version, while other portions of the source code in the interpretable programming language that are annotated by different tags corresponding to different versions of the source code are excluded from interpretation into byte code; and,
passing the byte code produced during interpretation to the virtual machine for execution.

19. The computer program product of claim 18, wherein the interpreter is a PHP hypertext processor interpreter.

20. The computer program product of claim 18, wherein the request is received from an end user to execute the version of a multi-version computer program over a communications network.

Patent History
Publication number: 20190073198
Type: Application
Filed: Nov 6, 2018
Publication Date: Mar 7, 2019
Inventors: Andreas Sandberg (Pacifica, CA), Yuk Lai Suen (Menlo Park, CA)
Application Number: 16/182,475
Classifications
International Classification: G06F 8/41 (20180101); G06F 8/71 (20180101); G06F 9/445 (20180101); G06F 8/52 (20180101); G06F 9/451 (20180101); G06F 8/65 (20180101); G06F 11/36 (20060101); G06F 17/30 (20060101);