Summary of the invention
Purpose to realize the present invention, is achieved using following technical scheme:
A kind of information system quickly opens up method, comprising the following steps:
(1) it creates one and opens up task, the selected source opened up and destination;
(2) service unit of required by task is opened up from source selection;
(3) according to the service unit selected in step (2) search for automatically service unit that the service unit is relied on andData cell generates task set meal;
(4) by task set meal service unit and data cell destination is parallel to migrate to by source.
The method, in which: step (2) includes providing the service list of source, and selection opens up the service of required by taskUnit.
The method, in which: the step (3) specifically: according to the service unit selected in step (2), from sourceMetadata storage assembly in information in search for the service unit and data cell that these service units are relied on automatically, generateTask set meal.
The method, in which: the parallel migration in the step (4) carries out as follows: for each serviceUnit and data unit starting one or more thread, to complete the migration of the service unit or data cell.
The method, in which: before step (1), further include the steps that creating service unit and data cell.
The method, in which: creation service unit and data cell include: for each service unit define one it is rightAs including multiple member variables, including Service name, service type, Service Instance storage location, Service Instance mirror in this objectThe subsystem as belonging to name, service a, so that Service Instance is abstracted into a service unit;For the definition of each data cellOne object includes multiple member variables, including data name, data category, data instance storage location, data in this objectAffiliated subsystem a, so that data instance is abstracted into a data cell.
The method, in which: further include the version information of service in the object of service unit.
The method, in which: the information in metadata storage assembly includes: the clothes that (1) service to be migrated is relied onThe information of business, Service name, service type, service memory position including the service relied on;(2) service to be migrated is relied onData unit information, data cell name, data unit type including the data cell relied on, data cell store positionIt sets.
The method, in which: the information in metadata storage assembly further includes the version information of service.
The method, in which: according to the service unit selected in step (2), from the metadata storage assembly of sourceInformation in search for the service unit and data cell that these service units are relied on automatically, form service unit and data cellBetween dependence forest map, if duplicate removal simultaneously generates task queue there are duplicate service unit or data cell in forest map,Store in queue migration in need service unit and data cell, that is, complete task set meal generation.
The method, in which: service unit and data cell are parallel to migrate to destination by source in step (4) and adoptedIt is carried out with the mode of breakpoint transmission.
The method, in which: the mode of the breakpoint transmission includes:
Migration units record the transmission progress of every thread in transmission process, and transmission log is stored in metadata storageIn component;Migration units first read data storage component before transmission starts every time, and whether inquiry has unfinished record, ifIt continues to transmit, if creating new record without and if be stored in metadata storage assembly;Predetermined number is being transferred every timeAfter the data of amount, migration units update transmission progress in data storage component;Migration units after every thread is transmittedDelete relevant transmission log in metadata storage assembly.
The method, in which: when opening up the service unit of required by task from source selection in step (2), if from sourceIt holds selected service unit to exist in destination, then obtains the version information of the service from purpose metadata storage assembly,And compared with the version information of the service of destination, prompt user version information comparison as a result, and prompting to use on opening up interfaceWhether family will also choose the service unit.
The method, in which: step (3) when searching the service unit that the selected service unit is relied on,If the service unit of the dependence exists in destination, the version letter of the service is obtained from purpose metadata storage assemblyBreath, and compared with the version information of the service of destination, and do not issue the user with prompt, but comparison result deposit source is firstIn data storage component.
The method, in which: by task set meal service unit and data cell purpose is parallel to migrate to by sourceBefore end, first the already present service unit of destination is backed up, the process of backup is that the example of service unit is first stopped clothesBusiness, the corresponding mirror image of example or installation directory are separately deposited, and can just start the process of source service unit migration after backing up successfully;For data cell, equally first the data cell of destination is backed up, the process of backup is by the corresponding data mesh of data cellRecord or table are separately deposited, and can just start the process of source data cell migration after the completion of backup.
The method issues the user with if destination has the service unit being migrated and whether migrates the serviceThe information of unit, if user's selection continues to migrate, migration units are by the services migrating to destination, if user's selection is putThe migration of the service unit is abandoned, then no longer migrates the service unit.
A kind of information system quickly opens up system, including opens up start unit, service selecting unit, task generation unitAnd migration units.
The system, in which: start unit, which is opened up, for creating one opens up task, the selected source and purpose opened upEnd, and call service selecting unit;Service selecting unit is used to provide service list, service column according to the metadata information of sourceTable includes all service names of source, chooses the service unit for needing to open up for application side;
Task generation unit is used for the service unit chosen according to application side, searches for the service list that the service unit is relied onMember and data cell, ultimately generate a task set meal, call migration units after application side starts unlatching task;Migration unitsFor being opened up to service and data.
The system, in which: when migration units open up service and data, read contain service unit firstWith the task queue of data cell, migrated for each service unit and data unit starting one even more than thread completionJourney carries out parallel migration.
The system, in which: service selecting unit is also used to create service unit and data cell, comprising: (1) be everyA service unit defines an object, includes multiple member variables in this object, including Service name, service type, service are in factExample storage location, Service Instance mirror image name, subsystem belonging to service, so that a Service Instance is abstracted into a service singlyMember;(2) object is defined for each data cell, includes multiple member variables, including data name, data class in this objectNot, data instance storage location, subsystem belonging to data, so that a data instance is abstracted into a data cell.
The system, in which: further include the version information of service in the object of service unit.
The system, in which: the information in metadata storage assembly includes: the clothes that (1) service to be migrated is relied onThe information of business, Service name, service type, service memory position including the service relied on;(2) service to be migrated is relied onData unit information, data cell name, data unit type including the data cell relied on, data cell store positionIt sets.
The system, in which: the information in metadata storage assembly further includes the version information of service.
The system, in which: migration units open up by the way of breakpoint transmission service and data, described disconnectedPutting the mode resumed includes:
Migration units record the transmission progress of every thread in transmission process, and transmission log is stored in metadata storageIn component;Migration units first read data storage component before transmission starts every time, and whether inquiry has unfinished record, ifIt continues to transmit, if creating new record without and if be stored in metadata storage assembly;Predetermined number is being transferred every timeAfter the data of amount, migration units update transmission progress in data storage component;Migration units after every thread is transmittedDelete relevant transmission log in metadata storage assembly.
The system, in which: when opening up the service unit of required by task from source selection, if selected from sourceService unit exists in destination, then service selecting unit obtains the version letter of the service from purpose metadata storage assemblyBreath, and compared with the version information of the service of destination, prompt user version information comparison as a result, and prompting on opening up interfaceWhether user will also choose the service unit.
The system, in which: task generation unit is in the service list for searching the selected service unit and being relied onWhen first, if the service unit of the dependence exists in destination, the version of the service is obtained from purpose metadata storage assemblyThis information, and compared with the version information of the service of destination, and do not issue the user with prompt, but comparison result is stored in sourceIn metadata storage assembly.
The system, in which: migration units by task set meal service unit and data cell moved parallel by sourceBefore moving on to destination, first the already present service unit of destination is backed up, the process of backup is first by the reality of service unitExample stops service, and the corresponding mirror image of example or installation directory are separately deposited, can just start source service unit after backing up successfully and moveThe process of shifting;For data cell, equally first the data cell of destination is backed up, the process of backup is that data cell is correspondingData directory or table separately deposit, backup after the completion of can just start source data cell migration process.
The system, if destination has the service unit being migrated, migration units issue the user with whether moveMove the information of the service unit, if user selection continue to migrate, migration units by the services migrating to destination, if withFamily selects to abandon the migration of the service unit, then no longer migrates the service unit.
Specific embodiment
Below in conjunction with attached drawing 1-3, by embodiment, invention is further described in detail:
In Fig. 1, service unit refers to: in information system, independently can externally provide information exchange, data processing, streamThe application service of amount forwarding is referred to as service unit, and entity can be the image file that encapsulation is completed in cloud platform, can also be withIt is the installation directory of service;Data cell refers to: in information system, being referred to as by the relied on data acquisition system of a certain service and countsAccording to unit, a data cell may include other data cells, but cannot rely on other data cells.Its entity can beA catalogue in file system is also possible to mesh corresponding to the library table in database including the file and catalogue under catalogueRecord and file.For the present invention by that will service with data abstraction to construct service unit and data cell, as each service is singleMember defines an object, includes multiple member variables in this object, including Service name, service type, Service Instance store positionIt sets, Service Instance mirror image name, subsystem belonging to service etc., preferably further includes the version information of service, retouching in this wayIt states mode and one Service Instance is abstracted into a service unit.An object is defined for each data cell, in this objectPass through including multiple member variables including subsystem belonging to data name, data category, data instance storage location, data etc.One data instance is abstracted into a data cell by such describing mode.
In information system, service A services B to rely on, then in the metadata storage assembly of service A, service A can beIts information registering for relying on service B is entered, and main includes Service name, service type, service memory position, the version letter of service BBreath etc., this process is known as registration service unit;In information system, service A is to rely on data cell A, then service A'sIn metadata storage assembly, service A can enter its information registering for relying on data cell A, and main includes the number of data cell AAccording to unit name, data unit type, data cell storage location etc., this process is referred to as log-on data unit;Above-mentioned metadataStorage assembly refer to can persistence high-performance storage software (module), such storage assembly usually stores data in memoryTo reach the high-performance of read-write, while it can also be according to certain rule, such asIt stores Deng by the data in memory into disk, completes data persistence, guarantee that data are not lost, which is used for storage serviceAll metadata informations of unit and data cell.
Opening up is can have source and destination for opening up for information system, the direction opened up be from source toDestination.Source and destination are equipped with basic platform in advance, and so-called basic platform just refers to the flat of the various information systems of carryingPlatform, now mostly cloud platform;The system that information system refers to each application service composition operated in cloud platform.So opening up justIt is the process for reappearing the information system in source cloud platform in destination cloud platform.
When opening up demand, is quickly opened up in source according to demand using side and select corresponding service single on the system pageMember, system can search for automatically the service unit and data that these service units are relied on according to the information in metadata storage assemblyUnit.As shown in Figure 1, may eventually form the dependence forest map between service unit and data cell, if there is weight in forest mapMultiple service unit or data cell, system automatic duplicate removal and can generate task queue, store that institute is in need to be moved in queueThe service unit and data cell of shifting complete the generation of task set meal.The task set meal refers to: a big information systemIt can be made of the data of many service and supporting, after service and data are abstracted as service unit and data cell, answerIt can according to need with side and freely combine necessary service unit and data cell, combined result is referred to as task set meal.After the confirmation of application side, system starting opens up process, and the process of opening up, which can read, contains the task of service unit and data cellQueue, by migration in need service unit and data cell between dependence be all clearly, it is possible to beEach service unit and data unit starting one complete transition process even more than thread, can make the process of migration in this wayParallelization.For service unit, needs to be copied to its image file according to the information stored in metadata storage assembly and open upThe designated storage location of rear platform (destination), and be loaded into specified mirror image warehouse, or service catalogue is copied to and is opened upThe correspondence original platform of rear platform storage location (such as service catalogue the storage location of source be C: TRUS, then in destinationStorage location be also C: TRUS);For data cell, need to be counted according to the information stored in metadata storage assemblyThe designated storage location of specified platform (destination) is copied to according to catalogue.Due to being parallel migration, so allowing in network bandwidthUnder conditions of, it is faster for entirely opening up process.If but encountering that network bandwidth is lower or even network environment deteriorates into transmitThe case where data, this system still support breakpoint transmission.The understanding of breakpoint transmission can be divided into two parts: a part is breakpoint, onePart is to resume.The origin of breakpoint is a file to be divided into multiple portions, while carrying out multiple portions in transmission processTransmission together, when some time point, task is suspended, and the position for transmitting pause at this time is exactly breakpoint.Resume is exactly when oneWhen a unfinished transformation task starts again at, it can be transmitted from the breakpoint succession of last time.The process of breakpoint transmission of the present invention is as follows:1. migration units record the transmission progress of every thread in transmission process, transmission log is stored in metadata storage assembly;2. migration units first read data storage component before transmission starts every time, whether inquiry has unfinished record, continues toTransmission does not create new record insertion database then;3. migration units are in data after the data for transferring predetermined quantity every timeTransmission progress is updated in storage assembly;4. migration units delete the transmission log in metadata storage assembly after being transmitted.Finally, in the case where network stabilization, new information system can be opened up onto specified platform, and can guarantee clothes thereinBusiness and data can be known as opening up, i.e., are successfully copied to information system from a platform by complete migration past, this migrationProcess on another platform, which is referred to as, to be opened up.And since the present invention provides the functions of breakpoint transmission, even if migratingNetwork interruption occurs in the process, can also complete all to service the migration with data after network recovery.
Fig. 2 is the flow chart that the present invention opens up method, specific as follows in conjunction with attached drawing 3:
The system that quickly opens up of information system of the present invention includes opening up start unit, service selecting unit, task to generate listMember, migration units.
A) application side opens up task by opening up start unit newly-built one, and the selected source opened up and destination open upStart unit calls service selecting unit;
B) service selecting unit provides service list according to the metadata information of source, and service list includes that source is allService name chooses the service unit for needing to open up using side;
C) service unit that task generation unit is chosen according to application side searches for the service unit that the service unit is relied onAnd data cell, ultimately generate a task set meal, it is preferred that include service unit and data sheet to be migrated in the set mealThe task queue of member;
D) application side confirms that the task set meal is errorless;
E) starting of application side opens up task, and task generation unit calls migration units, and migration units start and complete to serviceWith opening up parallel for data, service and data are copied to destination predetermined storage location;
F) information system of task based access control set meal opens up success.
The above-mentioned process that opens up assumes that the case where being migrated service is not present in destination, is moved if target side has existedThe service of shifting then needs first to carry out the version checking of destination service unit at the beginning of opening up task.Quickly opening up systemTask interface is opened up, after user has chosen required service unit, system is quickly opened up and can read purpose metadata automatically and depositComponent is stored up, judges that these whether there is from the selected service unit of source in destination, if it is present from purpose end member numberThe version information of the service is obtained according to storage assembly, and is compared with the version information of the service unit of destination, and interface is being opened upUpper prompt user version information comparison is as a result, and prompt the user whether also to choose the service unit.Furthermore for selected by userThe service unit that is relied on of service unit, above-mentioned comparison process can equally be completed by quickly opening up system, but not be sent out to userIt prompts out, but comparison result is stored in this metadata storage assembly.After user's confirmation, starting opens up process.MigrationUnit can first back up the already present service unit of destination when opening up, and the process of backup is first by service unitExample stops service, and the corresponding mirror image of example or installation directory are separately deposited, can just start source service unit after backing up successfullyThe process of migration.For data cell, also need first to back up the data cell of destination, the process of backup is by data sheetThe corresponding data directory of member or table are separately deposited, and can just start the process of source data cell migration after the completion of backup.It is specific laterIt is identical as above-mentioned migration process to migrate process.If the service unit being migrated is not present in destination, directly carry out subsequentProcess, no longer progress version information acquisition compare and etc..If destination has the service unit being migrated, migrateUnit issues the user with the information for whether migrating the service unit, if user's selection continues to migrate, migration units are by the clothesBusiness is migrated to destination, if the migration of the service unit is abandoned in user's selection, migration units no longer migrate the service unit,And continue the migration of other service units.
The present invention, which can be such that information system opens up, becomes very easy, efficient, reliable, only needs using side in visualization pageClicking operation is completed on face can be completed the migration of an information system, without taking great energy consideration requires which clothes migrated againWhether business and data can be used without system after worrying migration, less inaccurate with worrying to estimate the time of migration.SpecialUnder application scenarios (such as military aspect), efficiency is improved, reliability is improved, has won the time.