Friday, October 31, 2008

First Time in the Cloud with SQL Data Services

I just completed putting data into the cloud for real and getting it back out using SQL Data Services for the first time, and I wanted to share the experience.

I've been chomping at the bit to do some real cloud computing ever since attending a Software Design Review about 7 weeks ago. I could develop locally with the pre-CTP SDK that was made available to me, of course, but I didn't have a cloud account. The whole idea is to use the cloud after all, so cloud computing on your local box isn't terribly exciting. At PDC2008 the platform was branded (Windows Azure), the CTP given out (updated software), and most important of all you can now sign up for cloud accounts.

I finally received an Azure Services account invitation this week which allows me to make use of SQL Services and .NET Services. Apparently a separate but similar process will give me the ability to put applications into the cloud. In the meantime, I'll have to be content creating local apps that can use the cloud for storage, access control, service bus communication, and workflow (those last 3 are what .NET Services gives you). This is what the portal looks like once you've set up your account:




I decided to start with SQL Data Services. There is an SDK for SDS, which you can download from the SQL Data Services Developer Center. Included in the SDK is SDS Explorer, which looks like this:



While the SDS Explorer is rather simple, simple is all you need to use SDS. HTTP GETs and POSTs are what you use to retrieve, query, or store data using REST. There are other ways to access SDS, such as using C# or Ruby, but using REST from the SDS Explorer seemed appropriate for first-time experimentation.

This is definitely not your father's SQL Server:
  • There's a learning curve. There's a new authority-container-entity hierarchy you need to understand. Authorties hold containers. Containers hold entities. Entities are like tables, but records are really just ids and data. An entity can be homogenous where all data is similarly structured, or jagged. Fortunately the documentation explains this nicely.
  • Access using REST is simple. It's way different from what you're used to in the enterprise (not necessarily in a bad way), but I found myself comfortable using GETs and POSTs to store and retrieve data in no time.
  • It's fun. Once I finally stored some records and was abel to retrieve them, I felt a real sense of accomplishment. And it was fun. Granted these are baby steps, but you've got to walk before you can run. Performance was excellent.

I have to admit, this experience is warming me to REST. Those restafarians might be on to something after all.

Wednesday, October 29, 2008

Cloud Computing User Group

I'm involved in helping form a national user group for Microsoft's cloud computing platform, Windows Azure. A community web site is now up at http://www.CloudComputingUserGroup.com where you can post info, ask questions, and share everything from ideas to code. Check it out!

The user group will also have local chapters. These can be in any location where someone is willing to host the meeting each month and find a place to meet. Microsoft consulting partner Neudesic has offered to provide meeting space in its locations. It looks like the first meetings, which could be within the month, will take place in Seattle, L.A., Orange County (CA), San Diego, Phoenix, Denver, Dallas, and Philadelphia. Thank you Neudesic!

Cloud Computing is a big thing, and it's going to take a community to pioneer it.

How Cloud Computing Will Affect Every Developer

I've been working on a talk / presentation called How Cloud Computing Will Affect Every Developer, with Microsoft's Cloud Computing Platform (Windows Azure) specifically in mind. I used it for the first time today and it worked well.

Today at the PDC, Mickey Williams and I gave this talk in the form of a conversation using this presentation for Microsoft's Channel 9 (Internet video). It should be showing up on the Channel 9 site (channel9.msdn.com) soon, I'll include a link once it appears.

A PDF of the presentation itself is available here: http://www.savefile.com/files/1866092.

Here's an outline of the deck:
  • Level Set - Clearing up Cloud Terminology
  • Cloud Computing in a Nutshell
  • Microsoft's Cloud Computing Platform
  • Impact all Developers will Feel
  • Impact on Enterprise Developers
  • New Patterns for Business Apps
  • Cloud Service Application Model
  • EAI Developers
  • SOA Developers
  • SQL Server Developers
  • Web .com Developers
  • Computer Science / Grid Computing Developers
  • Consultants
  • Product Developers
  • Start-ups
  • Leveling the Playing Field
  • One Last Category... "I Don't Have a Use for Cloud Computing"
  • Summary

PDC2008 Report, Day 2 (Tuesday)

Day 2 of the PDC began with another keynote. This time the topics covered were Windows 7, .NET, WPF, and Visual Studio. There was also a technical demo by Don Box and Chris Anderson.

Windows 7 highlights (Steve Sinofsky):
  • Addresses lessons learned from Windows Vista and Windows Server 2008. It has had important work in the areas of ecosystem readiness, standards (CSS in IE), compatibility (UAC "went too far"), and better support for certain scenarios.
  • Remote desktop can support multiple monitors.
  • Task bar - small icon support, customizable shut down button
  • Action Center - you can change (or hide) all messages for all Windows subsystems
  • UAC slider (you decide how much you want)
  • Developers get ribbon user interface, jump lists, libraries, multi-touch support, Ink/speech support, DirectX improvements
  • Fundamentals: work to decrease memory,m disk I/O and power; and increase speed, responsiveness, and scale.
  • Memory sticks can be encrypted, so if you lose one no one else can do anything with your files.
  • VHDs can now be created from hard drive images easily. You can also boot natively from a Win7 VHD.
  • Better DPI controls and multiple monitor controls.
  • Improved magnifier. Win+, Win- to zoom.
  • Amazing project set up via Win+P keystroke.

Building Great Apps - Scott Guthrie ("ScottGu"):

  • Win7 apps - win32/c++: New Win7 APIs. MFC for Win7 - ribbon UI and multi-touch support.
  • VS2010 - IDE support for very large code bases. Multi-core app dev.
  • Windows apps with .NET - .NET 3.5 SP1 improvements: streamlined setup, start-up performance improvements, graphics improvement, WPF DirectX interop, more controls.
  • New WPF toolkit (for all versions off Windows). New data grid, data picker, calendar, ribbon controls.
  • Windows apps with .NET 4.0 - WPF improvements (multi-touch, deep zone, visual state manager). Fundamentatls and interop (in-process side-by-side support for multiple CLRs, managed/native code interop, dynamic language support, extensible component model). Improved tooling in VS2010.
  • VS2010 - changing over to be WPF based. Very extensible. Multi-monitor support. Refactoring support. Better test/developer workflow.
  • IE8 - improved standards support, web slices, visual search, accerlators, built-in tools for Javascript debugging.
  • ASP.NET in 2008 - dynamic data, REST, MVC support, Ajax/JQuery. Intellisense + JQuery downloadable now at jquery.com.
  • ASP.NET 4 - web forms, MVC, Ajax, distributed caching ("Velocity") in CTP stage now.
  • VS22010 for web development - code focused improvements / editor improvements, JS/Ajax tooling, design view, SS2 support, publishing and deployment, possible to maintain a separate config file for each environment.
  • Sliverlight 2 - Netflix Instant Watch is live now using Silverlight. Silverlight toolkit (charting, tree view, dock panelo, wrap panel, view box, expander, ....). Silverlight designer in VS2010. Working on Silver in or outside the browser.

In the technical sessions, I concentrated today on Oslo, whicih is about modeling. I'm going to post on that separately.

Monday, October 27, 2008

PDC2008 Report, Day 1 (Monday)

The PDC formally began today, as usual with a morning keynote talk by a number of Microsoft executives. Due to excessive LA morning traffic it took my hotel shuttle over an hour to get to the convention center which cost me the first half hour of the keynote but I was there in time for most of it. Ray Ozzie and Bob Muglia are excellent presenters.

As expected, the cloud computing platform has been officially announced and is the star of the PDC. The platform is being called Windows Azure and sports a light blue Windows logo.

Here's the architecture:
  • Windows Azure is the cloud operating system This includes a utility computing infrastructure, a basic API for things like storage, a new app model, and a powerful portal for uploading and managing cloud services.
  • Azure Services are building block services for applications. This includes Live Services, .NET Services, SQL Services, SharePoint Services, and CRM Services.
  • Above that are Software as a Service (SAAS) applications from Microsoft. The consumer ones are branded with Live and the business ones are branded with Online.




There is a web site for Azure, azure.com.

After the keynote, the sessions kicked off many of which explore the cloud computing platform in more detail. But that's not the only thing at the PDC. There's also Oslo (about modeling applications), Dublin (making Windows Server into a superior app server), Surface (awesome table-top interactive graphical surface), .NET 4.0, and more.

I've known about the cloud computing platform details for about 6 weeks but was under non-disclosure. Now that the platform is public I can discuss it openly.

A national cloud computing user group community has been started at http://www.CloudComputingUserGroup.com (not a Microsoft web site).

Sunday, October 26, 2008

PDC2008 Report, Day 0 (Sunday)

This week I'm at the Microsoft Professional Developer Conference (PDC) and will be blogging daily to give a blow-by-blow account for those unable to attend personally. The PDC takes place every 2-3 years and is where Microsoft unveils the latest technology to software developers.

Although PDC2008 doesn't kick off officially until tomorrow (Monday 10/27), it was in full swing today for a pre-conference day of training sessions on existing technologies. In my case, I signed up for the all-day training on WPF which was given by the famous Charles Petzold. The training was very helpful and I think I know enough about WPF now to try to build something serious with it. Charles Petzold is a good and humorous speaker and I enjoyed listening to him. Now when I read through his WPF book I'll be able to hear his tone of voice speaking to me.

Although there were a lot of people here today, it'll be really packed tomorrow when the full conference is in attendance. I'm glad I got registration out of the way today. The "goody bag" this year is a black bag that says Windows 7 on the outside. Inside is a PDC2008 T-shirt, a schedule/guide, and various inserts from sponsors. The really good stuff is going to be given away on Tuesday it seems.

The buzz and expectation is that cloud computing is going to take center stage for this PDC. We'll find out tomorrow morning during the keynote address.

Thursday, October 23, 2008

A Good Night's Sleep

"My name is David, and I have sleep apnea. I've been sleeping well for seven days now." Does this sound like an AA meeting? There are more parallels than you might think. One week ago, I finally decided to do something about a sleep problem that had been tormenting me and my family for years. Now just one week later I feel like a new man, and wish I hadn't waited so long to take action.

My descent into sleep problems starts with my family. My Dad would always take a nap on the couch every Sunday afternoon, and the snoring was truly awful. There was no refuge from that snoring, you could hear it from anywhere in the house. Many sleep disorders are hereditary, and sure enough as an adult I found I had the same problem. Lots of people snore, so it never occurred to me that this was anything other than something to put up with.

The snoring grew worse over time, especially over the last few years. It was now more than an annoyance; it was making it impossible for me and my wife to get a good night's sleep. I would have trouble breathing, which would cause me to wake up several times throughout the night. Occasionally I would wake up in the middle of the night in a panic, gasping for air. I tried to compensate for my sleep problem by sleeping on my side instead of my back, but that led to chronic shoulder and neck pain during the daytime.

Finally things got to the point where my wife would have to leave the room in the middle of the night if she was going to get any sleep. I started sleeping downstairs in the guest room to spare her this nightly ritual. Anthony Burgess once said, "Laugh and the world laughs with you, snore and you sleep alone." The man knew what he was talking about. Still I did nothing about the problem.

The cumulative lack of sleep would make me very tired in the daytime. I was still able to get my work done each week through a supreme effort, but it was a sad way to exist, living life through a fog of drowsiness. About 10 times in the last year I even fell asleep on the freeway, which is incredibly scary. Even with this clear danger to myself and to others, I didn't act.

In the last year, I started thinking seriously about doing something about my sleep. My reluctance was partly rooted in having a busy schedule, and also the conviction that something as natural as sleep shouldn't require medical help. My colleague Mickey Williams had been telling me how his sleep apnea had been turned around by a CPAP machine and what a difference it had made to his quality of life. His testimony made a big impression on me.

Finally, I reached a turning point. Last month, my in-laws came to visit. While driving them back to the airport, they staged an intervention. "We heard you snoring last night and it sounded like a wild animal," said my mother-in-law. "You've really got to do something," said my father-in-law. I agreed at long last to finally take some action.

There happens be a sleep center not far from the Neudesic Irvine office, and I made an appointment to see a sleep specialist. I had to fill out some forms describing my symptoms, and log my sleep behavior for a week. When I saw the doctor, he took one look down my throat--apparently I have a narrow air passageway--and declared me an emergency case. That weekend, I was scheduled for a sleep study.

In a sleep study, you come into the sleep center and sleep overnight in a private room so you can be observed. The sleep technician connected about 25 sensors and electrodes to me--mostly on my head--which allowed them to monitor everything from brainwaves to leg motion to oxygen level. Feeling somewhat like a science experiment with all those wires, I did my best to fall asleep and eventually I did.

In the middle of the night, I was awakened. They had enough data on my problems, and wanted to see how I did with a CPAP machine. They strapped a facemask on me and told me go back to sleep. It was a little hard to fall asleep at first but before I knew it morning had arrived and it was time to go home. Even then, I felt more refreshed than usual just from the half-night on the machine.

The results from my sleep study were eye-opening: I had stopped breathing 159 times in the first few hours I had been observed and my oxygen level was down to 66%. Fortunately, when I was placed on the machine, my oxygen level went up to 96%.

I was sent home with a loaner CPAP machine, and a few days later I had a machine of my own. CPAP stands for Continuous Positive Airway Pressure, and all that means is that air is flowing into your nose and down into your mouth and throat. The idea is that this opens up your airway blockage and you get the oxygen you need. For some people this takes getting used to, but I had no problem even on the first night. About all you have to do is remember to keep your mouth closed; otherwise you're breathing normally. The machine is very quiet, the only noise is the whisper of air flowing and your own breathing.

The first morning after trying this at home, I felt like a new man! I had slept through the night, on my back, without waking up, for the first time in many years. I was alert. I felt great. The doctor told me this was common: 95% of his patients have that reaction. I now feel this way every morning.

If you're having sleep problems, don't be in denial as I was for many years. Modern medicine can really help. Get the problem looked at and make a change for the better. Your life will improve and those around you will be better off as well.