Pittsburgh Code Camp 2009
This past Saturday, 4/4/09, I attended my first Pittsburgh
Code Camp. Not only was it my first Code
Camp, I was also a speaker this year with Rich Dudley, Shaun Eutsey, and Matt
Stultz. This year's presentation was
called ‘Squawking in the Cloud', which was to be a Silverlight chat application
hosted in Microsoft's cloud (Azure), incorporating SQL Server Data Services to
hold our data and using WCF & Web Services to get and put the data into the
cloud.
Let me be the first to say that Azure is definitely not in a
production form yet (actually, I'm sure the other guys I spoke with already
made mention of this in their blogs).
Over the past month, as we developed, we found many bugs/workarounds. In our application's most primitive pieces,
everything worked great. My piece of the
presentation was on the Silverlight application. The Silverlight front end was very simple and
probably could have been coded in less than an hour once I made up my mind on
what I wanted to do. Matt created the
WCF & Web Services, which were working fine when communicating with the
SQLEXPRESS instance on his machine. Rich
was going to do a middle piece using Workflow Foundation (an afterthought, but
would have been really nice functionality).
Shaun's duty was learning Azure and making sure we would be able to host
everything in the cloud.
Everything was built and working as separate pieces by the
Wednesday prior to the Code Camp (Rich's piece was on hold as he was helping
with some of the prep work of the separate pieces). We met to put all of these pieces together on
Wednesday and started to immediately run into issues. First issue - we couldn't obtain a seat in
the SQL Server Data Services in the cloud.
No problem, we decided to just use Azure Table Storage. It would work well enough for demo
purposes. That put us a little behind
(actually, it was a pretty devastating blow considering it was the driving
force behind the application). Thursday
night was spent reconfiguring the Web Services to talk with Azure Table Storage.
Next comes Friday night, and with the presentation the
following day, we set our goal to get everything working together. After finishing up some minor details, we
started on this task. The Web Service
was working fine outside of the ‘cloud' (as mentioned before), but we could not
get it to work once hosted in the ‘cloud'.
After 5 hours of researching and trying different things, Rich, Matt,
and Shaun stumbled across one single blog mentioning that there is a ‘not-so-well
known' bug with WCF in the cloud getting the WSDL after calling the service
(again, only one person has blogged about it so far). The workaround was listed, which we followed,
and all seemed to be working again (it was an odd workaround, obviously
temporary, and something that we did not necessarily need to present to the
group). This took about 5 hours Friday
night to find and fix, taking us into the early hours of the morning. Code Camp registration started at 8am, it was
already 1:30am, and most of us had a 45+ minute drive home and a 1+ hour drive
to the University of Pittsburgh where the Code Camp was held. We called it a night and decided to finish it
up the next morning prior to the presentation.
Saturday morning, we all immediately met in the speaker's
lounge, opened up the laptops, and started back at it. The first call to the web service failed, as
did every other one following. Our Web
Service was going to return XML, but was not working. Thinking it was the code, we started ripping
it apart, piece by piece, trying to find the issue. Ran a few tests and found out that we could
return a string from the cloud. This was
good news, but the bad news was that we were presenting in less than an
hour. We reconfigured the Web Services
once again to pass a string of XML. We put 2 + 2 together and contributed this bug
to the same issue as the WSDL problem since the WSDL also returns as an XML.
Now, with 20-25 minutes before the presentation, it was time
to try & link it with the Silverlight application. It didn't happen. We were up in the room until 3 minutes prior
to speaking and arrived just as the presentation started. I went out in the hallway with Rich to see if
there was any last minute coding I could do to get it to work (see Rich's blog,
there's a nice picture of me laying on the floor just outside the classroom
hammering away on the keyboard in a last-ditch-effort to get it to work). Mission unsuccessful. As Shaun, Matt, and Rich spoke on the other
pieces, I re-wrote my presentation in my head to show a high-level overview of
Silverlight & try to make the failure transparent to the audience. It was a little scatterbrained, but got the
job done. Not my best presentation ever,
but considering the lack-of-sleep and only minutes to re-do my game plan, I
would call it a success overall. The
entire group did a great job on this presentation, definitely showed strength
in some adverse conditions thrown at us, and we pulled it off.
For those that attended our Code Camp session, we're going to
get this finished up and send the code off to the PghDotNet guys to post. Stay tuned also to my blog, I should have a
blog post up soon on some of the Silverlight 2 functionality I used in the
front end (user controls, storyboards for animations, etc). I'll try not to throw in much design (as you
could see, I'm not much of a designer at all!).