Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Monday, June 9, 2008

Orchestrated windows communication foundation service (WCF + WF = BizTalk Content Routing)

These days... I start looking back to interesting .net 3.5 stuff, really impressive. Especially I can say with .net 3.5 sequential workflow and its two data shapes (receive and send) and their promotion to WCF services. Infect this is very good functionality toward integrating more complex collaborated scenarios with different domain application. Previously, it was really hard and time consuming to collaborate using open standards like web services, EAI (BizTalk), MSMQ etc, and it was bit effort consuming as well as contain higher risk on success of the design. Here I feel very nice and good solution towards such complex collaboration scenarios' integration to cross domain.

WCF itself is well functionality talk as open with open standards like WSE 2.0+, Queuing (MSMQ/JMS), .net Remoting, TCP/IP and web HTTP/HTTPs, etc. I must say this deadly combination will transform much complex scenarios in very simple WF/WCF solutions.

I tried to build one very simple collaborative solution. This can receive message through WCF Service which is simple passthrough service and routing incoming messages to WF. I found WF is very much flexible towards handling external events, tracking, hosting (with multi-threading).

I tried to draw one quick diagram which might help to understand the concept.


I also tried and simulate some work load on the sample application with the concept and I got surprised with really great performance. I pumped around 200 messages per second with approx size of 50kb and really it went smooth with some complex resource consuming XSLT transformation and file delivery. Where while building the application I programmed to raise max 5 threads for the transformations and delivering WF services. My correlation and Initializing WFs was working on single instance thread. But I was calling other WFs from main WF to performs transformation and delivery services.

Just thought this would be great to share with MS Developer community. I hope Microsoft is planning to put WF and WCF into future version of BizTalk on the same basis. Now, after success of the POC sample, I am analysing the replacement of content routing from BizTalk Server to WF + WCF and planning shift much load from BizTalk to standalone WF Hosting servers.

Let's see how it may go! I am very hopeful for this implementation and success of it as cost wise and performance wise too.

If anyone is interested in POC code most welcome to request on nilayparikh@gmail.com

Thanks.


Wednesday, March 26, 2008

Consuming WCF Services in BizTalk Server 2006 R2 - Add generated items (WCF Services)


I was thinking a long back to come up with this article, and now just found time to write about WCF services and it's implementation with BizTalk Server 2006 R2. I have designed few small solutions in past few months to deal with scenarios like Information Integration and SOA with BizTalk Server R2, where I found the great chance to work upon the WCF adapter series as well as Web Service Factory : Modeling Edition. Both made me big fan of them, it's great to work on both, I am not focusing on WebService Factory modeling in this article but will discuss about WCF services consumption inside BizTalk and few videos might help people to work on them.

I would like to share few images below, by reading this images you can understand the service I have coded for sample, if you are interested in sample code please mail me, and I promise you will find that sample someday in you mail box... when that I don't know. :-) But will try send you soon as possible for me.

The best way I feel to consume WCF services inside BizTalk solution is by using WCF Services Consume Wizard which you can find in Visual Studio Template, this wizard will power you by generating schema and port binding configuration files for your solution based on service descriptions. Not going into deep how this work internally here but focusing on the practice I gone through.

Below image shows Generated Items and Visual Studio Template.

Please have a look to the below Video Presentation where you can find what steps I followed to generate my sample project. Hope it will surely help you in any manner while working with WCF and BizTalk together.




As result of Wizard you will get schema and binding files inside your solution, that schema will be generated on basis of the metadata of the consumed services and it could be used as multipart messages in case of request-response services. Below snaps will show you the BizTalk schema presentation against the .net message contracts and data contracts.

DataContract Source Code:


MessageContract Source Code:


Service Implementation Code:


BizTalk Schema:



BizTalk Test Message I used for my sample:


You can analyze your self the presentation of Inbound message and the Contract representation inside WCF Implementation upon the above snaps. You can consume the generated schema in routine BizTalk solutions and patterns, while deploying such solution you can use generated binding information for such implementation with Endpoint transportation and Behavior information regarding WCF hosting and services. It is very good feature provided by wizard which make our life very easy :-). Let's have a view to below video presentation on the WCF Http and Custom Adapter configuration inside through BizTalk administrator console.



Hope you liked this article and it will give you fair idea about the BizTalk Server 2006 R2 and WCF coupling in Solution, as a system/solution designer point of view I really enjoyed to work with this two made for each other technologies and it provide such ease to workout most complex scenarios regarding service orientation and integration. As well as I realize the solution's capability to work over Internet Integration where security is the major concern and we generally prefers to go with ws-HTTP or HTTP channels for integration, on such scale it can help us to give such secured integration system.

Please provide your feedback about the article at nilayparikh@gmail.com.


Wednesday, March 19, 2008

Web Service Software Factory - Walk through Video (WCF Implementation)

Recently, I got very good opportunity to work on WCF Services through WebService Software Factory, it's a really nice tool, I have seen so far to build complex WCF services in very easy manner, no really I means. Yes, there are some limitation of the tool and it's not supporting all features of WCF implementation but you can say.. it's very nice kick off point for your project and code, later you can defiantly customize your code by modifying the auto-generated code itself.

While working on factory, I grabbed opportunity to record my activities through one screen recording software and I would like to share that video among IT Professional community. Please have a look and share you view on such beautiful tool.

Service Modeling & Message Modeling walk through:


Code Generation walk through:


You can also find some more videos on below link.
http://www.codeplex.com/servicefactory

Please send me your feedback and suggestions about the above walk-through on nilayparikh@gmail.com


Tuesday, December 25, 2007

BizTalk Server R2 - WCF HTTP Binding through BizTalk WCF Adepter

A very good video demonstration by Stephen W. Thomas, the video demonstrate WCF HTTP Binding through BizTalk WCF Adepter. Worth spending 13 minutes on the video.

To download the video please Click Here

Downloading the related sample files might also be helpful. They can be found here:
Click Here

Live Play (no need to download the file) of this video is available here:
Click Here

Monday, December 24, 2007

Presentation on .NET 3.0/3.5 at Microsoft, NET C# ASP.NET VB.NET WCF WPF WF LINQ

Very good video presentation by instructor Andrew Troelsen delivers presentation on .NET 3.0/3.5 at Microsoft, NET C# ASP.NET VB.NET WCF WPF WF LINQ. Worth spending your busy time or office time ;-).

Friday, December 21, 2007

WCF - Microsoft Service Configuration Editor – Services - SvcConfigEditor.exe

Microsoft announced very recently about "Oslo" and their strategies about Enterprise Integrations and Service Orientation. The announcement made me tempt to explore WCF (bytheway I started calling me WCF professional few months ago ;-) ), and I come across to a very good tool called "Microsoft Service Configuration Editor". So grabbed the opportunity to document something and let's publish ;-) please bare one more article…

While learning WCF the first thing came to my mind was Enterprise Services Management (This days I am playing my cards with Live Service Management), it's ok if you plan 2-3-10-20-50 number of the services for your business but when you are planning services in big bulk, distributed deliveries of services, different assemblies, managing behaviors/contracts/endpoints for various clients/hosts, etc…. there could be N number of the possibilities for various service management scenarios. And my thoughts and excitement brought me to the administrative tool called "Microsoft Service Configuration Editor". Microsoft is supplying this tool with "Microsoft Windows SDK v6.0A" itself, it's very useful tool for the service management (especially WCF).

WCF is saving configuration settings in web.config / app.config files and it's very hard to manage manually by editing.

Below I am just trying to put some screens and my tutorial experience to you, hope you like it.

Here for the demonstration, I am using the sample scenario called "TrustedFacade " which you can find in Microsoft WCF Samples ("\WCF_WF_CardSpace_Samples\WCF\Scenario\TrustedFacade"). Not going inside the code or development part, I am going to focus only on the deployment and administration with the Configuration Editor.

Steps, for configuring the service:

  1. You can open the tool from "Start Menu\Programs\Microsoft Windows SDK v6.0A\Tools\ Microsoft Service Configuration Editor" or go to the next path "Microsoft SDKs\Windows\v6.0A\Bin\SvcConfigEditor.exe".



  2. Click on crate a new service, it will bring you one service creation wizard.





  3. Click on the Browse Button and drive the wizard to the service dll, it can be GAC or File Location.



  4. After selecting the service, click on Next button, it will bring you to service contract page. It will show you all contracts available in one dropdown list in service, an appropriate contract you select and then move ahead with the next phase of configuration.



  5. Next screen will give you option to decide the communication mode, where you can select an appropriate mode of communication channels.



  6. Next screen will bring you selection of interoperability option.



  7. Now, the coming screen will ask you the address of your endpoint.



  8. After performing the above steps, now your wizard is ready to create configuration.


Now your service has been configured, the tool also provide facility to manage other configuration like hosts, base addresses, multiple endpoints, binding configuration, contracts, listening uri, etc. I am here just focusing on the service configuration, later on I will publish client and other configuration options available with in the tool. So let's coming back to services, the below image shows you, how to add multiple base location in host.

You can also add multiple endpoints to the service, as well as you can add certifications, identity and headers to messages and channels. Please check the blow screens to understand the configurations options for end points.


After completion of configuration you can save it as *.config file, which need to manage with services at the IIS/service hosting location.

This tool can give very good flexibility with the management and administration of the WCF services on large scale.

I will back with some more interesting articles on WCF as my study progress with it.

Thanks to bear with me during the article, please send your feedback to nilayparikh@gmail.com.

Cheers!

Wednesday, December 19, 2007

Exposing a simple BizTalk orchestration as WCF service

Very good article about the ESB solution approach. It explains how you can expose the BizTalk orchestration in WCF Services!


Please visit below link for full article.

http://blogs.msdn.com/rgarg/archive/2007/11/19/exposing-biztalk-orchestration-as-wcf-service.aspx