Adventures in SOA, Part 1

by javery on January 2, 2004

I have started work on a new side project and have decided that I am going to try and implement this project using a service-oriented architecture. I usually try and use side projects as a way to learn new things, and explore new technologies, and this is a perfect opportunity to better explore SOA. I also decided I would go ahead and blog about it here, so people can correct me where I am wrong, and perhaps learn from me when I am right.


The Application


The side project I am working on is a .NET news site, something in the same vein as Slashdot, Neowin, or TablePcTalk. I am calling the site devFrequency or devFreq for short. My goal is to try and create an online community surrounding .NET development similar to what exists at Slashdot. (ambitious eh?) Some people might question if sites like this are still needed, considering the increasing popularity of blogs, but I would argue that sites like this still offer value in a number of different ways. They offer a more frequent and consistent source of news, as well as a place for everyone to discuss the news in a common place.


Step 1: Understanding SOA


I am not completely ignorant on the subject of SOA, the current application we are building at work is somewhat service oriented. How can it be somewhat service-oriented? Well, it has a service interface and uses .NET remoting to communicate between the windows form application and server… But since we are sharing types between the windows app and the server, as well as using binary transport, it does not have the flexibility that true SOA might have. (That flexibility being that everything is tied by a schema, not a type.)


So I started this with a small bit of knowledge, but I needed to know more. First I checked out Don Box’s SOA focused MSDN TV Episodes (Part 1, Part 2) which are focused on the “big picture” of SOA, then I read a bunch of small articles on the net that were all focused on the big picture of SOA, without getting into the details of implementation. The most promising development in SOA is the Shadowfax architecture, a best practices architecture demonstrating how to implement SOA in .NET.


Step 2: General Architecture Decisions


I have figured out just enough to be dangerous, but first I have a couple decisions to make. The 1st is what type of transport to use, I could use remoting, MSMQ, or XML Web Services… I have chosen XML web services because I feel future compatibility is very important and that XML lends itself to future compatibility more than the other transports, and I also think there is much more flexibility in using schemas. I also want to make some of the services available to other applications and developers, and XML WS are the easiest to integrate.


The second decision I made was that I wanted authentication and advertising functionality to be multiple site aware, meaning that I am going to build a single set of services for authentication and advertising that I can then use on this site as well as any other site. These functions will be implemented as XML web services and will be called from either the other services, or the front end ASP.NET. (I have not decided this yet) In the beginning they will be on the same physical server, but eventually they will probably have there own server.


The rest of the functionality for the site, including working with news items, admin functions, etc, will also be implemented as web services and will be called from the ASP.NET front end. (Probably through some sort of proxy class).


Performance Concerns


All these web services have me concerned as to what the performance of this application will be, considering that instead of directly calling the middle tier through a .dll ASP.NET will be calling any number of web services. This means that for each page hit I will hit my server 2 or 3 times…. but at least I know it will be easy to scale to multiple servers. (Don’t know how economical that will be though)


Confusion


The one major thing I am not sure about is how to build the internals of the services, should I still use business components and a data access layer? Should they still be object oriented? Or should they be more focused on each service?


Look for Part 2 in the next week or so as I work more on the architecture of this side project.


Comments? Suggestions?


-James

{ 2 comments }

Andy January 3, 2004 at 2:40 am

Amen! I too am starting to look at doing a project in SOA.

I must say SOA has a lot of buzz.

When you look to Fowler’s patterns you have Transaction Script or Domain model as the major choices. Domain model seems to make the most sense with the layer pattern (being where SOA comes from) but that means building a mapping layer. I haven’t seen a great deal of MS code that doesn’t use DataSets in a transaction script style.

I look forward to seeing what you end up with.

Niyazi June 14, 2005 at 12:40 pm

James,

It is not recommended to call local web services.Read http://www.msdn.microsoft.com/webservices/building/architecture/default.aspx?pull=/library/en-us/dnpag/html/scalenetcheck09.asp

If the application is local to the webservices conside calling middle tier directly and has a great peformance imporovements.

Thanks

Niyazi

Dubai

niyazi.khan@emirates.com

Comments on this entry are closed.

Previous post: .Text 0.95 Released

Next post: What I learned from Eric’s Mistakes