ASP.NET Config files: Un-necessary Strings

We have been using ANTS Profiler lately to understand the memory behaviour of our ASP.NET application. What we observed is

  1. Too much memory have been allocated by Strings Objects.
  2. These string objects survives across many GC collection.

When we drill those strings more, we discovered

  1. That these are not our strings.
  2. Actually ASP.NET loads the settings of machine.config and web.config into the memory.
  3. I can now make out why it need to unload the AppDomain when we change these config files as the environment have to reload the settings again.
  4. There are many settings in these config files which have no relevance to our application.
  5. So we started commenting or removing from the machine.config file. (We took the backup of the ORIGINAL file).
  6. For e.g. webPart settings. We removed the entire block.
  7. We tested our web application and found everything to work fine.
  8. We then started removing those un-necessary entries.
  9. We then used the ANTS profiler to profile the memory and found that we save some 58 MB of memory by doing so.
  10. There was direct impact on the Gen 0 collection.

We haven’t decided whether we will do these on our production server but these can be done provided our application is the only app being used on that server.

Please take appropriate backup before trying this out.

Good Links on WCF

I wil keep on adding good links about WCF

  1. WCF Essentials
  2. ASP.NET WebServices V/s WCF
  3. Reliable Messaging
  4. Migrating ASMX to WCF

Understanding WCF

Windows Communication Foundation(WCF) that is part of .NET Framework 3.0 is in the line of Microsoft(MS) classic work of abstraction. MS have been innovator in providing abstraction over various technologies from many years. In the same tradition I do believe WCF is another achievement. Undoubtedly they understand the difficulties in any technologies being faced by technology implementors and then they use their experience to nake the technology simple by intoroducing the layer of abstraction.

Let me talk about WCf in particular now

  1. It was always challenge from many years to talk to remote objects.
  2. Many technologies have come and gone or become extinct as dinosors.
  3. To name a few will be CORBA or DCOM.
  4. But there was always problem with the technology itself and its implementation.
  5. Web Service was the most pouplar of all the technology and it still one of the best for such communication.
  6. The problem comes when we want to expose a remote object interface with multiple protocol interface such as HTTP, TCP etc.
  7. The problem with existing technology is that we have create multiple interface for the remote object i.e. each specific to each protocol.
  8. This really become a stumbling block while deciding on the protocol to be used as creating multiple interface results in maintainence overhead.
  9. So if we want a complete interoperable solution we need a web service based interface but if its standalone system the same Web Service interface becomes a performance bottleneck.
  10. WCF really becomes a great help for such scenario. It allows developer to create interface irrespective of the protocol to use.
  11. Developer can then configure the so called end points to decide on which protoocl to used for communication.
  12. The developer will create the interface and implement it. It will then expose the interface using multiple end points i.e. HTTP, TCP, Named Pipes.
  13. The client using the interface then can use the appropriate end point based their need.
  14. WCf as infrastructure takes care all overheads related to messaging etc.

WCF: Exposing multiple endpoints

Of late I have been reading about WCF. Though I have many things to share but thought of sharing this link about how to expose the WCF Service as multiple end points i.e. suppose we wrote a WCF service to calculate home loan. The same service can be exposed as

  1. HTTP
  2. TCP
  3. Named Pipe

If the service is to be used by non-.NET based app then HTTP is the best option and if both service and client are in same network and both the app are .NET based tcp can be used and if both the service and client areon same machine amed pipe can be used.

The question then comes do a developer have to expose multiple interface, the answer is NO. The developer have to use the configuration files to expose the service with 3 end points.

This is one of the cool feature that I liked about WCF. the below link provides the similar stuff with an example

Link1

QuickRules.NET 3.1 Beta 2 Released

YASU  Technologies one of the leading BRMS vendor announced the release of their .NET BRMS version QuikcRules.NET 3.1 beta 2.

        Flow Editor

The QuickRules.NET 3.1 Beta 2 comes with some exciting features that make it unique compare to other vendors in the same field

  1. For old customers, it claims to improve its productivity of Rule Development upto 268% which is amazing.
  2. The WebEditor which is used by end user as part of Change Management/Hot Deployment of Rules now supports localization which means business analyst can now manage rules in local language :).
  3. The Rule Builder provides a single editor interface (i.e. no dialog box) to write rules for Rule Developer.
  4. The Rule Builder also has its own Autocomplete and Intellisense feature, which makes rule writting a excitting stuff.
  5. For platform supports it now supports the latest OS Windows Vista and Office 2007 (Visio and Excel).
  6. The Rule Repository have been improved to seamlessly integrate with enterprise authentication mechanism. 

For beginners, use this video to understand BRMS and How QuickRules.NET solves the problem. 

Please go ahead and download the Beta 2 version from the YASU website.

KISS SOA

I have been quite busy with too many things at my professional front,so unable to write some good stuff. Though I happen to read this article on SOA, so thought of sharing the link with everyone. The reason I say KISS SOA, as the author believed in Keep It Simple and Straight

http://blog.objectmentor.com/articles/2007/04/11/what-is-soa-really

Please read this, this will reallly demystify a bit about the ocean called SOA.