Wednesday, May 04, 2005

Joint system testing completed

As i am wrapping-up the final program validation, i should thank everyone of offshore team. I happen to dig out some statistics of the work we completed,

7 online process 15 batch/components
~51,335 Lines of Code excluding comments, white lines
0 defects, 6 Accepted changes

I would have been happy if we had a chance to repeat this in FundRaiser, if not for that CR, that scoped out the application.

Here goes the list of dedicated team members,
Arumugam, Praveen
Raja Simman, Kamalesh Kumar
Chinnasamy, Ramesh babu
Elumalai, Dhanasekar
Sampathkumar, MuthuAnitha
Prasanna Subramanian;
Sundaresan, Raghuraman;
Cuppala Janakiram, Roopesh Kumar
Elwin, Annecca
Kandimalla, Neeraja
Karthikeyan, Ramesh Kulothunan
Narayanan, Sajitha
Seethapathy, Ganesan
Selvakumar, Annam

And my thoughts,

The worker becomes all the poorer the more wealth he produces, the more his production increases in power and range. The worker becomes an ever cheaper commodity the more commodities he creates. With the increasing value of the world of things proceeds in direct proportion to the devaluation of the world of men. Labour produces not only commodities; it produces itself and the worker as a commodity -- and does so in the proportion in which it produces commodities generally.
Karl Marx, Economic and Philosophic Manuscripts (1844)

Friday, March 11, 2005

Interactive india map

waited for something like this for long time, http://mapmyindia.com

Wednesday, March 09, 2005

thnx guys :-)

It’s high time that i should appreciate my offshore designer/developers/future architects in Chennai, TN, India. We are about to test our new system in onsite and its better i thank them now, before we get to usual onsite-offshore conflict. As i recollect, actually i don't remember any such incidents, may be i am lucky or guys were so tolerant to my crap comments on their design/code ;-)

Being a first project in their career for many, everybody put up a great show. All the best of your future endeavors and of course to our upcoming testing phase. Enough blabber, here goes my offshore development team, following the tradition; it was not intentional if i leave any name here and the list is not sorted in any order of preference.

Annecca E, Praveen A, Ramesh babu C, Roopesh Kumar CJ, Dhanasekar E, Neeraja K, Ramesh Kulothungan K, Muthu Anitha SK, Sajitha N, Ganesan S, Annam S, Prasanna S, Sonu S, Kamalesh Kumar & Suhanya J

If i had to tell anything, it would be, "There is always a better design!" (may be not from me) Good luck and happy .netting

Tuesday, March 08, 2005

ultimate VS.NET addins

Happen to browse thro' Scott's list of ultimate VS.NET addins, CodeRush is really a *bomb*, a flash preview of one of the feature



go google ...

If you are using yahoo maps/driving directions, then you should see google stuff, AFAIK, interactivity & super fast refresh blows you away. btw have u tried google local.

Monday, March 07, 2005

Yahoo ad-impression - cached but counted

explains a very clever technique, Michael Radwin from Yahoo on cache-busting technique (slides) they are using, more details in Scott's blog

Saturday, March 05, 2005

asp.net webservice output caching options and issues

We use WS as a fa·çade to underlying enterprise service components which handles all biz logic. And it was found some of the calls were to fetch some data that can be cached. So i thought of list out caching options i have,

1. Cache at client
2. HTTP 1.1 cache-capable device in the call path (Proxy server?)
3. Cache at WS layer
4. Use caching application block to cache data in ES

I am skiping the usual issues like caching in distributed environment, cache volatility, cache expiration policy, etc, just to concentrate on cache storage options.

Client cache is technique that i use in almost all apps i design. Hands down i should say a pretty simple approach, client had to be designed cache-aware and it will own all caching and its issues. Depending on cache data size and complexities; rich/smart or web app client will reap benefits accordingly.

HTTP 1.1 cache-capable devices, i haven't used this in any of my projects and i'll have to drill further to know the pro/cons on this one. But i heard there are some limitations to use HTTP cache for asp.net webservices

I'll defer the WS layer cache for a paragraph

Only way i see of caching in COM+ is using caching block, i can store cache with help of
Memory mapped file stream (it's an unmanaged code, do i like to use an unmanaged code? but if u think a while, windows is not a managed code that doesn't mean it is bad. If in next update of caching application block, p&p group implements a managed version of mmf storage, the client will no way know about this change and everybody is happy. Win FX (all new Win32 API) is all managed, ASP.NET 2.0 is 90% managed code, is looks like the trend will continue, its just a matter of perception)
SQL database (do i want to take the overhead of network? anyone has to weigh the benefits of caching over the network overhead)
Singleton object (Remoting? The popular and untruthful myth that remoting is hard, bad and its going away. I am no more going to reiterate, there will be a clear path of migration to Indigo and p&p or GDN will take care of this)

Ok now the fun of caching in WS, options ...
1. CacheDuration attribute, ok i set this for 60 secs and open the WS test page in IE and invoke the webmethod and i invoke again to see it output is cached, NO it was not cached. I google a bit and find it’s not me alone who is stumped by this.
**Webmethod caching doesn't work in WS test page in IE and works if used with a proxy class**, i had a strange feeling whether client proxy is somehow returning the data and not making the WS call, actually it not doing any of those WS call is actually made and its WS is the one which returns the cached output.

2. Applciation/Cache object, can use a Application or System.Web.Cache class and i have a feeling that CacheDuration attribute will in turn use one of this internally.

3. [Credits: Senthil] Having a private static variable in the WS class, this one bowls me out, somehow i was blind folded by words *HTTP is stateless* and I illiterately assumed that is applicable to WS. But i have to a doubt on how this will work in IIS process recycling, either in IIS5 (aspnet_wp) or IIS6 (w3wp.exe), will this static member data go away or retained during process recycling?

Monday, February 28, 2005

Future of .NET Remoting

Is .NET Remoting a dying technology? or Evolving to a unified distributed computing technology?

I heard that Ingo Rammer quoted "i have wasted two years of my life on .net remoting" in a conference in Frankfurt last year. Whether this is from a credible source or not, it looks like remoting is slated to go into second class technology, with flashy n sexy Indigo entering the scene.

[Ingo, offcially confirmed that *wasted* is not quoted by him]

In MSDN article "Introducing Longhorn for Developers" & Introducing Indigo: An Early Look,

Indigo is a set of .NET technologies for building and running connected systems, best of ASMX + Remoting. Indigo service applications support two main communications types: a stateless model (Indigo Web Services), in which messages are received with few if any guarantees, and a stateful model (Indigo RemoteObject Services), which creates a communication session between two service objects. The stateless model is equivalent to current-day Web services and is useful when broadcasting noncritical information. The stateful model, on the other hand, uses session state to enable Web services to provide functionality across the Internet, including callback methods, events, widely distributed transactions, and reliability and durability guarantees that enterprise applications require.

Indigo RemoteObject applications are built using the Indigo SOAP messaging infrastructure; therefore, they support end-to-end security features, including authentication and encryption, widely distributed and long-running transactions, automatic activation, and a robust management infrastructure, in addition to providing the ability to perform interface-based remoting and use asynchronous server methods.

I'm still not sure if Indigo RemoteObject will work behind a firewall, if you know pls let me know. Happen to view the msdn channel 9 video of Richard Turner {Indigo Program Manager} looks like, stage is all set for Indigo and we know about that so called *support* he is talking about and as a matter of fact Indigo will NOT support Windows 2000 either.

With all the performance the remoting framework suppose to deliver, it looks like somebody throwed the baby out with the bathwater. Looking at MSDNtv, Matt Tavis was demonstrating some of the feature enhancements to remoting infrastructure in Whidbey, my guess nothing will be added in Orcas version of .NET.

IpcChannel - for inter process communication in same box, avoids the overhead of network stack
Secure TcpChannel - built-in support for encryption, signing and authentication
Version Tolerant Serialization - more a serialization feature but this allows for versioning of types without worrying about failing to de/serialize when communicating with older versions on the client/server
some more that i didn't understand

Finally a word from Ingo about this
"The role of Remoting after Indigo? Hmm ... it will be the same role as the one of ASP.NET Web services, WSE 2.0, MSMQ, and Enterprise Services/COM+: Existing apps will continue to work (you can even run Indigo and any of these previous technologies in the same application and AppDomain). New apps (or parts thereof) will however quite likely be developed directly based on Indigo. (If running on Windows XP, Windows Server 2003 or - future - Longhorn as these are the only platforms which will be supported). "Normal" apps with the previous technologies (Remoting, ASP.NET, ...) will be quite easy to migrate. Custom transport channels and custom sinks will be harder to move ... i.e. they will have to be rewritten using the new extensibility models. Oh btw: Remoting will also continue to exist for areas which are not addressed by Indigo like cross-AppDomain communication. After all: Indigo is based on Remoting's __TransparentProxy architecture anyway ;-) "

No, there is no need to push the panic button and stop using remoting in new projects, a Prescriptive Guidance for Today's Technologies by Richard Turner's Tech-Ed session.

Saturday, February 26, 2005

p&p Updater Application Block - Analysis and Review

Prior to including this application block as part of your enterprise architecture, do check out the architectural alternative of push technology, using Systems Management Server or group policy of active directory. Apart from server cost this may turn out to be information overload, but provides lot of benefits with simplified application deployment and administration, like ability to rollout to specific group, incremental updates greatly reducing network traffic and reduces the operational costs of developing software for deployment.

We can also look at another technical alternative that is shipped with .NET 1.0, HREF-EXE AKA Zero-touch deployment {sounds very similar to JAVA Web Start ;-)}. It might turn to be simplest of all deployment models, you deploy the application in any web server and user clicks on the link to the application .NET downloads the application and executes it. The update mechanism is like updating web applications, simply have to replace the file on the Web server and from that point on everyone launching your application will get the newest version.

But HREF-EXE come with an inherent limitations like, No offline support (always connected to web server), No desktop integration (user has to manually create an shortcut to exe), Runs in a sandbox with restricted semi-trust security (will not be able to call a web service in different machine from where exe is downloaded) and network delay (fat smart client apps will be more impacted).


Some of these limitations are overcome in next generation of this technology, ClickOnce shipping with .NET 2.0, with features like offline support, rolling back to previous versions of an application, and listing an application in the Windows Start menu & Add/Remove Programs catalog, HTTP compression support, simpler deployment packaging with help of "Whidbey". But if you are looking at capabilities like install to GAC, manage ODBC or COM+, registry write, setting up permissions (File/Folder/Registry) or any custom actions at install/uninstall, Install On Demand
Transactional Installation and Source Resiliency, only option is MSI.

The Updater Application Block helps to detect, validate, and download application updates deployed in a central location, using a "pull" model, with minimal coding and ability to configure externally and extend it for any special reqt.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/updater.asp

1. All applications will have a boot strap application (AppStart.exe) which will use its configuration file to identify the latest and greatest version of the application and launch it.

2. The Updater Application Block requires a controller application to start/stop the update process and handle the various events that occur when application update tasks are performed. There are three distinct types of controller, each with their own considerations: Computer-Wide Controllers, Application Launcher Controllers and Self-Updating Applications. This controller app will get the server manifest for the application, connecting to the web server and check if there is any updated version available.

3. If new version is found, it will download the latest version using an downloader (Background intelligent transfer service (BITS) downloader comes out-of-the-box)

4. Uses and validates binaries (basically an crypto hash check with RSA algorithm) to ensure authenticity of the binaries

5. Updates the boot strap application configuration to the new version and runs the post-installation tasks if specified in manifest.

6. Depending on the type of controller, the new version is launched, if its a self updating controller, all the update happens in background and application gets notified of the successful completion of updating, which can take action like popping up a form to confirm with user on launching updated version.

As with other application blocks everything is customizable and out-of-the-box ships with a standard binaries that can be used for 90% of cases. Its one of the simpler and easy to use blocks of what i have seen. There is no sample provided for Application Launcher Controllers, although it should be easier to modify application launcher to make the asynchronous update process as a synchronous one, i got a very good sample for this one from Chris L. Kinsman http://www.vergentsoftware.com/downloads/uabsamples.zip.

Some of the features that i wish/expect to be in next release,

- Make mandatory updates, in most of cases you might want to make the update mandatory instead of user opting for an update

- Incremental update, i would prefer to publish only modified binaries and application block should be able to take the other files from the previous version of application

- Manage staged rollouts, to be able to control which clients update and when. Found a simple and good solution in net, modify the manifest retrieval code so that it can call an ASP.NET page, which returns different manifests based on the user's credentials (so you can have a group of users who are given one version, and everyone else gets the last major release or a one department can be given one version that is different from another department)

- Compression on the wire, this will help reduce a lot of network traffic

- Rollback update, only way to do that out-of-the-box is to release a new version with older binaries, works perfect but may be we can do that better

- Cleanup old versions, which should be simpler with some code in post processor

- May be i'm more user friendly, i would like to have a "what's new" or more accurately "what's the fix" information for the updated version to be available in manifest

The soon be released Updater Application Block 2.0, focuses on simplification of use, adherence to the Enterprise Library specification, and alignment with .NET 2.0 ClickOnce.

Thursday, February 24, 2005

int division in SQLServer T-SQL

Today, I'm trying to use T-SQL to do a calculation something like this


Declare @a intDeclare @b int
select @a=1, @b=2
select (@a/@b)*100

No the result was not 50, it was 0.Thats 'coz SQL Server performs an implicit data-type conversion and converts the resulting value of 1/2 as integer. Fix is to cast the operands to decimal

select ( cast(@a as decimal)/ cast(@b as decimal) )*100