CN103984567B - The modular method and apparatus of open platform - Google Patents
The modular method and apparatus of open platform Download PDFInfo
- Publication number
- CN103984567B CN103984567B CN201410161868.XA CN201410161868A CN103984567B CN 103984567 B CN103984567 B CN 103984567B CN 201410161868 A CN201410161868 A CN 201410161868A CN 103984567 B CN103984567 B CN 103984567B
- Authority
- CN
- China
- Prior art keywords
- module
- resource
- open platform
- api
- website
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides the modular method and apparatus of open platform, including, route and resource isolation management are made requests on based on multimode;By method name corresponding to request and version number come uniform management module resource, while carry out multi version operation and management.Module release deployment is carried out based on node mode, same Version module may operate at different nodes.The present invention realizes module service high-performance, High Availabitity, and Dynamical Deployment is simpler, and operation is controllable, and Development of Module reduces coupling.
Description
Technical field
The present invention relates to field of program development, more particularly to a kind of modular method and apparatus of open platform.
Background technology
Open platform modularization relies on OGSI (Open Service Gateway Initiative) technology to realize that module is given birth to
Order cycle management and service registry.Module heat deployment and thermal control are realized by node control, offer can coexists in multimode version
Service.The degree of coupling of open platform API exploitations is reduced, module is by Version Control, and realization is disposed, started, stopping, unloading,
The operation of module is set to be managed monitoring by service platform, the stable operation to whole open platform provides a full set of improvement
Function.The multi version storehouse management of module is realized simultaneously, and all modules all store physical file in warehouse, for different editions
Comparison and rollback provide effective guarantee.
However, due to modules A PI business complexity, the problem of interdepending between multimode be present, not only include opening
It is laid flat class compiling existing for platform modularization to rely on, for the module of complexity, the problem of bidirectional dependency and Circular dependency is also present.
For the above mentioned problem in the presence of correlation technique, effective solution is not yet proposed at present.
The content of the invention
To solve the problems of above-mentioned prior art, the present invention propose a kind of modular method of open platform and
Device, realize module Dynamical Deployment and dynamic offloading, there is provided module storehouse management and Version Control, realize service heat renewal, drop
The low exploitation degree of coupling.
The present invention adopts the following technical scheme that:A kind of open platform modular method, including:
Console is disposed and installed to module based on node mode, is read for website end;
When starting module, current block is registered in module resource manager by console;
The multi version for realizing module using module warehouse stores, and same Version module may operate at different nodes.
Preferably, this method also includes:When stopping modular, the module resource manager by module resource from open platform
Middle removal.
Preferably, the deployment and installation steps further comprise that module uploads, module parsing and module metadata store,
Wherein, module resource manager is uniformly showed and managed by database with open platform website end data,
Upload on the node specified and load and instantiate corresponding jar file, parse the API descriptive metadatas of the jar file
Into database, website shows corresponding API documents by the API of reading database.
Preferably, this method also includes:
When Unload module, module is removed from the module resource manager of open platform, and slave module explorer
Module resource corresponding to middle removal.
Preferably, the step of starting module further comprises:
To be asked in response to user, specified module example is loaded into current block explorer by console, and
API states are updated during startup, by reading database, website shows API documents,
Wherein, the storage class ServiceMethodBean of module is explained into the entrance class as unified modules, it has been pacified
The resource and classLoader of dress are switched in current Classloader, and are registered in module resource manager, for adding
The resource for the module that will start is carried, the module of startup is found by agency.
Preferably, during Resource orientation, determined using the method name of calling and the combination of version number unique
Interface service.
Preferably, the step of stopping modular further comprises:
To be asked in response to user, console removes specified module instance from current resource managers, and real-time
API states are updated, by reading database, website shows API documents, the module resource pipe by the resource of module from open platform
Removed in reason device, open platform is ignored as the module of all stoppings, and the request of entrance will be unable to handle, open platform front end website
Corresponding API documents and description are marked as pause and used.
Preferably, the step of Unload module further comprises:
Module resource corresponding to being removed in console slave module explorer, while the entity jar file of the module
It will remove, API documents corresponding to the website of open platform front end, in old version, while website does not show that the API correlations are retouched
State.
Preferably, in module multi version storage, using maven storage catalogue structure, module warehouse is controlling
It is managed collectively on platform, all modules, which are deployed to, must upload on module warehouse, uniformly distribute and be deployed to corresponding
Node.
According to another aspect of the present invention, there is provided a kind of open platform modular unit, including:
Installation unit, for module to be disposed and installed based on node mode, read for website end;
Start unit, for current block to be registered in module resource manager to start the module;
Module warehouse unit, for realize module multi version store, wherein same Version module may operate at it is different
Node;
Stop element, for module resource to be removed from the module resource manager of open platform, to stop the module;
Unloading unit, for module to be removed from the module resource manager of open platform, and slave module explorer
Module resource corresponding to middle removal;
Wherein, described device use to be called method name and the combination of version number determine unique resource.
Compared to prior art, technical scheme has advantages below:
Dynamical Deployment of the module in platform is simpler, and operation is controllable, and Development of Module reduces coupling, and module renewal is realized
Heat deployment is controlled, and multimode version is coexisted, and by warehouse and Version Control, module upgrade risk is reduced into minimum, and
The module of different old versions can be compared to each other, and module interface, which accesses, realizes that dynamic is controllable, can be directed to module and carry out method level control
System, which starts, to be stopped.
Brief description of the drawings
Fig. 1 is the flow chart of open platform modular method according to embodiments of the present invention.
Fig. 2 is the flow chart of module installation process according to embodiments of the present invention.
Fig. 3 is the flow chart of module start-up course according to embodiments of the present invention.
Fig. 4 is the flow chart of module stopped process according to embodiments of the present invention.
Fig. 5 is the flow chart of module uninstall process according to embodiments of the present invention.
Fig. 6 is that schematic diagram coexists in module multi version according to embodiments of the present invention.
Fig. 7 is the flow chart of module multi version management according to embodiments of the present invention.
Fig. 8 is the flow chart of class load mechanism according to embodiments of the present invention.
Fig. 9 is the lookup flow chart of module class according to embodiments of the present invention.
Figure 10 is module life period schematic diagram according to embodiments of the present invention.
Embodiment
Various ways can be used for(Including being embodied as process;Device;System;Material composition;In computer-readable storage medium
The computer program product included in matter;And/or processor(Such as following processor, the processor are configured to perform in coupling
Instruction that is being stored on the memory of processor and/or being provided by the memory is provided))Implement the present invention.In this manual,
Any other form that these are implemented or the present invention can use is properly termed as technology.In general, can be the present invention's
In the range of change disclosed in process the step of order.Unless otherwise expressing, it is described as being configured to the part of execution task(Such as
Processor or memory)It may be embodied as by provisional configuration into the general part that the task is performed in preset time or made
Cause to perform the specific part of the task.
Retouching in detail to one or more embodiment of the invention is hereafter provided together with the accompanying drawing for illustrating the principle of the invention
State.The present invention is described with reference to such embodiment, but the invention is not restricted to any embodiment.The scope of the present invention is only by right
Claim limits, and the present invention covers many replacements, modification and equivalent.Illustrate in the following description many details with
Thorough understanding of the present invention is just provided.These details are provided for exemplary purposes, and without in these details
Some or all details can also realize the present invention according to claims.
Fig. 1 is the flow chart of open platform modular method according to embodiments of the present invention.Method bag provided by the invention
Include:
1st, console is disposed and installed to module, is read for website end.
Module is disposed and installation, and module is installed by the deployment of console, including module uploads, module parses and module member
Data storage.And uniformly show and manage with open platform website end data.
Fig. 2 is the flow chart of module installation process according to embodiments of the present invention.As shown in Fig. 2 asking in response to user
Ask, API is distributed in database by governor to specifying node to dispose.Website is shown by the API of reading database
Show corresponding API documents.
According to the further preferred embodiment of the present invention, deployment module is uploaded on the Node specified by Governor
And load and instantiate the jar, and the API descriptive metadatas for parsing the jar file are now labeled as into database
Installation, website is not shown.
2nd, when starting module, current block is registered in module resource manager.
Fig. 3 is the flow chart of module start-up course according to embodiments of the present invention.As shown in figure 3, asked in response to user,
Specified module example is loaded into current block explorer by Governor, and updates API states on startup.Pass through
Reading database, website show API documents.
In the preferred embodiment of the invention, the storage class ServiceMethodBean of module is explained as unified mould
The entrance class of block, its mounted resource and classLoader are switched in current Classloader, and are registered to module
It is used for the resource for loading the module that will start in explorer.The module of startup is so found by acting on behalf of can.Mesh
It is preceding to determine unique interface service using the method name called and the combination of version number.
3rd, the multi version for realizing module using module warehouse stores.
Module warehouse is used for the target directory of memory module.Fig. 6 is that module multi version according to embodiments of the present invention coexists
Schematic diagram.As shown in figure 5, in the preferred embodiment of the invention, the structural reference maven of catalogue storage organization, based on mould
Multi version storage management under block title.
Fig. 7 is the flow chart of module multi version management according to embodiments of the present invention.As shown in fig. 7, module warehouse exists
It is managed collectively on Governor.All modules, which are deployed to, must upload on module warehouse, uniformly distribute and be deployed to
Corresponding node.
According to a further embodiment of the invention, when stopping modular, the module resource by module resource from open platform
Removed in memory.
Fig. 4 is the flow chart of module stopped process according to embodiments of the present invention.As shown in figure 4, asked in response to user,
Governor removes specified module instance from current resource managers, and in real-time update API states.By reading number
According to storehouse, website shows API documents.The resource of module is removed from the module resource manager of open platform, it is so open flat
Platform can ignores the module of all stoppings, and the request of entrance will be unable to handle.API corresponding to the website of open platform front end simultaneously
Document and description all in labeled as " pause use " prompting.
According to a further embodiment of the invention, when Unload module, the module resource management by module from open platform
Device removes, and module resource corresponding to removal in slave module explorer.
Fig. 5 is the flow chart of module uninstall process according to embodiments of the present invention.As shown in figure 5, asked in response to user,
Governor removed in slave module explorer corresponding to module resource when, the entity jar file of the module will also remove.
API documents corresponding to the website of open platform front end will also be in old version simultaneously, while website does not show that the API correlations are retouched
State.
It is the further preferred embodiment of the module class loading of the present invention below, for realizing the mistake of module class loading
Journey.The most important is exactly to possess the classloader mechanism of independent separate and be able to ensure Module in class load mechanism
Closure, the classloader of OSGI frameworks collectively constitutes by System Classloader, Bundle Classloader.
Each Bundle possesses independent Classloader.Bundle of the present invention class load mechanism is as shown in Figure 8.
The lookup of module class can be by following steps, referring to Fig. 9 flow chart:
Step A:If desired for the class for java.* of loading, then Parent Classloader are directly delegated to, are such as existed
Corresponding class is have found in parent Classloader, then is directly returned, does not find such as, then dishes out
NoClassDefFoundException is abnormal.
Step B:As loading be not java.* class, then judge loading class whether belong in boot delegation
The scope of configuration, step C is entered if being not belonging to, as belonged to, continue to be delegated to Parent Classloader, such as exist
Then directly return is found in Parent Classloader, is not found such as, then into step C.
Step C:The class such as belonged in Bundle Import package, then give export package Bundle
Classloader loaded, such as loading failure, then directly dish out NoClassDefFoundException, such as loading into
Work(then directly returns.
Step D:The class being such as not belonging in Bundle Import package, then search for and whether belong to Require
Export package class in Bundles, as belonged to, transfer to export package Bundle Classloader
Loaded, directly returned if loading successfully, enter step E if loading failure.
Step E:Search needs in Bundle classpath (being exactly in the path that Bundle-Classpath is configured)
The class to be loaded, such as load successfully, then directly return, step F is gone successively to if loading failure.
Step F:Search for Fragment Bundle (being configured referring to Fragment-Host) classpath, such as loading into
Work(, then directly return, step G is gone successively to if loading failure.
Step G:Judge whether the package for belonging to export, as belonged to, directly dish out
NoClassDefFoundException, step H is entered if being not belonging to.
Step H:Judge whether the package for belonging to DynamicImport, as being not belonging to, directly dish out
NoClassDefFoundException, the ClassLoader of the Bundle if belonging to using export package are carried out
Loading, directly returned if loading successfully, dish out NoClassDefFoundException if loading failure.
For the resource file in Bundle, can be used bundle.getResource, bundle.getEntry or
Bundle.findEntries is obtained, and return is an object that can be converted into java.net.URL, can by URL
Corresponding resource file is loaded into, is needed if the resource file that get other Bundle by setting Require-
Bundle mode can just obtain, and Require-Bundle also can be considered a kind of mode for realizing that resource file is shared.
Module life period schematic diagram shown in Figure 10, another aspect of the present invention provide a kind of module that corresponds to and given birth to
Order the device in cycle.Including with lower unit:
Installation unit, for module to be disposed and installed based on node mode, read for website end;
Start unit, for current block to be registered in module resource manager to start the module;
Module warehouse unit, for realize module multi version store, wherein same Version module may operate at it is different
Node;
Stop element, for module resource to be removed from the module resource manager of open platform, to stop the module;
Unloading unit, for module to be removed from the module resource manager of open platform, and slave module explorer
Module resource corresponding to middle removal;
Wherein, described device use to be called method name and the combination of version number determine unique resource.
In summary, open platform modular method proposed by the present invention and device, realize module heat deployment and thermal control
System, multimode version coexists and resource isolation, and modular approach level control running status, the operation of Dynamic control module method is opened
It is dynamic, and rollback control.
Obviously, can be with general it should be appreciated by those skilled in the art, above-mentioned each module of the invention or each step
Computing system realize that they can be concentrated in single computing system, or be distributed in multiple computing systems and formed
Network on, alternatively, they can be realized with the program code that computing system can perform, it is thus possible to they are stored
Performed within the storage system by computing system.So, the present invention is not restricted to any specific hardware and software combination.
It should be appreciated that the above-mentioned embodiment of the present invention is used only for exemplary illustration or explains the present invention's
Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any
Modification, equivalent substitution, improvement etc., should be included in the scope of the protection.In addition, appended claims purport of the present invention
Covering the whole changes fallen into scope and border or this scope and the equivalents on border and repairing
Change example.
Claims (9)
- A kind of 1. open platform modular method, it is characterised in that including:Console is disposed and installed to module based on node mode, is read for website end;When starting module, current block is registered in module resource manager by console;The multi version for realizing module using module warehouse stores, and same Version module may operate at different nodes;Deployment and installation further comprise that module uploads, module parsing and module metadata store, wherein, module resource manager Uniformly showed and managed by database with open platform website end data, upload on the node specified and load and Corresponding jar file is instantiated, parses the API descriptive metadatas of the jar file into database, website passes through reading database API show corresponding API documents.
- 2. according to the method for claim 1, it is characterised in that this method also includes:When stopping modular, module resource is removed from the module resource manager of open platform.
- 3. according to the method for claim 1, it is characterised in that this method also includes:When Unload module, module is removed from the module resource manager of open platform, and is moved in slave module explorer Except corresponding module resource.
- 4. according to the method for claim 1, it is characterised in that further comprise the step of the starting module:Asked in response to user, specified module instance is loaded into current block explorer by console, and is being started Shi Gengxin API states, by reading database, website shows API documents,Wherein, the storage class ServiceMethodBean of module is explained into the entrance class as unified modules, its is mounted Resource and classLoader are switched in current Classloader, and are registered in module resource manager, will for loading The resource for the module to be started, the module of startup is found by agency.
- 5. according to the method for claim 4, it is characterised in that during Resource orientation, use the method name of calling Combination with version number determines unique interface service.
- 6. according to the method for claim 2, it is characterised in that further comprise the step of the stopping modular:To be asked in response to user, console removes specified module instance from current resource managers, and in real-time update API states, by reading database, website shows API documents, the module resource manager by the resource of module from open platform Middle removal, open platform are ignored as the module of all stoppings, and the request of entrance will be unable to handle, and open platform front end website is corresponding API documents and description be marked as pause use.
- 7. according to the method for claim 3, it is characterised in that further comprise the step of the Unload module:Module resource corresponding to being removed in console slave module explorer, while the entity jar file of the module will also move Remove, API documents corresponding to the website of open platform front end, in old version, while website does not show the API associated descriptions.
- 8. according to the method for claim 1, it is characterised in that in module multi version storage, using depositing for maven Bibliographic structure is stored up, module warehouse is managed collectively on console, and all modules, which are deployed to, must upload to module warehouse On, uniformly distribute and be deployed to corresponding node.
- A kind of 9. open platform modular unit, it is characterised in that including:Installation unit, for module to be disposed and installed based on node mode, read for website end;Start unit, for current block to be registered in module resource manager to start the module;Module warehouse unit, for realizing that the multi version of module stores, wherein same Version module may operate at different nodes;Stop element, for module resource to be removed from the module resource manager of open platform, to stop the module;Unloading unit, for module to be removed from the module resource manager of open platform, and moved in slave module explorer Except corresponding module resource;Deployment and installation further comprise that module uploads, module parsing and module metadata store, wherein, module resource manager Uniformly showed and managed by database with open platform website end data, upload on the node specified and load and Corresponding jar file is instantiated, parses the API descriptive metadatas of the jar file into database, website passes through reading database API show corresponding API documents;Wherein, described device use to be called method name and the combination of version number determine unique resource.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410161868.XA CN103984567B (en) | 2014-04-22 | 2014-04-22 | The modular method and apparatus of open platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410161868.XA CN103984567B (en) | 2014-04-22 | 2014-04-22 | The modular method and apparatus of open platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103984567A CN103984567A (en) | 2014-08-13 |
CN103984567B true CN103984567B (en) | 2017-12-26 |
Family
ID=51276560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410161868.XA Active CN103984567B (en) | 2014-04-22 | 2014-04-22 | The modular method and apparatus of open platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103984567B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677302B (en) * | 2014-11-17 | 2019-04-12 | 阿里巴巴集团控股有限公司 | A kind of application program module melts forwarding method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101494657A (en) * | 2008-01-24 | 2009-07-29 | 纬创资通股份有限公司 | Method and system for automatic arrangement program control |
CN102253832A (en) * | 2011-06-24 | 2011-11-23 | 上海北大方正科技电脑系统有限公司 | Method and system for monitoring versions of function modules by using server application program |
CN102262556A (en) * | 2011-09-08 | 2011-11-30 | 山东中创软件工程股份有限公司 | Method and system for configuring service information |
CN103294455A (en) * | 2012-02-27 | 2013-09-11 | 杭州勒卡斯广告策划有限公司 | Software service implementation method and system, as well as Java platform |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8601462B2 (en) * | 2010-06-17 | 2013-12-03 | International Business Machines Corporation | Modifying a multi-module application |
-
2014
- 2014-04-22 CN CN201410161868.XA patent/CN103984567B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101494657A (en) * | 2008-01-24 | 2009-07-29 | 纬创资通股份有限公司 | Method and system for automatic arrangement program control |
CN102253832A (en) * | 2011-06-24 | 2011-11-23 | 上海北大方正科技电脑系统有限公司 | Method and system for monitoring versions of function modules by using server application program |
CN102262556A (en) * | 2011-09-08 | 2011-11-30 | 山东中创软件工程股份有限公司 | Method and system for configuring service information |
CN103294455A (en) * | 2012-02-27 | 2013-09-11 | 杭州勒卡斯广告策划有限公司 | Software service implementation method and system, as well as Java platform |
Non-Patent Citations (1)
Title |
---|
http://www.ibm.com/developerworks/cn/webservices/ws-OSGi/;nalla;《http://www.ibm.com/developerworks/cn/webservices/ws-OSGi/》;20100329;第1页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103984567A (en) | 2014-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2417416C2 (en) | Solution deployment in server farm | |
CN103034523B (en) | The method and system of maintenance for the model-driven of virtual unit | |
US9311199B2 (en) | Replaying jobs at a secondary location of a service | |
US10216514B2 (en) | Identification of a component for upgrade | |
US9075661B2 (en) | Placing objects on hosts using hard and soft constraints | |
JP6217034B2 (en) | Related plug-in management method, apparatus and system | |
US20120102480A1 (en) | High availability of machines during patching | |
CN103810001B (en) | For the method and system to deployment virtual unit in data handling system | |
US8751656B2 (en) | Machine manager for deploying and managing machines | |
US20110296404A1 (en) | Systems and methods for host-level distributed scheduling in a distributed environment | |
US7886270B2 (en) | Methods, systems, and computer program products for file version control management | |
WO2012054185A1 (en) | Dynamically splitting multi-tenant databases | |
CN102737088A (en) | Seamless upgrades in distributed database system | |
CN105024839B (en) | A kind of method and device of software release upgrade | |
CN105653329A (en) | Application management method, apparatus and system | |
CN108369544A (en) | The server delayed in computing system restores | |
WO2004079525A2 (en) | System and method for single transparent deployment flow | |
EP3535955B1 (en) | Systems, devices and methods for managing file system replication | |
EP3185474B1 (en) | Distributed database for network functions | |
US20120102484A1 (en) | Installing software remotely using a high privilege process | |
US20220385532A1 (en) | Adding host systems to existing containerized clusters | |
US10152265B1 (en) | Efficient repository migration and storage | |
CN103984567B (en) | The modular method and apparatus of open platform | |
JP5037545B2 (en) | Information processing system and control program | |
CN109218259A (en) | License management method and device, APPLM functional entity and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |