| Mauro's profileTaming the JunglePhotosBlogLists | Help |
|
April 29 Microsoft TechEd 2010 dates and locationMy friends at Microsoft told me the next years’s TechEd, Microsoft’s primary technical conference, will take place in New Orleans, from June 7th to 11th.
This year’s Tech will take place in Los Angeles on the week of May 11th. I will not be able to attend this year but I expect to visit New Orleans next year. April 17 Automatic checking numeric rangeI was recently involved in a discussion about the lack of “ranged ints” in the C# language. A ranged int is an integer type that would only accept a smaller subrange of all possible integers, say just 1 to 100. This is a discussion dear to me be because I sort of designed “ranged ints” for C++.
It all started because I used to develop with Turbo Pascal which *had* “ranged” integer types. You could turn on a compiler option that would automatically validate the range at runtime. I used it as a debugging aid, like an “automatic assert” every time the variable was assigned to. For instance, I would have a “row” variable that must hold values between 1 and 24, so I would declare it to be of a “row type”, a ranged integer of 1 to 24. During development and testing I would get an error if it got assigned something outside of that range. The final “non-checked” version would have this option turned off and have no performance penalties.
Then I had to switch to C++ and I missed my “ranged ints”. Since C++ templates allowed not only types but constants as arguments as well, I developed my own “ranged int” classes based on templates. At debug time they would check the range. I then flipped a compiler “define” and they would behave pretty much like a normal int, semantically and performance wise. This was not a popular C++ technique, but I used it left and right, despite that it made for slower compilations and at one point the Borland C++ compiler would choke with so much template usage.
I dusted off my C++ skills and wrote such an example as a console Win32 app below – this one is pretty simple (no copy constructor, no necessary operator overloading) and it will actually coerce the value to be within the range instead of issuing a warning, but you can get the idea. Of course, you could do the same with other numeric types such as float.
I couldn’t replicate the technique with C#. Maybe if it would accept constants as generics arguments, I could have my “ranged ints” back…
Here is the sample:
#include "stdafx.h"
#define DEBUG template <int V1, int V2> class RangeInt { private: int Value; #ifdef DEBUG // Checks range and force into the range if outside // An alternative would be to throw an exception or flag the error somehow void CheckRange() { if (Value < V1) { Value = V1; } if (Value > V2) { Value = V2; } } #endif public: RangeInt() { Value = V1; } RangeInt(int N) { Value = N; #ifdef DEBUG CheckRange(); #endif } operator int() { return Value; } }; int _tmain(int argc, _TCHAR* argv[])
{ RangeInt<1, 100> MyVal; MyVal = 0; printf("%d\n", MyVal); MyVal = 1000; printf("%d\n", MyVal); return 0; } April 16 Why I am not crazy about 64 bit desktop applications64-bit computing has been around for some years now and it didn’t get a lot of traction, despite the efforts from hardware and software suppliers. I know the reason: few people really need to run 64-bit software on their desktops; even on the server side the picture is not so rosy.
From a software developer point of view, if you are not managing more than 2 GB of memory in your program, it doesn't make sense to go to 64 bits. Some people would go further and say that a 64-bit address space is only worth if you have a *single variable* that holds more than 2 GB of data by itself. This is a far cry from the jump from 16 to 32 bits. In the Intel 16-bit world it was a huge pain if you wanted to have variables holding more than 64 kb each - which any stupid program did have back then; 32-bits cured that.
If you have less than 2 GB of data in your program, the same 64-bit code is way larger and thus slower (takes more time to load from memory) and the memory operations themselves are slower. I would dare to say that there are very, very few desktop programs around that would benefit from going to a 64-bit address space.
I’ve heard people say that if you have to manage a large, multi-gigabyte file, such as a video file, a DVD image or even a PST/OST Outlook file, you could use a large variable. Yes, you could but I am not sure that there would be a benefit loading the whole thing into memory at once, even if it were virtual memory.
On the server side, where a single application is actually serving hundreds or thousands of users, there are more reasons to go to 64 bits, especially in the case of infrastructure products that will be around for several years like a database server. March 31 The Cloud Manifesto and it’s dark originThere’s some buzz going on over the Web about the so called “Could Manifesto” (http://opencloudmanifesto.org/). It’s supposedly a technical manifesto asking for companies providing “could” hosting to be open, interoperable, nice and good-smelling. Their motto is “dedicated to the belief that the cloud should be open”.
At first one would think this is just the usual naïve, hippie, Richard Stallmanesque wishful thinking.
Yeaa, right. We have at least three companies (Microsoft, Google, Amazon) spending billions of dollars to set up cloud infrastructure, both hardware and software. Cloud hosting is a challenging environment, one for which the current software and hardware infrastructure is unable to meet for several technical reasons. That’s why those companies are investing on it.
Or, according to the Manifesto these companies are supposed to do one of the following:
Both are business suicides. Now it seems that IBM – a company notable for its lack of cloud offers – is behind the manifesto: http://news.cnet.com/8301-13505_3-10206927-16.html. Shame on you, IBM. March 25 The Wonderfull World of ScorecardsSuppose you are managed under a scorecard system: you have a numeric objective (i.e. numeric) criteria and you follow it, even knowing that might leave “something to be desired” or “it might not be the absolute best for the company”.
Let me give you an example: suppose you are an executive in the financial arm of a major insurance company. Your scorecard tells you that you get big cash bonuses if you sell “XYZ” financial instrument, say insurance against default on a AAA-rated package of crappy loans, a product you might have some mixed feelings about. Anyway you sell it left and right and cash in your bonuses. What else can you do? You are just a peon on the check board. Someone high up in the hierarchy must know better and have reasons to act this way. They do, BTW – and their reasons are similar to yours: High in the Sky there’s this Godly thing called “Wall Street” that scorecards the top executives of all public company every three months and commands their bonuses, jobs and lives.
Despite all the recent turmoil in the financial industry, the Gods are doing fine and didn’t lose their ways. Treasury Secretary Tim Geithner recently said: “AIG highlights broad failures of our financial system…Compensation practices encouraged risk-taking and rewarded short-term profits.”
Alan Greespan, of all people, didn’t know that the Gods were evil – or even existed. He found “a flaw in the model I perceived was the critical function in the structure that defines how the world works”… “I made a mistake in presuming that the self-interests of organizations, specifically banks and others, were such as that that they were best capable of protecting their own shareholders and their equity in the firms.”
Besides the “short term issue”, scorecards are an attempt to transform essentially subjective things in objective ones, but many times they end up like trying to fit a circle in a square hole. One can hope that even if the score cards were not precise, there would at least be a correlation between the points and what is best for the business.
Unfortunately that’s the way for an individual to survive in this environment. In March 2006 I wrote about this: http://maurosjungle.spaces.live.com/blog/cns!F3CEB0849B03B6CC!130.entry.
Obviously a good alternative is a system where the selfish interests of the executives are aligned with the selfish interest of the owners. Currently the owners of public US companies, such as a retirement fund, see a 20+ years horizon. The executives see a three months to one year horizon. One wonders why they sink the ship for a quick buck.
In places where you have a more “oligarchical” capitalism, where companies are owned by families or small groups you don’t see them doing this sort of blunders (well you see other blunders, but that’s another story).
Recently The Economist Magazine ran an article on how the Brazilian banks were spared from the recent financial massacre (http://www.economist.com/world/americas/displaystory.cfm?story_id=13331179). They attributed it to the high interest rates in Brazil, which made the banks “neglect” other “sources of profit”, as if they were fools. Ha ha ha. This is my explanation: all the major banks are tightly controlled and don’t give too much credit to what Wall Street says, so they didn’t join the “subprime gold rush”. They are no fools at all. March 10 The Scourge of Multi-Threading and its mitigationMulti-threading was promoted by IBM in the days of OS/2 2.0 as a way to differentiate it from the far more successful Windows 3.11. OS/2 had it; Windows only got it with Windows 95. Multi-threading was promoted as a way to never let the user looking at an hourglass cursor again.
Never mind that:
I do believe Mankind would have been better served had we took the coroutine path back then. But IBM marketing folks decided it was not to be. In fact the whole industry fell in love with this multi-threading thing.
Hopefully, very few programs *really* needed multi-threading. Things like web browsers, web servers, database servers and application servers did need (and used) it. Your average “Joe programmer” didn’t need to bother – and the few who did bother are to this day trying to figure out what hit them. So the damage was limited.
Forward to 2008. We now have CPUs with two, four and more cores and counting. If they are in a server, the cores are already being heavily used by the highly multi-threaded server software. However, if they sit in a workstation, chances are that the multiple cores are not really being used much. The reason is that most of the time workstations do nothing but wait for user input. When they do run some heavy load, like printing a large report, chances are this program was not developed with multiple cores in mind and run no faster that they would have run in a single core CPU. In order to take advantage of the multiple cores, some clever multi-threading programming is in order. Much clever than the average Joe programmer is capable of, unfortunately.
In order to address this problem, Microsoft is coming up with some new clever “parallel extensions” for .NET Framework 4.0. Those extensions include several ways to extract parallelism from the average program with minimum additional complexity. They also include better debugger support, parallel LINQ query and much more.
You can check this links to know more about parallel extensions in .NET 4.0: http://msdn.microsoft.com/en-us/magazine/cc817396.aspx, http://msdn.microsoft.com/en-us/magazine/cc163340.aspx.
Note that we are not talking about “multi-threading”, but “running parallel”. Although similar, the two things are not quite the same. January 27 Coding Standards & ToolsI’ve have always used very strict coding standards, similar to what Steve McConnell preaches at his classic book, “Code Complete”. The main problem with those standards is that they require some manual labor to continuously review the code, which makes them somewhat difficult and expensive to enforce with a large team. Not that I don’t think you shouldn’t enforce them – I’ve always did it in the projects that I managed directly. But as a consultant it is always a hard sell, for the need of continued reviewing. I’ve applauded Microsoft when they added “Code Analysis Tools” (a.k.a. FxCop) to Visual Studio 2005. Those tools would automatically verify several good coding practices. That was certainly a step in the right direction, but it didn’t check several things I deem important such as the complexity of the code inside methods, to name just one. Anyway, Microsoft is definitely moving in the right direction along this path. With Visual Studio 2008 they brought in more options in the “Code Analysis Tool”, one of my favorites being checking for try/catch statements that don’t specify the type of the exception being caught. In Visual Studio 2010, Microsoft also included a tool that allows you to see dependencies in your code (“what calls what”), as I blogged about before (http://maurosjungle.spaces.live.com/blog/cns!F3CEB0849B03B6CC!539.entry). Despite all that, I always felt that something was missing and still toyed with the idea of writing a tool myself (as if I had the time…). Not anymore. Last week I found out a tool that is really a dream come true: NDepend (http://www.ndepend.com/). First, it has a comprehensive and visual set of tools that allows you to see “what calls what”. Then it spits out a very detailed report, along the same “party line” that I myself always preached and then some. But the best part is that, after analyzing your code, it sets up a database and implements a SQL-like query language that really allows you to do your own queries, in case their own are not good enough! (well, they never are – everybody has his/her own quirks). For instance, this query checks if the size of the instance is too big: WARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE SizeOfInst > 64 ORDER BY SizeOfInst DESC Last but not the least: it’s a small (7MB) download, it occupies 17MB after unpacked and it doesn’t need to be installed, which in my opinion speaks volumes about its own quality. They could have written an .msi installer but it seems that they didn’t on purpose to send a silent message to their audience. You see, it’s like a Ferrari, it does not come with an automatic transmission. If you really want an automatic transmission, well, then you don’t belong. Go buy a Mustang. It’s an amazing tool, I just scratched the surface. BTW, some features like the query engine are only available in the “Pro” version, the free demo doesn’t have them. January 12 Windows 7 First impressionsI’ve been using the Windows 7 build 7000 public beta for a few days and I am quite happy so far. It recognized *all* the hardware in my Satellite A205-S5825, a 1-year old computer, including things like the touchpad that gave trouble to both Vista and Windows 2008.
Although the computer runs x64, I installed the 32-bit version so as to compare it better with the other 32-bit OSs I run in the same machine. I replaced the copy of Vista I had there and left Windows 2008 Enterprise Server.
After the installation the OS selection menu didn’t show up any longer so I could not boot Windows 2008. I then run VistabootPro, a utility I used to recover from a similar situation after I wanted to make Vista coexist with XP. Not only it didn’t work, it made all OSes disappear, including the fresh copy of Windows 7. I then booted from the Windows 7 DVD and selected the “recover” option. It did find both OSes and set up a boot menu with both options.
Windows 7 seems to be everything Microsoft promised with Vista but failed to deliver: it boots fast, uses much less resources than Vista, UAC is much less intrusive so I can live with it turned on. The OS seems to be more responsive, for instance I no longer see a long leg after I open Windows Explorer. Although it’s a beta, it already looks better than the first retail version of Vista. It looks like Microsoft got it right this time. January 08 Windows 7 beta availableMicrosoft released yesterday to its beta testers (at http://connect.microsoft.com) a new version of Windows 7. I am already downloading the multi-gigabyte package.
This is a much-anticipated version because of a recently non-official leaked version that got good “reviews” on the Web, “unofficial” and official such as this one at CNET: http://news.cnet.com/8301-1001_3-10134184-92.html. December 18 At Last a (very) good Cross-Reference tool for .NETOk, I am old. I started programming professionally with Applesoft BASIC on Apple II in the early 1980s. At that time there were many “cross-reference tools” that would go through your code and find what function each function called – a “call graph” and display it as a list of function and the ones it called.
Software was small but even then the cross-reference tools (there were many!) were useful in order to see the impact of changes, help reorganize the code (we call it “refactor” nowadays), find bugs and so on.
Now I am managing a large health care application that was developed along the years by people that professional courtesy forces me to call “not very careful”. As it is now, there are very few DLLs (including a huge one) and it seems that each method calls every other one, without any layering and any order.
I desperately need to break down the code in sensible layers so I can recode parts of it and plug in new functionality with ease. I desperately need a modern version of my old Applesoft “cross-reference” tools. Of course, a modern version would know about assemblies, classes and would display the “call graph” graphically. I spent many hours on the Web and didn’t quite find anything satisfactory. The closest I got was something called “Total “.NET XRef”, but it didn’t work with .NET 2.0 and it lacked a graphical output. I even entertained the idea of writing such a tool myself – after all, AFAIK the information is all there on the assemblies and can be pulled in by reflection.
Now my prayers were answered: Microsoft came up with such a tool for Visual Studio 2010. It is no longer called “cross reference”, it is called the “Architecture Explorer” - marketing people in action, you see.
Anyway, this "Architecture Eplorer" is reason enough to upgrade to VS 2010 when it is available. Actually, I it’s reason enough to download the 8 GB CTP, put up with the slow speed of the Virtual Machine and keep using it till the cows come home – or Microsoft launches the final version.
Take a look below at XPS file it generated. Inside VS 2010 you can drill down at each module, see classes and methods. This thing is simply Glorious. Hail to the people at Microsoft that came up with this.
October 13 Silverlight 2 is hereMicrosoft announced today that its new browser client platform, named Silverlight, will be available for download tomorrow, Oct 14th at http://www.microsoft.com/silverlight/.
Silverlight is a kind of “.NET Light” that runs under many Internet browser (IE, Firefox, Safari) and operating systems (Windows, MacOS and Linux). It is very attractive to Microsoft shops because it uses the same languages, class library and development environment as the “full .NET”.
Silverlight is a direct competitor to Adobe Flash. Compared with Flash, Silverlight has a much more robust and feature rich development environment. The one thing that Silverlight lacks when compared to Flash is 3-D graphics, but that can be included by the applications themselves. Also, Microsoft can extend Silverlight at will in the future and include support to different APIs, I believe it’s just a question of getting customer feedback.
I hope .NET finally delivers the promise of “Smart Client” applications made by Bill Gates during PDC 2001 but never quite delivered by .NET 1.X or even ClickOnce. Smart Client applications are meant to deliver the ease of deployment of browser applications with the rich user experience of Windows apps.
Compared with ClickOnce, Silverlight has some clear advantages:
It’s not as powerful as the full blown .NET Framework but I expect it to have the right balance of power and simplicity. Given that it was developed under the leadership of Scott Guthrie, of ASP.NET fame, I have a very good feeling. September 24 Windows will be shown for the first time during the PDCMicrosoft will for the first time publicly the next version of its flagship operating System, Windows 7, during the Professional Developer’s Conference to take place in Los Angeles during the last week of October.
See more at http://www.microsoftpdc.com. September 23 Preparing for PDC 2008PDC (Professional Developer’s Conference) is the premier Microsoft’s event for developers. The exciting thing about PDC is that, contrary to TechEd, it does not happen every year. It only happens when Microsoft “has something new to say”. Because of that, its contents are somewhat foggy; the real news is “saved” for the event itself.
In no PDC was this most striking than PDC 2000 in Orlando. In the agenda you could see that there were only “general sessions” and absolutely no abstracts were published beforehand. Even then Microsoft managed to attract about four thousand curious developers to see what used to be called the “New Generation Windows Services”, now known as “.NET”. You can check at http://www.microsoftpdc.com/.
This year there are abstracts published, but the main focus – as far as I can tell – will be “Extending the Platform to the Cloud”. From a developer point of view it seems it’s a new set of APIs to stuff over the Internet in deeper ways that it’s now easily possible. There’s video about the strategy at http://channel9.msdn.com/posts/Dan/Countdown-to-PDC-2008-This-is-the-Software--Services-PDC-Plus-a-Hard-Drive-Chock-Full-oBits-is-a-PDC/.
And BTW, I just got the wind that there will be so many things delivered that they will give away a 160GB USB hard disk to each participant with the contents in!
I will be there. September 03 Browser Wars (again)Last week Microsoft put out Beta 2 of Internet Explorer 8. One of the touted advantages was better compliance to Web standards, something Microsoft has been accused of not doing well in previous versions.
Now Google launched its own browser, “Chrome”. At first it sounds strange: why spend money when there are already good browsers around, like IE, Firefox, Safari and Opera? Google says that it “wants to give users a better, faster and more reliable browser”. How noble of them.
I myself think there are more selfish motives. Google has some of the hottest Internet properties and gets a lot of money from advertising. If they managed to control the client, they can get some very clear benefits:
Their “term of use” is quite long at more than 4000 words plus several web links. The privacy link has no less than 32 links to other pages. “Chrome’s policy itself is another 1100 words long. It does have suspicious wording. Read some of it:
“Your copy of Google Chrome includes one or more unique application numbers. These numbers and information about your installation of the browser (e.g., version number, language) will be sent to Google when you first install and use it and when Google Chrome automatically checks for updates.”
“Sites that you visit using Google Chrome will automatically receive standard log information similar to that received by Google”
“In consideration for Google granting you access to and use of the Services, you agree that Google may place such advertising on the Services.”
“By submitting, posting or displaying the content you give Google a perpetual, irrevocable, worldwide, royalty-free, and non-exclusive license to reproduce, adapt, modify, translate, publish, publicly perform, publicly display and distribute any Content which you submit, post or display on or through, the Services.”
I am not the only one with mixed feelings. Check this blob by a lawyer : http://tapthehive.s483.sureserver.com/discuss/This_Post_Not_Made_In_Chrome_Google_s_EULA_Sucks. He is very suspicious about the rights you give Google by simply using their software. Check this too: http://news.cnet.com/8301-13860_3-10030522-56.html?tag=txt.
So now it seems that Microsoft is indeed migrating to “standards based browser” while Google is going exactly the other way – and stealing your stuff in the process. Do no evil my a**.
BTW, hours after release somebody found a serious security flaw in Chrome: http://blogs.zdnet.com/security/?p=1843 August 28 The perils on outsourcing projectsI am not a big enthusiast on outsourcing the development of projects, having done that for more than a couple of years. Actually, it’s fair to say that I am mostly out of this business. From the point of view of the supplier, it’s very difficult for a small company to compete effectively and seriously. Suppose you have a software development project that would cost US$500k. Ok, estimates are difficult but I have to start this discussion from some point. My company offers to do the job for US$600k. Then another guy offers US$300k and gets the bid, maybe knowing very well that it’s impossible to deliver the product for this price. The manager of the hiring company is a genius for saving the company money; if it’s a long project he may even be promoted before the time bomb goes off. Sometimes he even gets some sort of kickback from the seller, varying for a trip to an international conference to money under the table. At the contracting moment, the buyer has all the power. Sometime along the project, it becomes clear that the project will not be completed on budget and on time. Now the power is with the seller. The buyer has already spent money and time – remember he needs the software for some concrete business need. He can fire the contractor and start over – maybe with somebody else who would pull the very same trick on him! So the buyer plays along and accepts some “changes of scope” so as to: 1)justify raising the price with some overpriced “new” functionality and 2)drop some expensive features. See, it’s not his fault: “everybody” knows software projects run over budget and over time; he might even have budgeted for it beforehand without telling the seller. And an over budgeted US$300k contract is better than an over budgeted US$600k contract, isn’t? The project ends up costing more than US$600k and doing less. The seller can claim he developed such a product and use it as a recommendation for a similar project elsewhere! Serious bidders *always* have the higher prices. There will always be somebody with a much lower price. No matter how much a customer likes you, it’s pretty much impossible to justify those prices differences. This situation has some interesting consequences:
You might say that one can write good contracts, hire insurance etc. I doubt those are as effective as one hopes. I see that problem happening big time in the USA. Big-ticket military weapons contractors are known for doing precisely what I described earlier. And you don’t even need the government to “help” you: The Boeing 787 is a textbook example of the problem above. After developing the 777 internally on time, some Boeing executives years ago “invented” a new manufacturing concept based on outsourcing as much as they could. They twisted the suppliers’ arms into giving low estimates - and I am sure, very stringent contracts. This allowed Boeing to sell a very capable and very cheap airplane in record numbers, some 800 even before the first flight! Boeing’s stock value tripled and I am pretty sure all of those executives got fat bonuses for the “outsourcing miracle”. This outsourcing involved not only manufacturing parts using new carbon fiber technology, it also included designing the stuff! Boeing would become more or less a “branding” operation (not engineering, not manufacturing). Final “assembly” would be done in three days! A few year passes and now it’s crunch time. Now the suppliers simply can’t deliver and Boeing had to nanny them and bail them out, no matter how “airtight” the contracts were. The “airplane” rolled out on the 2007/8/7 ceremony was an empty husk put together with fasteners bought at a local hardware store. The project is a money pit and terribly late. Despite record sales of the 737 and 777, the stock price took a dive. There are of course outsourcing exceptions, usually companies with such a reputation that they can command “fair” and much higher prices. The costumers agree to pay a premium when the project is very critical and absolutely must be done right and on time. One can buy off the shelf, of course, which should be the “default” choice for any company. August 27 Mojave Experiment, now in SilverlightThe “Mojave” marketing campaign from Microsoft surprised some people though its use of Adobe’s Flash instead of the shiny new – and I must add superior - Silverlight from Microsoft itself.
Well, Microsoft now mended its ways and put up a new site using Silverlight. Check at http://www.mojaveexperiment.com/.
Last but not the least: the site is now hosted under IIS7, running ASP.NET (it was not before). August 15 Open XML goes ahead at ISOAfter approval of DIS 29500 (“OpenXML”) at ISO during the “Ballot Resolution Meeting” , four government bodies (Brazil, India, South Africa and Venezuela) appealed against it but the appeals got no support and it will be published as an ISO standard. You can read more at http://www.iso.org/iso/pressrelease.htm?refid=Ref1151 July 07 Using IIS with Network Storage – DON’TI had to troubleshoot a problem over this weekend that arouse after an IIS server farm (Windows 2003 SP2, IIS 6.0, Application Center, 4 servers) had its storage moved from internal disks to external Storage (NAS, Netapp FAS 2020 using CIFS protocol). When running with NAS, the application would lose session state frequently and that was a big problem. BTW, the application writes to its own directories under normal operations.
Microsoft Internet Information Server creates a “change notification” for each web application it has, so when the folder changes it can recompile/restart the application. This sounds like a good idea and it works like a charm with local disks, the standard deployment scenario for web applications. Indeed, I wrote a program that is able to watch for more than one thousand notifications at the local disk. However, things break down when you use network storage because both the client and the server have a default limit of 50 “SMB slots” for communication between client and server. Those slots are used (and reused) for every file operation, but each notification “hogs” one of them. My test program confirms this by opening just 50 notifications with a network share. There’s a solution (or workaround): increase this limit both at the file server and the client (web server in this case). This is well documented at http://support.microsoft.com/kb/843584. So problem solved? Maybe. I did some research and I concluded that although “change notifications” are fine with local storage, it’s a somewhat brittle mechanism over a network and you should avoid it whenever possible, either directly in your own code or indirectly, such as when you use IIS with network storage. This is why: 1) It’s a state full, resource intensive feature Having a permanent connection between the client and the server is probably a bad idea. Elsewhere we stopped doing this: HTTP is connectionless; application servers use atomic methods (the A in ACID); databases are accessed without permanent connections. Permanent connections are now considered non-scalable, performance hogs. Change notifications require permanent connections.
BTW, Microsoft stopped using them for cache control by default in IIS starting with IIS6: http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/remstorg.mspx. But it seems that I have no control over what Application Center and/or the ASP subsystem does regarding the use notifications for whatever use they find fit. 2) The CIFS specification say that this is a brittle mechanism The CIFS specification clearly states that the NT_TRANSACT_NOTIFY_CHANGE command might “loose it cool” under load: “If too many files have changed since the last time the command was issued, then zero bytes are returned and an alternate status code is returned”. 3) ReadDirectoryChangesW has a 64k limit The Windows API used for notifications, ReadDirectoryChangesW, has a documented 64k buffer limit (actually the size of the SMB package) when working over the network. This limits the amount of data a notification might send and might break the mechanism altogether. In short, avoid change notification over the network in your code and try to prevent programs that you use from doing this. For instance, if you do have to use network storage with IIS, try to keep the application files in local storage and put only application data on the network. June 26 Data Access DebateI’ve been yet again involved in some discussion about ORM tools and data access architectures. Here is my take.
There’s a lot of “religious” discussion when talking about ORM in general; few people have unbalanced views. Maybe because when you are fresh in the field you simply can’t have an opinion – it’s a very complicated matter. Later on when you do have experience you also have a lot of baggage in the form of assumptions and preconceptions about how things do and don’t work. I consider myself in the “against ORM” group; I think that ORM tools like NHibernate would do more harm than good in 90% of the projects I’ve been involved in and are bound to be misused by 98% of the developers I met, if left to their own devices.
My focus lately is mostly with LOB applications developed by non-rocket-scientists developers. In this environment things are not individually complex but are extensive: we are talking hundreds or even thousands of forms/pages/reports. High productivity using run-of-the-mill developers is paramount. Having half a dozen very senior and experienced people is not an option. I particularly like typed DataTables because of the Visual Studio designer support and easy data binding.
This is what I have been doing so far with some success, in a nutshell:
May 25 Update on IE 8 Beta - I Like itMy first impressions on IE8 Beta (http://maurosjungle.spaces.live.com/blog/cns!F3CEB0849B03B6CC!356.entry) still stand, but after using it for more than two months I do have some comments.
I am quite happy with IE8, especially because it Is stable, fast and does not have my #1 IE 7 annoyance. IE7 doesn’t allow you to open more than about 30 pages at the same time (YMMV, but 40 pages is really a dead end). This is the way I browse the Internet and my browser should be able to do support it, period. Actually when you open that many pages on IE7, you cannot open any new windows at all in any program, not even the system menu when you right click on something. IE7 is actually hogging some system wide limit (very strange, BTW).
That IE7 hogs so many system resources in a computer with 3 GB RAM is beyond inexcusable. That reminds me of Windows 3.0 times when there were some limits on the amount of stuff you could do because of the use of a single 64kb heap for some system data such as Windows management data. Windows 3.1 improved that by using different heaps for different kinds of data but Windows 95 with its true 32-bit architecture is supposed to have put those limits to rest.
IE8 is fast and compatible with most sites. It has an “Emulate IE7” button that supposedly emulates IE7 behavior. I usually leave this “Emulate IE7” turned on because without it some sites don’t display properly. Also, since it’s a global setting (why?) and you have to restart all copies of IE in order for this setting to “stick”, it’s simply too much trouble for me to do this all the time, especially with dozens of simultaneously open windows. I say “supposedly” emulates IE7 because Google Maps is unusable even with this setting on.
So except for this Google Maps issue (I then open Firefox), I like IE8 Beta better than IE7 retail. |
|
|