Cloud and failure

Despite all the cloud talk and where I live, it is like the cloud mecca, for enterprises it is still quite new and many are just starting to think about it. A hard lesson that many of us learn (and partly how we amass our scars) is to design for failures. For those, who run things in their enterprises data center, are quite spoilt I think. Failures are rare, and if machines or state goes down, moving to another one isn’t really a big deal (of course it is a little more complex, and not to say, there isn’t any down time, or business loss, etc....

May 30, 2018 · Amit Bahree

Is rand() harmful?

​I saw this awesome presentation on why rand() is considered harmful. When you need a random number, don’t call rand() and especially don’t say rand() % 100! This presentation will explain why that’s so terrible, and how C++11’s header can make your life so much easier. If you need uniqueness and non-deterministic, especially on the context of security or crypto then you need to think about a few things. For example the frequency, non-uniform distribution, and not using a pseudo random number generator (such as Mersenne twister ) and not a linear congruential generator ....

November 6, 2013 · Amit Bahree

Automated Code Reviews with Visual Studio?

I have been thinking of doing some code ‘smelliness’ test, and am keen to automate code reviews (as much as possible). I am interested to know what tools have you guys used? I want to use the tools to find the low hanging fruits and know off the 80% of things and then we manually look at the more interesting aspects, which the tools don’t (or can’t) pick up. Ideally, I would like this as an add-in to Visual Studio, which can run as part of a build and depending on how one configures it, can get to a gated check-in and/or work-items being created in TFS which then can be assigned and tracked....

August 21, 2013 · Amit Bahree

Fallacies of Distributed Computing

I was reading something and came across these fallacies of Distributed Computing which all beginners (to distributed computing) have. Oh how we all learn. The network is reliable Latency is zero Bandwidth is infinite The network is secure Topology doesn’t change There is only one administrator Transport cost is zero The network is homogeneous

July 7, 2012 · Amit Bahree

Concurrency and CEP

The sooner we all understand the Concurrency ≠ CEP (Complex Event Processing), the better the world will be! CEP is generally used when we implement real-time systems (of course that is not the only area where CEP is used). Real-time does not mean concurrent or for that matter high-performing system. Of course there are correlations, but at the same time they are fundamentally different paradigms.

April 18, 2012 · Amit Bahree

What I am working on today? Optimisation Algorithms

I often get the question – a what am I working on today? Some of the things I can’t discuss in an open forum, but some I can. Those that I can, I thought it was best to share via my blog and do quick small posts on it. Will this become a new series? Well time will tell – depends on how much bandwidth I will have. This weekend, I am researching Optimisation Algorithms – both Deterministic and Probabilistic....

March 17, 2012 · Amit Bahree

Occasionally Connected Architecture

When implementing an occasionally connected architecture for a solution, there are three fundamental requirements: Part of the overall solution, some smart client is deployed and installed on the desktop and a web only approach is not possible. The main rational being that a smart client can work in a disconnected mode which of course with a web application is not possible. Underlying infrastructure needs to be in place to support this....

June 16, 2011 · Amit Bahree

C++ Message queuing options?

I am thinking of implementing a queue in one of the projects I am working on right now (sorry cannot go into more details until it gets published - hopefully in a few months). Anywyas, this is in C++ which needs to run on Ubuntu and my queueing experience (with C++ or otherwise) is only with MSMQ which is brilliant, but does not help me here as that run only on Windows....

December 29, 2010 · Amit Bahree

MOOS

I don’t think many people have heard of MOOS (which stands of Mission Oriented Operating Suite); I have been working with it for the past few months as part of my dissertation. And I must admit, the more I play with it, the more impressed I am. It is quite simple and yet powerful. Whilst MOOS’s roots are in robotics ( MRG ) and embedded systems, I wonder if I can extend it to use it some of the grid computing scenarios....

November 6, 2010 · Amit Bahree

Analysis of Algorithms

If you were interested in algorithms and interested in some mathematical foundations for algorithm analysis? For example if you are interested in proof techniques, probability, Amortization analysis techniques, Case studies and Asymptotic notions (such as Big-Oh, Big-Omega, Little-oh, little-omega, Big-Theta) then check out these lecture notes (in ppt, 224kb) from California State University.

March 26, 2010 · Amit Bahree

Good UML Tool (and free too)

Love it or hate it UML is important for anyone involved (Architect/Developer/Whoever) - either you need to create designs based on UML and you need to understand that someone else has. Sure it has its challenges and for some specific things there are better solutions (DSL’s - more on that some other day). I am “old school” and over the years have used Rational Rose (or whatever IBM has renamed it to since buying Rational out)....

December 3, 2007 · Amit Bahree

Rules of Threading

As Mr. Kale so eloquently puts it (and of course 100% correct): If you think you need multi-threading, you’re wrong If your specification says “you need threading”, see Rule 1 (For advanced users only) If you think you need multi-threading, you’re probably wrong.

September 20, 2007 · Amit Bahree

Architect Insight presentations available

I had the opportunity to present on .NET 3.0 in the Enterprise at the Architect Insight Conference hosted by Microsoft earlier this month. All the presentations from the conference are available for download and of course including my presentation (13.6 mb).

March 16, 2007 · Amit Bahree

Microsoft Architect Insight Conference

Microsoft hosts an annual event in the UK called the Architect Insight Conference . I am one of the speakers this year and will be presenting on “.NET 3.0 in the Enterprise”. This is a pretty good event and I would recommend it if you have not been to one of these. You can check out the Agenda here and if you want, register here and you can find out more information on the Speakers here ....

February 15, 2007 · Amit Bahree

One man's feature is another man's bloat - The Java Performance Debate

Firstly this is not a Java bashing and I don’t preach to say .NET/C++, etc is faster. However, based on what I have seen it sure is slow - slow like a snail. Maybe its the time that takes to load the VM or maybe it Swing - gurk! I like how Andy puts it - “One man’s feature is another man’s bloat”. He has a very objective article on the area which are slow, what Sun is doing to address it and what the main issues (with the developers) are - who don’t know how to use it....

June 14, 2005 · Amit Bahree

CLR: Under the Hood

The CLR team has a couple of slides from their roadshow where they talk about two tracks, one discusses what happens insight the CLR, if you have some of the books recommended in the presentation, none of this would be new to you. It covers things like the IL which is the abstract representation of an execution semantic and how that is represented using an abstract stack machine, where we consecutively execute each instruction, using the stack as the evaluation of that execution and how this stack abstraction works....

June 2, 2005 · Amit Bahree

Which encoding is better for webservices?

There are two options when it comes to encoding in the context of webservices, e.g. .NET and Weblogic use document literal encoding while IBM and other vendors (Java) use RPC encoding. What is the difference and which one is better for which scenarios? Also, how easy is it to switch between the two? Well for those new to webservices, there are two options that you can choose when encoding your wsdl messages....

April 12, 2005 · Amit Bahree

Web Services are not distributed objects

Werner Vogel, CTO of Amazon.com has an article which was published a few months ago where we talks about the misconception of how most people think that web services are distributed objects. Here is an excerpt from the article. The hype surrounding Web services has generated many common misconceptions about the fundamentals of this emerging technology. Web services are frequently described as the latest incarnation of distributed object technology. This misconception, perpetuated by people from both industry and academia, seriously limits broader acceptance of the true Web services architecture....

March 24, 2005 · Amit Bahree

Examination of Data Structures in .NET 2.0

You might have seen this already, if not, MSDN has a six-part article extensively examining the data structures in .NET 2.0 covering the usual suspects and then some not-so-usual unless you have written some compilers such as BST’s, graphs, red-back trees, etc. Quite an interesting read when you have some time.

March 1, 2005 · Amit Bahree

Enterprise Library

Microsoft released the Enterprise Library based on ACA.NET which our engineering guys here at Avanade, work their butts off! Enterprise Library features new and updated versions of application blocks that were previously available as stand-alone application blocks. All Enterprise Library application blocks have been updated with a particular focus on consistency, extensibility, ease of use, and integration. The application blocks that comprise the Enterprise Library are the following: Caching Application Block....

January 29, 2005 · Amit Bahree

Testing .NET Application Blocks (Version 1.0)

A little while ago while I was one of the industry advisors for the PAG group at Microsoft. One of the last things I did in that capacity was provide input to the the Testing App blocks for MS. Microsoft has finally released this and can be downloaded here . Testing .NET Application Blocks covers many testing areas that were used during testing and verification of the various application blocks provided by Microsoft’s patterns & practices group, such as functional, globalization, performance, integration, and security....

January 18, 2005 · Amit Bahree

Data Concurrency and Mobile Applications

As I start working on some stuff, I have been thinking of this. Essentially when you are dealing with mobile devices, by their very nature they are disconnected in nature, and not always on a network (such as desktop or laptop). In multi-user environments, the challenge is how to you keep the data concurrent between the “online” and “offline” version? Typically there are two scenarios either you do optimistic concurrency or pessimistic concurrency....

November 27, 2004 · Amit Bahree

HTTP Modules and HTTP Handlers

ASP.NET has a pretty interesting HTTP runtime architecture if you have ever dug into the covers. The basic run-time support has API’s as powerful as ISAPI (in IIS). ASP.NET offers IHttpHandler and IHttpModule interfaces that offer you similar functionality. I will get into each one in a little bit of detail, but at a high level IHttpHandler is analogous to what would be an ISAPI extension in IIS and IHttpModule would be analogous to what a ISAPI filter in IIS....

October 28, 2004 · Amit Bahree

Yes, the GC *can* leak memory - there I said it!

Shawn Van ness has an excellent article, that spells out how event listeners can cause memory leaks, yep even when running in managed code. Steve Main sums it up pretty well: The main issue is the “lapsed listener” problem. This occurs when objects subscribe to events and subsequently get out of scope. The problem is that the event subscriber doesn’t get garbage collected because the event is still holding a reference to it inside of the event’s invocation list....

September 21, 2004 · Amit Bahree

Exceptional Condition Handling in SQL Server 2005

This is my second part of the SQL Server 2005 posts; you can read the <strong>first part</strong> on Hosting the .NET runtime in SQL Server. In the CLR certain conditions such as out of memory, stack overflow, etc can bring down an app domain (or process), this cannot be allowed in SQL Server 2005 when latter is acting has a host (for the CLR) as it will affect reliability and performance - couple of the key goals for SQL Server....

August 5, 2004 · Amit Bahree