Azure+MongoDb: Having my mind blown at Mongo Boston

Update: Originally the Mongo Boston talk on Azure was supposed to be given by David Makogon (blog) (twitter). He talks about the session and some upcoming articles he will write in this post.

I was at the thoroughly awesome Mongo Boston conference at the Micrsoft NERD Center this weekend. I had a great time at the conference, as well as the surrounding activities. Of all the talks during the conference, one stood out. It was given by Mark Eisenberg who does sales for Microsoft Azure. That talk was on running MongoDB in Azure.

For those who do not know, Azure is Microsoft’s cloud offering. While they offer you virtual hosts, its not a traditional VM slice offering. You don’t get to run processes with administrative access, and you don’t get RDP access.

A few things stood out about this talk. First, it was a well executed “initial conversation” sales pitch. However, it was aimed perfectly at the audience in the room: programmers, architects, and technical decision makers. Mark knew his stuff. I asked some pretty deep technical questions, and got actual answers. It was also refreshing to hear, “its probably better to use Azure to write new apps than to port existing apps.” Having a salesman set expectations so frankly is unfortunately unusual in the IT industry.

The second thing that stood out was how you run a standalone exe like mongod.exe on Azure. Since you do not have administrative access to the machine, you cannot deploy via MSI, and you cannot run in the context of a windows service. The mongod process is basically running in a command prompt on a console you don’t have access to. Also, you cannot create different users to run different processes. The assumption, since this is the cloud, is that you spin up a new instance for each process. To be quite frank, I found this quite appalling at first. I spent a good chunk of my early career doing helpdesk and later system administration for a small ISP. Although titularly I was in charge of Unix and iSeries machines, I helped out on the windows side of the shop as well. Sometimes we had to run windows apps on the console of a server, requiring that a user was always logged into the console of that server. Knowing first hand the problems this caused, I declared a crusade against such programs. Also, this means all the windows improvements I contributed to mongo, windows service related improvements, served no purpose in the cloud.

Now, I’ve always been very dogmatic about my development and operations practices, so I’m still adjusting to what a more cool headed developer would accept instantly. However, my emotions will eventually come to accept what my intellect knows to be true. The cloud is here, I can get on it, or become the best buggy whip manufacturer there ever was.

The third thing that stood out had very little to do with the specifics of mongod and Azure. While its quite obvious Microsoft wants you to develop for Azure using .NET, they care about properly supporting all the third party technologies that Azure supports. I felt more like I was being sold by Lou Gerstner era IBM, than modern day Balmer lead Microsoft. Azure is being sold as a service. While Microsoft naturally wants to supplement that with the sale of their software products, they mainly want you to run your software on their platform. The threat of vendor lock-in is still there, but it always is on any platform.

CoApp: Open Source Package Manager for Windows

As I mentioned before, I am a big fan of msi installers on windows. So I was really excited to see Garrett Serack announce an OSS package management system called CoApp that he has been authorized to work full time on.

In my point of view, Garrett really gets it. I’m hoping as a side effect of this project, WiX will get all sorts of dependency handling improvements.

I’ll be watching how this develops very closely.

Trouble building PHP on Windows

Update: It seems that the facts presented to me in the initial bug report are not correct. I will be revising this article after the facts are settled. For now read the comments.

It all started with a simple bug encountered while trying to get PHP and WCF to play nice. Before you know it I was attempting to compile PHP on windows myself. That’s when I realized how deep the rabbit hole really goes.

These days I program in PHP and .NET for a living. In a past life I was a unix admin for small ISP where most of the internal unix infrastructure was FreeBSD while the managed customers tended to run Redhat.  Due to the unique path of my IT career, I usually don’t have a problem compiling open source software primarily targeted for unix on windows. PHP has proven to be a bit of an exception. However, with a little struggle, I got it to compile.

In this case the crux of the struggle was not a lack of documentation, but documentation outdated to the point of being wrong. This is perhaps the one exception to the rule postulated by Dick Brandon, “Documentation is like sex . . . when it is good, it is very, very good; and when it is bad, it is better than nothing.” Thankfully, Pierre of libgd fame pointed me in the right direction on the mailing list. So being a good netizen, I submitted a bug report so that someone with commit access to the php source repo could straighten the mess out. This was the response I received:

We don’t understand the build requirements or system.

You have to ask the Microsoft guys to update that file. was one of our
best Windows know-how (not-microsoft-employee) guy shot at documenting
the process, but the feedback he got from Microsoft employees was “this
is crap. its all wrong”.

Sorry, we simply do not know how to do this.

That was a little disheartening. I asked them to mark the readme file as outdated, and I asked them how to contact Microsoft. This was the response I received:

Updated the file to say its outdated.

As for contacting the Microsoft guys, try surfing around on

We have tried multiple times to get these docs updated, with no luck so
far, and like I said; our last attempt was shot down and they wanted
those docs to be reverted.

I’m sorry, you are simply on your own here.

So it seems my only resort is to blog about it and hope someone from Microsoft is in earshot. If you care about PHP on windows, spread the word. Spread this article with twitter, digg, reddit, or just plain old email. If you have the ear of anyone in Microsoft give it a bend. I’ve never attempted blogger activism like this, but I don’t know what else to do. I much prefer to fix problems myself than delegating or inspiring. However, this is one case where I need to “have a little help from my friends.” I don’t even know what Microsoft finds wrong with the proposed updates to the documentation, so submitting updated documentation seems pointless.

Microsoft and the OLPC – Red Tape and Misconceptions

It would appear that Microsoft is making significant progress in porting XP to the XO laptop. While I think the third world is better off learning Linux, I have no problem with them learning on a Microsoft platform, provided they make it suitable for their needs. They seem to be attempting to do that. I can’t say for sure that the OLPC is what the third world needs regardless of operating system, therefore I really can’t make a judgment as to which OS better serves said undefined needs. However, this is not a post to judge the merits of the OLPC or any OS that would run on it. Rather, its about red tape and misconceptions.

First the red tape. The technet article states that Microsoft cannot contribute to the OLPC project directly because of the open source license. It then seems to imply that Microsoft must reverse engineer the hardware because their engineers would somehow be tainted if they read the specs. I am quite ignorant of the OLPC project licenses, as well as open source hardware in general. So I have to assume that their lawyers are correct in their interpretation of whatever licenses govern the spec of the hardware.

This seems to be quite a hindrance. Granted the hindrance might be intentional. It seems to be similar to the hindrance that the GPL places on you reusing the code in a non open source project. I would expect many people that have worked on the OLPC project to be glad of this hindrance, just as many are glad of the hindrance that the GPL provides to their code being reused in a closed source project. However, many companies such as Sun and IBM are able to donate their programmers time and talents to Open Office, Apache, Firefox and other open source projects without “tainting” them. I think Microsoft could do similar. Even if it was impossible not to “taint” there developer, they are not in the business of making hardware or drivers. I doubt it would hurt Microsoft if the drivers they created for the custom XO hardware were all released as open source.

Now to tackle the misconception. James Utzschneider, the author of the technet blog, seems to think that the projects plan for supporting the laptop is to have the children patch the source code themselves.

And we have a different support model than OLPC is envisioning: we are not expecting K-6 school children to access the source code and do their own programming in the event they have to fix a problem in the computer. Certainly, we think there is a role for students in the support of school computers — in fact, as part of our Partners in Learningprogram we have trained over a million kids in a student helpdesk program (like in this case study from Brazil) — but we also think that local entrepreneurs and businesses need to play an important role here when you are talking about deployments involving tens of thousands of computers.

The angry young idealist in me started screaming of FUD immediately when I read this one. Just because the source is available, doesn’t necessarily mean you have to edit it. There has got to be a better support model than this. So I looked on the OLPC wiki page linked to by the article for more information and I found the following.

The laptop is an open-source machine: free software gives children the opportunity to fully own the machine in every sense. While we don’t expect every child to become a programmer, we don’t want any ceiling imposed on those children who choose to modify their machines. We are using open document formats for much the same reason: transparency is empowering. The children—and their teachers—will have the freedom to reshape, reinvent, and reapply their software, hardware, and content.

The article contains no explicit statement of their support model. It does allow for students and teachers to modify the laptop, but acknowledges that not every child will become a programmer. A cursory search does not turn up a formal support model. However, very few support issues require a code change, especially for commodity software that have a much larger usage in testing scenarios than most code gets in production. So while the support model may be lacking, I don’t see where they assume the children will be hacking their own laptops except as a learning exercise.

I honestly hope this port of XP is successful, and that they ship some OLPCs running Windows. First of all it gives people more choices. Secondly, I’d like to see that translate in to a first world consumer oriented $200 laptop.