Windows DNA is a platform for building distributed
applications using the Microsoft Windows operating system and related software products.
That statement leaves a considerable amount of room for
confusion. What is a "platform"? What are "related products"? Even the term
distributed computing has been given various definitions.
It's worth the effort to sort out the confusion because
multi-tier architectures like DNA are widely regarded as the future of large-scale
development. As we will see in this chapter, such architectures offer significant
benefits in the construction of mission-critical and
enterprise-scale systems. This book will introduce and overview, just about everything
you want to know about building modern, forward- looking
applications for Windows. The Windows DNA architecture is
a blueprint and set of guidelines for doing
this.
Before we can begin, however, we need
to examine a few concepts. When we talk about modern applications, we are almost always
talking about
network applications. It's rare to develop an application today that does not either
make use of distributed
resources or incorporate technologies developed for the Web. Even standalone desktop
applications
make use of techniques and technologies influenced by distributed programming,
such as data source abstraction and component development.
In this chapter, we'll look at:
- The nature of modern,
networked applications, and a brief review of the history that
brought us to the current state of software development
- What we want to get out
of an application, and the inherent problems we need to overcome
when designing distributed applications
- The goals that Windows DNA is designed to tackle over and above
other architectures
Before we embark on our voyage through Windows DNA, let's examine the nature and
needs of a modern application. Building such
applications is what Windows DNA is about.
Internet Application Design
In case you haven't noticed,
most of the new software development taking place today centers
around delivering functionality via the
Internet. What does the typical Internet-based application look like
today?
There really is no single answer to
that question. There are so many types of business solutions being built using Internet
technology that there are probably
thousands of different types of Internet-based applications. However, there is one
question we can probably
answer: what are the basic characteristics of these applications?
Internet Application Requirements
In general, an Internet-based application will:
- Present a unified view of data from multiple data sources
- Allow a user to update data
- Provide full e-commerce capabilities
- Be fast
- Be scalable to thousands of concurrent users
Now let's take a look at each of these characteristics in a little more detail.
Presenting a Unified View of Data From Multiple
Data Sources
Presenting a unified
view of data coming from multiple sources creates a number of problems. A lot
of businesses have multiple types of data
stores, ranging from mainframe-based VSAM applications, to SQL Server databases,
to Oracle databases, to e-mail stores and
directory services. There needs to be a way
to "tie" all of this data together. So obviously we are going to need a robust
data access mechanism, which allows us to
access multiple types of data sources that might even reside on different
platforms. In addition, we might need host,
or mainframe, integration capability. Just getting data from a
mainframe application to a web page is a
huge technical feat.
Allowing a User to Update Data
If our application allows a user
to purchase something, or
initiate financial transactions, or update personal data, we're going to need
transactional capability. By
having transactional capability, we need to
somehow make certain that either all parts of a piece of work, or transaction,
complete successfully or none of the
transaction is allowed to occur.
To make
matters more complicated, we already know that the likelihood of having data in
multiple sources is fairly high. The
consequence is we will need the ability to define transactions that
span multiple data sources, while still
having full two-phase commit and rollback.
Full e-Commerce Capabilities
Providing full
e-commerce capability is a must these days. If you're selling products over the
Internet, you will need a framework that
provides a shopping cart, and management tools to manage product
catalogs, run promotions and sales, and present
cross-selling opportunities to your users. Additionally, you will need this framework
to be extensible so you can
incorporate your own business logic, such as calculating taxes in foreign countries.
It would also be really
nice if this e-commerce framework used the same transactional capability described
above when users commit
their purchases.
Fast
You might get users to your web site the first time, but if your
site is so slow that they have a bad user experience, they might never come back. So you're
going to need
to be able to architect a solution that solves your business problem, but is fast at the
same time.
Being able to distribute requests
among many machines is one way to help achieve a speedy solution. Other design
characteristics, such as performing work
asynchronously, can also help speed up things.
An example, albeit a crude one, might be an online purchasing
application. When a user actually places an
order, they probably don't need any kind of response other than "we received
your order, here is your confirmation
number". You could then place the order on a queue and process it later. The
user doesn't know their order won't be
processed until later, but they've got the result they wanted
quickly.
The implication here is that
you'll need a queuing or messaging mechanism at your disposal, so you
can incorporate it into your application
design.
Scalable to
Thousands of Concurrent Users
Not
only does your site need to be fast, it probably needs to support thousands of
concurrent users. Again, load balancing
across multiple machines will help solve this problem. Not only will
load balancing help you handle more users,
it will also improve your "uptime", and help ensure you are running 24x7x365 like all
users expect these
days.
Platform Capability
Requirements
So now you have a
better picture of some characteristics of applications being built today.
There's obviously a lot of infrastructure
needed to build these applications. What we can do now is take
these characteristics, and from them create
a list of the capabilities we're going to need from our platform.
These include:
- A web server
- Transaction processing and object brokering
- Message queuing
- A data access mechanism
- Security
- Load balancing capabilities
We'll see later in the book that Windows 2000 provides these,
but that's jumping the gun a little. We should probably turn our attention first to
identifying the
things that drive us when designing applications.
Application Design Goals
For most Internet-based applications you can usually
identify two sets of goals: