Source code deployment method and electronic device therefor, and non-transitory computer-readable recording medium
Patent Information
- Application Number
- TW113132536
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-06-18
- Filing Date
- 2024-08-29
- Publication Date
- 2026-10-21
- Estimated Expiration
- 2044-08-28
AI Technical Summary
The inefficiency in source code development processes due to the need for developers to wait or switch tasks during validation and integration, leading to prolonged development times.
A method and electronic device for efficiently distributing source code by allowing modifications without interrupting the application, involving the reception of source code updates, confirmation of changed categories and resource files, and reloading using appropriate processors, followed by transmission to a server.
Reduces development time and resource requirements by enabling seamless integration of source code changes without application restarts, facilitating immediate validation and error correction.
Smart Images

Figure TWG2TB001916918_001 
Figure TWG2TB001916918_002 
Figure TWG2TB001916918_003
Abstract
Description
[Technical Field]
[0001] The embodiments in this specification relate to a source code publishing method and its electronic device. [Previous Technology]
[0002] Source code can be developed through various steps. Specifically, source code can be developed through the steps of writing source code, building the application including compiling the source code, releasing the source code, starting services related to the source code, validating the application, and fixing program errors. The updated application based on the source code, which has been developed through all these steps, can finally be released to users. [Summary of the Invention]
[0003] [The problem the invention aims to solve]
[0004] As the source code is developed, the various steps can take a long time. Furthermore, developers must switch to other tasks or wait for a certain period of time before performing the validity verification of the published service, thus the processes related to source code development are inefficient.
[0005] This invention was proposed to solve the above-mentioned problems, and the disclosed embodiments aim to provide a source code distribution method and electronic device thereof. Specifically, this invention relates to an efficient source code distribution method and electronic device that can modify source code without interrupting the application.
[0006] The technical problem to be solved in this embodiment is not limited to the technical problem described above; other technical problems can be deduced based on the following embodiments. [Technical Means for Solving the Problem]
[0007] As a technical method for achieving the above-mentioned problem, the source code publishing method of the electronic device in the first aspect of the present invention may include the following steps: receiving a file of source code related to an application update from a user's device; confirming at least one of the changed category of the source code and the changed resource file based on the file; reloading the source code by means of a processor corresponding to the confirmation result using at least one of the changed category and the changed resource file; and transmitting information related to the source code to a server in accordance with the completion of the reloading of the source code.
[0008] According to one embodiment, the step of receiving a file may include the following steps: receiving information and files of a target server related to the source code in response to input made by a user through a plug-in of the device.
[0009] According to one embodiment, when the file system relates to a change in the type of source code, the file may be a compiled type file.
[0010] According to one embodiment, confirming at least one of the changed category and the changed resource file may include the following steps: confirming that the category of the source code has been changed based on the compiled category file; loading the compiled category file into the Java execution environment; and confirming the information of the changed category of the source code in the Java execution environment.
[0011] According to one embodiment, the step of confirming that the category of the source code has been changed may include the following steps: based on the compiled category file, confirming whether the changed category of the source code is based on the set framework.
[0012] According to one embodiment, the step of determining the information of the changed category in the Java execution environment may include the following steps: redefining the category of the source code based on the compiled category file, thereby changing the category of the source code.
[0013] According to one embodiment, the Java execution environment includes JDK (Java Development Kit) and DCEVM (Dynamic Code Evolution Virtual Machine).
[0014] According to one embodiment, the framework may be Spring, and the processor may be a Spring container.
[0015] According to one embodiment, the reloading step may include the following steps: identifying the processor corresponding to the set framework in one or more processors; and reloading the source code by means of the processor based on the changed category information.
[0016] According to one embodiment, the reloading step may include the following steps: initializing a first bean corresponding to the class before the source code change in a bean managed by the processor and associated with the application; and generating a second bean corresponding to the class after the change.
[0017] According to one embodiment, the changed category may be at least one of the attributes and methods related to the original category before the change of the source code, or at least one of the new attributes and new methods related to the original category before the change of the source code may be added.
[0018] According to one embodiment, when the file is a resource file that relates to changes in source code, the file may be a compiled resource file.
[0019] According to one embodiment, the source code publishing method may further include the following steps: confirming whether the loading to the Java execution environment is successful; and transmitting the success information to the device.
[0020] According to one embodiment, the information related to the source code may include information about the target server related to the source code and image information related to the application.
[0021] The electronic device of the second aspect of the present invention may include: a transceiver; one or more processors; and a storage device storing one or more commands executed by the one or more processors; and the one or more processors are configured to: execute the one or more commands to receive source code files related to application updates from a user's device; based on the files, confirm at least one of the changed category of the source code and the changed resource files; reload the source code using the changed category and the changed resource files by the processor corresponding to the confirmation result among the one or more processors; and transmit information related to the source code to a server in response to the completion of the reloading of the source code.
[0022] The recording medium of the third aspect of the present invention may be a non-transitory computer-readable recording medium, which records a program for executing a source code distribution method of an electronic device in a computer. [Effects of the Invention]
[0023] According to the proposed embodiments, one or more of the following effects are expected to occur.
[0024] According to embodiments of this specification, source code can be reloaded using an appropriate processor based on at least one of the modified category of the source code and the modified resource file. During reloading, since a portion of the source code written without interrupting the application can be reflected, the time and resources required for the source code development process can be reduced.
[0025] The effects of the invention are not limited to those mentioned above. Those skilled in the art can clearly understand other unmentioned effects based on the description in the claims.
Implementation Method
[0027] The terminology used in the embodiments has been selected as widely used general terms as possible while considering the functions of the present invention. However, it may also differ depending on the intent of those skilled in the art, precedents, or the emergence of new technologies. Furthermore, in certain situations, there may be terms arbitrarily selected by the applicant. In such cases, their meanings will be described in detail in the corresponding description. Therefore, the terminology used in the present invention should be defined based on the meaning of the term and the overall content of the present invention, rather than simply based on the name of the term.
[0028] Throughout this specification, when it is mentioned that a certain component "includes" another component, unless otherwise stated, it means that other components may be included, rather than excluding other components. Furthermore, the terms "...part" and "...module" used in the specification refer to a unit that processes at least one function or action, which may be implemented by hardware or software, or by a combination of hardware and software.
[0029] The expression “at least one of a, b and c” as recorded throughout the specification may include “a alone”, “b alone”, “c alone”, “a and b”, “a and c”, “b and c”, or “a, b and c”.
[0030] The "terminal" mentioned below can be implemented by a computer or a portable terminal, which can connect to a server or other terminal via a network. Here, a computer includes, for example, a laptop computer, a desktop computer, or a laptop computer equipped with a web browser. A portable terminal is a wireless communication device that ensures portability and mobility, and may include, for example, IMT (International Mobile Telecommunication), CDMA (Code Division Multiple Access), W-CDMA (W-Code Division Multiple Access), LTE (Long Term Evolution) and other communication terminals, such as smartphones, tablets, and all types of handheld wireless communication devices.
[0031] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the invention. However, the present invention can be implemented in various different forms and is not limited to the embodiments described herein.
[0032] When describing the embodiments, descriptions of technical content well-known in the technical field to which this invention pertains and not directly related to this invention will be omitted. The reason for this is that by omitting redundant descriptions, the main idea of this invention can be clearly conveyed, thereby avoiding confusion regarding the main idea of this invention.
[0033] For the same reason, some constituent elements are exaggerated, omitted, or approximated in the accompanying drawings. Furthermore, the dimensions of each constituent element do not perfectly reflect the actual dimensions. In each drawing, the same or corresponding constituent elements are assigned the same reference numerals.
[0034] The advantages and features of the present invention, as well as the methods of implementing them, will become clear from the embodiments described in detail below with reference to the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, and can be implemented in various different forms. These embodiments are provided only to make the disclosure of the present invention more complete and to enable those skilled in the art to fully understand the art to which the present invention pertains. The present invention is limited only to the claims. Throughout the specification, the same reference numerals refer to the same constituent elements.
[0035] At this time, it should be understood that the combination of each block of the flowchart and the flowchart itself can be implemented by computer program instructions. These computer program instructions can be loaded onto the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing equipment. Therefore, the instructions, implemented by the processor of the computer or other programmable data processing equipment, produce methods for implementing the functions described in the blocks of the flowchart. In order to implement the functions in a specific manner, these computer program instructions can be stored in computer-usable or computer-readable memory that is oriented towards a computer or other programmable data processing equipment. The instructions stored in the computer-usable or computer-readable memory can produce an article of manufacture including instruction methods that implement the functions described in the blocks of the flowchart. The computer program instructions can also be loaded onto a computer or other programmable data processing equipment. Therefore, a series of action steps are performed on the computer or other programmable data processing equipment to produce a flow executed by the computer. Thus, the instructions implemented by the computer or other programmable data processing equipment can also provide steps for executing the functions described in the blocks of the flowchart.
[0036] Furthermore, each block may represent a portion of a module, fragment, or code comprising one or more executable instructions for performing a specific logical function. It should also be noted that, in some alternative embodiments, the functions mentioned in the blocks may be generated out of order. For example, two blocks represented successively may be executed substantially simultaneously, or occasionally in reverse order depending on their corresponding functions.
[0037] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0038] Figure 1 is a diagram of a system 10 for illustrating a source code publishing method for an electronic device 100 of an embodiment.
[0039] Referring to FIG1, the system 10 of various embodiments may be a system 10 for implementing the source code distribution method of the electronic device 100. More specifically, the system 10 may be a system that improves the time and resources required for code development steps by simplifying the CICD (Continuous Integration / Continuous Deployment) process. The system 10 may include the electronic device 100, the user's device 110, and the server 120. The system 10 shown in FIG1 only shows the components related to this embodiment. Therefore, those skilled in the art related to this embodiment will understand that, in addition to the components shown in FIG1, other general components may be included.
[0040] Electronic device 100, device 110, and server 120 may each include a transceiver, a storage unit, and a processor. Furthermore, electronic device 100, device 110, and server 120 each refer to a unit that processes at least one function or action, which may be implemented by hardware or software, or by a combination of hardware and software. On the other hand, throughout the embodiments, electronic device 100, device 110, and server 120 are referred to as separate devices or servers, but they may be logically separate structures, and at least a portion of them may be implemented by functions separated from a single device or server.
[0041] According to one embodiment, electronic device 100, device 110, and server 120 may include multiple computer systems or computer software implemented via a network server. For example, at least a portion of electronic device 100, device 110, and server 120 may refer to computer systems and computer software that are connected to a lower-level device to accept job execution requests, perform the job request, and provide execution results, wherein the lower-level device communicates with other network servers via a computer network such as an intranet or the Internet. Furthermore, at least a portion of electronic device 100, device 110, and server 120 may be understood as a broad concept including a series of applications that can operate on a network server, and various databases that can be built internally or on other connected nodes. For example, at least a portion of electronic device 100, device 110, and server 120 may be implemented using network server programs provided in various forms according to operating systems such as DOS, Windows, Linux, UNIX, or MacOS.
[0042] Electronic device 100, device 110, and server 120 can communicate with each other via a network (not shown). The network includes Local Area Network (LAN), Wide Area Network (WAN), Value Added Network (VAN), Mobile Radio Communication Network, Satellite Communication Network, and combinations thereof. This network is a comprehensive data communication network that enables the constituent entities of the networks shown in FIG1 to communicate smoothly with each other, and may include wired Internet, wireless Internet, and mobile wireless communication networks. Wireless communication may include, for example, Wi-Fi, Bluetooth, Bluetooth Low Energy, Zigbee, WFD (Wi-Fi Direct), UWB (ultra-wideband), IrDA (infrared data association), NFC (Near Field Communication), etc., but is not limited to these.
[0043] According to one embodiment, the electronic device 100 can receive a file of source code related to an application update from the user's device 110, and based on the file, confirm at least one of the changed category of the source code and the changed resource file, and reload the source code using the changed category and the changed resource file and through a processor of one or more processors corresponding to the confirmation result, and transmit the information related to the source code to the server 120 after the source code reloading is completed.
[0044] In this specification, the user of device 110 may be a developer who writes source code to update an application. Here, writing source code may include all operations performed on the source code related to the application, such as adding or modifying a portion of the source code. For example, writing source code may correspond to changing any of the categories or resource files related to the source code. More specifically, changing the categories related to the source code may refer to changing the implementation of the attributes or methods of the category. That is, changing the category may represent changing at least one of the attributes and methods related to the category before the change of the source code, or adding at least one of the new attributes and new methods related to the category before the change of the source code.
[0045] In this specification, the release of source code can refer to the release during the source code development process. That is, the release during the source code development process can refer to uploading the source code written by the developer to the server 120. Furthermore, the release of the application can refer to, based on the written source code, a complete update of the application program, followed by unified release to the user terminals of the application-related services.
[0046] In this specification, the file may be a machine language related file obtained by converting source code into a binary format executable by a computer or other device. That is, the file may be a file compiled based on the compiler of device 100 itself. Device 110 can transfer the compiled file to electronic device 100.
[0047] In this specification, the electronic device 100 may be a device for performing necessary operations before the release of the source code. More specifically, the electronic device 100 may perform operations to dynamically reflect a portion of the written source code and to verify whether the portion of the written source code is integrated with the application and operates normally. When a portion of the source code is integrated with the application and operates normally, the electronic device 100 may transmit information related to the source code to the server 120. At this time, the electronic device 100 may immediately reflect the changes in the written source code in the application without restarting the application. That is, the release of the source code by the electronic device 100 may be a hot deployment. Conversely, errors caused by various reasons may cause a portion of the source code to fail to integrate with the application, thus failing to operate normally.
[0048] In this specification, server 120 may be a server used to collect information related to the source code and provide a test environment for the application reflecting the source code. That is, the user of device 100 can immediately perform validity verification operations using the test environment for the application reflecting the source code, thus eliminating the need to wait for validity verification operations. In other words, the process related to source code development can be efficiently improved in terms of the required time.
[0049] Furthermore, after the source code is released, the user of device 100 can sequentially perform a validity verification operation and a program error correction operation for the application reflecting the written source code. With the completion of the validity verification and program error correction operations, the verification of the source code is completed. After verification, server 120, the first server (not shown) managing application updates and application releases, can provide application-related information. Therefore, the first server can publish the updated application information to the terminals (not shown) of users utilizing application-related services. That is, the first server can provide updated application information to users utilizing the service without interrupting application usage.
[0050] According to one embodiment, the electronic device 100 can perform operations related to the release of source code, which is associated with the updating of a plurality of applications. That is, the electronic device 100 needs to integrate a portion of the written source code with a suitable application to confirm whether the application is functioning correctly. Relatedly, the device 100 can transmit information about a target server corresponding to the written source code from a plurality of servers corresponding to the plurality of applications. However, this is not limited to this; the electronic device 100 can also perform operations related to the release of source code, which is associated with updating a plurality of pages in a service related to a specific application. In this case, the information of the target server may correspond to a specific page among the plurality of pages in the service related to the application.
[0051] Figure 2 is a flowchart illustrating a method for publishing source code of an electronic device according to an embodiment.
[0052] Referring to FIG2, it can be clearly understood that the actions of the source code publishing method of electronic device 100 can be modified or replaced or the order of some actions can be changed within the scope of common sense in the technical field to which this invention pertains.
[0053] In step S210, the electronic device 100 may receive source code files related to application updates from the user's device 110.
[0054] Here, the user may be a developer who writes source code using device 110 to update the application. According to one embodiment, writing source code for updating the application may be for modifying a part of the application's operation. For example, writing source code may be for changing the text of a specific page related to e-commerce services.
[0055] According to one embodiment, a user can transmit source code files for hot swapping to an electronic device 100 via a device 110 with a plug-in installed. Specifically, the user can select a portion of the source code to be hot swapped via the plug-in, and can select a target server associated with the source code. Here, hot swapping can be a technique that modifies the source code without restarting the application.
[0056] According to one embodiment, electronic device 100 can receive information and files of a target server associated with source code in response to input made by a user via a plug-in. Here, the information of the target server may include information of API symbols associated with the target server. An embodiment of transferring source code files, which are objects to be hot-swapped, to electronic device 100 via a plug-in installed on device 110 will be described in more detail below in FIG6.
[0057] According to one embodiment, the writing of source code may correspond to either a change in the category associated with the source code or a change in the resource file associated with the source code. As an example, when the file system relates to a change in the category of the source code, the file may be a compiled category file. As another example, when the file system relates to a change in the resource file of the source code, the file may be a compiled resource file.
[0058] According to one embodiment, the file may be stored in a local storage library, which serves as the storage of the electronic device 100. The electronic device 100 may perform steps S220 to S240 based on the file stored in the local storage library.
[0059] In step S220, the electronic device 100 can identify at least one of the modified category of the source code and the modified resource file based on the file.
[0060] According to one embodiment, the electronic device 100 may first determine whether the compiled file is about a category or about a resource file.
[0061] According to one embodiment, the electronic device 100 can confirm that a compiled file is related to a category using a plurality of file-based methods. For example, the electronic device 100 can confirm that a file is a compiled category file by comparing files at the binary level using the "diff" command in Linux / Mac OS or the "fc" command in Windows OS. For another example, the electronic device 100 can confirm that a file is a compiled category file by calculating and comparing the hash value of the file. For yet another example, the electronic device 100 can use a build system (e.g., Maven, Gradle) to confirm whether the compiled category file has been modified. For yet another example, the electronic device 100 can confirm whether the compiled category file has been modified based on the file change history stored in the local repository of a version control system (e.g., Git).
[0062] According to one embodiment, after confirming that the compiled file is related to a category, the electronic device 100 can confirm whether the modified category of the source code is based on a set framework. Here, the set framework can be a Java-based application-specific framework. For example, the set framework can correspond to either Spring or Harbor Nest, but is not limited to this. In this case, if the category is based on Spring, it can indicate that the category is using Spring's functionality.
[0063] According to one embodiment, electronic device 100 can determine whether the modified category of the source code is based on the defined framework based on whether a framework-related encapsulation is included in the file. For example, a category using Spring may include the "org.spirngframework" encapsulation. Therefore, electronic device 100 can use distributed tools (e.g., javap), string retrieval (e.g., string), or JAR files (e.g., jartf) to determine whether the modified category of the source code is based on Spring.
[0064] According to one embodiment, the electronic device 100 can confirm the changed category information of the source code in the Java execution environment after confirming that the category of the source code has been changed. Specifically, the electronic device 100 can load the compiled category file into the Java execution environment and confirm the changed category information of the source code in the Java execution environment. A specific embodiment for confirming the changed category information of the source code in the Java execution environment will be described in detail in FIG3.
[0065] According to one embodiment, the electronic device 100 can confirm that the compiled file is a resource file by various file-based methods. For example, the electronic device 100 can confirm that the file is a compiled resource file by comparing the file's hash value. For another example, a build system can be used to confirm whether the compiled resource file has been modified. For yet another example, the electronic device 100 can confirm whether the compiled resource file has been modified based on the file change history stored in the local repository of a version control system (Git). After confirming that the compiled file is a resource file, the electronic device 100 can confirm the modified resource file.
[0066] In step S230, the electronic device 100 may use at least one of the changed category and the changed resource file, and reload the source code by means of a processor corresponding to the confirmation result.
[0067] According to one embodiment, in step S220, the electronic device 100 may determine the processor to be reloaded based on the result of confirming at least one of the modified category of the source code and the modified resource file. For example, when the file is a compiled category file and the modified category is Spring-based, the processor to be reloaded may be determined as a Spring container among one or more processors of the electronic device 100. As another example, when the file is a resource file, the processor to be reloaded may be determined as a middleware processor among one or more processors of the electronic device 100.
[0068] According to one embodiment, the electronic device 100 can reload the source code based on the modified resource file. That is, the electronic device 100 can integrate the modified resource file into the application and confirm whether it runs normally. A specific embodiment of reloading the source code based on the modified category information and by means of the processor will be described in detail in FIG4.
[0069] In step S240, the electronic device 100 can transmit information related to the source code to the server after the source code is reloaded.
[0070] According to one embodiment, source code development can be carried out in a defined environment. Here, the defined environment can be an open-source platform that automates the deployment, scaling, and management of containerized applications. For example, the defined environment can be Kubernetes (hereinafter, K8s), but is not limited to this. In K8s, a Pod can be the basic unit for managing and deploying containers. A Pod can consist of more than one container. At this time, information related to application updates that reflect the written source code can be transmitted from the electronic device 100 to the server 120 via the Pod.
[0071] According to one embodiment, the information related to the source code may include: information on at least one of the modified category and the modified resource file, image information related to the application obtained by reflecting a part of the written source code, information on the target server related to the source code, and information on API symbols. Here, the information on API symbols may be security information used for information transmission and reception between electronic device 100, device 110, and server 120.
[0072] According to one embodiment, if a portion of the written source code cannot be integrated with the application, the application may fail to function correctly. If there are errors in the modified category structure or the resource file format, a portion of the written source code may also fail to integrate with the application. Errors may also occur when loading the compiled file into the Java execution environment or reloading the source code. For example, in e-commerce services, public enumeration types can only include names corresponding to pages within the e-commerce service, such as default, banner, item-feed-carousel, and double-grid-wide. In this case, if the source code is written to change the value of the public enumeration type to a name that does not correspond to a page in the e-commerce service (e.g., a test page), the update of the application corresponding to the e-commerce service may fail.
[0073] According to one embodiment, in order to effectively analyze the success rate of hot-release and the reasons for hot-release failure, electronic device 100 can transmit information about whether the source code was successfully released to device 110. More specifically, log data generated from the time the compiled file is received until the information related to the source code is transmitted via Pod can be stored in real time in the storage of electronic device 100, and the log data stored in the storage can be transmitted to device 110. That is, based on the log data, it can be determined which step of the operation of electronic device 100 caused the error, and the user of device 100 can appropriately correct the source code.
[0074] Figure 3 is a flowchart illustrating a method for confirming information about the changed category of source code in a Java execution environment according to an embodiment.
[0075] Referring to Figure 3, it can be clearly understood that the actions of the electronic device 100 in confirming the information of the changed category of the source code in the Java execution environment can be changed or replaced or the order of some actions can be changed within the scope of common sense in the technical field to which this invention pertains.
[0076] In step S310, the electronic device 100 can confirm that the category of the source code has changed based on the compiled category file.
[0077] In step S320, the electronic device 100 may load the compiled class file into the Java execution environment. More specifically, in order to confirm the changed class, subsequent processes need to be performed, therefore the electronic device 100 may load the compiled class file into the Java execution environment.
[0078] According to one embodiment, the Java execution environment may include JDK and DECVM. JDK provides basic hot-swapping functionality, while DECVM provides a wider range of hot-swapping functionality through extended features. For example, JDK only supports hot-swapping of method text changes, while DECVM can also support hot-swapping of adding new methods, deleting existing methods, changing class inheritance constructors, changing method signatures, adding new attributes, changing existing attributes, and deleting existing attributes. That is, DECVM can be a tool for supporting hot-swapping of source code changes with a wider scope than JDK.
[0079] In step S330, the electronic device 100 can confirm the information of the changed category of the source code in the Java execution environment.
[0080] According to one embodiment, the electronic device 100 can redefine the categories of the source code based on the compiled category file in a Java execution environment. Here, the redefinition operation is a dynamic modification or addition of category definitions related to the currently executing application, which may be a modification or addition of the binary representation of the category. Therefore, the electronic device 100 can confirm the changed category after the modification or addition of the binary representation.
[0081] Figure 4 is a flowchart illustrating a method for reloading source code according to an embodiment.
[0082] Referring to FIG4, it can be clearly understood that the various actions of the electronic device 100 in reloading the source code can be changed or replaced or the order of some actions can be changed within the scope of common sense in the technical field to which this invention pertains.
[0083] In step S410, the electronic device 100 can identify the processor corresponding to the set frame in one or more processors.
[0084] According to one embodiment, one or more processors may include a first type of processor corresponding to each of the defined frameworks, and a second type of processor corresponding to the modified resource file or (generally) the modified category file. That is, the first type of processor differs from the second type of processor and may be a dedicated processor for processing only category changes based on the defined framework. As an example, when the modified category is based on Spring, the processor may be a Spring container. As another example, the processor corresponding to the modified category file not corresponding to the defined framework and the processor corresponding to the modified resource file may be an intermediate software processor.
[0085] In step S420, the electronic device 100 may reload the source code by means of the processor based on the information of the changed category.
[0086] In this specification, a Spring container can be a unit used to create, configure, and manage Beans as objects used in an application. Furthermore, a Bean can be an object created and managed by the container. The following will describe methods for reloading Spring-based modified classes in various frameworks.
[0087] According to one embodiment, the electronic device 100 can initialize a first bean corresponding to the original class of the bean associated with the application managed by the Spring container. More specifically, the electronic device 100 can call an initialization method to initialize the first bean corresponding to the original class of the bean. In one embodiment, the electronic device 100 can generate a second bean corresponding to the modified class after initializing the first bean. That is, the original class of the bean can be replaced with the modified class confirmed in the Java execution environment. Furthermore, dependency injection operations can also be selectively performed simultaneously.
[0088] Figure 5 is a diagram used to illustrate in more detail the system of the source code publishing method of an electronic device that can implement an embodiment.
[0089] The electronic device 100, server 120, and plug-in 500 in Figure 5 can correspond to the electronic device 100, server 120, and plug-in installed in device 110 described in Figures 1 to 4. That is, detailed descriptions of the contents of the electronic device 100, server 120, and plug-in 500 in Figure 5 that are repeated in the above descriptions are omitted.
[0090] According to one embodiment, plug-in 500 is a plug-in installed on device 110, which can be an extension module for providing software development-related functions in an integrated development environment (IDE). That is, the user of device 110 can perform source code operations in the IDE. After the source code operation is completed, the user can select the target server associated with the application corresponding to the source code (corresponding to the remote Pod selection in Figure 5), and select the source code to be hot-swapped (corresponding to the hot-swappable file selection in Figure 5). Here, the target server can be the application corresponding to the source code among a plurality of applications, but is not limited to this. For example, the target server can correspond to the target page corresponding to the source code among a plurality of pages provided by the application. In this case, each page provided by the application can be managed and published by a separate server. That is, when writing source code to modify statements on a specific page, users can select the target page from a plurality of pages provided by the application.
[0091] According to one embodiment, electronic device 100 may be a hot-swap agent that allows for the application of code changes in a Java application to a wider range of applications at runtime. That is, electronic device 100 can support more types of source code changes, and users of device 110 can modify various codes without restarting the application. The components of electronic device 100 may perform the following functions.
[0092] The transceiver layer can transmit and receive information via the device 100 and socket where the plugin 500 is installed. For example, the transceiver layer can receive the compiled source code file from the device 100. Furthermore, the transceiver layer can transmit log data to the plugin 500c via the socket. This log data is generated from the receipt of the compiled file until information related to the source code is transmitted via the Pod. This data may correspond to the remote log echo of the plugin 500. The listening layer can be a unit used to determine whether the source code category has changed or whether the source code resource files have changed based on the compiled file. The processing layer can reload the source code based on the changed category or changed resource file information. As shown in Figure 5, the processing layer may include a Spring processor and a middleware processor, but is not limited to these.
[0093] The multilevel class loader can load source code files related to updates of multiple applications or multiple pages into the JDK / DECVM. The custom class converter and class redefinition enhancer can verify the information of the changed classes in the source code within the Java execution environment.
[0094] According to one embodiment, server 120 can provide a testing environment reflecting the source code of an application written by a user. That is, the user of device 110 can perform validity verification in the provided testing environment, and can rewrite the source code if errors occur. Server 120 can receive API symbol information via Pod. Furthermore, it can receive plugin information and hot-release error information via device 110 with plugin 500 installed.
[0095] Figure 6 is a diagram illustrating a method for hot swapping source code using a plugin according to an embodiment.
[0096] Referring to Figure 6, interface 600 represents the process by which a user who writes source code performs hot-replacement of the source code using a plugin. Specifically, the user can modify the sentence "What brand are you looking for?" on a specific page of an e-commerce service application to "test AA" 600. Afterward, the user can perform hot-replacement of the file using the hot-replacement plugin.
[0097] In the context menu related to hot swapping, the first area 610 may correspond to the remote Pod selection in Figure 5. That is, the first area 610 may be the area used to select the target server associated with the application corresponding to the source code. Furthermore, in the context menu related to hot swapping, the second area 620 may correspond to the hot swap file selection in Figure 5. That is, the second area 620 may be the area used to select the source code to be hot swapped.
[0098] Figure 7 is a block diagram illustrating an electronic device 100 used to implement a source code publishing method of an embodiment.
[0099] The electronic device 100 in FIG7 may be an electronic device 100 used to implement the source code distribution method. According to one embodiment, the electronic device 100 may include a transceiver 101, a memory 102, and one or more processors 103. The electronic device 100 shown in FIG7 only illustrates the components relevant to this embodiment. Therefore, those skilled in the art related to this embodiment will understand that, in addition to the components shown in FIG7, other general components may be included.
[0100] For example, according to one embodiment, electronic device 100 may include a transceiver 101. Transceiver 101 is a device for implementing wired / wireless communication and can communicate with external electronic devices. Furthermore, the communication technologies used by transceiver 101 may include GSM (Global System for Mobile communication), CDMA (Code Division Multi Access), LTE (Long Term Evolution), 5G (5th Generation Mobile Communication Technology), WLAN (Wireless LAN), Wi-Fi (Wireless-Fidelity), Bluetooth, RFID (Radio Frequency Identification), Infrared Data Association (IrDA), Zigbee, NFC (Near Field Communication), etc. According to one embodiment, transceiver 101 can receive source code files related to application updates from a user's device 110. According to one embodiment, transceiver 101 can transmit information related to source code to server 120.
[0101] Storage 102 may store information for implementing at least one of the methods described above, according to Figures 1 to 7. Storage 102 may store one or more commands executed by one or more processors 103. Storage 102 may be referred to as memory, and may be volatile memory or non-volatile memory. Storage 102 may be referred to as the local storage of electronic device 100, and may store source code files related to application updates received from user device 110. Furthermore, storage 102 may store log data from the time the file is received until the information related to the source code is transmitted to server 120.
[0102] One or more processors 103 can control the overall operation of the electronic device 100 and process data and signals. One or more processors 103 can implement one of the methods described above according to Figures 1 to 7. One or more processors 103 can be composed of at least one hardware unit. Furthermore, one or more processors 103 can operate by means of one or more software modules, which are generated by executing one or more commands stored in the memory 102. One or more processors 103 can control the implementation of the electronic device 100 through interaction with the transceiver 101 and the memory 102, and further with the constituent elements that the electronic device 100 may include.
[0103] According to one embodiment, the processor 103 can execute one or more commands to receive source code files related to application updates from the user's device 110, and based on the files, confirm at least one of the changed category of the source code and the changed resource files, and reload the source code using the changed category and the changed resource files and the processor corresponding to the confirmation result among one or more processors, and transmit the information related to the source code to the server 120 after the source code reloading is completed.
[0104] On the other hand, preferred embodiments of the present invention have been disclosed in this specification and accompanying drawings. Although specific terms have been used, these terms are only used in a general sense to facilitate the description of the technical content of the present invention and to aid in understanding the invention, and are not intended to limit the scope of the present invention. In addition to the embodiments disclosed herein, it will be apparent to those skilled in the art that other variations can be implemented based on the technical concept of the present invention.
[0105] The electronic device or terminal in the above embodiments may include a processor, memory for storing and executing program data, permanent storage such as a magnetic disk drive, a communication port for communicating with external devices, and a user interface device such as a touch panel, keys, and icons. Computer-readable code or program commands that can be executed on the processor, implemented by a software module or algorithm, can be stored on a computer-readable recording medium. Here, computer-readable recording media include magnetic storage media (e.g., ROM (read-only memory), RAM (random-access memory), floppy disks, hard disks, etc.) and optical reading media (e.g., CD-ROM, Digital Versatile Disc (DVD)). The computer-readable recording medium is distributed across a network-connected computer system, thereby enabling distributed storage and execution of computer-readable code. The medium can be read by a computer, stored in memory, and executed in a processor.
[0106] This embodiment can be represented by functional blocks and various processing steps. These functional blocks can be implemented by different numbers of hardware and / or software components performing specific functions. For example, the embodiment can employ integrated circuits capable of performing various functions via the control of one or more microprocessors or other control devices, such as memory, processing, logic, lookup tables, etc. The constituent elements can be executed by software programs or software components. Similarly, this embodiment includes various algorithms implemented by combinations of data structures, programs, routines, or other programs, and therefore can be implemented using programming or scripting languages such as C, C++, Java, assembler, Python, etc. Functionally, it can be implemented by algorithms executed in one or more processors. Furthermore, this embodiment can employ prior art for electronic environment setup, signal processing, and / or data processing. Terms such as "mechanism," "element," "method," and "construction" are widely used and are not limited to mechanical or physical construction. The above terms may be associated with processors and include the meaning of a series of software processes.
[0107] The above embodiment is only an example, and other embodiments can be implemented within the scope of the invention application described below. [Simplified Explanation of the Diagram]
[0026] Figure 1 is a system diagram illustrating the source code distribution method of an electronic device that can implement an embodiment. Figure 2 is a flowchart illustrating the source code distribution method of an electronic device that can implement an embodiment. Figure 3 is a flowchart illustrating a method for confirming the changed category information of source code in a Java execution environment according to an embodiment. Figure 4 is a flowchart illustrating a method for reloading source code according to an embodiment. Figure 5 is a system diagram illustrating the source code distribution method of an electronic device that can implement an embodiment in more detail. Figure 6 is a diagram illustrating a method for hot-swapping source code using a plugin according to an embodiment. Figure 7 is a block diagram illustrating an electronic device that implements the source code distribution method of an embodiment.
Claims
1. A source code distribution method, performed via an electronic device, comprising the following steps: receiving source code files related to an application update from a user's device; confirming at least one of the changed category and changed resource files of the source code based on the file; reloading the source code using the changed category and at least one of the changed resource files via a processor corresponding to the confirmation result; and transmitting information related to the source code to a server upon completion of the reloading of the source code.
2. The source code distribution method as described in Request 1, wherein the step of receiving the aforementioned file includes the following steps: receiving information about the target server related to the aforementioned source code and the aforementioned file in response to the input made by the user through the aforementioned device's plug-in.
3. As in the source code distribution method of request item 1, where the above file relates to changing the category of the above source code, the above file is the compiled category file.
4. The source code distribution method as described in request item 3, wherein the step of confirming at least one of the aforementioned changed category and the aforementioned changed resource file includes the following steps: Based on the aforementioned compiled category file, confirming that the category of the aforementioned source code has been changed; Loading the aforementioned compiled category file into the Java execution environment; and confirming the aforementioned changed category information of the aforementioned source code in the aforementioned Java execution environment.
5. The source code distribution method as described in request item 4, wherein the step of confirming that the category of the above source code has been changed includes the following steps: Based on the above-compiled category file, confirm whether the above-changed category of the above source code is based on the set framework.
6. As in the source code distribution method of request item 5, the step of confirming the information of the changed category in the Java execution environment includes the following steps: redefining the category of the source code based on the compiled category file, thereby changing the category of the source code.
7. As in request item 4, the source code distribution method, wherein the Java execution environment mentioned above includes JDK and DCEVM.
8. As in the source code publishing method of request item 5, where the framework set above is Spring, and the processor above is a Spring container.
9. The source code distribution method as described in Request 5, wherein the reloading step includes the following steps: identifying the processor corresponding to the framework set above in one or more processors; and reloading the source code by means of the processor based on the information of the changed category.
10. The source code distribution method as described in request item 9, wherein the reloading step includes the following steps: initializing the first bean corresponding to the class before the source code change in the bean managed by the processor and associated with the application; and generating the second bean corresponding to the class after the change.
11. The source code publishing method of request item 1, wherein the modified category is at least one of the attributes and methods related to the category before the modification of the source code, or at least one of the new attributes and new methods related to the category before the modification of the source code is added.
12. As in the source code distribution method of request item 1, where the above file is a resource file relating to changes to the above source code, the above file is a compiled resource file.
13. The source code distribution method of request item 4 further includes the following steps: confirming whether the loading to the above-mentioned Java execution environment is successful; and transmitting the information on whether the loading is successful to the above-mentioned device.
14. The source code distribution method as described in Request 1, wherein the information related to the source code includes information about the target server related to the source code and image information related to the application.
15. An electronic device comprising: transceiver; One or more processors; and a storage device storing one or more commands to be executed by the one or more processors; wherein the one or more processors are configured to: execute the one or more commands to receive source code files related to application updates from a user's device; identify at least one of the modified type and modified resource files of the source code based on the file; reload the source code using the modified type and modified resource files via the processor corresponding to the identification result; and transmit information related to the source code to a server upon completion of the reloading of the source code.
16. A non-transitory computer-readable recording medium recording a program for performing the methods described in any one of claims 1 to 14 on a computer.
Citation Information
Patent Citations
Font distribution system and method of font distribution
TW201729126A
Hot reloading a running application with an unsaved source code change
US11573787B1
Malware detection in migrated virtual machines
US20170351861A1
Systems and methods for redeploying source code builds
US20220197621A1
