Partilhar via


Commerce Server as an Application Server-SOA like

We recently hosted a Commerce Server Air Lift and there were may questions around using Commerce Server as an application server. In this post I will address some areas of concern, and risk associated with this approach. I am not saying it can't be done. You just need to be aware of issues around each Commerce Server Systems.

What is an Application Server?

A "middle-tier" software and hardware combination that lies between the Web server and the other networks and systems.

What is SOA?

You can do a quick search on www.live.com to learn more about Service Oriented Architecture (SOA), but the short and simple answer is, SOA is a loosely coupled software service. Commerce Server 2007 implements SOA to facilitate seamless integration into Web services-enabled environments.

Ways to Access Commerce Server

Here are the ways commerce server can be accessed.

Note: Not all Commerce API are serialized, and only the Runtime API was tested for performance.

Runtime API

The runtime APIs are meant to be used under the ASP.NET context, such as an aspx or an asmx. You can find more info at Programming with the Runtime APIs.

Service Agents API

The Service Agent mode allows access to the Commerce Server web services. For more help see the following Agent Mode Programming with the Management APIs.

Site Agent API

The site Agent APIs are meant to be used in either an ASP.NET, console, or WinForm application. Unlike using the Web services directly, the agent APIs provide the same object model as is available locally using the in-process APIs. For more info you can look at Local Mode Programming with the Management APIs.

Web Services

If you are using other programing languages like J2EE you can access the Commerce Server 2007 and Programming Directly to the Web Services.

What are the Issues for Commerce Server as an Application Server

If you are going to use Commerce Server as a middle tier, then you need to understand the Commerce Server Systems and issue that you may face.

Catalog and Inventory System

You can use any of the methods stated above to access the Catalog and Inventory System. If you have requirements around using Catalog Sets, then you will need to do additional work. The Catalog API has one method GetCatalogsForUser that will not work if the Catalog System is used as an application server.

  • CommerceContext.Current.GetCatalogsForUser()
    This method requires a context to the users profile, to retrieve the guid for the Catalog Set associated under the AccountInfo.user_catalog_set property. Since you are accessing the Catalog System remotely, you will not have a profile context and the default values are used under the web.config for authenticated and anonymous users.

Marketing System

The Web Services for Marketing are meant for management, and should be used for that purpose. If used as an application server you will have issues with how the Ads and Discounts are displayed. A web.config setting configures the runtime Marketing APIs to be cached for specific time interval. When Ads or Discounts are created, you may have a business rule to display them for a specific number of times. This data is collected in memory and when the cache time is reached, the in memory data is persisted into the database. Since the in memory cache is in the application server the Marketing System can only record what is being accessed, and it will not know how many times the presentation tier displays the Ads and Discounts. You will also have to figure out how to record the click through of Ads and Discounts.

Targeting of Ads and Discounts will be difficult if using the Target Expression. Since they based on users profile you will require a profile context, which is not available in an application server environment.

Profile System

The Profile System handles the authentication of users by creating cookies. If you are in an application server environment, you have to create your own cookies and manage them.

Order System

I can't think of any requirements that would keep you for using the Order System in an application server environment.

Data Warehouse

Web logs are used to gather analytic reports about users and their click stream. In an application server environment you will have two or more web logs to consider for importing into the Commerce Server Data Warehouse. You will also need to figure out where you are going to recording Commerce Events. Commerce Events are methods that write to the web log.

Starter Site

Starter site does not implement SOA out of the box.

Comments

  • Anonymous
    November 05, 2007
    Do you know of any implementations of CS as an application server with a SharePoint front end?

  • Anonymous
    November 07, 2007
    The comment has been removed