Service quality of service-side software

Source: Internet
Author: User

Software Quality Overview

Among those who provide the same functions, products and services, the competitiveness comes from the diversification of function and the differentiation of service quality, whether individual, enterprise or country.

    • The service here refers to the function, the degree of realization and processing capacity of the product, and the level of technical support provided by the research/customer service (7x24, responsive, convenient communication, quick resolution, warm hints, effective guides, etc.).

    • In a sense, everything is served. Functions and products are only forms, service is the essence. The service responds to a demand and thus has the value of being. Individuals, enterprises to provide a certain type of society, a certain degree of service, and to obtain a corresponding return.

Programmers provide services that use available resources and their knowledge, skills, experience, time, energy, resources, and the ability to solve problems and maintain them at the right acceptable development cost, in a specific work environment and enterprise culture, by structuring and organizing real-world problems into the correct logical flow.

    • This level of competence encompasses both the ability to serve itself and the capacity to create services through this capacity. The capabilities of the service include: proficiency in the specific language, technology, platform, architecture and other technical depth, combination of technology, products, operations, services, business comprehensive cognitive breadth, with diversified skills (development, writing, foreign language, communication, organization, negotiation, etc.); ability accomplishment, patience, concentration, meticulous, courage, humor, etc. With non-technical expertise, such as sports, music, literature, art, design and so on. The services created by this capability usually refer to software, products, or services.

Every time you solve the top three issues that users care about, don't waste time, energy, and resources on things that matter.

    • The first is the function and service, function and service is the core, is the value of existence;
    • Next is the design, the design makes the function and the service more outstanding has the attraction, the better use quality;
    • Then there is the cost and the spread. Ensure excellent functionality and design based on reduced resource time and labor costs, while good communication and use make marginal costs lower.

How to ensure that the functions and services developed by the server to achieve the desired quality?

    1. Identify the qualities that need to be achieved, know what to do and how to do it;
    2. To quantify and measure service quality as much as possible, so as to achieve transparency of service quality;
    3. More inclined to the emotional factors of service quality, the use of emotional methods to deal with. is not within the scope of this article.
Basic Quality Attributes Correctness:

Whether the software correctly implements the specified functions to meet the diversified needs of customers.

    • Draw the business flowchart, subsystem interaction diagram, follow the intent navigation programming method, through decomposition, implementation and connection of a number of closely connected logical units to achieve.
    • In the internal implementation, whether the data record is correctly and completely constructed, accessed or destroyed, and does not produce dirty data and invalid data "internal quality".
    • The entire process loop of the function implementation needs to be established, with all the details known to Genjiu, and the related services provided by the interactive External system.
    • Quantification: Whether the business data is reasonably accessed, and if multiple subsystems are involved, the consistency of the data needs to be ensured.
    • Related recommendations:
    1. Communicate, accurately understand requirements, scenarios and business flow;
    2. Carefully select the Toolbox, library and framework used for development;
    3. Common subtasks use recognized mainstream development libraries and carefully test them;
    4. Complete understanding of the API, including its functions, principles, applications and limitations;
    5. Specify the use contract and special handling when writing the class/method/function;
    6. Each class/method/function works in concert with each other.
Performance cost

The software realizes the ability to respond to functions and services and request processing with the specified time and resources available. A measurement or estimate of the error range is required.

    • Constructs a single request to measure run time and response time, and constructs a large number of concurrent requests to measure throughput.
    • Refer to SLA (Service level Agreement). The efficiency of the execution of the program should be best achieved at an acceptable development cost.
    • That said, there is a trade-off between "the time and resource cost of developing a feature" and "the quality that the service is ultimately delivering."
    • In general, the higher the quality of services required by the time and resource costs, the endless pursuit of greater efficiency, regardless of cost and service objectives is undesirable.
    • The ideal situation is: through the right amount of improvement, technological innovation, management improvement, etc., can make less time and resource costs to achieve higher service quality.
    • Quantification: Runtime, required storage resources (number of database records, KV number, cache, file), response time, throughput/concurrency capability (QPS, TPS, UPS).
    • Related recommendations:
    1. The large data volume result set uses multithreading technology to obtain subsets and summarizes;
    2. Multi-io tasks are handled asynchronously;
    3. Time-consuming tasks for decomposition/concurrency/asynchronous processing;
    4. Avoid unnecessary duplication of creation/calculation overhead;
    5. Delay creation and reuse of large objects that consume memory;
    6. Time consuming/frequent read operation to make proper use of cache;
    7. Short-time operation control in 0.5-1s, long-term operation using "asynchronous + Message notification" mode;
    8. Measure the time, optimize the degree of the hotspot area;
    9. Measure and improve response time and throughput to achieve a good balance;
    10. Use better hardware to improve performance;
    11. Reduce boot load components, load and cache on demand;
    12. Use asynchronous mode to load and display incrementally;
    13. Loading and execution separation;
Robustness

The ability of software to respond to errors. The ability to degrade in an unintended environment can capture all error conditions (non-conforming, unintended input, dirty data, etc.) and abnormal situations and give appropriate return information in the expected environment.

    • For front-end interactions, you need a friendly, easy-to-understand hint, and for background services, you need a canonical error code and error message.
    • The improvement of software robustness requires a lot of error detection, which can lead to the reduction of maintainability. It is best to extract error detection from the main business process and establish a reusable detection library function.
    • It is recommended that you establish the correct and complete business master process and then make a thorough elaboration of each link in the main process to find out the various error scenarios and deal with them.
    • Quantification: The number of error scenario test cases, and the number of coverage scenarios.
    • Related recommendations:
    1. Error codes and error messages are separated from the code using a configuration file;
    2. Different types of parameter detection use different parameter validators (usually regular expressions);
    3. Use the globally uniform error detection function to centralize the detection of errors in one place.
    4. Subdivide the various anomalies that occur in the application and carry out different processing;
    5. In the system bottom processing can handle the exception, unable to handle the use of abnormal translation to the top layer;
    6. Uniformly handle various application anomalies and return friendly hints at the top level of the system;
    7. Hints and exception messages are placed in the configuration file, separated from the code.
    8. Error handling Global Framework.

Error detection function registrar: different parameters correspond to different detection functions
Map<paramName, ErrorDetectFunc> errorDetectFuncMap; ErrorMsg ErrorDetectFunc(paramName, paramValue);
Globally uniform error detection function:
def detectError(Map<paramName, paramValue> params) : Map<paramName, errormsg> allErrorMsg = new Map<String, ErrorMsg>(); for (paramName, paramValue) in params: ErrorDetectFunc func = errorDetectFuncMap.get(paramName); ErrorMsg errormsg = func(paramName, paramValue); allErrorMsg.put(paramName, errormsg); return allErrorMsg;
Globally uniform error handling functions:
def ShouldResponse processError(Map<paramName, errormsg> allErrorMsg):

Ease of traceability

The program runs the appropriate amount of log information, easy to track the execution status of the program, quickly troubleshoot the error "Internal quality".

    • Identify the critical path and critical state of the business process and record its run-time status for ease of analysis.
    • Appropriate and critical INFO logs and Error logs are required for well-formed specifications. Personally, the DEBUG log can eliminate the need by improving the quality of the code.
    • Quantification: How long it takes to troubleshoot and locate each problem.
Ease of testing

Mainly unit testing, automated functional testing and performance testing. Unit and functional tests ensure correctness, performance testing guarantees efficiency "internal quality".

    • Unit testing requires that a short method, class with a single responsibility be written as much as possible during the development process, and the smaller the code object, the greater the role of unit testing plays.
    • Functional testing requires the design of effective test cases, test plans, and test executions for specific usage scenarios.
    • Performance testing requires that the time and resources required for business processing be measured, giving the best, worst, and average values. At a minimum, the elapsed time should be measured.
    • Quantification: Test coverage of business methods, line of code, branch coverage, test case collection, performance test report.
Security

Avoid leaking important, sensitive, private information, protect business and data from unauthorized access, unauthorized access, and track system access logs.

    • Common methods include sensitive information identification and masking, access authorization mechanism, access log Audit, code Vulnerability preparedness.
    • Related recommendations:
    1. User role and permission rating;
    2. Read-only and operation permissions are separated;
    3. Confidential data Encryption Protection/rights control/operation restrictions/identity authentication;
    4. Permission application to join the approval process system;
    5. Logging of request logs and user operations;
    6. Request a connection for encryption;
    7. Avoid displaying the request URL;
    8. Prevents injection attacks and identifies illegal request patterns.
Extensibility Quality Attributes Scalability
    • Related recommendations:
    1. Modular design of the whole architecture, component service, minimized public service interface;
    2. Changes are always considered in the design;
    3. Use configuration parameters to avoid hard coding;
    4. Write code that is self-contained, self-encapsulated, and does not modify the external state, minimizing dependencies;
    5. Use design pattern to optimize code expression structure, enhance software "flexibility";
    6. Document order and dependency relationship, regular collation, update dependencies;
    7. expression and execution separation, using domain language/rule expression logic, precompiled rules, dynamic generation, configuration, and loading of rules.
Reusability

It is required that the functions, methods, classes, libraries, modules, components, frameworks, etc. in the software can be used multiple times in the same project or in different projects or different products, so as to replace the update "internal quality".

    • The minimum requirement is to reuse the same project as much as possible and avoid repeating the code snippet.
    • It is best to have no more than 60 rows per business method.
    • There is a reasonable abstraction for each knowledge point, business point, and fact.
    • Quantification: The number of repeating code snippets, functions, methods, classes, libraries, modules, components, and the number of times the framework is reused.
Maintainability

Requiring software to be easily understood and easily modified to meet new requirements, the system should typically have a modular, high cohesion, loosely coupled feature "internal quality".

Easy to understand
    • Support for reusability is required, and the code is required to be as semantic and detail-independent as possible, self-explanatory, and appropriately annotated, using idioms.
    • The separation of semantic and detail "refers to the expression intention of high-level code, low-layer code rendering details;" Self-explanatory power "means that code can be words too literally by proper variables and functions;
    • "Appropriate notes" need to indicate code intent and design ideas as an effective guide to understanding the code; "Idioms" is a common pattern of code that facilitates quick browsing and comprehension.

      It is easy to modify the collection of code needed to quickly locate a functional service, requiring the code to have a good organization and implementation structure, avoid making the same or similar changes to multiple places, and avoid making drastic changes to the original overall design.
    • Please refer to the book "Agile Software Development: principles, patterns and practices" as much as possible to meet the five design principles (SRP, OCP, LSP, DIP, ISP), to achieve the "close to modification, open to expansion" realm. That is, the development of new requirements, as far as possible only to increase the code, without the need to modify the original code.

Quantification: Understanding the length of time a feature requires, modifying or extending a line of code to which a feature needs to be modified.

Global Quality attributes Stability

The program runs consistently and consistently for a long time to deliver the right, consistent service.

    • Request the program to use and release resources rationally, monitor the running state of the program and find out the abnormal situation in time.
    • For high concurrency scenarios, it is necessary to use appropriate techniques for triage, to process or reject requests in a timely manner, and to avoid service crashes due to excessive resource consumption.
    • Quantification: The duration of a program's continuous availability, high concurrency capability.
    • Related recommendations:
    1. Ensure the operating environment of the software is normal and stable, including hardware, operating system and dependent system;
    2. Software can effectively cope with environmental fluctuations (such as network outages) without termination;
    3. The influence of the external system service call is localized, which does not affect the whole operation;
    4. The System Component Service module affects the localization, does not affect the whole operation;
    5. Avoid memory leaks, dead loops, deadlocks and other problems that can cause a program to crash;
    6. Bulk resource release issues to be examined carefully, whether the memory leaks due to errors or exceptions;
    7. Operation failure can be rolled back;
Reliability

Services are recoverable and replaceable in severe error situations, avoiding single points of failure, guaranteeing availability, and ensuring the correctness and completeness of user data.

    • It mainly includes service redundancy, fault tolerance, backup, monitoring, self-detection and recovery mechanism.
    • Quantification: Whether the service is available when an error occurs, or if it can be recovered from the error.
    • Related recommendations:
    1. Load balancing avoids single point of failure;
    2. Emergency response of primary and standby disaster;
    3. High load/performance testing;
    4. Add system monitoring to show the health of system metrics/services/resources within a specified time interval.
Ease of Use

Ease of use is a measure of how easily users are using the product. A front-end area that is typically used to describe the user experience. However, the service side also has the concept of usability.

    • Service-side usability, in-depth embodiment in the interface, library methods are easy to learn and use, whether easy to misuse, misuse, the superficial level is reflected in the code layout is pleasing and readable, code style is consistent and beautiful.
    • Related recommendations:
    1. The accuracy and richness of knowledge and information, in line with or exceeding expectations;
    2. The guiding design, correctness and comfort of the operation;
    3. Appearance and design of the practical aesthetics, pleasing;
    4. Use animations or add interesting content to weaken the effect of waiting time;
    5. Use the change effect to prompt the user that the request has been sent and is being processed.
Elastic Scaling

Services can improve service capacity (throughput) by simply deploying on more machines, reducing costs by reducing machine deployment.

    • Support is required from the architecture design. Request processing is as stateless as possible.
    • Quantification: The ratio of concurrent request processing volume to machine count.
    • Horizontal scaling: Increase the number of logical unit resources and make them work as a whole, such as clustering, distributed, load balancing;
    • Vertical scaling: Add resources in the same logical unit to increase capacity, such as increasing CPU, memory, and disk space.
Portability

The software is able to operate consistently and correctly in a variety of operating environments and platforms with little or no modification required.

    • Reduce the use of non-standard behavior by using portable languages and platforms, and by complying with standard interfaces and behaviors as much as possible when implementing features and services;
    • Provide interfaces at the bottom to unify the differences between different platforms, and use a unified interface at the top to avoid processing platform details.
    • Portability is best taken into consideration at the beginning of the system's construction, such as the initial adoption of PHP and subsequent porting to Ruby, Python or the Java platform.
    • Quantification: The lines of code needed to migrate from one language to another or from one platform to another.
    • Related recommendations:
    1. Use abstractions to mask differences between different platforms;
    2. Use the cross-platform SDK;
    3. As far as possible to comply with portable standards;
    4. Use standard notation whenever possible;
    5. Responsive design.
Operational dimension

After the service is released, manage the difficulty and speed of running large-scale services, troubleshooting/troubleshooting, and handling user feedback.

    • What are the issues that may arise after a service is released? How to troubleshoot? How big is the scale of the service? What is the degree of concurrency?
    • In service development, it is necessary to avoid the generation of low-level problems, reduce the workload caused by low-level errors;
    • For difficult problems, you need to provide critical log information/operational documents for easy troubleshooting;
    • For large-scale service operations, the usual approach is to monitor, alarm, and visualize.
    • Quantification: Refer to the quantitative standard of operation and maintenance.
Customizable/Hot Upgrade

Whether it is easy to tailor the customer's specific needs, whether the service upgrade can not affect the user's normal use as far as possible.

    • Related recommendations:
    1. Modular application and system services components;
    2. Each standalone component has an identity that identifies whether it can be displayed/loaded;
    3. The configuration file specifies the modules and components that can be displayed/loaded when starting or initializing;
    4. Use a timed job or a time-bound caching mechanism to load the configuration file;
    5. Use the Observer mode to detect changes in configuration and reload the configuration into the app;
    6. When detecting configuration changes, external commands can be sent to the application system to trigger its reload configuration;
    7. Provide interface to modify configuration file parameters and update the application and configuration files in real time (there may be security risks);
    8. Use global singleton managers to dynamically display/hide and dynamically load/unload modules based on changes in configuration files;
    9. Use the policy mode to flexibly replace and toggle modules with the same functionality, using abstractions to extract their public usage interfaces.
Interoperability

How easily the software interacts with other systems. Mainly including communication mode, version compatibility.

Reference articles

    • Guaranteeing Web services with SLAs
    • Software Quality Model
    • Elaborate software quality indicators
    • Tactics of implementing quality attributes of software architecture
    • Reusability: Special Topics
    • Scalability Best Practices: experience from ebay
    • The usability of software design

Service quality of service-side software

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.