BizTalk communication with Linux and other nix platforms!

Mikael Sand and Gareth Kavanagh had an intresting chat on twitter which ended up here, this is an interesting topic. You have a ton of *nix based operation system, Linux, FreeBSD, RedHat etc. But how would these operating systems communicate easy with BizTalk? (this is dedicated to receiving since this is not an issue on sending)

Well first of all there are a few fundamentals differences between Microsoft and Unix. I’m not gonna go into all of them, mainly because I don’t know all of them (I’m no *nix guru even though I have a FreeBSD server running here). So I’ll go through a few important steps and the main reason why you never should use the FILE adapter towards a *nix share.

File is not locked!

So, on a windows computer when you create a file and you have it up and running in some program you cannot delete the file, basically because it is in use by some other program. You can try this yourself by creating a document in Word store it at your desktop and try to delete the file while you still have it open, it won’t be deleted. I belive this is a good safety precaution, specially when you are dealing with people not so technology knowledgeable, lets face it, there are a few of them.

So how does this work on most *nix based operating systems? Well the if you create a file and you save it, you can delete the file while it’s still there, and if you continue to write some more it will create a new file (same name, just with some more content). So the file is never locked. Scary huh?

And we all know how the FILE adapter works towards a fileshare, it creates a subscription and as soon as a file appears BizTalk will pick it up, not as a copy but as a “cut”. So if the program never finished copying the entire file, the rest may be added later in another file, or it may even fail. And in BizTalk, what will happen? Well I’ll tell you, it will fail most likely either way you will end up with a corrupt message. But have no fear, I’ll give you some options to do it here!

Solution 1, FTP adapter:

Well solution 1 is to create a FTP server on the *Nix server and let BizTalk pull from that folder by using the FTP adapter. Safer and will eliminate the locking problem. However as you should know the FTP adapter is a single host instance and can only run on one host istance in your environment. So if you’re planning some large loads, large files or any other things that may be slow when using the FTP adapter this may not be the best option. But have no fear, I’ll bring the second solution here ->

Solution 2, FILE adapter

Oh wait, did I just say this didn’t work, yes I did, but it is a lot faster than the FTP adapter if you have a multi-server environment and you need the extra performance. But you cannot connect to the *nix share to pick up the file. You should create a new filehsare on a windows server. and establish a job on the *nix server to move these files to a windows share. this will of course be an extra limb in the whole integration, however it will be faster then the FTP Adapter.

Click the image for a larger copy of it


1 sec 84 46
2 sec 192 92
3 sec 286 142
4 sec 360 201
5 sec 470 236
6 sec 554 284
7 sec 617 311
8 sec 758 347
9 sec 812 383
10 sec 871 425

Be aware that my environment is running in a subnet and this includes all artefacts servers, fileshare and BizTalk environment, it’s a clustered environment with SQL (active / passive) and BizTalk (Active /  Active). There were a total of 2500 messages on the FreeBSD server.

I took a test for 10 seconds 32kb xml file with a simple pass through, the just to get a great overview of it and as you can see the file adapter was magnificently improvement with over 100% better performance.

I hope this gives you some idea when you end up the same scenario where you have to communicate with a nix* share at that this may help you get what you want. Have you resolved this any other way?

Happy BizTalkin’!

Note: This may not be the fact of all *nix share, 
but all I've tested have this issue.

2 Responses to "BizTalk communication with Linux and other nix platforms!"

Leave a Comment