Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Scale Your Applications with Component Load Balancing

Microsoft's new Application Center offers component load balancing technology that allows administrators to create a cluster of servers that will respond to component requests.




Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js

Date: 1/31/2018 @ 2 p.m. ET

ith more and more companies moving their applications to the Internet, Visual Basic developers are faced with the problem of having to build components that scale to thousands of users. This either takes learning all of the tricks to squeezing every bit of performance out of VB or moving to a language like C++. You have probably also created an extremely convoluted network architecture to partition users across multiple servers to provide some level of redundancy. In doing so, you struggled with having to install and administer COM components on multiple servers; figuring out which server has which version of the component, messed around in the registry to ensure that everything is configured correctly, or faced DLL hell because other applications were installed on servers that overwrote supporting DLLs.

Until now, there has been no simple solution for developers to easily create COM applications that provide the scalability and reliability necessary for Web applications. Adding your components to MTS helped, but it was still a bottleneck and a single point of failure in your application. If the server went down, then that part of the site would come down. To help with some of these issues, Microsoft has introduced a new server called Application Center.

Visual Basic is great for building applications quickly but unfortunately, with VB, the tradeoff is usually poor scalability. The Internet has made this limitation of VB applications a constant challenge for developers, who must build components that scale to thousands of users.

Microsoft's new Application Center offers component load balancing technology that allows administrators to create a cluster of servers that will respond to component requests.

Background on Application Center
Application Center is designed to provide a more robust environment for configuring, testing, deploying, maintaining, and scaling Web applications that are deployed across a server farm. There are a number of features in Application Center that will be of great interest to any VB developer, as they will assist in developing more scalable applications that are easier to administer and deploy. This article will focus on the component load balancing (CLB) feature of Application Center, which can significantly improve application scalability.

Note: Application Center runs only on Windows 2000 Server, Advanced Server, and Datacenter Server with IIS 5.0 installed.

COM Activation of Objects
In order to understand what CLB is, you will first need to understand the basics of how COM+ instantiates objects. When an application makes a call to instantiate a new object using the New keyword or the CreateObject function, a Windows service, the Service Control Manager (SCM), is performing the instantiation. The SCM acts as a middleman between your application and the COM component. The request for an object is passed to SCM as either a request for the ProgID, such as Word.Application, or as a GUID of the class, such as {000209FF-0000-0000-C000-000000000046}. The SCM uses this information to locate the COM DLL or EXE in the file system by searching the keys in the registry.

When the physical location of the COM component is found, the SCM instantiates an object and returns a pointer to the object in the case of an in-process COM DLL, or a proxy object in the case of an out-of-process COM EXE. With out-of-process objects, the SCM must create two objects to marshal data across processes. These two objects are the proxy and stub objects. From the perspective of the client application, it always thinks it is communicating directly with the instantiated object because the proxy implements the interfaces of the class being instantiated.

With Windows NT 4.0 and DCOM, Microsoft extended the SCM to allow applications to instantiate objects on a remote server by passing the server name into the CreateObject function:

Set oCustomer = CreateObject("MyExe.MyClass", _ "ServerName")

or setting the RemoteServerName value in the registry for your components. DCOM allows your applications to be partitioned into three physical tiers and moves some of the workload off of the client machines. For Web sites, this means that part of the workload can be removed from the Web server and placed on an application server. The Web server can service the HTTP requests and the application server can handle the "business logic."

With CLB, Microsoft extends the SCM to dynamically assign a server within a server farm to handle activation requests of objects. Instead of relying on one machine to process the requests, CLB distributes the load across multiple servers.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date