Application lifecycle

zhaozj2021-02-11  216

Application lifecycle

(Reprinted from Microsoft Site, Original Address: http://www.microsoft.com/china/msdn/library/techart/complus_lifecycle.asp)

In the life cycle of the project, many decisions must be related to the operation process. Such as advance plan, intensity testing and troubleshooting are crucial in each period. Plan will eventually save you a lot of troubles and time. Check the Microsoft Solution Framework to learn about the life cycle: www.microsoft.com/msf (English).

Learn when to set "binary compatibility"

Compile the DLL that specifies "binary compatibility" means that the newly generated DLL and the old DLL have the same TypeLibraryID, Class ID, interface ID, and other identifiers. This is necessary when subsequent version of DLL deployed to a client. However, using it in the development cycle may be not conducive to efficiency. Keep the project compatibility before freezing all interfaces, then take care of binary compatibility and keep it.

details

According to COM rules, the interface cannot be changed in the case of maintaining its IID. Visual Basic utilizes a so-called interface forwarding to make developers from the limitations of this rule. However, it ultimately creates complex registry items. In fact, this forwarding is a series of searches, ultimately pointing to the latest and best compiled COM components.

Once the forwarding chain is set, it will lose the ability to put the components into the MTS. This may cause confusion during the rapid change of the interface specification. Eliminate this chain as much as possible.

In addition, there is a periodic issue for an application. Once the interface is set, go back and change them may endanger other simultaneous development activities.

Operation method

In the development cycle, your object interface typically has many changes to correct undetected errors in the design phase. During this development process, it is best to keep the DLL to keep project compatibility. Under very special cases, it can even rely on the binding. However, this will reduce the performance advantage of a large number of developers of Visual Basic IntelliSense AutoComplete feature. You are worse than returning a step, making the interface correctly and then recover simultaneously.

After confident that the component can be released, a separate copy of the DLL can be stored in a uniformly agreed location for future reference (perhaps in the Source Safe with "read-only authority", point the Compatibility dialog to it. And specify binary compatibility.

reference

PRB: Add a new method to interrupt existing clients in the VB component of MTS (Q241637) (English)

MSJ: Visual Basic Design Technology (English) to prevent running version conflicts

BUG: MTS Unable to delete VB6 Project Compatible Server (Q190175) (English)

PRB: Error has been sent to the interface in Visual Basic with MTS (Q222634) (English)

Integrate the application to get the actual capacity plan

The application's scalability and resource conflicts, queue topology, and application architectures are greater compared to a given range of physical resources. Add more processors to the machine or add more threads for the process, usually do not significantly improve performance, especially in the case where existing resources have not been fully utilized. Determine if an application can withstand a certain amount of load, is through a strict strength test (except for the actual production environment test).

details

Even the simplest scalability model is also based on nonlinear relationships, and it is a simple system. For complex systems, it is difficult to model the performance of the program, not to mention the performance of special circumstances. In order to reasonably obtain the exact specifications of the system function, you need to test the application at different degrees, and fully record the actual performance. You should draw "Performance / Load" and "Load / Resources" diagrams, then observe its trend to get a more realistic expected value. However, the plan value will never replace the actual experience from the strength test. Operation method

In MTS, "Status View" or XtremeSoft's Performance Monitor Counter can be used in MTS to determine the object usage of certain strength. If you see the total number of active objects of the package close to 100, you may need to adjust the MTS thread pool. On the other hand, the architecture may also impose unrealistic loads on the MTS activity thread.

reference

Performance test for scalable applications (English)

No MTS application deployment result (English)

Web Workshop: Load Test for ASP Applications (English)

Windows DNA Performance Toolkit (English)

XtremeSoft (English)

Designed to test the test environment as a highly matched production environment

People encounter many problems during the process of transferring applications from testing, QA or simulation. include:

Different operating system versions

Different service operations

Number of different processors

Different security boundaries across applications

Different domains, domain trust, or native privilege or identity

Network traffic affects the ability of applications and communication-connected resource communication

Different connection settings (DNS, firewall, etc.)

Different resource usability (problems related to hardcoded paths, registry, etc.)

Operation method

In the standard, design and development phase, many such issues can be avoided through the intervention of network administrators and security engineers. This includes ensuring their participation during all key tests. At the same time, we must understand the needs of the application and test the system with the same locking behavior as expected in production.

reference

Information: Test Web Server Strength Test Tools (Q231282) (English)

Test deployment and plan backup to prevent failure

Difficult causes in the distributed application life cycle, from the day of the application started working. All relevant groups attempt to inject air into the air to mask the lack of exercises and plans for the event. Before "Enter Survival Day", you need to practice operation in a clean environment and all participants. Solve small problems in the controlled environment, not to increase pressure on production users. By planning and logging production and installation processes and possible plans to avoid confusion and embarrassment of deployment failures.

Operation method

Create an environment called "clean system". It has nothing to do with applications and test deployments. From the most common configuration (clean installation of Windows 2000 Advanced Server, or any configuration mapped to the production environment), clearly record each of the steps involved in the distributed application installation process. Pay attention to the position of the binary file and the location where the installation point is located.

It is assumed that no one will solve the problem throughout the process. Make sure that the small test scheme that the installer can use is used as a record point that determines if the installation is normal. Finally, how documents uninstall applications, including registered components, registry entries, temporary files, special users who create it or have installed, started or stopped.

reference

COM Application Deployment and Registration (English)

Use source control software, as well as source control policies and policy

Distributed applications have many components distributed in the network, which is usually a good thing. However, if the source code is distributed across the enterprise, then this is certainly not a good thing. The future source code strategy should be determined before starting development. Ensure that the source code and all test groups and documentation records are guaranteed. Make sure the debug extension includes in the compiled code. (See "Compilation and Symbol Information" above.)

Be sure to include a simple text file in the installation instructions, where there is a description of the source code copy when you need to debug.

reference

Visual SourceSafe 6.0 Data Sheet (English)

Set Visual SourceSafe (English)

Learn how to debug and analyze the running app or dump

After completing the project, you will compile it and then deploy in analog test environments and finally put in the production environment. Due to configuration, hardware, logic, or runtime errors, applications will express unfavorable behaviors at any time.

In this case, it is often lacking the development and debugging tools during development, and it must be retracted to another debug mechanism.

In some cases, the presence of the debugger reduces error messages. The development environment often makes timed errors and operations cannot be manifested. Fortunately there are many debug tools to be used for these situations. However, most tools are set up and configured.

There are two main debugged user mode processes, such as MTX.exe. They are interactive debugging and dump debugging.

Interaction is meant to load tools, such as Visual C , which can achieve runtime thread control, browse memory (such as processor registers, stacks, and stack spaces), all of which are completed during the execution of actual programs. This debugger can be specified on the attribute order of the COM application. For more information on interaction is a debugging, see Debug Visual Basic MTS Components (English).

Applicable dump debugging is that the application crashes, and it is difficult to know the cause and time of the server application to run in the case of 100% CPU utilization. This is mainly carried out around the operation, that is, the snapshot (usually crash dump) of the running process is obtained, and then load it into the debugger to analyze the status of the error at the time. Because this requires more low-level understanding of the machine, stack and stack architecture, it is difficult to sleep than the mutual adjustment, but once you have a memory dump, it can be done on any machine at any time.

Operation method

Many tools are useful for development applications. These tools are particularly important when interacting with the heritage code, inherited black box DLL or other scheme. At the same time, you will need to generate a PDB file for the component, review the section above the Compile and Sign Debugging Information.

A good tool for this type of behavior is an IIS Exception Monitor. It allows "hook" to the MTS / IIS / COM process to monitor any abnormal conditions that may occur in the run process.

The simplest interaction debugging tool is Visual C because it is a debugger for GUI. However, its availability is limited. If you are not willing to install Visual Studio in a production or test environment, then other debuggers may be more in line with your needs.

Other available debuggers are also a word-of-mouth WINDBG in Win32 SDK. Its powerful feature is cost. It is recommended that you understand the assembly code and complexity.

reference

Visual Basic developers do not often perform low-level debugging, but if you need this, the following link helps learn and use those tools.

COM Configuration Settings: Application (English)

Web Workshop: Developing Visual Basic Components for IIS / MTS (English)

Windows SDK Debugger (English)

Debug Visual Basic MTS Components (English) Web Workshop: IIS Exception Monitor Troubleshooting (English)

Web Workshop: Analyze logs from IIS Abnormal Surveillance (English)

---

转载请注明原文地址:https://www.9cbs.com/read-3786.html

New Post(0)