Gracey’s in the trenches .NET development

March 3, 2008

Grid Computing = Silverlight + Parallel Extensions, nearly….

Filed under: Parallel FX, Silverlight — gracey @ 6:34 pm

Using my trusty Google Reader I came across a couple of interesting projects which I hoped could be combined to solve very real world problems.

The Projects

Legion is a Grid Computing framework that uses the Silverlight CLR to execute user definable tasks.

Parallel Extensions

Is a library that allows developers to take advantage of multi-core machines while abstracting away the hard problems of multi-threading programming. It includes,

-Parallel Language Integrated Query (PLINQ)

This is declarative in nature and provides a SQL like syntax for your parallel work.

-Task Parallel Library (TPL)

This is imperative in nature and just makes it easier to write managed code that can take advantage of multiple processors.

The Problem

There are certain types of problems in the real world that are CPU intensive a classic one is determining risk. The Monte Carlo method is one way of tackling this problem through repeated random sampling to work out the risk.

It is used in industries such as finance to price complex financial derivatives and within portfolios to work out the Value at Risk (VAR) . In manufacturing it can be used to determine how many product units should be produced. Take a look at this Microsoft Excel Monte Carlo simulation example for an introductory primer as to whats it all about.

Monte Carlo methods are computationally intensive but naturally parallel and so using grid computing to solve the problem is a good fit.

A Potential Solution

There seems to be a good fit between the Legion project and Parallel Extensions to solve these class of problems but unfortunately the releases of Silverlight 2.0 & Parallel Extensions are just to far apart for now (see here). I hope these will be supported together in the future so opening up a whole new area for the average developer. For now I’d recommend keeping an eye on the Silverlight 2.0 release at MIX 08 this week so to see what threading support will be provided.

January 27, 2008

Multi-Tenancy & the Singleton Design Pattern

Filed under: General — gracey @ 5:03 pm

Since before xmas we have been working on a upgrading one of our core products which is built on the MS CRM platform (yes platform..working on a post about that topic).

Its the first time I have worked on a multi-tenant system and one of the first things you run into is not being able to use the standard singleton design pattern in a lot of common places. We use is for configuration information about the system but now that you can have multiple organizations (tenants) effectively sharing the same DLL loaded into memory means you have to think differently.

We took a very simple approach and just changed the existing singleton to have a new private member storing a generic list of configuration objects that can be accessed by passing the organization (tenant) as a parameter.

Anyone know of any better ways to accomplish this ?

December 31, 2007

22+ months of silence

Filed under: Agile, General — gracey @ 1:11 am

Yep quite a long silence, I hope to do much better in the new year starting with getting this one post in for 2007.

I have been using my fair share of open source projects throughout the years from Cruise Control & Nant to Spring.Net & Rhino Mocks so I was very happy to see earlier this year the emergence of ALT.NET

It really shows that the .NET community has evolved and maturated over the years just as the Java community had done previously. I really like the core tenets of this group (lifted directly from the site),

  1. You’re the type of developer who uses what works while keeping an eye out for a better way.
  2. You reach outside the mainstream to adopt the best of any community: Open Source, Agile, Java, Ruby, etc.
  3. You’re not content with the status quo. Things can always be better expressed, more elegant and simple, more mutable, higher quality, etc.
  4. You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principles (e.g. Resharper.)

There has been some us versus them threads on other blogs\publications but no matter which bias you have I always liked the quote,

Let both sides explore what problems unite us instead of belaboring those problems which divide us

Happy New Year :)

February 21, 2006

INDA Waterford

Filed under: General — gracey @ 6:48 pm

Well made it to the INDA event in Waterford for my talk on .NET Build Systems last Friday despite my laptop of many years blowing up and losing all of my demos. But got most of the demos set up on another laptop and the talk went well.

Thanks goes to Brian Delahunty from Waterford INDA for organizing and looking after everyone at the event.

Finally I can whole heartily  recommend  Dooleys hotel as the place to be if you find yourself in Waterford on a Friday night. You just can’t beat the combination of one  man with his electronic keyboard and a bus load of retired folks from across the pond :)

February 5, 2006

Finding the sweet spot

Filed under: WCF — gracey @ 10:50 am

So I’ve being playing with Indigo (WCF) since Beta 1 and now Beta 2 with its go live license. And I have to say I’m impressed with its simplicity and extensibility. Its going to reset the bar for developing the next generation of distributed applications.

You have all the major things like adhering to standards, good interoperability with the likes of Java via its implementation of the WS-* specification and critically its the unification of all the existing (ASMX, COM+, Remoting, MSMQ) .NET technologies for building distributed applicaions.

Its interesting so see some of the things that had to be put in place for all this to work. One lesser known one that caught my eye was about improvements to IIS in handling requests at the kernel level for performance and scalability reasons. But for me the real killer point is it allows multiple applications to listen on one IP port. Heres a link to a good article explaining what was done and why.

In terms of simplicitly one of the test apps I developed was a system so that the client talks to a service via an MSMQ so if the service is not running for some reason the client can still work away and when the service does start up it will start processing the messages in the queue in order. This type of work has now just become plain easy, all you need to do is change the config file and you can point the client to either the actual service or the MSMQ.

With respect to interoperability over the past year the work I’ve done has invloved ensuring that the web services I work on are Basic Profile 1.1 compliant and therefore I have worked a little with Java and specifically the Apache Axis toolkit. It really is good to see that the two stacks work well together. And with the announcement late last year of Service Component Architecture (SCA) and it implementing the WS-* specification as well then the future does look good for the two major platforms.

If you want to play around with WCF then the WinFx SDK now ships as part of the Windows SDK and can be downloaded from here. I reckon its going to be the sweet spot of .NET development for the next 5-10 years so enjoy.

January 29, 2006

INDA & Build Systems

Filed under: General — gracey @ 8:57 am

As I mentioned in my first post I did my first public talk with .NET on Build Systems earlier in the month for INDA (Irish .NET Developers Alliance) in Cork. The one thing that struck me (and everyone else in the room) was I had alot to talk about and not enough time. So I hope to cut down on the slides and put more time into the demos next time. And this is going to be on the 17-02-2006 at a Waterford INDA event.

Thanks goes to Joe Gill and the folks from INDA for giving me the oppurtinuity to do the talk and also to Robert Burke from Micrsoft for the words of encouragement.

January 20, 2006

Post One

Filed under: General — gracey @ 2:36 pm

Been meaning to start a blog for a long time now and having done my first public
speaking event earlier this week on .NET build systems I have finally got the ball rolling.

Just like most people I come across interesting .NET items from time to time and I hope to
post some of the better ones.

Blog at WordPress.com.