Skip to main content

Posts

Thread Parameters

One of the useful niblets in .NET 2.0 is the new ParameterizedThreadStart delegate that makes it convenient to pass parameters (OK, a single parameter - but it's an Object so you can pretty much pass anything you want!) to a thread. ParameterizedThreadStart makes your multithreaded code more readable and therefore easier to maintain. In the "old" days, I had to expose an explicit property in the class that performed a multithreaded task like so: // An object that compresses the contents of a folder to // a .ZIP file. public class FolderCompresser { // The folder to be compressed to a .ZIP file public string Folder { get { return _folder; } set { _folder = value; } } // The compress method public void Compress() { string zipFilename = _folder + ".zip"; internalCompress (_folder, zipFilename); } } The client code that used FolderCompresser had to explicitly set its parameter before starting the thread: // Invoke the compressor FolderCompressor fc = new FolderComp...

Cloud Computing: The power of one

In their quest to find answers, experts have demonstrated that the future of medical discoveries, environmental challenges, energy deficit, all lie in collaborating through Cloud Computing. With Cloud Computing, users have been able to access data, share expertise and high-end infrastructure from around the world, and vice-versa. The resources are shared through a public platform like the internet. Several companies like Amazon, IBM, Microsoft, etc have invested heavily as they reach out to users. Cloud Computing companies have customers of three kinds - Infrastructure-as-a-service: Option of renting and utilizing computing power and storage capacity of vendor's quality. Software-as-a-Service (SaaS): Vendors license particular services to subscribers on-demand and once the contract expires, the services are disabled. Platform-as-a-Service: Here a developer is given the opportunity to utilize various web-tools to build and host applications. The Cloud (other computers in the network...

Connection Pooling Concepts

Connection Pooling If you do not use connection pooling, each connection instance ( java.sql.Connection or oracle.jdbc.OracleConnection instance) encapsulates its own physical database connection. When you call the close() method of the connection instance, the physical connection itself is closed. This is true whether you obtain the connection instance through the JDBC 2.0 data source facility described under " Data Sources ", or through the DriverManager facility described under " Open a Connection to a Database ". With connection pooling, an additional step allows physical database connections to be reused by multiple logical connection instances, which are temporary handles to the physical connection. Use a connection pool data source to return a pooled connection, which is what encapsulates the physical database connection. Then use the pooled connection to return JDBC connection instances (one at a time) that each act as a temporary handle. Closing a connect...

What is Hypervisor?

Definition: A hypervisor, also called a virtual machine manager, is a program that allows multiple operating systems to share a single hardware host. Each operating system appears to have the host's processor, memory, and other resources all to itself. However, the hypervisor is actually controlling the host processor and resources, allocating what is needed to each operating system in turn and making sure that the guest operating systems (called virtual mahines) cannot disrupt each other. Microsoft Hyper-V: Hyper-V is the latest virtualization product from Microsoft. The new hypervisor platform works with Windows Server 2008 to create and manage a virtual infrastructure. As with any virtualization platform, Hyper-V makes for a more efficient data center, maximizing resources and reducing costs. Hyper-V consists of a 64-bit hypervisor that can run 32-bit and 64-bit virtual machines concurrently. Hyper-V virtualization works with single and multi-processor virtual machines and inc...

What is an Aggregation?

Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true. For example, a university owns various departments (e.g., chemistry ), and each department has a number of professors. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a University can be seen as a composition of departments, whereas departments have an aggregation of professors. In addition, a Professor could work in more than one department, but a department could not be part of more than one university. Composition is usually implemented such that an object contains another object. For example,: class Professor; class Department { ... private: // Aggregation Professor* members[5]; ... }; class University { ... private: // Composition Department faculty[20]; ... }; In aggregation, the o...

What is service-oriented architecture?

Service-oriented architecture (SOA) is an evolution of distributed computing based on the request/reply design paradigm for synchronous and asynchronous applications. An application's business logic or individual functions are modularized and presented as services for consumer/client applications. What's key to these services is their loosely coupled nature; i.e., the service interface is independent of the implementation. Application developers or system integrators can build applications by composing one or more services without knowing the services' underlying implementations. For example, a service can be implemented either in .Net or J2EE, and the application consuming the service can be on a different platform or language. Service-oriented architectures have the following key characteristics: SOA services have self-describing interfaces in platform-independent XML documents. Web Services Description Language ( WSDL ) is the standard used to describe the services. SOA ...

Function Point Analysis (FPA)

Function Point Analysis (FPA) was a valuable techniquedeveloped by A. J. Albrecht, in 1977. FPA assigns a point to each function in an application. Various modifiers then act upon the function points in order to adjust for the product environmental. Modifiers typically included applying weighted percentages or multipliers that would simply increase or decrease the point values. Environment factors included modifiers for complexity of technical issues, developer skill level, and risk. One problem organizations attempting to use this method would run into was consistent definition of a function and consistent definition of environmental factors across multiple projects and multiple development languages. In order to produce reliably accurate estimates, FPA relies heavily on historical data to derive weighting values and modifiers.