Saturday, August 1, 2009

Call outs (Plug-in)/CRM Adapter Vs Ajax Calls for Microsoft CRM integration

Recently, I have been undergone with experimental investigation during my CRM exploration drive with CRM 4.0. To design event driven data receive from Microsoft CRM, we can use some of in-house functionalities like Workflow, Callouts (Plug-in for 4.0 Version) and BizTalk (CRM Adapter/SOAP Adapter - CRM Web Services) but with these all methodology we are creating extra overhead on CRM Server only. I trial with my laptop and VS 2008 to create such scenario and compare results between different implementation methodologies and I found very interesting results.

My System Configuration is Turion x2 64 1.9 GHz with 4 GB RAM, this system I have used for the excremental drive. I have dedicated virtual PC to CRM and bombard through VS 2008 test agents and generate real-time scenario of 10 active users which I can say equivalent to standard production servers configuration and 100 active users for any SMB organization.

Workflows / Plug-in(s) & Callout(s):

I found some interesting results, first let me go through workflow options, workflows are basically design over the land of Windows Workflow foundation and they follow the same process like custom plug-in(s). I tried to integrate different entities and their data using event driven BizTalk SOAP calls. Workflows have very high latency (more then 4 minutes approx) and also they are very resource consuming, I found my processor was used more then average 65% and some time it picked 100 % utilization. It's oblivious that workflow will be slower as CRM itself takes 30-60 sec to invoke workflow after an event as well as workflows have been called by in process .net assembly (similar like call out assembly) so it would be slower and resource consuming option.
- More control over the Integration.
- Stronger security.
- Collaboration integration.
- Custom composite messages and control over message build
- Synchronized and asynchronized approach, gives flexibility.
- Higher latency.
- Resource consuming.
- Slow

CRM Adapter:

CRM adapter is general practice for integrating Microsoft Dynamics CRM to external world. It is quite easy and quicker to building solutions. It allows you to fetch all entities in the standard schema format as they have in Microsoft CRM. Let's back to performance, as it relay on different mechanism then workflows and callouts, it talk with SOAP services (Web Services) in CRM so it's bit quicker the previous option but it also generate process overhead on CRM server/databases to fetch data. The same amount of resource utilization i observed for CRM adapter.
- Easy to design and develop schemas and messages.
- Quick development.
- Faster then workflow(s) and plug-in/(s)callout(s).
- No control over message structure.
- Only support asynchronize method.
- Resource consuming.

Ajax Calls (Java Script calls):

'AJAX' is very fancy term but believe me it has same qualities inside implementation. Asynchronized JavaScript and XML (AJAX) generally used into web development but it have very large scope of implementation across various scenarios like such client face integration to Servers. I would like to elaborate such functionalities I have implemented in past and the result with this excremental drive. Supremely, it works really well with such load and handling such great traffic of requests without any failures and heavy latency.

img. 1. AJAX WS* Call

In above code you can write the synchronize post method as well as asynchronize post method, as in my organization we are using only IE for CRM client such Microsoft active x object works well with it.
- Very quick as it been called by client side code.
- No overhead for integration on CRM server.
- No read call back to database and CRM Server (unless you require to fatch GUID PK, still they are manageable with advance coding in java script)
- Full control over the message and schema, you can build custom schemas and message as per organization need.
- Full control over process, it support synchronize and asynchronize methods.
- Easily we can develop such bespoke services to plug into existing infrastructure.
- BizTalk and other Integration tools can easily connect without any third party components or services as WS* are standards.
- Security, need to provide enhanced security features, if it's called and manage by internal domain then it would be not issue.

Personally, I believe all methods and technologies have advantages and disadvantages; it's up to us what we select as best for the scenario.

Hope you like this article, please give your feedback to


shilpa said...


Thanks for the post on AJAX calls.

Could you please brief me what are the IE settings for AJAX to fire properly?

We are facing an issue becaues of this in our production environment.

Any help in this regard is appreciated.

Many Thanks


longge said...
This comment has been removed by a blog administrator.