The Barnes & Noble fulfillment and distribution system takes full advantage of n-tiered distributed application architecture. Separating between presentation, business logic, and data tiers, which share services and communicate using the Component Object Model (COM), helped significantly decrease time to market.
The presentation tier presents customer service applications made up of Active Server Pages hosted in a browser talking to the middle tier. It presents forms created with Microsoft Visual Basic® for Applications and integrated with Microsoft Internet Information Services 5.0 (IIS) and custom dynamic hypertext markup language (DHTML) user interfaces.
COM+ components residing in the business logic tier perform a variety of functions, such as preparing orders, authorizing credit cards, shopping for suppliers, and communicating with the automated plant floor machinery that ships products. MSMQ processes each of these steps. Each component receives instructions from its inbound queue, completes its processing task, and then sends a message to the queue of the next component. Orders can be dispatched to multiple order processors and to components running on other computers, offering virtually unlimited scalability.
The ability of COM+ and MSMQ to automate multi-step transactions not only saves time and labor, but also dramatically increases Barnes & Noble.com's order-processing capacity. For example, the company's custom-built warehouse management system automatically controls the flow of orders coming in, provides the person on the warehouse floor with a printed invoice for picking and packing, then sends a message to the shop-floor equipment to print the shipping label.
One of the most unique pieces of business logic is the smart shopping and shipping component Barnes & Noble.com developed using the Microsoft Visual Studio® development system. This component enables the system to select automatically the distribution center for the ordered item and determine the easiest, fastest, and most cost-effective way to ship it from that location.
When an order includes items assembled from different locations, smart shopping and shipping determines the best way to handle it. "If we have a book coming from the Barnes & Noble, Inc. distribution center and music coming from another location, the system figures out the best way to proceed," explains Peterson. "Do we ship it separately? Do we consolidate all items in one place? The system automatically determines the best arrangement to meet the promised delivery date and the expectation levels of our customers."
All order information goes from the front-end Web servers into a Shop DB database running on SQL Server 7.0. That database is replicated to a mirrored database on the back end. The data tier consists of the main online transaction processing (OLTP) database on SQL Server 2000 and a data warehouse for reporting.
The distributed database system is based on a hub-and-spoke design. The hub includes all the orders coming in from the Shop DB database plus the central Customer Service System. The spokes point to the distributed transactional databases at each vendor site.
Order data from the replicated Shop DB database on the back end is transferred to a SQL Server 2000 database in the hub, using SQL Server replication and MSMQ. Then, based on the content, the order is automatically sent to the appropriate vendor database on the extranet, using MSMQ. The order is pulled out of the appropriate vendor sites and the results are sent back to the hub system.
Using a custom-built MSMQ application, the system extracts data from the SQL Server 2000 database and pulls it into the SAP R/3 system. Data is also drawn from the SQL Server 2000 database and imported into the data warehouse, where it is analyzed using custom-built applications.
The back-end system is composed of Compaq ProLiant 8500R eight-way servers and Compaq ProLiant 6400R servers maintained in clustered pairs. The main hub databases run on Compaq StorageWorks RA1200 Fibre Storage Units. The solution was built in about eight months, using the Visual Studio development system.
http://www.microsoft.com/resources/casestudies/casestudy.asp?CaseStudyID=10633