Software applications can be made to work in various environments. For example, software applications may be run on different operating systems, hardware platforms, databases, network environments having fluctuating conditions, as well as varying memory and computer processing unit (CPU) hardware amounts and hardware resource usage amounts.
A software application can be run in different environments to perform various functions. As used herein, the term “software application” refers to a set of instructions that are executed by a processor to perform a group of coordinated functions, tasks, and/or activities. For example, a software application may be utilized to perform cloud computing applications, web services applications, database management, among other functions by a computing device.
During execution of software applications in various environments, failures during a runtime of the software application may occur. As used herein, the term “failure” refers to an inability to perform a function, task, and/or activity by a set of instructions to perform the function, task, and/or activity. For example, during a runtime of the software application or during runtime of a software module within the software application, the software application may fail to perform a particular function, task, and/or activity.
In some examples, the software application may include a retry mechanism. For example, the software application may retry performing a task by performing a same set of instructions to perform the task. However, retrying performance of the task using the same set of instructions may not fix a failure of the software application. For instance, the same set of instructions may be executed to perform the task without any other change in execution variables, such as the software application, hardware running the software application, network environment, and/or hardware environment. Without changing one of the variables described above, the failure may be repeated.
In some examples, changing an execution variable above may cause instructions comprising the software application to have to be re-compiled. As used herein, the term “compiling” refers to converting programming instructions into a machine-readable code to be read and/or executed by a processing device. As used herein, the term “execute” refers to a process by which a processor of a computing device carries out machine-readable instructions of a script, software application, etc. Re-compiling the instructions comprising the software application to address a failure can be time and/or resource consuming and may generate additional unintended errors as a result.
Rule based failure addressing, according to the disclosure, can allow for failure addressing of a software application without having to re-compile the instructions comprising the software application. A strategy based retry mechanism having various rules can allow for a computing device to address a failure based on an error code associated with the failure. Accordingly, a failure in the execution of a software application can be addressed using the various rules based on an error code of a failure, which can allow the software application to “self-heal”. As a result, software application efficiency and robustness can be increased, and the software application can be delivered to various environments without re-compiling.
System 100 can include computing device 102. As used herein, the term “computing device” can, for example, refer to a device including a processor, memory, and input/output interfaces for wired and/or wireless communication. A computing device may include a laptop computer, a desktop computer, a mobile device, and/or other wireless devices, although examples of the disclosure are not limited to such devices. A mobile device may refer to devices that are (or may be) carried and/or worn by a user. For instance, a mobile device can be a phone (e.g., a smart phone), a tablet, a personal digital assistant (PDA), smart glasses, and/or a wrist-worn device (e.g., a smart watch), among other types of mobile devices.
Computing device 102 can be utilized for rule based failure addressing. For example, computing device 102 can be utilized to execute rules to address failures during execution of a software application 104, as is further described herein. As described above, a software application 104 can include a set of instructions that are executed by a processor to perform a task. If a failure occurs during a runtime of the software application 104, computing device 102 can execute rules to address the failure, as is further described herein. Further, in some examples, a software application 104 may include modules within the software application 104. As used herein, the term “software module” refers to a subset of instructions that are executed by a processor to perform a sub-group of coordinated functions, tasks, and/or activities within the context of the greater software application. If, for example, a failure occurs during a runtime of a module within the software application 104, computing device 102 can execute rules to address the failure.
In some examples, a failure can be a transient failure. A transient failure can be a temporary failure which may be due to infrastructure. For example, software application 104 may utilize computing device 102 to communicate information over a network. The network can be, for example, a local area network (LAN), wide area network (WAN), personal area network (PAN), a distributed computing environment (e.g., a cloud computing environment), storage area network (SAN), Metropolitan area network (MAN), a cellular communications network, and/or the Internet, among other types of networks. Computing device 102 may transmit information (e.g., a packet) over the network while the network is down, which can result in a dropped packet. As a result of the dropped packet, a failure may occur which can result in an error code being generated, as is further described herein.
Although a transient failure is described above as being a dropped packet, examples of the disclosure are not so limited. For example, a transient failure can be any other temporary failure which may be due to infrastructure issues (e.g., network, hardware, etc.)
In some examples, a failure can be a fault. A fault can be a software issue. For example, a fault may include a missing file, rest network connection, a database entry being empty, among other types of faults. As a result of a fault, a failure may occur which can result in an error code being generated, as is further described herein.
As described above, a failure of an execution of a software application 104 can occur in different ways. As a result of the failure of the execution of the software application 104, an error code may be generated. As used herein, the term “error code” refers to an enumerated message that corresponds to a status of a particular software application 104. For example, in an instance in which failure of execution of software application 104 occurs as a result of a particular file missing, an error code may be generated that indicates the failure as a result of the particular file missing.
Computing device 102 can receive the error code corresponding to the failure during an execution of software application 104. For example, the particular missing file can generate an error code indicating the particular file is missing. The error code can be, for example, “error:“FileNotFoundException””, among other error codes corresponding to different types of failures.
As a result of the error code, computing device 102 can determine a rule based on a keyword included in the error code. As used herein, the term “keyword” refers to a word that serves as an indicator as to the meaning of another word, sentence, passage, etc. For example, as described above, the error code may include “FileNotFoundException”, where the keyword can be “FileNotFound”.
Although the error code and/or keyword are described above as being a single error code and/or keyword, examples of the disclosure are not so limited. For example, a failure can generate an error code having multiple keywords.
Utilizing the keyword “FileNotFound”, computing device 102 can determine a particular rule based on the keyword included in the error code. As used herein, the term “rule” refers to a set of instructions executed by a computing device 102. For example, a rule can be a script. The rule can be executed to perform a certain task, such as address a failure during execution of software application 104, as is further described herein.
The rule can be stored in a configuration file 106. As used herein, the term “configuration file” refers to a file used to modify parameters and settings of a software application. Configuration file 106 can be a parsable file. That is, configuration file 106 can be a file that is readable by computing device 102. For example, configuration file 106 can include rules used to modify parameters and/or settings of software application 104. The rules can modify parameters and/or settings of software application 104 in order to address a failure of software application 104, as is further described herein.
In some examples, the configuration file 106 can be a text (TXT) file. As used herein, the term “text file” (e.g., TXT file) refers to a computer file that is structured as a sequence of lines of electronic text. For example, the configuration file 106 can include a plurality of rules structured as sequences of lines of electronic text.
In some examples, the configuration file 106 can be a JavaScript Object Notation (JSON) file. As used herein, the term “JavaScript Object Notation file” (e.g., JSON file) refers to a computer file having human-readable text to transmit data objects having attribute-value pairs and array data types. For example, the configuration file 106 can include a plurality of rules structured as data objects having attribute-value pairs and array data types.
In some examples, the configuration file 106 can be an Extensible Markup Language (XML) file. As used herein, the term “Extensible Markup Language file” (e.g., XML file) refers to a computer file representing electronic office documents. For example, the configuration file 106 can include a plurality of rules structured as electronic office documents.
Although the configuration file 106 is described above as being a TXT, JSON, and/or an XML file, examples of the disclosure are not so limited. For example, the configuration file 106 can be any other parsable file type suitable to include rules.
As described above, each rule included in the configuration file 106 can be executed to perform a certain task, such as addressing a failure during execution of software application 104. Accordingly, each rule can be associated with a particular error code. A failure can have a particular failure type. For example, the failure error code “FileNotFoundException” can have a failure type “file missing”. The keyword “FileNotFound” of the failure code “FileNotFoundException” can be associated with the particular failure type (e.g., file missing) of the failure.
Although a particular failure is described above as having an associated rule, examples of the disclosure are not so limited. For example, a particular failure can have more than one associated rule. For instance, the particular failure having an error code “FileNotFoundException” may include multiple rules executable to address the particular failure, as is further described herein.
As described above, each rule can be associated with a particular error code. Additionally, each rule can include a particular retry strategy and a rule execution order. As used herein, the term “retry strategy” refers to a particular series of steps to address a particular failure. A retry strategy can include a retry method, retry count, and/or a delay between retries, as is further described herein. As used herein, the term “rule execution order” refers to a disposition of rules following one after another.
As illustrated in
Configuration file 106 can be modifiable. For example, configuration file 106 can be modified by adding rules to the configuration file 106 and/or removing rules from the configuration file 106. Configuration file 106 can be modified by a user, such as a network administrator or other user having administrative privileges, in order to address failures of software application 104. For instance, software application 104 may experience a failure and configuration file 106 may not have a rule to address the failure. In such an example, a rule can be added to the configuration file 106 that is executable to address the failure. In some examples, the rule may be a script outside of software application 104 to address the failure.
Configuration file 106 can be modified without re-compiling instructions comprising the software application 104. For example, a rule can be added to configuration file 106 to address a failure software application 104 may encounter without having to re-compile software application 104. As a result, modification of instructions comprising software application 104 can be avoided, avoiding lengthy re-compiling of software application 104 which may take time and computing resources.
Continuing with the example from above, based on the keyword “FileNotFound” for an error code “FileNotFoundException” corresponding to a failure of software application 104, a rule stored in configuration file 106 can be determined. For example, Rule 1 can be determined, and can be formatted as follows:
Rule 1: 1# module: “load_configuration_data”, error:“FileNotFoundException”, retry_strategy:“create_config_file”, retry_count: “2”, delay “2”, default_retry:“true”
Computing device 102 can execute the rule to address the failure to cause execution of software application 104. For example, Rule 1, stored in configuration file 106, can be executed by performing instructions comprising Rule 1 to address a failure of software application 104 having an associated error code according to the retry strategy and rule execution order described above. For example, the error code “FileNotFoundException” can be associated with a failure of software application 104 (e.g., due to a file being missing) during execution of software application 104. Further, the retry strategy based on the error code can be creating a configuration file (e.g., create_config_file), trying to create the configuration file twice with a two second delay between each retry, where Rule 1 is the default rule for the failure having error code “FileNotFoundException”.
As described above, Rule 1 can be a default rule for the error code “FileNotFoundException”. As used herein, the term “default” refers to a rule first used based on a particular error code.
In some examples, a particular failure having an associated error code can include multiple rules executable to address the particular failure. For example, a failure of software application 104 can have an error code “401”. The error code 401 can be associated with a failure to connect to a web server, for example. In such an example, configuration file 106 may determine three rules executable to address the failure. The three rules can be as follows:
Rule 1: 1# module: “connect_to_webserver”, error:“401”, retry_strategy:“retry_with_samecreds”, retry_count: “2”, delay “10”, default_retry:“true”
Rule 2: 2# module: “connect_to_webserver”, error:“401”, retry_strategy:“retry_with_differentcreds”, retry_count: “2”, delay “10”, default_retry:“false”
Rule 1: 3# module: “connect_to_webserver”, error:“401”, retry_strategy:“retry_with_LDAPcreds”, retry_count: “2”, delay “10”, default_retry:“false”
For example, the error code “401” can be associated with a failure of software application 104 to connect to a web server during execution of software application 104. According to Rule 1, Rule 1 can be the default rule having a retry strategy including retrying the login to the web server using the same access credentials (e.g., retry_with_samecreds), retrying the login to the web server twice, and retrying the login to the web server using the same access credentials with a ten second delay between each retry.
In some examples, computing device 102 can determine a second rule from configuration file 106 in response to Rule 1 failing to address the failure. That is, in response to the execution of Rule 1 not causing a successful execution of software application 104, Rule 2 can be executed after Rule 1 according to the rule execution order. According to Rule 2, Rule 2 can be the first rule executed following the default rule, where Rule 2 has a retry strategy including retrying the login to the web server using different access credentials (e.g., retry_with_differentcreds), retrying the login to the web server twice, and retrying the login to the web server using the different access credentials with a ten second delay between each retry.
Additionally, in some examples computing device 102 can determine a third rule from configuration file 106 in response to the execution of Rule 2 not causing a successful execution of software application 104. That is, in response to execution of Rule 1 and execution of Rule 2 not causing a successful execution of software application 104, Rule 3 can be executed after Rule 1 and Rule 2 according to the rule execution order. According to Rule 3, Rule 3 can be the second rule executed following the default rule, where Rule 3 has a retry strategy including retrying the login to the web server using lightweight directory access protocol (LDAP) access credentials (e.g., retry_with_LDAPcreds), retrying the login to the web server twice, and retrying the login to the web server using the LDAP access credentials with a ten second delay between each retry.
As described above, Rules 1, 2, and 3 can include a predefined rule execution order. The Rules 1, 2, and 3 can be executed in the predefined rule execution order until a particular rule in the group of rules causes a successful execution of software application 104. For example, if Rule 1 does not cause a successful execution of the software application, Rule 2 can be executed to cause a successful execution of the software application. Further, if Rule 2 does not cause a successful execution of the software application 104, Rule 3 can be executed to cause a successful execution of the software application 104. Further, although described above as including three rules, examples of the disclosure are not so limited. For example, a particular failure having an error code can include more than three rules which can be executed in a predefined execution order until a particular one of the more than three rules causes a successful execution of the software application 104.
Rule based failure addressing, according to the disclosure, can allow for a software application to “self-heal”. For example, the software application 104, when encountering a failure, can utilize different retry mechanisms based on a particular error code associated with the failure. The retry mechanisms can be rules stored in a configuration file 106. The different rules can be executed until the software application 104 has successfully executed. Further, the configuration file 106 can be modified to allow for the addition and/or removal of rules.
Rule based failure addressing, according to the disclosure, can provide increased robustness to software applications in order to handle various types of failures that may be experienced during execution of software applications. Further, software application quality, maintainability, and adaptiveness can be enhanced, allowing software applications to be reliably executed, enhancing a customer experience and reducing time, effort, and customer support resources.
As illustrated in
In an example such as that illustrated in
As illustrated in
The computing device 302 may include instructions 324 stored in the memory resource 322 and executable by the processing resource 320 to receive an error code corresponding to a failure. The failure can be encountered during execution of a software application by computing device 302. As a result of the failure, an error code may be generated. The error code can include a keyword, as is further described herein.
The computing device 302 may include instructions 326 stored in the memory resource 322 and executable by the processing resource 320 to determine a rule from a configuration file. For example, an error code can have an associated keyword. A rule stored in the configuration file can be associated with a particular keyword. For example, a rule can be a set of instructions executable to address a particular failure having a keyword associated with the rule. The configuration file can be located locally on computing device 302 or be located externally from computing device 302. In some examples, the configuration file can be modified to add and/or remove rules.
The computing device 302 may include instructions 328 stored in the memory resource 322 and executable by the processing resource 320 to execute the rule to address the failure. For example, computing device 302 can execute the rule to address the failure such that execution of the software application can be performed. In this manner, computing device 302 can address failures in execution of the software application.
Processor 432 may be a central processing unit (CPU), microprocessor, and/or other hardware device suitable for retrieval and execution of instructions stored in machine-readable storage medium 434. In the particular example shown in
Machine-readable storage medium 434 may be any electronic, magnetic, optical, or other physical storage device that stores executable instructions. Thus, machine-readable storage medium 434 may be, for example, Random Access Memory (RAM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a storage drive, an optical disc, and the like. The executable instructions may be “installed” on the system 430 illustrated in
Receive instructions 436, when executed by a processor such as processor 432, may cause system 430 to receive an error code corresponding to a failure. The failure can be a failure during an execution of a software application. As a result of the failure, an error code may be generated. The error code can include a keyword, as is further described herein.
Determine instructions 438, when executed by a processor such as processor 432, may cause system 430 to determine a rule from a configuration file. The rule can be determined based on the keyword included in the error code. The rule can be determined from a plurality of rules included in a modifiable configuration file that can be executed to address the failure.
Execute instructions 440, when executed by a processor such as processor 432, may cause system 430 to execute the rule to address the failure. That is, the rule can be executed to cause execution of the software application.
At 544, the method 542 may include receiving an error code corresponding to a failure during an execution of a software application. The error code can be generated as a result of a particular failure of the software application. For example, a first type of failure can generate a first type of error code, a second type of failure can generate a second type of error code, etc.
At 546, the method 542 may include determining a group of rules selected from a plurality of rules included in a configuration file. The group of rules can be selected based on a keyword included in the error code generated as a result of the particular failure of the software application.
At 548, the method 542 may include executing a default rule from the group of rules to address the failure. Executing the default rule can cause execution of the software application.
At 550, the method 542 may include executing a second rule from the group of rules in response to the default rule failing to cause a successful execution of the software application. For example, if the default rule does not cause a successful execution of the software application (e.g., the failure re-occurs), a second rule can be executed following the default rule. The second rule can be executed according to a predefined rule execution order. The predefined rule execution order can include a list of rules that can be executed in the order until a successful execution of the software application occurs (e.g., the failure does not occur).
In some examples, the method 542 can include modifying the configuration file by adding a rule to the configuration file. The added rule can be executed to cause execution of the software application.
In the foregoing detailed description of the disclosure, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration how examples of the disclosure may be practiced. These examples are described in sufficient detail to enable those of ordinary skill in the art to practice the examples of this disclosure, and it is to be understood that other examples may be utilized and that process, electrical, and/or structural changes may be made without departing from the scope of the disclosure.
The figures herein follow a numbering convention in which the first digit corresponds to the drawing figure number and the remaining digits identify an element or component in the drawing. Similar elements or components between different figures may be identified by the use of similar digits. For example, 102 may reference element “02” in