Wednesday, October 31, 2012

MongoDB and the Relational Car

Sometimes you want your data all nicely normalized, and sometimes you don't. This has come into sharp relief as I go through MongoDB training this week. By way of background, I have a fair amount of experience with many types of databases, data modeling and data thinking in general, so it is interesting and fun to learn about new ways of thinking.
But forst a story. In the dark ages (maybe 1974 or 1975), I wondered about mailing lists. So much so that I devised a way of tracking some of the uses of data among companies - especially early markets in buying and selling of information. I would sign up for a magazine using some unique variant of my names. Keep track of which variant I used for which magazine, and then see what solicitations I would get through the mail using that name variant. Most instructive. American Express sent mail to the largest number of variants.
I do the same things to this day - making up email names addresses just for long enough to validate that I want the service I have signed up for, and then wait and see what else arrives. Of course everything that arrives is by definition spam. But I digress.
I also thought about the "relational car" i.e. what would the world be like if I normalized my vehicles. Kept the wheels with the wheels, the engines with the engines,... You get the idea. I think it is likely that I would be late for work every day. First join all the piece parts together to make a suitable version (assuming that the children hadn't emptied the fuel tank the night before, thus putting the equivalent of a lock on the tank). Then drive off. After coming home, put the updated parts back. Updated???? Yes, because the tires are now more worn...
Clearly from the primary use of having a vehicle as transport, the relational car is far from ideal. I am much better off with the assembled car.
That's kind of how I think in Mongo. Often times the data are much more useful when put together by primary usage than when all normalized and accessed with joins. But, of course, not all the time.
That led me onto thinking about the quality of "relationships" (among the data entities). Many others, in more learned writings than mine, have fussed about different qualities in relationships. Composition is different from association, etc. So a Purchase Order might be composed of Many (at least 1) Purchase Order Line Items, so it seems reasonable to think of these line items inherently bound up with the POs. So the document oriented approach looks pretty good. But, things are less rosy, when I think about the association between the Product and the PO. There it is probably unreasonable to bury the product data inside a PO document. And there are several different kinds of associations we might want to consider.
So, when learning the document oriented DBMS (MongoDB), I am finding myself revisiting types of relationships and whether the distinctions are important. For me I have come down on the side of, I probably care in my master systems, those systems of record that actually run the business. But in those which are simply systems of reference, maybe it makes a whole lot of sense not to worry about the normalization, required schemas and other aspects that make the document oriented databases so interesting.
In the relational model the foreign key is the only relationship condtruct available. Even the cretion of "link" relations relies on the Forign Key. That doesn't seem to me to be a powerful enough construct to express the nuances of the kind of relationship and thus its associated semantics.
Oh, and circling around to something interesting about composition types of relationships, we do have some interesting delete anomalies. If we say that an A is composed of 1 or more Bs, what do we do when attempting to remove the last remaining B. That should somehow kill off the A, of course - or we expressed the rule incorrectly.

Thursday, July 12, 2012

Clouds and failures

Cloud infrastructure delivers us a utility view of computing. Models like Amazon's Elastic Cloud Computing (ECC) give us scalability on demand - and consumption based pricing. But along with all of the benefits of the model, there are some downsides that are less well understood or considered. The first is that you are responsible for ensuring that you have chosen the right disaster recovery options. If (when) the cloud infrastrucute hiccups, you do want to make sure your systems are still operational and available. You don't want the very public beatings that occur when Amazon takes a hit and sites hosted by Amazon become unavailable.
Second, there are many more players in the mix than you might think. There is a whole collection of management platforms that help you deal with the complexity of the underlying cloud. I'll use RightScale as an example here. In order to deploy/manage/maintain a specific deployment, the Rightscale environment can be used. That is a whole bunch (technical term, I know) of software that essentially provides processes and tools to configure/start/stop/script/debug/deploy servers in the cloud. That is some fairly complex software. It can break too. Or it can become part of a maintenance window. After all even management software has to be upgraded. So an outage in your management software could become problematic. You need to understand the location, up time guarantees, etc. of your management software.
Above that - because even the management software environments can be a bit cumbersome, companies might add their own layers of management software - think of them as super processes that run canned "scripts" for performing the most common tasks. These can fail too. Often corporations include these as part of their internal infrastructure - providing some handy authentication/authorization services integrated with corporate ldap or other directory services approaches. Where does that live? What's it's failure model?What kind of downtime does it have to take?
There are many moving parts here - so while there are considerable benefits to moving certain kinds of applications and services to the cloud, there may well be more failure scenarios to plan for.

An era ends

On May 31, 2012 I was laid off from Progress Software. Several events led to this - the first being when Progress decided to reduce its focus on the Travel Industry. I switched from being the Industry Architect for Travel and Leisure to being a member of the Demonstration Systems Group. There I had the responsibility for deploying the various Progress offerings "in the cloud" so that developers could quickly get a properly configured instance up to speed for doing demonstrations and proofs of concept.

Progress then decided that it is no longer in the "Enterprise Integration" business and as has been publicly announced, will be divesting several of the products that make up the Responsive Business Integration and Responsive Process Management offerings. Leaving behind the OpenEdge database product and development environment and the Apama/Corticon product lines for rules and analytics "in the cloud" and for capital markets.

From the public statements, it had become clear that Progress wanted to focus more on the more profitable, partner driven model that has been historically so successful.

Since I was a part of the RPM/RBI world of products, I along with several others became "surplus to requirements".

I enjoyed my time at Progress, and while I wished that it would have continued in the previous direction, I completely understand what the driving forces are.

I wish the company well in its future endeavors - and hope that the many friends that I made while there are successful.

Total Cost of Ownership

I think it is time to think about the TCO of living somewhere. The amount we have to expend (or is expended on our behalf) just for being somewhere.
The typical (and intensly political) approaches look at things like "The Deficit" and "Taxes" in giant categories. But what they don't do, not do they make it easy for us individually to do is to look at the cost/waste in the system of being somewhere.
That cost/waste comes out of our hides somehow. So, for example, we can keep taxes low by providing few government services and somehow billing back the citizenry for the necessary services.
We can have legislation that frees up tax money for a specific purpose (e.g. a Flexible Spending Account as part of the healthcare options). Nice you think - that will be taken off pre-tax. But because of abuse, we have to justify every dollar withdrawn from it - ensuring that we aren't buying things we shouldn't with pre-tax $. So bureacuracy is established to handle this. This bureaucracy has to be paid for. Oh, and this is a job creation scheme too! Premiums rise to pay for the bureaucracy. The blame is passed onto the healthcare industry and the government gets away scot free. As my dad would say, "A good game played slowly!"
So when we look at just the costs of being around we need to look at those items that aren't taxes (i.e. not collected by governemnt), but that somehow we have to pay in order to be here.
Of course much of this overhead comes about because so many individuals just cheat the system. So we create legislation, and then band-aid on anti-cheating measures which inevitably increase the price of the service, but the legislators can (correctly, but disingenuously) claim that they didn't increase taxes.

Thursday, January 19, 2012

Cost of switching

I am certainly not the first to make this observation, nor will I be the last. Switching from something that works OK to something that works a bit better probably won't happen. Huge generalization, yes. But we are mostly lazy and if switching requires lots of effort, we won't do it.
What brought this home? I was given an iPad by my employer (well loaned actually). I already have a Motorola Xoom whose quirks I am finally used to.
The iPad is gorgeous. The screen is crystal clear, the rendering spot on, the speed of response to user actions is great, the battery life seems to be wonderful. So why haven't I switched?
There could be several reasons:
  • Switching makes me admit I bought the wrong device
  • Switching requires me to relearn the User Experience
  • Switching means giving up some features in return for others
  • Switching means giving yet another big brother some basic information about me
  • Switching is work!
There isn't a single compelling reason to switch. Sure if I had not bought the Xoom, and was just starting the tablet journey, I might well buy the iPad. But having a device already means that I have to overcome some inertia. How much inertia? In this case a lot. The Xoom does pretty much what I want, so I am getting little more valuable functionality in response to the cost (of my time) that I put into the switching. While the iPad is an emotional purchase, it hasn't stimulated my emotions enough to want to part with the Xoom.

That and while I thought the Xoom soft keyboard was poor, the iPad one is hideous by comparison. Shift keys for each number? And we are told to have letters and numbers in passwords. It's too bloody difficult

Tuesday, January 17, 2012

Human "Technology"

I have been bothered for a while by the calories in/calories out model of weight thinking. I have finally articulated at least to myself why I have difficulties:

  • My scale doesn't weigh "calories" it is all about mass.
  • Energy seems to be a proxy for weight (and no I am not in the e=mc^^2 realm of thinking because that deals at entirely the wrong level!)
  • The energy in/energy out doesn't account for a few things (which I will detail out in the body of this posting)
So, here's the fundamental set of thinking. Please comment and point out the holes.

Taking the assumption that I am interested in what the scales say, I should be thinking in terms of the total inputs/outputs. Even without understanding any digestive processes.

Weight at any point in time = weight at previous point in time + weight of all inputs since that time  - weight of all outputs since that time.

It's the all inputs/all outputs that we need to worry about.

At the simplest level the inputs consist of:
  • All solids (food)
  • All liquids (drink)
  • All gases (air breathed in, water vapor in the air, etc.)
  • Supplements
At the simplest level the outputs consist of:
  • All solid (fecal) material 
  • All liquid (urine) material including dissolved solids
  • Vomit
  • Sweat
  • Respiration products (gases, especially Nitrogen and Carbon Dioxide, but total of all gases)
  • Water vapor in respiration products
  • Anything else we can think of (dead cells, sputum, tears, ear wax....)
It's no wonder we use energy as a proxy!

Now for the area where I have trouble with energy in/energy out. There is a move afoot to extract energy from human waste. That must mean that there is some residual energy in some of our outputs. Especially, I suspect in our feces. But maybe elsewhere too.  So the big questions for me are:
  • How much of the available energy is in our waste products?
  • Does the amount of available energy in our waste depend on our eating habits? If so how?
  • Does the amount of available energy in our waste depend on any conditions (eg Celiac disease) we have? If so how much effect?
Any thoughts/comments gratefully received.

Chris

Friday, November 4, 2011

Macs in PC workplaces

Much has been trumpeted in the twitterspeher and elsewhere about the general studliness of Mac users in the workplace.

This piece probably summarizes the situation well, and quotes from Forrester research. And while it may make individuals more productive, it fails to recognize the burden that Mac users place on the rest of the community. A couple of small cases in point.

A company I worked for had a significant Sharepoint knowledge sharing infrastructure. However, my boss - a Mac user claimed he couldn't get to the Sharepoint site from his Mac, so could I please email him stuff. He - more productive? Perhaps, the jury is out on his productivity anyway. Me, less so because now I have to remember to place the items in the Sharepoint - and mail them to the Macerati. Knock on effect? My mailbox filled every day because instead of sending pointers, I had to send files. The files were often large. So I lost 40 minutes per day managing my mailbox + whatever extra time/effort I expended creating the extra emails.

A second case in point, another boss (and a few people in the company) runs a Mac. The corporate standard for instant messaging is Lync (a Microsoft product). The Mac users don't have access to it (I don't know what the issue is), but it means I am now deprived of the ability to use a very valuable tool in internal communication. Again, my productivity is affected negatively - I try not to worry about the effect on the boss.

The main purpose of the article, however is that organizations should not ignore the needs of Mac users. I think that is all wrong. The organization must ensure that all users are productive - and provide tools that work seamlessly across the user base.