Wednesday, July 23, 2008

Many technologies can scale

  I was going to post this on Twitter - but shockingly - Twitter is down - I know - haven't heard that one before.  So in light of that - I am dropping my thought on my blog - so 2007.  Dare has some good thoughts around scaling and points out rightfully so that you can find examples of many different technologies that companies have scaled successfully even when you'll have people vehemently proclaiming that there is no way that technology can scale.  Scale in many cases is simply a function of how much work you want to put into it - guaranteed that the companies that Dare cites all have done some pretty tricky flips to eek out extra performance from their foundational technologies.  In the Team Foundation Server space which I follow quite heavily Brian Harry has documented on many occasions Microsoft's efforts to scale their TFS environment to meet the demands they place on it.

As a closing note people that take extreme (or absolute) positions on technology are almost always WRONG!

 

Technorati Tags: ,

Monday, July 14, 2008

The myth of cost when comparing Oracle Explain Plans

The cost that shows up in Oracle Explain Plans has long been a source of confusion for developers. I can’t count how many times I have heard experience Oracle developers comparing the cost of Explain Plans between different queries.
Now let me define different queries because I think that is often part of the confusion. Say you write a query to go get Lot History from Intel’s factory databases. As you go to write the query you realize that there are two ways that you could write it - perhaps the different ways involve different tables or different where clauses. If you then go get the Explain Plan for those queries they will show you the access paths that the database is taking to retrieve the data you want. Even though you are wanting to get the same data (so in that case the queries could be considered the same because they yield the same result set) the queries are different and as such you cannot use the cost information in the two Explain Plans to compare which query is more efficient or faster. Tom Kyte describes in detail why this is in a response on AskTom found here.

Technorati tags: Oracle, SQL

Writing Filters for TFS Alerts - a exercise in frustration

My team recently began looking at possibly migrating to a new TFS configuration where we would enable several dev groups with related components/systems that previously had separate dev management systems and bring them into one team project.  One of the first things that we wanted to make sure was possible was the ability to get alerts for only check-ins directly in our section of the codebase and for all changes to workitems connected to our efforts.

I was familiar with bissubscribe.exe somewhat and knew that there was filtering capability so I began looking around.  I was amazed at how little documentation there is out there for working with VSEFL (Visual Studio Event Filtering Language).  I found some here and Clark Sell has some stuff here.  Clark references a link that say you will find everything you want to know and more at it about Eventing well I would have to disagree because there is not good documentation for VSEFL and how to use it effectively. 

Accentient has a list of Team System widgets and lists two for use in working with Events and Notifications (Alerts).  Naren's tool hurt me to start with, but ended up helping me in the end.

Here is how it all worked out.

Check-In Subscription

This was the easy part - Buck Hodges had the answer in one of his blog posts and so I just took that and modified it with my path information and away we went - it all worked.

WorkItemChangedEvent

I thought this one was going to be likewise easy with Naren's tool.  Unfortunately it doesn't produce filter expressions that work with Bissubscribe.exe.  The way the command-line wants the single and double quotes is different than Naren generates and so I was getting invalid subscriptions created.  They were invalid because they didn't have single quotes around the System.IterationPath string in part of the filter and without the quotes the filter just wouldn't work.  It took quite a bit of playing to figure out how it should work, but in the end I ended up with a working bissubscribe.exe call to have a filter for only those workitems that fell under a certain Iteration Path which is how we are choosing to segment our subprojects within our Team Project.  Below is the final call with some of my specific info stripped out (like my email address!)BisSubscribe.exe /eventType WorkItemChangedEvent /deliveryType EmailHtml /server someserver:8080 /address someemail@email.com /filter "PortfolioProject = 'FSM DSS' AND (\"CoreFields/StringFields/Field[ReferenceName='System.IterationPath']/NewValue\" MATCH '\\FSM DSS\\TSS.*' OR \"CoreFields/StringFields/Field[ReferenceName='System.IterationPath']/OldValue\" MATCH '\\FSM DSS\\TSS.*')"

Notice the \ before the double quotes at the start of the CoreFields... and then the \ before the close double quotes at the end - those were crucial - but I don't know why - I suspect it is some escape at the command line that I should know - but it worked and perhaps someday I will look it up to try and understand it.  If you know please leave a comment explaining it to me!

I hope this helps someone somewhere such that they have an easier time figuring this out then I did

Technorati tags: tfs, vsts, visual studio team system, tfs alerts, vsefl

What everyone should know about using Bitmap Indexes with Oracle

I am only through part one of the three parts of the article that Jonathan Lewis wrote about bitmap indexes, but it was so good that I had to post it now.  He takes on the common understanding/misunderstanding with bitmap indexes.

Technorati Tags: Oracle

Interesting Oracle trick for range queries

http://www.linuxdevcenter.com/pub/a/linux/2004/01/06/rangekeyed_1.html

Why does every iTunes point release require a 70 MB reinstall?

Since the iPhone release which generated I think iTunes 7.3 over the last couple of months we have had 7.3.1 and 7.3.2 and 7.4 and now 7.5.  Each required reinstalls (including a reinstall of Quicktime???) and the size continues to grow - last night when prompted to install 7.5 it downloaded and installed 69 MB or something like that - I remember 7 being in the range of high 40s.  Anybody ever heard of a patch?  I am a software developer so I understand a little about the distribution of software.  I just don't get why point releases aren't handled as patches - going from 6 to 7 or 7 to 8 I completely understand a reinstall, but not for point releases.

Technorati Tags: iTunes,Apple

Solving the Oracle Home nightmare - Oracle Locator Express

For a year or two now I have been using a nice systray utility from dbmotive that has served me very well in managing the variety of Oracle Homes that I always seem to have on my machine.  It is called Oracle Locator Express - it looks like it used to be called Oracle Home Selector or something like that or perhaps is a replacement for it.

It runs in your systray and looks something like this

image

 

As you can see I have Oracle homes for Oracle 11g, 10g, XE, and Instant Client (not sure what the Instant Client thing is though?).  For my day to day development work I use the 10g client to connect to the various Oracle databases that I use.  Occasionally when I have something that I want to try out or test (like the Linq to Oracle prototype that is out there) I will switch over to the XE version.  This makes it very convenient and hassle free compared to what I have had to do in the past.  You just right click on the icon in the systray and up pops the menu above.  You select the Oracle Home you want to be active and away you go.  You have to restart any applications that you want to use this new Oracle Home.  For example I would need to restart Visual Studio so that it picks up the new path to the Oracle Home same goes for any SQL apps you might use like TOAD or PL/SQL Developer.

Entlib 4.0, Unity, Logging Application Block, and a CLR bug makes for a bad day

  One of my first tasks at my new job has been to look at integrating the Exception Handling block and Logging block into our .NET Stack.  We are also exploring using Unity as the Dependency Injection container.

  Things were moving along as I started playing with Unity and the Exception Handling block, but as soon as I tried to simply add logging of the handled Exception - it all blew up in my face.  Fortunately others had discovered the problem as well which was traced back to a bug in the CLR which had previously been reported and marked as fixed in .NET 4.0.  Now I understand that bugs happen and especially when they are bugs in the underlying platform there is only so much to be done.  The Entlib team did provide a code fix that could be applied to the source code and then with a custom compilation of Entlib you could be off and running again.  Well sort of - having a custom version of Entlib introduces other problems when you are talking about using the VS config tool to manage Entlib config.  When deploying this to 30 developers so they can manage Entlib config on their projects it gets to be problematic as the instructions for getting the built-in config tool involves changing solution properties and copying binaries around are not trivial.

  If I were doing something out of the ordinary I would be more willing to pay the price  - but I am trying to do the most basic Unity-EntLib integration here.  I am disappointed that issues with such a common scenario weren't caught before release.  The p&p teams have obviously invested time to make Unity and EntLib play nicely together (ala the Unity extensions that are available out of the box to enable Entlib to work with Unity) - I would have imagined that acceptance testing of any sort would have caught this.  Perhaps the explanation is as simple as the issue repros differently (perhaps JITs differently) on different machines.  Here is hoping that when the fix to the binaries that is hopefully in the works comes out that the team will explain how this happened.  Based on the principles that p&p espouses I know they value quality highly which makes this even more unusual. 

 Note: I use this blog to post both Personal and Technical articles.  For a technical only feed use the following URL (http://bryanandnoel.spaces.live.com/category/technology/feed.rss).  For a family only feed use the following URL (http://bryanandnoel.spaces.live.com/category/family/feed.rss)

Technorati Tags: ,