Windows Server appfabric: better, faster, and cheaper

Source: Internet
Author: User

Microsoft's global vice president Soma, responsible for Microsoft's developer division, posted a blogArticleWindows Server appfabric: better, faster, and cheaper. Microsoft Server and Internet Information Service (IIS) do not provide Web applications for deployment, management, and monitoring of specific categories.ProgramWindows Server appfabric is launched to respond to the requirements of a large number of organizations and developers. Over the years, they have always wanted Microsoft to provide "application servers ". The Microsoft Server appfabirc fills this gap. It is used as a free extension for Microsoft servers and is expected to provide the availability of local components to be released on Windows servers.

Windows Server appfabric is an extension of Windows server. Applications can be free of charge in part or whole. It provides a series of functions to improve performance and enhance the management of web and hybrid applications. Windows Server appfabric uses the. NET technology we are familiar with to provide distributed cache technology and the basic structure of distributed management and monitoring.

One way to improve user experience and system scalability is to accelerate their access to information. If multiple applications on multiple servers access the same database, data access becomes a bottleneck. If the Asp.net page is waiting to access the database, adding more front-end servers does not help. Now we need an extension method: how to distribute frequently accessed data to multiple servers for direct access to solve the bottleneck of accessing a database server. An effective method is to create a publish cache service (distributed cache) that distributes data to multiple client machines. Compared to retrieving data from a single database, the Asp.net page can now retrieve data from multiple machines. Load Balancing and applications will be better. This is what appfabric caching services has to do.

One of the main components of appfabric caching services is the cache client, such as the Asp.net page, which accesses the cache cluster. The cache cluster consists of multiple servers running the cache service, each server runs an appfabric caching service instance, and each cache service contains some data caches. The cache client can contain its own local cache and provide external services as part of appfabric caching services through software.

When the cache client uses data for the first time, the data can be the information provided by the user of the Asp.net application, or the value read by the database, you can use the appfabric caching services client library to explicitly store the data to the cache cluster using a unique name. (It will also be explained later that the Asp.net application can do all this transparently with the session object. Therefore, the cache service does not needCodeMake any changes) for the client, all the cache servers in the cache cluster are displayed as a logical cache service, and the client does not need to know or care about which server provides data for it, if you select local cache, the client can also store data items in its local cache.

When the client needs to access the same data item again, the data item name must be used. The query is first searched from the local cache (if the local cache is set ). If the data item can be found, the cached data is directly returned. If the data is not locally cached, the query is sent to the cache cluster. If the data can be found in the cache cluster, then, data is returned from the cache cluster. The process of data transmission to the client is that the client initiates a data request, and appfabric caching services prepares for the request and returns the result. If the data is not found in the local and cache clusters, the client needs to query information from other places, such as databases.

Appfabric caching services is designed for use by. NET applications. Therefore, cached data items can be any serialized. Net object. Once an object enters the cache, the application can update the cached version or delete it. The cached data can also be deleted by the cache service, the deletion condition can be a set expiration time or replaced by more frequently accessed data. The same is true for data items cached locally. In addition, the local cache can be set to automatically synchronize with changes to the cache cluster.

Multiple cache clients can share the same cache cluster, which makes sense because a scalable application can replicate its business logic (such as the Asp.net page) across multiple servers ), and access the cache. At the same time, security is also a problem that needs to be raised. In order to reduce the risk of sharing to a lower level, the data transmitted between the cache client or cache server needs to be digitally signed and encrypted, the administrator can restrict the account's access to each cache. Even so, organizations also need to ensure that multiple clients using the same cache are trustworthy, because they can access data between each other by default.

Caching is very useful for a variety of data. For example, for data that changes slowly or basically does not change, such as the product catalog information for online sales, the cache has a good experience and can satisfy the requests of multiple clients at the same time; another cached application stores changed data, but can only be accessed by one client, such as Asp.net session object. Once again, do not control concurrent access to the cache.

However, what should I do for data that needs to be changed and accessed by multiple clients at the same time? The cache service can still be used, but the situation will be complicated and concurrency control is necessary. To solve this problem, appfabric caching services provides two concurrency control methods: one is optimistic concurrency control mode, that is, the version number is provided for each cached object; another method is pessimistic concurrency control, that is, explicit locks are used.

Applications generally expose functions through services. For Windows applications, these services are implemented through WCF in many cases. At the same time, some service logic is better implemented through workflows, therefore, creating a WCF Service Based on a workflow is also very likely. How can we make these services run? Windows provides many common host methods. developers can create host programs as needed. However, it is not easy to create an efficient and manageable host. Using WCF and WF, you can easily support and manage hosts through the functions provided by Windows server. This is what appfabric hosting services has to do.

WCF provides a common way to expose and use services, and WF supports workflow creation logic. Appfabric manages both the WCF Service and the workflow service (the workflow service is also a WCF Service ). The difference lies in the content contained in the service. The content of the WCF Service is your code. For workflow services, you usually need to use the Visual Studio workflow designer to draw your workflow and a set of reusable workflow activities. A workflow activity must contain activities to make your workflow a service and call other services.

We can also consider a workflow activity as a component. You can create an activity from an existing component, that is, an integration activity. Using different components to synthesize applications is a very powerful model that is useful for both cloud applications and today's common applications.

The Visual Studio WCF workflow service application template helps you start and run your workflow service in a short time and view the results in appfabric. To start the service, you can use the template to create a new project and set the Web properties in the project so that it can use the local IIS server. Build and run your project, and the built-in WCF test client will run. You can use this test client to send data to your workflow and view the results. Code-based WCF services also have similar templates, so you can immediately focus on the business logic written in code, instead of writing the WCF infrastructure or any relevant host logic and management functions-appfabric has done this for you.

The appfabric console allows you to view all statistics related to your code and workflow service in the IIS manager. The historical data of the workflow instance shows the activated and completed workflows. The operation board can also help you monitor and control the persistence of workflows. All service calls are tracked. Creating your own monitoring events and displaying them on the console is also very easy.

Appfabric tracks workflow execution from one activity after another, and displays information in the Operation board. This is useful for fault analysis and understanding of the stream running status of a workflow instance. You can even expose your data to appfabric from your workflow and query its data to find the workflow instance it contains.

For more information, see http://www.microsoft.com/windowsserver2008/en/us/default.aspx

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.