Posts
1145
Comments
890
Trackbacks
1
October 2011 Blog Posts
Faulting Module Kernel32.dll: One solution

This is one solution to this error, hardly the only one.

Sometimes when you try to run a .NET application, you get a completely generic error message in event viewer that includes “faulting module kernel32.dll” in the description.  If you Google this, you will see that there is a wide and nearly useless range of cases where this can occur.

In my particular case, though it took a little while to figure out, the cause and solution were fairly straightforward.

The application was a windows service, and would throw an error when started.  It worked in other environments, worked on other machines in the same environment, yada yada yada.  The problem was that the .NET application had a reference to dependency it expected to be in the GAC.  On the machine throwing the error, the dependency wasn’t in the GAC, thus the failure (there were actually two missing dependencies, one custom, one Microsoft Enterprise Library 4.1).

Once the dependencies were installed, the windows service started successfully.

posted @ Sunday, October 30, 2011 4:18 PM | Feedback (5)
Philosophy 101: A reason to consider using a NoSQL implementation

Note: the cross-section of people interested in philosophy and also interested in NoSQL is close to zero, but it’s my blog and I blog what I want to, blog what I want to.  The general philosophical point applies to all of life, the usage of NoSQL to discuss it might be interesting to people interested in NoSQL.

This might not come as a surprise to anyone, but developers tend to be an opinionated bunch (ask me what I think about TDD).

On a factor of something like 5X, DBAs are worse.  I believe I have some standing to state this, as I am one.

There are various topics that get discussed in DBA-land that, quite frankly, approach dogma-level.  To be clear, within some particular context, there might be right or wrong, better or worse answers to some questions, but they are almost always discussed at a level that ignores context and so become largely pointless.  Some random examples:

  1. Should you use stored procedures or not?
  2. Should you use surrogate or natural primary keys?
  3. Should all database access code go through DBA review or not?

In case anyone is wondering, the correct answer to these questions is as follows:

  1. You should never use stored procedures unless they are necessary.  When are they necessary?  When they need to be used.
  2. It doesn’t matter, unless it does.
  3. No, unless it needs to.

I can imagine dozens of reasons why people will disagree with my analysis of what the correct answers are.  They are all wrong.

Ignoring that for a minute, and getting to how this deals with NoSQL:

I have often joked/commented that SQL Server (and this true of all RDBMS) is somewhat similar to quantum mechanics in that the results of any analysis of SQL performance/design/architecture/whatever is affected by the act of observation, and that it can appear to be ‘random’, where, e.g., the same query can perform differently when run in different contexts.

The randomness factor can be attributed to a number of things

  1. The performance of a query is directly tied to the data present, which can obviously change over time.
  2. The performance of a query is (usually) directly tied to the indexes and statistics that support it, which can obviously change over time.

The observation factor can be attributed to a number of things:

  1. When you want to test a query that hits SQL Server, you typically use SQL Profiler to do so.  The use of SQL Profiler can directly impact the results of a query (in fact, if you are ‘good enough’, you can crash SQL Server if you set up a profiler trace incorrectly).
  2. I’ve been told that the same applies to Oracle.

Getting back to the dogma stuff:

  1. It is almost impossible to prove the pro or con of any of the questions I listed, in large part because of the quantum mechanics like behavior of RDBMS. 
  2. The technical details/specs/whatever of almost every RDBMS are agnostic towards the dogma stuff.
  3. Almost every DBA (including myself) is influenced by real-world experience, almost always negative real-world experience, that drives us to a particular set of conclusions, conclusions that cannot be disproven directly, due to the quantum mechanics like behavior of RDBMS.

Get to the point already about NoSQL

If you have the ability to implement a NoSQL solution, you immediately free yourself from having to deal with this dogma. 

I have absolutely no doubt that, given enough time, there will be NoSQL-related dogma built up, but for now, there is a freedom in being able to implement an implementation, and see the results. 

I have little doubt that any NoSQL implementation will eventually run up against the quantum mechanics like behavior of an RDBMS system.  This is because of the nature of data in general.

What the hell does this have to do with Philosophy?

The answer to this question begins with a posit about human nature that is undeniably true, but which many people would want to deny:

Almost everything that you believe is believed for largely non-rational reasons.

This includes what you believe about SQL, politics, religion, and everything else.

A couple of points to be made here

  1. I said ‘largely’
  2. I said ‘non-rational’, not ‘irrational'.’  This is especially important.

We believe the things we believe on the basis of many different things.  Our upbringing and our personal experience are two of the main sources.

Not to put too fine a point on it, but life is pretty complicated.  The various ‘inputs’ that drive our habits are pretty varied, and this applies to life in general as well as to our beliefs involving technical matters.

If we were forced to provide rigorous validation for the things we believe, we would hardly be able to get out of bed, much less lead our lives.

Because of this fact (and it is a fact), we tend to gravitate to reasons that fit our experience.  Obviously, this doesn’t mean we don’t learn, but, all things being equal, we tend to lean in a certain direction by nature, because to do otherwise would prevent us from acting on our beliefs.

This doesn’t mean that our beliefs are irrational.  Irrational beliefs are, generally speaking, beliefs that we have that we refuse to give up even when experience tells us we should.  Non-rational beliefs, generally speaking, are beliefs that we have that we don’t really look for support for, largely because we don’t have any reason to look support for.

I believe the things that I believe through a combination of personal experiences and the experiences of others that make sense to me.  Many of the things I believe are ‘non-rational’ in the sense that I simply accept what other people who make sense to me have expressed.  But the ‘who make sense to me’ caveat is tied to my own personal experience.

Though some think that this fact is despairing, I think it is par for the course.  To use a standard philosophy example, why do you believe the sun will rise tomorrow?  Well, it always has.  So what?  Well, science tells us it will.  So what, science is wrong all the time?  Well, it isn’t about this.  So what, why can’t it be wrong this time about this?  Well, stop asking me stupid questions about the sun rising tomorrow, if it doesn’t, I’ll deal with it then, in the meantime, I will hold the largely non-rational belief that it will.  And by the way, shut the fuck already.

Debates about whether or not to use surrogate or natural keys really end up in the same position.  If we have used surrogate keys in the past and it has caused problems, we will tend to use natural keys.  Or the opposite.

It would be easy to think that what I am saying is that it never matters which we use.  That would be incorrect.  It does matter within a particular context.  Just don’t think that the answer crosses context.

posted @ Tuesday, October 11, 2011 10:26 PM | Feedback (0)
NoSQL gets a boost: Oracle joins the NoSQL Club

Here’s the InfoQ link.

I’ve actually been expecting something like this from either Oracle or Microsoft.  There’s more than enough evidence out there that a NoSQL implementation is able to handle important, real-world scenarios in ways that traditional relational databases can’t (or, more accurately, can’t easily).

It makes sense, from a vendor perspective, to add this weapon to its arsenal.  It would not surprise me to see Microsoft offer something at some point down the road, though I wouldn’t be surprised if the marketing department has some difficulty in developing decent branding for it:  SQL Server 2012 NoSQL Edition anyone?

posted @ Tuesday, October 04, 2011 7:17 PM | Feedback (0)