June 2007 - Posts

WCF and Concurrent usage throttling
Wednesday, June 27, 2007 12:37 PM

Have a requirement to interface with a legacy system that exposes a set of web services. The legacy system is not terribly fast and there are concerns by the client that it cannot handle excessive load. It seems to handle the current load ok, but we have been tasked with writing a system which will interface directly with the legacy system and potentially increase that load substantially. I can neither confirm nor deny the legacy systems ability to handle our projected load as the metrics simply are not available and its not feasible to generate them at this time.

So, the design decision is to implement our system such that it only allows a certain amount of requests through to the legacy system.

To do this, I have adopted a Unit of Work approach to the legacy system and will create a WCF service that acts as the system gateway (and no, it wont be strict Unit of Work pattern, but the concept is identical).

The service gateway will be exposed via a named pipe binding and it will use a serviceThrottling service behavior to limit the number of concurrent requests to the required number deemed "manageable" by the legacy system.

I like this approach because it means WCF can deal with the concurrency regulation, and I am sure it would do a better job than me at queuing and managing the requests. Its pretty simple, and also pretty fast. The named pipe binding is extremely high performing and the design of a service boundary now, means it will be trivial to expose this to other clients in the future using other bindings such as wsHttpBinding.

by Glav | 6 comment(s)
Filed under: , , ,
Windows Workflow and validation
Wednesday, June 20, 2007 12:40 AM

Requirement

I need to provide a means to perform validation on a booking system. This validation needs to act as a type of service. It will initially be simple, but will change as usage patterns emerge in the system that we wish to deal with and validate against. The validation process will be the same for every booking, but the process itself may change each week or month depending on the business. ie. We need an easy way to update the validation periodically. Eventually the fluidity will subside but initially it could be quite high.

Solution

I have written a proof of concept that uses windows workflow which I think is going to work out nicely. I define a workflow that performs the validation in a separate assembly. The workflow uses a base class that contains a property which holds the meta data upon which to validate the booking against. This will act as a common point to provide the data upon which to validate.

The validation is created using the workflow designer and is serialized as XOML (Workflow specific XAML) and saved to a database (just a simple string). The assembly is shipped with the system. The validation API loads the current XOML definition from the database and instantiates a workflow from it (de-serializes the XOML), then populates the meta data properties so the workflow can do its thing. We kick off the activity and get a notification about success or failure (and appropriate reason if failure).

When I need to change the validation, I define a new one using the workflow designer (same assembly or a new one...doesn't matter), serialize it and store it in the DB (using a really basic utility app. new validation is now used when the next booking is performed.

 

I'll post some code when I get a nicer API around it going and the code a lot neater. Right now it is very dirty and just proves the technical concept. Now I can move forward with a neater solution to encapsulate this within our current solution.

Just thought I'd share for comment. Works well in the POC. Actual implementation may be different....

ASP.NET Podcast - Show #94 - WCF, Client Side
Thursday, June 14, 2007 10:50 PM

Original URL: http://aspnetpodcast.com/CS11/blogs/asp.net_podcas...

Subscribe <-- What the cool kids are doing

Download

In this show, I talk about WCF and some implications of usage patterns on client side performance. In particular:

  • Usage Patterns in WCF
  • General performance
    • WCF and WSE/ASMX
    • Client engagement around WCF/WSE
  • Static re-use of the proxy – ASP.NET application pattern
  • Not re-creating the proxy
  • WCF Proxy/Channel pool
  • Performance Gains

Wally also talks about:

  • The podcast sit and upcoming changes.
  • Trip to Florida.
  • Talking in Knoxville.
  • Book Status.
  • Non Technical:
    • Marketing.
    • Contracts.
by Glav | 3 comment(s)
Filed under: , , , ,
More Posts

This Blog

Syndication