CN105260193A - Self healing frame and healing method of large software - Google Patents

Self healing frame and healing method of large software Download PDF

Info

Publication number
CN105260193A
CN105260193A CN201510745681.9A CN201510745681A CN105260193A CN 105260193 A CN105260193 A CN 105260193A CN 201510745681 A CN201510745681 A CN 201510745681A CN 105260193 A CN105260193 A CN 105260193A
Authority
CN
China
Prior art keywords
module
healing
event
program
bytecode
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.)
Pending
Application number
CN201510745681.9A
Other languages
Chinese (zh)
Inventor
莫展鹏
杨松
季统凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201510745681.9A priority Critical patent/CN105260193A/en
Publication of CN105260193A publication Critical patent/CN105260193A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to the field of software development, in particular to a self healing frame and a healing method of large software. The frame comprises six parts; a monitoring module is used for obtaining a program operation state and generating monitoring data; a program analyzing module is used for receiving monitoring data from the monitoring module, judging whether a system normally operates or not through analyzing, and sending to an event forwarding module in an event form if a program goes wrong; a code healing strategy generator uses wrong positioning information diagnosed by the program analyzing module as input, interacts with the event forward module, obtains bytecode information currently processed from the information sent from the event forwarding module on one hand, and sends a healing strategy generated according to a generation rule to the event forwarding module in a form of a healing command; a bytecode amending module is used for the practical operation on amending a bytecode file; the event forwarding module is in charge of forwarding an event flow among the program analyzing module, the code healing strategy generation module and the bytecode amending module. The invention provides the self healing frame and method of the large software and can improve reliability of the software.

Description

A kind of large software self-healing framework and healing process
Technical field
The present invention relates to field of software development, refer to a kind of large software self-healing framework and healing process especially.
Background technology
Along with the improving constantly of complicacy of software, be especially applied in the large software of the key areas such as communication, finance, the high reliability of software more and more receives publicity.How to develop software systems with high reliability to become software engineering and develop the problem that must solve.
Self-healing system improves a kind of approach of software reliability.It combines method that is fault-tolerant and debug, operationally program is adjusted, complete the correction to mistake.At present, realizing self-healing software has two kinds of means, and a kind of is the built-in characteristic providing self-healing of program itself, realizes monitoring, analyzes, amendment code completes self-healing feature by software self.A kind of is realize the framework of a dynamic configuration and have the redundant component of identical function.Program is by completing the elimination to mistake at reloading software.
There is following drawback in said method:
1, software itself needs to gather and analysis monitoring data, and data volume is large, large to system performance loss.
2, thorough to the healing of software, if software causes collapse due to internal factor, so by after said method self-healing, mistake also may occur again.
3, applicability is not strong, and owing to needing to modify to monitored program, therefore the feature of large software complexity often causes it to implement.
Summary of the invention
One of technical matters that the present invention solves is to provide a kind of large software self-healing framework, effectively improves the reliability of large software.
The technical matters that the present invention solves two in the healing process providing a kind of large software self-healing framework, realize the self-healing of large software, improve the reliability of large software.
The technical scheme that the present invention one of solves the problems of the technologies described above is:
Described framework comprises as lower module:
Module 1, running environment;
Module 2, monitoring module;
Module 3, process analysis module;
Module 4, code healing policy generation module;
Module 5, bytecode modified module;
Module 6, Event Forwarding Module;
Described running environment is the software environment of actual executive routine;
Monitoring module obtains the state of program operation and generates monitoring data;
Process analysis module receives from the monitoring data of monitoring module, by the parsing to monitoring data, obtains by judgment rule analysis the result whether system normally run; If program is made mistakes, process analysis module provides location of mistake information, and sends to Event Forwarding Module with the form of event;
Code healing policy generation module is made up of create-rule and code healing strategy generator, the location of mistake information that process analysis modular diagnostic goes out by code healing policy generation module is as input, mutual with Event Forwarding Module, the bytecode information that the acquisition of information sended over from Event Forwarding Module on the one hand is processing at present, again the healing strategy generated according to create-rule is sent to Event Forwarding Module with the form of instruction of healing on the other hand, be converted to the flow of event information of bytecode modified module identification by Event Forwarding Module;
Bytecode modified module is used for the amendment of practical operation to byte code files; Event Forwarding Module is responsible for forwarding flow of event between process analysis module, code healing policy generation module, bytecode modified module.
Described running environment has the characteristic of dynamic load, by Classloader dynamic load class file, completes link, and after initialization, program is able to normal operation.
Described monitoring module is observed it by the program outside running environment, obtains the state of the big software program operation run in running environment.The present invention observes all aspects that program is run.In " attribute and method " description document, The present invention gives program behavior and state that framework pays close attention to.
The present invention solve the problems of the technologies described above two technical scheme be:
Described method is carried out according to following workflow:
Step 1: monitoring module registers the method and attribute that will monitor, realizes selectively monitoring working procedure; Monitoring module is sent to process analysis module the monitor data produced;
Step 2: process analysis module receives from the monitor data of monitoring module, by the explanation to monitor data, analyzes us by means of judgment rule and can obtain the result whether system normally run; If program is made mistakes, process analysis module provides location of mistake information, and sends to code healing policy generation module with the form of event, registers on Event Forwarding Module simultaneously;
Step 3: code healing policy generation module generates relevant healing instruction according to create-rule, and sends to Event Forwarding Module, converts flow of event to be forwarded to bytecode modified module again by Event Forwarding Module;
Step 4: bytecode modified module is modified to byte code files;
Step 5: amended byte code files is re-started load and run.
Described bytecode modified module comprises demoder and bytecode composer two parts, and it is as follows to the modify steps of byte code files:
Step 1: bytecode modified module scanning byte code files forms byte code stream, and by demoder, the information scanned is sent to outside with flow of event form;
Step 2: bytecode framework device receives the flow of event sended over, and is converted to byte code stream and is saved in class file.
Bytecode modified module can complete the amendment to byte code files by this two-way process.
Whether healthy run at present by described process analysis module determining program, the need of healing; The numerical value of the monitor data received and the judgment rule of setting compare by process analysis module, and divide into following three kinds of situations and process accordingly respectively:
1) health status: all data that monitoring module is reported and submitted, all within the scope of system restriction, at this moment represent that system is normally run, and does not need to carry out any change to program;
2) latent fault: the data message that monitoring module is reported and submitted violates some constraint of system, but program is still normally run; This represents not have initiator mistake to the violation of constraint, but can program caused to make mistakes, so system needs to enter self-healing program in the future based on to the violation of constraint;
3) erroneous condition: the information that monitoring module is reported and submitted has indicated system fault (such as, the exception of dishing out), at this moment program is in error condition, does not need, through just can decision procedure mistake to the judgement of program restriction, can enter self-healing program immediately;
Described judgment rule is the normal restraint scope of exponential quantity.
The beneficial effect of the present invention program is as follows:
1, method of the present invention is only monitored the attribute of specifying and method, and the data volume gathering and analyze is few, little to system performance loss;
2, the framework healing provided of the present invention is high, and mistake can not occur again;
3, method applied range of the present invention, does not need to modify to monitored program.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is the structural drawing of framework of the present invention;
Embodiment
The implementation of framework of the present invention has multiple, as shown in Figure 1, below adopts Java Virtual Machine technology and bytecode engineering relevant knowledge and instrument implementation framework.Java Virtual Machine has a lot of dynamic perfromance, is conducive to structure dynamic framework.
(1) running environment
The topmost task of running environment is the operation of responsible program, and provides the support to monitoring.
In this framework, adopt the combination of class file and Java Virtual Machine to form this part.For the operation of program, the mechanism of dynamic load that Java Virtual Machine is built-in.First program class file is loaded in Java Virtual Machine by Java Virtual Machine, then links, and link verification needs the class file of link, and then Java Virtual Machine carries out initialization to program, finally performs bytecode.
For the support of monitoring, primary not this kind of design of Java Virtual Machine.This function needs to realize outside Java Virtual Machine.Here use Java reflection first to find main () method, then call it with the command line parameter of expection.
The Classloader that above-mentioned employing Javassist provides.Javassist is a powerful driving code library performing bytecode operation.It allows developer freely in compiled class, to add new method, or revises existing method.
(2) monitoring module
Monitoring module needs to assign in running environment, for the operation of hook procedure, obtains the program operation information that framework is concerned about.
For realizing this module, adopting Javassist to tackle class loading procedure, depending on javassist.ClassPool class.This class can by the mode of title directly from the class that ClassPool request needs, and the Javassist obtaining such with the form of javassist.CtClass example represents.In addition, Javassist additionally provides javassist.Loader class form access ClassPool, and it uses ClassLoad as class data source.
In the code shown above, pattern can be obtained by the attribution method description document of analytical framework.This method can provide data for framing program analysis.
(3) process analysis module
Process analysis module, itself realizes is exactly judge by one group the proving program that statement forms, and the interpreter composition of an analysis constraint.In addition, also need to design a set of description to constraint and parsing.This realization adopts the description form of similar PQL.
The varLatency variable of above-mentioned constraint explanation in class ClassConnect is after acquisition current bandwidth, and bandwidth value can not be greater than maximum bandwidth value.
(4) code healing policy generation module
This realization provides the method for error handling processing in table form to code healing policy generation module.By inquiring about corresponding error message, directly error handling method can be obtained.Below list some information that this realizes form.The first row shows, if the maximal value of being delayed over, we can complete amendment by loading more server; If the second row display checkedOut value is true, we need to perform CheckIn () operation; The third line shows a node for time empty, and we need for this chained list storage allocation space, and this is used in when node has joined in a structure as chained list.
Mistake Disposal route
varLatency>MaxLatency ServerLoader();
checkedOut==true CheckIn();
pNode==NULL pNode=new Node;
(5) bytecode modified module
This realization adopts ASM correlation technique and instrument to realize this module.ASM adopts the technology based on flow of event to process bytecode, as processing XML in SAXAPI uses.Based under event flow model, a class is represented as a sequence of events, and each event represents an element in class.Such as its head, a field, the statement etc. of a method.API based on event defines the possible event of class and order that they occur.ASM provides an alanysis device and produces corresponding event to each element.Same, ASM also provides a class editing machine from a flow of event sequence to produce compiled class.
Based on this technology, self-healing framework is reflected in actual code by completing healing strategy to the intercepting and capturing of event and the registration of event.By an analyzer scanning class file, produce corresponding event.By judging whether to reach the code position that framework is paid close attention to the intercepting and capturing of event.By registering corresponding event to a class editing machine, event being converted to amendment to class is completed to the practical operation of class amendment.
(6) Event Forwarding Module
The Design Mode of the realization reference observer of this module.

Claims (7)

1. a large software self-healing framework, is characterized in that: described framework comprises as lower module:
Module 1, running environment;
Module 2, monitoring module;
Module 3, process analysis module;
Module 4, code healing policy generation module;
Module 5, bytecode modified module;
Module 6, Event Forwarding Module;
Described running environment is the software environment of actual executive routine;
Monitoring module obtains the state of program operation and generates monitoring data;
Process analysis module receives from the monitoring data of monitoring module, by the parsing to monitoring data, obtains by judgment rule analysis the result whether system normally run; If program is made mistakes, process analysis module provides location of mistake information, and sends to Event Forwarding Module with the form of event;
Code healing policy generation module is made up of create-rule and code healing strategy generator, the location of mistake information that process analysis modular diagnostic goes out by code healing policy generation module is as input, mutual with Event Forwarding Module, the bytecode information that the acquisition of information sended over from Event Forwarding Module on the one hand is processing at present, again the healing strategy generated according to create-rule is sent to Event Forwarding Module with the form of instruction of healing on the other hand, be converted to the flow of event information of bytecode modified module identification by Event Forwarding Module;
Bytecode modified module is used for the amendment of practical operation to byte code files; Event Forwarding Module is responsible for forwarding flow of event between process analysis module, code healing policy generation module, bytecode modified module.
2. large software self-healing framework according to claim 1, is characterized in that: described running environment its have the characteristic of dynamic load, by Classloader dynamic load class file, complete link, after initialization, program is able to normal operation.
3. large software self-healing framework according to claim 1, is characterized in that: described monitoring module is observed it by the program outside running environment, obtains the state of the big software program operation run in running environment.
4. large software self-healing framework according to claim 2, is characterized in that: described monitoring module is observed it by the program outside running environment, obtains the state of the big software program operation run in running environment.
5. a healing process for the large software self-healing framework described in any one of Claims 1-4, is characterized in that: described method is carried out according to following workflow:
Step 1: monitoring module registers the method and attribute that will monitor, realizes selectively monitoring working procedure; Monitoring module is sent to process analysis module the monitor data produced;
Step 2: process analysis module receives from the monitor data of monitoring module, by the explanation to monitor data, analyzes us by means of judgment rule and can obtain the result whether system normally run; If program is made mistakes, process analysis module provides location of mistake information, and sends to code healing policy generation module with the form of event, registers on Event Forwarding Module simultaneously;
Step 3: code healing policy generation module generates relevant healing instruction according to create-rule, and sends to Event Forwarding Module, converts flow of event to be forwarded to bytecode modified module again by Event Forwarding Module;
Step 4: bytecode modified module is modified to byte code files;
Step 5: amended byte code files is re-started load and run.
6. the healing process of large software self-healing framework according to claim 5, is characterized in that: described bytecode modified module comprises demoder and bytecode composer two parts, and it is as follows to the modify steps of byte code files:
Step 1: bytecode modified module scanning byte code files forms byte code stream, and by demoder, the information scanned is sent to outside with flow of event form;
Step 2: bytecode framework device receives the flow of event sended over, and is converted to byte code stream and is saved in class file.
Bytecode modified module can complete the amendment to byte code files by this two-way process.
7. whether the healing process of the large software self-healing framework according to claim 5 or 6, is characterized in that: run healthy at present by described process analysis module determining program, the need of healing; The numerical value of the monitor data received and the judgment rule of setting compare by process analysis module, and divide into following three kinds of situations and process accordingly respectively:
1) health status: all data that monitoring module is reported and submitted, all within the scope of system restriction, at this moment represent that system is normally run, and does not need to carry out any change to program;
2) latent fault: the data message that monitoring module is reported and submitted violates some constraint of system, but program is still normally run; This represents not have initiator mistake to the violation of constraint, but can program caused to make mistakes, so system needs to enter self-healing program in the future based on to the violation of constraint;
3) erroneous condition: the information that monitoring module is reported and submitted indicates system fault, and at this moment program is in error condition, does not need, through just can decision procedure mistake to the judgement of program restriction, can enter self-healing program immediately;
Described judgment rule is the normal restraint scope of exponential quantity.
CN201510745681.9A 2015-11-03 2015-11-03 Self healing frame and healing method of large software Pending CN105260193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510745681.9A CN105260193A (en) 2015-11-03 2015-11-03 Self healing frame and healing method of large software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510745681.9A CN105260193A (en) 2015-11-03 2015-11-03 Self healing frame and healing method of large software

Publications (1)

Publication Number Publication Date
CN105260193A true CN105260193A (en) 2016-01-20

Family

ID=55099897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510745681.9A Pending CN105260193A (en) 2015-11-03 2015-11-03 Self healing frame and healing method of large software

Country Status (1)

Country Link
CN (1) CN105260193A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920179A (en) * 2017-04-12 2018-11-30 中国移动通信集团福建有限公司 Java reflects implementation method, device and system
CN111259224A (en) * 2020-02-20 2020-06-09 山东旗帜信息有限公司 Data crawling method and device
CN114924727A (en) * 2022-05-31 2022-08-19 重庆长安新能源汽车科技有限公司 Automatic generation system and method of software code framework

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101452386A (en) * 2007-11-28 2009-06-10 国际商业机器公司 Method for executing policy based on context model by using forward direction discursion chain
CN102158554A (en) * 2011-04-02 2011-08-17 南京邮电大学 Mobile agent-based Internet of things middleware development method
US20130156286A1 (en) * 2011-09-25 2013-06-20 Theranos, Inc. Systems and methods for collecting and transmitting assay results
US20140280856A1 (en) * 2007-11-23 2014-09-18 International Business Machines Corporation Enforcing context model based service-oriented architecture policies and policy engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140280856A1 (en) * 2007-11-23 2014-09-18 International Business Machines Corporation Enforcing context model based service-oriented architecture policies and policy engine
CN101452386A (en) * 2007-11-28 2009-06-10 国际商业机器公司 Method for executing policy based on context model by using forward direction discursion chain
CN102158554A (en) * 2011-04-02 2011-08-17 南京邮电大学 Mobile agent-based Internet of things middleware development method
US20130156286A1 (en) * 2011-09-25 2013-06-20 Theranos, Inc. Systems and methods for collecting and transmitting assay results

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
符强: "基于Java动态编程技术的软件自愈合构架研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920179A (en) * 2017-04-12 2018-11-30 中国移动通信集团福建有限公司 Java reflects implementation method, device and system
CN111259224A (en) * 2020-02-20 2020-06-09 山东旗帜信息有限公司 Data crawling method and device
CN111259224B (en) * 2020-02-20 2023-02-21 山东旗帜信息有限公司 Data crawling method and device
CN114924727A (en) * 2022-05-31 2022-08-19 重庆长安新能源汽车科技有限公司 Automatic generation system and method of software code framework
CN114924727B (en) * 2022-05-31 2024-06-04 深蓝汽车科技有限公司 Automatic generation system and method for software code frame

Similar Documents

Publication Publication Date Title
US7676816B2 (en) Systems and methods for integrating services
US9672137B1 (en) Shadow test replay service
US7810075B2 (en) Common trace files
CA2621946C (en) Improvements in and relating to service oriented architecture
US20070220492A1 (en) Application verifier infrastructure and checks
US20030055809A1 (en) Methods, systems, and articles of manufacture for efficient log record access
US7890808B2 (en) Testing software applications based on multiple data sources
US20120159421A1 (en) System and Method for Exclusion of Inconsistent Objects from Lifecycle Management Processes
US9442822B2 (en) Providing a visual representation of a sub-set of a visual program
US8904063B1 (en) Ordered kernel queue for multipathing events
US9804952B1 (en) Application debugging in a restricted container environment
Panigrahi et al. An approach to prioritize the regression test cases of object-oriented programs
CN105260193A (en) Self healing frame and healing method of large software
Ritter et al. Exception handling in message-based integration systems and modeling using BPMN
KR101024249B1 (en) Real-time data replication system
US20170091076A1 (en) Debugging remote vertex code on test machine
US7739420B2 (en) Communication error information output method, communication error information output device and recording medium therefor
US10116512B2 (en) Service discovery and/or effort estimation in networked computing environments
US9354962B1 (en) Memory dump file collection and analysis using analysis server and cloud knowledge base
US10324819B1 (en) Runtime performance introspection
CN117235107B (en) Data access processing method and device, electronic equipment and storage medium
CN112445692A (en) Case testing method and terminal
CN117493162B (en) Data verification method, system, equipment and storage medium for interface test
CN100435114C (en) Online method for checking out software based on interceptor
KR101411266B1 (en) Event processing method using hierarchical structure and event processing engine and system thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160120

WD01 Invention patent application deemed withdrawn after publication