Santosh Benjamin’s Weblog

February 28, 2008

Training Kits and Screencasts

Filed under: General — Tags: — santoshbenjamin @ 10:49 pm

By now i think most people would be aware of the Visual Studio 2008  and .NET Framework 3.5 Training Kit. I just got my hands on it today and am going to install it soon. The docs seem to indicate that Vista is a prerequisite and i only have Windows 2003 Server so i’m not sure where that leaves me.

Anyway, what you might not be aware of is the tons of screencasts on Channel 9 for the same kit. There is also another .NET FX 3.0 Training Kit available here which is nearly a year old but i just found it.

A tip for the folks who are heading off now to Channel 9. Since they are screencasts there is no direct link to download the WMV but if you check the source of the page and look for “.wmv”, you will find a full link which you can use. I collected the whole lot and then put them into Download Accelerator and now the system is happily grabbing them for me. I prefer watching things offline and being in control than streamed videos where i’m at the mercy of the connection.

Of course, this is more or less useless to Biztalk people because we cant use Biztalk on VS2008, SQL 2008 or Windows 2008 (so much for the grand combined release!!) but it can be a decent diversion to get upto speed on the other areas that are taking off.

Enjoy.

February 23, 2008

SOA-2: Debating the nature of the Integration Layer

Filed under: Architecture, Biztalk — Tags: , , — santoshbenjamin @ 6:43 pm

In a previous post on project goings on I talked about our choice of adapters and the lessons we learned. One thing we are never short on is stress, excitement and debate (mostly the last one). .

Before you read any further, let me warn you this is going to be a long one. I’ve been chewing over it for a couple of months now. Ok, back to business.

Once that project got over we had to start on the next assignment. The requirement was like this. There is an existing backend system, call it system A (which we integrated with in the previous project) which was used by a particular department and the business wanted to build another system based on some processes which had hitherto been paper based. Let’s call that System B.

The way they wanted it work was that System A and B would actually be subsystems of one big application and that they would share some core database entities such as person & address. Now we have a portal, which is a sort of mash-up presenting a view of the customer across multiple systems including A and B. (You could argue that this not really a mash-up because it processes transactions across systems rather than just presenting an aggregated view). System B did not need its own UI because it was to be presented via the portal so all we needed was some web services.

We take our lessons seriously and once we had decided that we would avoid the database adapter in the service layer, a more profound argument arose as to the value and maybe more importantly the location of the service layer.

In a general integration situation where you have existing systems and you are placing a hub into the mix, the design is fairly straightforward. The hub obviously goes in the middle. But when you have a total green field what do you do?

The key thing that got people tied in knots for a while is that if the portal is to call web services and the backend system exposes web services then why put a web service layer (backed by orchestrations) in the middle?  If the backend system had a different granularity from what we needed, then the hub would provide the mapping and a reason for its existence, but we had full freedom to design the backend service with coarse enough granularity from the beginning. Yes, we had to send some notifications about data changes in system B to other applications as well, but why do that from a central mediation layer? Why not just emit notifications from system B to the hub and have it then publish them to other systems?

The options are shown in the block diagram below.

  SOA Integration Layer Options

From the portal point of view, its just connecting to a web service and it doesn’t particularly care if Biztalk is behind the web service or some vanilla .NET components but when you are designing those services, what’s behind the service is very important.

So, what are the considerations in this situation? Here are some of my thoughts on the items that influenced our decision.

Granularity: The way I normally approach things is to is to categorise the backend service as an Application Service which can legitimately expose CRUD operations while the main Business Service that would span system A and B and others would be designed with more coarse grained functionality (for instance, ProcessCustomerNotification, which could be mapped on to one or more Application Service calls such as SearchCustomer & Insert/UpdateCustomer. Of course, in this particular project, as I mentioned above, the granularity was up for grabs so System B might as well expose a ProcessCustomerNotification instead of CRUD.

Consistency: From the point of view of consistency option 2 is awful. Just because you have web services doesn’t automatically mean you have SOA. It becomes a mess of point to point web service connections very easily which is why we go for hubs in the first place. “So what about “distributed SOA then?” you may legitimately ask. I have heard that term bandied about a lot in various blogs by folk who don’t seem to like hubs for various reasons. Now option 2 when extended to the nth degree may or may not resemble a distributed SOA but I don’t know because I haven’t actually seen a distributed SOA or a solid reference architecture for the same which covers all the bases.

Isolation of systems: One of the classic arguments for the hub is “what about the time when the backend system changes? You need to avoid breakage in consumers”. That still holds good.

One point offered by a colleague was that you could always introduce some mapping into the WS to cater to future changes in System B and it didn’t have to necessarily be in a Biztalk layer. I agree with that but the implementation of the backend service needs to be really well partitioned to allow inserting a translation layer without causing issues.

Cost: This is an interesting consideration. Option 1 may cost more when you consider that System B could well expose whatever the portal needs so why pay to build something in between that would only (at least initially) be a pass through layer? But then again, in the short term point to point is always attractive from the cost point of view and mediation is more expensive. It begins to bite soon enough when the inevitable changes begin. If it didn’t, there wouldn’t be an integration business at all. If you were to design System B to be well factored so you could cater to potential change, then the cost of doing that could well be equal to the cost of putting in the hub components in the first place (assuming that the hub already exists – if it didn’t, then the cost of acquisition could prove to be too much). Secondly, when it comes to the notifications to other systems, you are actually adding extra costs to write the notification emitting component (which is not always a simple database polling option).

Opportunity: (or is it opportunism :-) ). This issue is somewhat related to cost. When things start to break and the business starts to worry, there is hardly any time to bring in a proper mediation layer. Further, if the business didn’t want to pay for something like Biztalk early on (because they were convinced that all they needed was the web services) they are hardly likely to change their minds and pay for it at the end. In our case it helps that the hub is existing infrastructure so we are plugging everything into it early and routing through it for all messages so there’s no last minute purchasing considerations to worry about.

Composition (vs.) Mediation: Depending on your needs, providing a joined up processing could take the form of Process Composition or just an ESB based mediation /routing. If all you need to do is inform other systems of an occurrence in one system, publishing a notification to a bus and transmitting from there will work fine. If the clients (like our portal) actually want to compose the data and view & act on it as a single unit, then elements like orchestrations (with various different patterns) come into play. This is where option 1 is more suitable.

Management & Operations: it’s a heck of a lot more work to try and track messages in option 2 than it is in option 1. Even if you call out to the BAM Interceptor (in the Biztalk world) from custom components, it will be a significant effort to track all the way. Option 1 would be much easier because the hub is in control right from the start.

The nature of the consumer: I used the term mash-up rather loosely when I described my portal above. IMO mash-up refers to more of a read-only approach and so you can use various techniques to pick up the data and present it but when the consumer is a transactional system (to an extent) and when the data elements on the portal (in various portlets) are linked in some way, then things are not so easy. Dealing with a set of business services in one place is much better than pointing all over the place to get/set data.

Performance: This is a big one especially when you consider that SOAP over HTTP doesnt make for rocket speed. Calling one web service can be bad enough but passing through one and onto another can be painful. I’ll post about some considerations here and where we have got to in my next post.

Our conclusions and the present: Congratulations if you have come this far! It may seem obvious as to what our conclusion was – we went for option 1. It has proved to be correct (as I knew all along :-) ) because the core business service that links System A and B is now extending to pull in assorted data sets from related systems and display them in the portal as well as managing changes to those data sets. For the portal, there is no change at all (except new element blocks being added to the service schemas that relate to distinct segments on the UI) and managing them is much easier. The service layer which was initially a pass through is, as anticipated, much more solid. System B still needs only pass through maps because we designed the API to be very granular but we can handle any changes easily. System A, being an existing one, has an API that’s more fine grained so it’s easy to see where the responsibilities of all the components lie.

So, those are my opinions on the value and location of the services layer. I hope it was a good (and maybe even vaguely useful) read. I’d love to hear your thoughts on this issue and how you make similar decisions and if you have successfully done a distributed SOA and would like to share your thoughts and pointers to where I can learn more about it,  do let me know.
 

February 9, 2008

Remove Vocals from Track

Filed under: General — Tags: , — santoshbenjamin @ 5:15 pm

I’m going through that phase again where I’m agonizing over my lack of progress in my guitar playing especially when compared to the purple patches I had when building my GuitarPortal site (which is long due for an overhaul). This kind of sentiment is usually brought on when i go back to India for a visit and see my mates rocking the place down with great technique while i have to resort to compensating for a lack of ability by using the biggest pedal i can get my hands on such as my POD XT Live.

Anyway, I was listening to a few songs that I want to nail and was trying to focus on the guitar while the singer was wailing away and i badly wanted to get my hands on something that could knock off the vocals while letting me listen to the guitar part. I have been searching for something like this for a long time and finally managed to hit paydirt. I initially looked for something to alter the track itself but i decided to settle for just eliminating that section of the track while playing without altering the source file in any way.

AnalogX has a freeware plugin for Winamp and DirectX called VocalRemover. It doesnt work perfectly and as the readme file explains, the way the songs are mixed means that sometimes the vocals will find their way through no matter what you do.

The Winamp plugin (works on Winamp 5.52) is the easiest to use. Just activate the plugin after installation and it shows a little window with a slider control that controls the vocal level. To use the DirectX version with Windows Media Player I had to download another DSP plugin named AdaptX from Chronotron which sets up WMP and then when you install the DirectX version of VocalRemover, AdaptX lets you activate it and then remove the vocals. The effect seemed better with the DirecttX version.

Cool stuff. Check it out if you are into such things.

DOS Batch Rename in XP

Filed under: General — Tags: — santoshbenjamin @ 4:57 pm

Just a little non Biztalk tidbit for my own future reference and maybe useful to someone else :-)

I had a batch of mp3 files i wanted to add a suffix to and was looking for a quick DOS command to do that. I found this article on Yahoo Answers which did the trick and the author did an excellent job of explaining every part of the command.

All I had to write was

for /f “tokens=1-2 delims=.” %i in (‘dir *.mp3 /b’) do ren “%i.%j” “%i(BT).%j” 

and that did the trick basically renaming a file such as “MyFavorite.mp3″ to “MyFavorite(BT).mp3″.

Another page with a nice detailed collection of renaming techniques and commands can be found here at ExpertsExchange.

Enjoy.

Blog at WordPress.com.