Information processing device
Middleware enables framework switching on servers by executing old framework functions on new frameworks without rewriting, enhancing efficiency and compatibility in framework updates.
Patent Information
- Application Number
- JP2024018680
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-09
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-02-09
AI Technical Summary
Switching frameworks on a server, such as from Struts to Spring Boot, requires significant labor-intensive work due to the need for program rewriting, making it difficult to update frameworks efficiently.
Implementing middleware that enables functions of the old framework (e.g., Struts) to be executed on the new framework (e.g., Spring Boot) without requiring program rewriting, using a routing table and tag functions to maintain compatibility.
Facilitates seamless framework switching by allowing functions of the old framework to be executed on the new framework, reducing the need for labor-intensive tasks and maintaining display and database operations compatibility.
Smart Images

Figure 2025122927000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an information processing device. [Background technology]
[0002] A known information processing device is disclosed in, for example, Patent Document 1. This device includes a server to which requests are input from a client computer. The server is capable of running a framework. The framework executes a function corresponding to the request and returns the execution result of the function to the client computer as a response to the request. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2021-68160 Summary of the Invention [Problem to be solved by the invention]
[0004] In the information processing device, the framework may be changed from an old one to a new one for reasons such as improving vulnerabilities. For example, if the new framework is designated as the first framework and the old framework is designated as the second framework, the framework is changed from the second framework to the first framework. In this case, if the program in the first framework is rewritten so that the functions executed in the second framework are realized in the first framework, a significant amount of work is required. Such a labor-intensive task makes it difficult to switch frameworks running on a server. [Means for solving the problem]
[0005] Next, various aspects of the information processing device that solves the above problems will be described. (Aspect 1) An information processing device comprising a server to which a request is input from a client computer, the server being capable of operating a framework, the framework executing a function corresponding to the request and returning the execution result of the function to the client computer as a response to the request, wherein the framework is a first framework, the function corresponding to the request is a function executed by a second framework and is implemented on the server, and the server operates middleware that enables the function of the second framework to be executed on the first framework.
[0006] For reasons such as improving vulnerabilities, the framework running on a server may be changed from the second framework to the first framework. In this case, if the program in the first framework is rewritten so that the functions previously executed by the second framework are implemented by the first framework, a significant amount of work is required. Such a labor-intensive process makes it difficult to switch the framework running on a server. However, with the above configuration, the server can run middleware, allowing the functions of the second framework to be executed on the first framework. In this case, the functions previously executed on the second framework can be executed on the first framework without requiring labor-intensive work such as program rewriting. This makes it easy to switch the framework running on a server.
[0007] (Aspect 2) The first framework passes the request input to the server to the middleware, and the middleware reads a routing table that specifies the function of the second framework to be executed based on the request, and refers to the routing table to execute the function of the second framework corresponding to the request (information processing device described in aspect 1).
[0008] According to the above configuration, when a request is input to the server, the request is passed to the middleware. The middleware references the loaded routing table and executes the function of the second framework corresponding to the request on the first framework. This allows the function of the second framework to be executed on the first framework.
[0009] (Aspect 3) The middleware executes the function of the second framework corresponding to the request on the first framework and returns the execution result to the client computer in a display format for displaying the execution result of the function, and the server is implemented with a display function as a function executed by the second framework, for displaying the execution result in a display format for displaying the execution result based on the execution result, and a tag function for executing the display function based on its name, and when the middleware returns the execution result to the client computer in the display format for displaying the execution result, if the display format corresponds to a display function dependent on the second framework, it executes the display function of the second framework based on the name of the display function by executing the tag function (information processing device described in aspect 1).
[0010] According to the above configuration, when the execution result of a function based on a request is returned to the client computer as a response, the execution result is returned to the client computer in a display format for displaying the execution result. If the display functions for displaying the execution result in the display format include a display function that depends on the second framework, the display function of the second framework is executed based on the name of the display function by executing a tag function. In this way, the display function of the second framework is executed on the first framework.
[0011] (Aspect 4) The first framework has a database library used when operating a database and passes the request input to the server to the middleware, and the middleware executes a library call program based on SQL, a language for operating the database, as a function of the second framework that is executed based on the request, and the library call program has a database management class whose contents correspond to the first framework and whose package name and class name are the same as those used in the second framework, and is executed by the middleware based on the SQL to operate the database using the database library (information processing device described in aspect 1).
[0012] According to the above configuration, the middleware executes a library call program based on SQL, a language for operating a database, as a function of the second framework executed based on a request. The contents of the database management class of this library call program correspond to those of the first framework, and the package name and class name of the database management class are the same as those used in the second framework. Therefore, by executing the library call program based on SQL using the middleware, it is possible to operate a database using the database library of the first framework.
[0013] (Aspect 5) The database library passes the execution results of the database operations to the middleware, and the middleware returns the execution results to the client computer in a display format for displaying the execution results.The server is implemented with a display function as a function executed by the second framework, which displays the execution results in a display format for displaying the execution results based on the execution results, and a tag function for executing the display function based on its name.When the middleware returns the execution results to the client computer in the display format for displaying the execution results, if the display format corresponds to a display function dependent on the second framework, it executes the tag function to execute the display function of the second framework based on the name of the display function (information processing device described in aspect 4).
[0014] According to the above configuration, the execution result of the database operation is returned to the client computer in a display format for displaying the execution result, thereby providing a response based on the request to the client computer. If the display functions for displaying the execution result in the display format include a display function that depends on the second framework, the display function of the second framework is executed based on the name of the display function by executing a tag function. In this way, the display function of the second framework is executed on the first framework. [Brief explanation of the drawings]
[0015] [Figure 1] 1 is a schematic diagram illustrating an overall configuration of an information processing device. [Figure 2] 2 is a block diagram illustrating the operation of a character encoding correction filter unit of middleware executed on a server in the information processing apparatus of FIG. 1. [Figure 3] 2 is a block diagram for explaining the operation of a controller unit of the middleware of FIG. 1. FIG. [Figure 4]2 is a block diagram for explaining the operation of a controller unit of the middleware of FIG. 1. FIG. [Figure 5] 2 is a block diagram for explaining the operation of a controller unit of the middleware of FIG. 1. FIG. [Figure 6] FIG. 2 is a block diagram for explaining the operation of a service base unit of the middleware of FIG. [Figure 7] FIG. 2 is a block diagram for explaining the operation of an event base unit of the middleware of FIG. [Figure 8] 2 is a block diagram for explaining the operation of a DB management unit of the middleware of FIG. 1. FIG. [Figure 9] 2 is a block diagram for explaining the operation of a JSP tag reproducing function unit of the middleware of FIG. 1. FIG. DETAILED DESCRIPTION OF THE INVENTION
[0016] An embodiment of an information processing device will be described below with reference to FIGS. As shown in FIG. 1 , the information processing device includes a server 11. A request is input to the server 11 from a client computer 12. The server 11 is capable of running a first framework 13 such as Spring Boot. The server 11 also has implemented therein a function 15 executed by a second framework 14 such as Struts as a function corresponding to the request. The server 11 also runs middleware 16 that enables the function 15 of the second framework 14 to be executed on the first framework 13.
[0017] The first framework 13 running on the server 11 includes a database library 18 that is used when operating a database 17. The first framework 13 passes the request input to the server 11 to the middleware 16. The middleware 16 executes the function 15 of the second framework 14 on the first framework 13 as a function corresponding to the request.
[0018] The middleware 16 executes a library call program as the function 15 of the second framework 14, for example, based on SQL (Structured Query Language), which is a language for operating a database 17. The library call program is executed by the middleware 16 based on the SQL, thereby operating the database 17 using a database library 18. The database library 18 passes the execution results of the operation of the database 17 to the middleware 16.
[0019] The middleware 16 returns the execution result of the function 15 to the client computer 12 as a response to the request in a display format for displaying the execution result of the function 15. The function 15 executed by the second framework 14 includes a display function for displaying the execution result in a display format for displaying the execution result based on the execution result, and a tag function for executing the display function based on its name.
[0020] When the middleware 16 returns the execution result to the client computer 12 in the display format, if the display format corresponds to a display function dependent on the second framework 14, the middleware 16 executes the tag function to execute the display function of the second framework 14 based on the name of the display function.
[0021] Next, the middleware 16 will be described in detail. The middleware 16 has a character encoding correction filter unit A, a controller unit B, a service base unit C, an event base unit D, a DB management unit E, and a JSP tag reproduction function unit F. Each of the above-mentioned units of the middleware 16 will be described in detail below.
[0022] <Character encoding correction filter part A> A request from the client computer 12 is input to the server 11 through a user's operation of the client computer 12, for example, through an operation on a web browser. Such a request is made, for example, by a character string in the form of a URL (Uniform Resource Locator).
[0023] The request input to the server 11 is passed by the first framework 13 to the character encoding correction filter unit A of the middleware 16. The character encoding correction filter unit A is used to correct any differences between the encoding of the character code used in the first framework 13 and the encoding of the character code used in the second framework 14.
[0024] 2, the character encoding correction filter unit A performs the above correction on the received request, and then passes the request to the standard URL resolution process 20 in the first framework 13. At this time, the character encoding correction filter unit A blocks transmission of the request to the standard character encoding filter 19 in the first framework 13.
[0025] <Controller section B> 3, the controller unit B of the middleware 16 receives the corrected request via the URL resolution process 20. The controller unit B manages the session, i.e., the communication state, between the client computer 12 that sent the request and the server 11.
[0026] More specifically, the request includes information about a session key. This session key is used to identify the user of the client computer 12 that sent the request. Controller unit B obtains the session key from the request. Furthermore, controller unit B obtains session information between the client computer 12 and the server 11 from a standard session management function 21 in the first framework 13.
[0027] If the controller unit B determines, based on the acquired session key and session information, that there is no session between the user of the client computer 12 that sent the request and the server 11, it executes login processing 22. In this login processing 22, a login screen is returned to the client computer 12 as a response to the request. Then, the user of the client computer 12 enters a user ID and password based on the login screen, thereby establishing a session between the user and the server 11. On the other hand, if the controller unit B determines, based on the acquired session key and session information, that there is a session between the user and the server 11, it executes URL resolution processing 23 on the middleware 16.
[0028] As shown in FIG. 4, the controller unit B executes the URL resolution process 23 on the middleware 16, thereby executing some of the functions 15 in the second framework 14 using a URL routing table 24. The URL routing table 24 represents the association between the execution program of each function 15 and the URL in the request. In other words, the URL routing table 24 specifies the execution program of the function 15 to be executed based on the URL in the request. The controller unit B is capable of loading the URL routing table 24. Based on the URL in the request, the controller unit B references the loaded URL routing table 24 and executes the function 15 corresponding to the URL in the request.
[0029] As shown in FIG. 5, the controller unit B receives the execution result of the function 15. After receiving the execution result, the controller unit B executes a screen JSP selection process 25 for outputting the execution result in HTML (HyperText Markup Language) format. The screen JSP selection process 25 outputs the execution result in HTML format using JSPs (Java Server Pages (registered trademark)) 26. There are multiple types of JSPs 26 corresponding to different display formats such as an edit screen, a reference face, and a delete screen. The execution result stores a path indicating which of the multiple types of JSPs 26 should be used. The screen JSP selection process 25 executes the JSP 26 corresponding to the path stored in the execution result, and returns the execution result to the client computer 12 as a response to the request in a display format for displaying the execution result.
[0030] <Service Base C> When executing the above function 15, the controller unit B performs an event call process 27 shown in Fig. 6. This event call process 27 is for calling an event 29 required to execute the above function 15, and then executing the called event 29. Such an event 29 has the same location and name as an event executed in the second framework 14, and is implemented in the server 11 as something executable in the first framework 13. In the event call process 27, event information indicating an event required to execute the above function 15 is passed to the service base unit C.
[0031] The service base C searches for the event 29 required for the execution of the above function 15 using the event table 28. The event table 28 represents the association between event information and the corresponding event 29. The service base C refers to the event table 28 based on the above event information and searches for the event 29 required for the execution of the above function 15. The service base C executes the searched event 29 through the transaction process 30. The transaction process 30 is for returning the state of the database 17 to the state before the execution of the transaction process 30 when a problem occurs in the executed event 29.
[0032] <Event base D> When executing the above event 29, the service base C performs the DAO call process 31 shown in FIG. 7. This DAO call process 31 is for calling the DAO (Data Access Object) 32 required for the execution of the above event 29 and then executing the called DAO 32. Such DAO 32 has the same position and name as the DAO executed in the second framework 14 and is implemented on the server 11 as being executable in the first framework 13. In the DAO call process 31, the DAO name required for the execution of the above event 29 is passed to the event base D.
[0033] The event base D searches for the DAO 32 required for the execution of the above event 29 using the DAO table 33. The DAO table 33 represents the association between the DAO name and the corresponding DAO 32. The event base D refers to the DAO table 33 based on the above DAO name and searches for the DAO 32 required for the execution of the above event 29. The event base D executes the searched DAO 32.
[0034] <DB management department E> When the event base D executes DAO32, as shown in FIG. 8, the DAO32 passes the SQL corresponding to the DAO32, that is, the SQL which is a language for operating the database 17, to the DB management unit E. The DB management unit E executes a library call program based on the SQL as the function 15 of the second framework 14.
[0035] The library call program is such that the content of the database management class corresponds to the first framework 13, and the package name and class name of the database management class are the same as those used in the second framework 14. The library call program is executed by the DB management unit E based on the SQL, and operates the database 17 using the database library 18. The database library 18 passes the execution result of the operation of the database 17 to the DB management unit E.
[0036] The execution result passed to the DB management unit E is passed to the controller unit B in the middleware 16 shown in FIG. 1. After receiving the execution result, the controller unit B executes the above-described screen JSP selection process 25. The screen JSP selection process 25 executes the JSP 26 corresponding to the path stored in the execution result, and returns the execution result to the client computer 12 in a display format for displaying the execution result and in HTML format as a response to the request.
[0037] <JSP tag reproduction function unit F> The function 15 implemented in the server 11 shown in FIG. 1, that is, the function 15 of the second framework 14, includes the display function and the tag function as described above. This display function is a function for displaying the execution result in a display format based on the execution result. Also, the tag function is a function for executing the display function based on its name.
[0038] 9 executes the JSP tag call processing 34 when the controller unit B returns the execution result to the client computer 12 in the display format, HTML, as described above. When the display format of the execution result corresponds to a display function dependent on the second framework 14, the JSP tag call processing 34 executes the tag function to execute the display function of the second framework 14 based on the name of the display function.
[0039] The client computer 12 receives the execution result in the display format as a response to the request, and then displays the execution result in the display format using a web browser.
[0040] Next, the effects of the information processing apparatus of this embodiment will be described. (1) For reasons such as improving vulnerability, the framework running on the server 11 may be changed from the second framework 14 to the first framework 13. In this case, if the program in the first framework 13 is rewritten so that the function 15 executed by the second framework 14 is implemented by the first framework 13, a significant amount of work is required. Such a labor-intensive task makes it difficult to switch the framework running on the server 11. However, in the information processing device, the server 11 can run the middleware 16, thereby allowing the function 15 of the second framework 14 to be executed on the first framework 13. In this case, the function 15 executed by the second framework 14 can be executed on the first framework 13 without requiring a labor-intensive task such as program rewriting. This facilitates switching the framework running on the server 11.
[0041] (2) When a request is input to the server 11, the request is passed to the middleware 16. Such a request is made, for example, by a character string in URL format. The controller unit B of the middleware 16 refers to the URL routing table 24 and executes the function 15 of the second framework 14 corresponding to the request on the first framework 13. This allows the function 15 of the second framework 14 to be executed on the first framework 13.
[0042] (3) When the controller unit B of the middleware 16 responds to the client computer 12 with the execution result of the function based on the request, the execution result is returned to the client computer 12 in a display format for displaying the execution result. At this time, the JSP tag call processing 34 is executed by the JSP tag reproduction function unit F of the middleware 16. If there is a display function that depends on the second framework 14 among the display functions for displaying the execution result in the display format, the JSP tag call processing 34 executes the display function of the second framework 14 based on the name of the display function by executing the tag function. In this way, the display function of the second framework 14 is executed on the first framework 13.
[0043] (4) The DB management unit E of the middleware 16 executes a library call program based on SQL, which is a language for operating the database 17, as a function 15 of the second framework 14 that is executed based on a request. The contents of the database management class of this library call program correspond to those of the first framework 13, and the package name and class name of the database management class are the same as those used in the second framework 14. Therefore, by having the DB management unit E execute the library call program based on SQL, the database 17 can be operated using the database library 18 of the first framework 13.
[0044] (5) The execution result of the database 17 operation is returned to the client computer 12 in a display format for displaying the execution result, thereby making a response based on the request to the client computer 12. If the display functions for displaying the execution result in the display format include a display function that depends on the second framework 14, the display function of the second framework 14 is executed based on the name of the display function by executing the tag function by the JSP tag call processing 34. Therefore, even when the execution result of the database 17 operation is returned to the client computer 12 in a display format for displaying the execution result, the display function of the second framework 14 is executed on the first framework 13.
[0045] The above embodiment can be modified as follows, for example: The above embodiment and the following modifications can be combined and implemented within the scope of technical compatibility. A framework other than Spring Boot may be adopted as the first framework 13.
[0046] As the second framework 14, a framework other than Struts may be adopted. [Explanation of symbols]
[0047] 11...Server 12...Client computer 13...First Framework 14...Second Framework 15...Function 16...Middleware A: Character encoding correction filter B: Controller section C: Service base D...Event base E…DB management department F...JSP tag reproduction function section 17...Database 18...Database Library 19...Character encoding filter 20...URL resolution process 21...Session management function 22...Login process 23...URL resolution process 24…URL routing table 25...Screen JSP selection processing 26...JSP 27...Event call processing 28...Event table 29...Event 30...Transaction processing 31...DAO call processing 32...DAO 33…DAO table 34...JSP tag call processing
Claims
1. An information processing device comprising: a server to which a request is input from a client computer, the server being capable of operating a framework, the framework executing a function corresponding to the request and returning a result of the execution of the function to the client computer as a response to the request, the framework is a first framework, the function corresponding to the request is a function executed by a second framework and implemented in the server; The server is an information processing device that runs middleware that enables the functions of the second framework to be executed on the first framework.
2. the first framework passes the request input to the server to the middleware; The information processing device according to claim 1 , wherein the middleware reads a routing table that defines the functions of the second framework to be executed based on the request, and executes the functions of the second framework corresponding to the request by referring to the routing table.
3. the middleware executes a function of the second framework corresponding to the request on the first framework, and returns the execution result to the client computer in a display format for displaying the execution result of the function; the server is implemented with a display function for displaying the execution result in a display format for displaying the execution result based on the execution result as a function executed by the second framework, and a tag function for executing the display function based on its name; 2. The information processing device according to claim 1, wherein when the middleware returns the execution result to the client computer in a display format for displaying the execution result, if the display format corresponds to a display function dependent on the second framework, the middleware executes the display function of the second framework based on the name of the display function by executing the tag function.
4. the first framework includes a database library used when operating a database, and passes the request input to the server to the middleware; the middleware executes a library call program based on SQL, which is a language for operating the database, as a function of the second framework executed based on the request, 2. The information processing device according to claim 1, wherein the contents of the database management class correspond to the first framework, and the package name and class name of the database management class are the same as those used in the second framework, and the library call program is executed by the middleware based on the SQL to operate the database using the database library.
5. the database library passes the execution result of the database operation to the middleware; the middleware returns the execution result to the client computer in a display format for displaying the execution result; the server is implemented with a display function for displaying the execution result in a display format for displaying the execution result based on the execution result as a function executed by the second framework, and a tag function for executing the display function based on its name; 5. The information processing device of claim 4, wherein when the middleware returns the execution result to the client computer in a display format for displaying the execution result, if the display format corresponds to a display function dependent on a second framework, the middleware executes the display function of the second framework based on the name of the display function by executing the tag function.
Citation Information
Patent Citations
Sip message distribution method and sip message distribution device
JP2010003273A
Information processing apparatus, method for controlling information processing apparatus, and program
JP2018032119A
Information processing device, control method, and program
JP2020016951A
Information processing system and information processing device
JP2021068160A