All posts by joshholmes

Scale out, not up… Cloud Architecture 101

scaleA common question that I get is how to cut down on one’s Azure bill. People will come to me because they are finding a way to control their spend in Azure while not hurting their service levels. Most of these folks are big proponents of the cloud because of how agile they can be and the fact that it’s got geo-replicated content and traffic and so on.

The first time that I saw this question, I was thinking that this could be tough to tackle as Azure’s pricing is fairly aggressive until I saw their architecture. And it turns out that in most cases, it’s the same issue.

A very common architecture is two large web role instances or so in front of a small worker role instance with some storage plus a SQL Azure database. The basic problem here is that the two large instances means that their unit of scale is a large instance which is an 4 core box with 7 gig of memory that costs about $345 a month to run. This is not leveraging cloud computing. There are definitely times where you need a big iron box but for 99% (made up statistic) of web apps, it’s overkill. Actually, overkill is the wrong term, it’s scaling vertically by throwing bigger hardware at a problem rather than what the cloud is really good at which is scaling horizontally.

The fundamental difference between architecting for cloud verses architecting for old school on premise or fixed contract hosting is that in the old world you had to architect and build for the maximum and hope you never hit it. In the new world of cloud computing, you architect for scaling out horizontally and build for the minimum. This means building small stateless servers that can be added or thrown away on an hour by hour basis.

The fix to these customer’s cost issues is simple, move from 2 larges into how ever many smalls you need and then scale up or down as needed.

The reason that they were running 2 larges rather than 2 smalls is that they are concerned about traffic spikes and the site going down. I completely get that and there are a number of great solutions to this issue. We don’t “auto-scale” automatically in Azure. The reason for this is simple, we charge your for instances that are spun up so it’d be in our interest to aggressively spin up new instances and charge you for them. To avoid even the appearance of impropriety, we don’t auto-scale. However, we give you all of the tools to write your own auto-scaling or manage it remotely.

How do you know how many instances you should be running? Go to the Windows Azure portal and look at your current usage. There’s a ton of diagnostics available through the portal. You should go spelunking there and see what all they have. Some folks are running as low as 1-2% utilization whereas we are pushing for folks to try and run on average between 70 and 80% utilization. In a traditional data centre, we’d never never want for that to be our “normal” for fear of spikes but in Azure, your spikes can be soaked up by the rest of the infrastructure.

Once you figure out where your normal should be, build that out and then use some of the tools to scale up or down as needed.

Mobile tools:

http://udm4.com/iPhone/CloudTools_for_Windo-701342. That’ll give you health stats on your instances and then you can turn them on and off from the phone.

http://mobilepcmonitor.com/ – will let you know when your site has any issues at all. X amount of memory being used, X number of users, server goes down and the like. Clients on iphone, windows phone, windows 8, windows 7 and so on.

 

Autoscale with your own code:

http://archive.msdn.microsoft.com/azurescale – auto-scaling yourself sample all.

http://channel9.msdn.com/posts/Autoscaling-Windows-Azure-applications – Windows Azure Application Block that does auto-scaling for you.

http://channel9.msdn.com/Events/WindowsAzure/AzureConf2012/B04 – more great content on how to do this yourself.

 

Third parties to manage your scale:

http://www.paraleap.com/AzureWatch offers monitoring and auto-scaling.

http://www.azure-manager.com/ – does what it says on the tin. Manages azure for you.

http://www.italliancegroup.com/ – does a managed service/partnership where they manage your infrastructure in Azure.

 

In short, if you are looking at cloud computing, make sure that you architect for the right kind of scaling…

The 12 Apps of Christmas

imageYou know that I’m a Windows Phone/Windows 8/Azure evangelist for Microsoft Ireland. As part of that, I sometimes get to do fun things like run some fun Christmas promotions. This month we’re running a simple promotion called the 12 Apps of Christmas. Here’s the deal… Build an Windows 8 app get a phone.

 

Very simple offer, we have 12 Windows Phone Nokia Lumia 710s to reward those developers that have been very good.

 

To qualify you need to publish a Windows 8 Store app between December 7th and December 31st and email appireland@microsoft.com with a link to your app and your name, address and phone number for delivery. If we have any in stock still, we’ll send one out tout suite… 🙂

 

Rules in brief:

1. You need to be an app developer with an Irish  or Northern Irish developer account. This, unfortunately, doesn’t include Microsoft employees.

2. You app needs to be live in the Windows 8 app store before December 31st.

 

Rules in not so brief (the lawyers heard I might be having too much fun and got involved…):

1. Instructions on how to enter form part of the conditions of entry. By participating entrants agree to be bound by these conditions.

2. The promoter is Microsoft Ireland Limited, of Microsoft Ireland Building 3, Carmenhall Road, Sandyford Industrial Estate, Dublin 18, Ireland.

3. Qualifying apps must be published to the Windows Store (previously called the Windows 8 app store) between December 7th 2012 and 12 midnight GMT December 31st, 2012.

4. Publish 1 new apps to receive a Nokia Lumia 710 (subject to availability)

5. Nokia Lumia 710 phones will be distributed first whilst stocks. Once all phones have been awarded the promotion will cease.

6. The sooner you publish your new apps the sooner you’ll receive your Windows Phone (subject to availability).

7. Apps must be new and published to the public marketplace and excludes updates to existing apps.

8. App must meet the Windows App submission guidelines. There will also be a subjective criteria applied to exclude apps of very low quality that offer no value to Windows 8 users.

9. In exceptional circumstances apps that are not deemed of sufficient uniqueness or quality may be excluded. This decision is solely Microsoft’s to make

10. This offer is only open to developers based in the Republic of Ireland and Northern Ireland who submit apps to an Irish or Northern Irish registered Windows Phone Marketplace account.

11. This offer is limited to the first 12 developers and is limited to 1 phone per developer.

12. There are a number of promotions in progress with Nokia and Microsoft in Ireland and the UK; the apps submitted for this challenge must differ from those submitted elsewhere. i.e. no double counting.

13. The promoter reserves the right to verify the validity of entries and to disqualify any entrant who the promoter believes either has tampered with the entry process or has submitted an entry that is not in accordance with these conditions of entry.

14. The prizes are not exchangeable, transferable or redeemable for cash.

15. The Prize does not include:

a. Any standard or other call or data costs billed by a mobile operator/service provider.

b. Any associated costs billed by a mobile operator/service provider.

16. Successful entrants will be notified via email.

17. The phone winner is liable for all taxes and benefit in kind that may be incurred as a result of the phone.

18. Subject to any applicable law which cannot be excluded, the promoter and its related bodies corporate shall not be liable for any loss, damage or injury suffered or sustained (including but not limited to direct or consequential loss or loss arising from negligence) arising directly or indirectly out of or in connection with the promotion or any prize.

19. Before the prize is awarded, the winner will be required to sign a form to release the promoter from and indemnify the promoter against, any and all liability arising from the use or participation in the prize.

20. Any costs associated with entering the challenge are the responsibility of the entrant.

21. The promoter’s (Microsoft) decision is final.

22. The promoter assumes no responsibility for, and the entrant releases the promoter from responsibility for, any failure to receive an entry or for inaccurate information or for any loss, claim, damage or injury to person or property (including computer systems and servers) as a result of the entrant’s participation in this promotion or the conduct of the promotion generally or as a direct or indirect result of an entrant’s error, any technical problem of any kind including communications or network failure, unauthorized access to, transferring or theft of data, whether caused by the entrant or associated with the equipment or programming used in the conduct of this promotion. If, because of any such problem, this promotion is not able to be conducted as planned and/or the promotion’s administration, security, fairness or integrity are compromised or affected, the promoter may cancel, terminate, modify or suspend the promotion and/or disqualify any entrant involved in interfering or tampering with the conduct of this promotion in any way.

Custom Search with Azure Mobile Services in JavaScript

image I’ve published my first little Windows 8 app using the Azure Mobile Services in JavaScript. It was incredibly quick to get up and running and more flexible than I thought it would.

The one thing that was tricky was that I’m using JavaScript/HTML5 to build my app and since I don’t have Linq in JavaScript, doing a custom date search was difficult. Fortunately I got to sit down with Paul Batum from the Azure Mobile Services team and he learned me a thing or two.

I already knew the backend of Azure Mobile Services was node.js. What I didn’t realize is that we can pass in a javascript function to be executed server side for a highly custom search the way that we can with Linq from C#. The syntax is a little weird but it works a treat.

itemTable.where(function (startDate, endDate) {
            return this.Date >= endDate && this.Date <= startDate;
        }, startDate, endDate)
    .read()
    .done(function (results) {
        for (var i = 0; i < results.length; i++) {
           //do something interesting
        };


Notice that inside the where function, I’m passing in another function. This function gets passed back and operates server side. The slightly wonky part is that the function has to accept the parameters that you pass in as well as you have to pass the variables that will be passed to this function. So reading that sample carefully, see that we’re passing three variables to the server side including the function and then the two actual variables that we want to pass to the function that executes on the server.

This allows for some awesome flexibility, well beyond custom date searches. 🙂

Windows 8 Dev Training Opps in Ireland

Visual Studio 2011

We’ve got two events coming up on short order here in Dublin that will help you learn how to write Windows 8 Applications.

The first is an actual class called the Developer Introduction To Windows 8. That’s a two day course being run on March 20-21 (*Update – the dates here are moving due to unforeseen circumstances – will update when we have firm dates again.*) at Microsoft in Sandyford. The training will be done by the crack team at Black Marble who have been doing Windows 8 development for quite a while and are now some of the official trainers for Windows 8 across Ireland and the UK.

You can register at http://msirl.eventbrite.com/

The second event is a self directed learning opportunity called the Windows 8 Code Camp in Dublin. This is being run in conjunction with the good folks at Dublin Alt.NET. The idea is that there will be very short amount of lecture at the beginning of the day and then the rest of the day is for you to sling code with experts in the room to help you with any issues and questions as they come up… Imagine that it’s Stack Overflow in the room with you rather than waiting for an answer. 🙂

You can register at http://msirl.eventbrite.com/ for this event as well…

Looking forward to see you at one or both of those events in the near term!

Josh

PHP Benelux 2012

Last weekend I was at PHP Benelux (@phpbenelux). This is the third year that they have run the conference but the first time that I’ve been able to make it, definitely an advantage of living in Ireland… It was a really fun conference for a number of reasons.

First, we had a PHP on Azure Hackathon where we had a number of PHP devs working on getting a project up onto Azure. There were definitely some learnings around the setup and preparation side of the hackathon but once people got setup, it was pretty good. In the three hours with setup problems and the like we actually had 3 people get a project up and running. I was fairly pleased with that as an outcome given the first time nature of this exercise.

IMG_0490First of all, the people are fantastic. That includes everyone from the other speakers, to the attendees to the conference organizers. To be fair, I’ve got a lot of friends that were there and it was great to just hang out with some of them. But I also met a ton of new people there. The speaker’s themselves range from international PHP celebrities, such as David Zülke and Derick Rethans, to local Belgian and Dutch speakers getting their first breaks. Microsoft’s own Craig Kitterman from the Azure product team was one of the speakers as well.

Second, the content, across the board, was top notch. I really enjoyed a number of the talks from Matthew Weier O’Phinney’s VIM talk to David Coallier’s closing keynote on taking PHP to the next level.

Third, the conference organization is on par with a number of pro-conferences that I attend. The tremendous number of little touches, like the fact that they track your flights and pick you up from the airport and arrange travel back for you as well, is what really puts it over the top. One of the things that I particularly liked is that they, at the end of the conferences in the closing bits called out each of the sponsors and talked about why that sponsor was important. This is something that not nearly enough conferences do. The sponsors invest quite a bit of resources ranging from cash to people to many types of resources. It was great to hear how some of the sponsors who had a small amount of cash were deeply involved in other ways while some others simply wrote a check. Both are valid sponsorships and are needed but it was really interesting to see how the different sponsors were involved. I also liked that at the end they called up all of the speakers. that line of speakers filled the stage. For anyone who thought this was a small conference, it’s amazing to see all of the bodies on stage that were involved from the staff to speakers and see how many people it takes to pull it off.

Looking forward to next year…

Startupbootcamp Day 1

One of the most fun things that I get to do in my job here at Microsoft Ireland is work with all of the great startups here in Ireland. I manage the Bizspark program for Ireland, North and South. Through that work, I get to work both with startups directly as well as working with the startup accelerators and incubators here in Ireland. That’s great fun as we’ve got some really good ones. TechCrunch did an article last year where they highlighted the top incubators in Europe and they specifically highlighted the top 8 which includes NDRC Launchpad at #6, DCU Propeller at #7 and Startupbootcamp Dublin at #8. That’s some heavy hitting for such as small island and I’m right in the middle of it.

Eoghan Jennings runs Startupbootcamp Dublin. I met him back in March 2011 when I had the pleasure to speak at a startup thing he was running for Dublin Web Summit. He’s a crazy Irish man who was largely raised in the US (Boston if I remember right) so he really brings the best of the Irish and the American together in a fantastic motivational package of intelligence, perseverance and going huge… It’s that unique blend of personality that make him a great guy to get Startupbootcamp Dublin off the ground and attract some great startups, mentors and investors into a great win-win-win…

Today, I spent the full day down at Startupbootcamp Dublin mentoring potential startups who have all pitched for the program. It was a brutally intense day where we, the 25ish (I didn’t actually count) mentors that were onsite interviewed and gave advice to the startups in a speed dating style day. In this way, we got to mentor 10-12 of the 16 startups that were in for the day.

Patrick de Zeeuw and I were paired up as mentors the whole day. Patrick runs the Startupbootcamp Amsterdam and is a co-founder of Startupbootcamp. I’ll be honest, I’ve been working with startups for a long time and I learned a ton co-grilling startups with him. His business acumen and sense for what startups need was outstanding. If I am ever to do a startup, I’m going to seek him out as a mentor and advisor. It was impressive to see him cut through all of the clutter and spin to get to the base of the business in a short few moments.

There were some of the startups that we pushed pretty hard. There were some that really wowed us. There were some that really disappointed us. All of them, I hope, walked away better for the experience and will take the advice that we gave forward.

Some tips that we ended up giving a lot of companies and things that you should know…

  1. Focus. Many of the startups were giving their pitch and it had several ands, alsos and the like in the pitch or they were talking about going live in a thousand different countries. The best possible thing that you can do is focus. Get down to the one thing that’s going to matter and trial it in a sandbox – then go BIG. We applauded the companies for thinking big but pushed them to get down to the nitty and gritty “minimal viable product” and to knock out a specific market and then go big.
  2. Commit. It’s imperative that if you’re really going for it with a startup that you commit to it. That means that it’s not your part time job or your hobby but rather your full time gig. That’s tough but it makes a difference. We saw several startups that had been in theory mode for a couple of years and in every case it was because they had been working on it part time rather than committing full time and risking everything. Honestly and on a personal note, it’s why I’m not actively working on a startup – I can’t currently take the risk with the family and I need to put food on the table on a day to day basis rather than risking my kid’s college funds on a company that might not take off.
  3. It’s all about the team. Patrick said it well. They don’t invest in products, they invest in people. More than once, Patrick chased down the team dynamics and found glaring issues. Sometimes that was in areas where people hadn’t or can’t commit full time. Sometimes it was that they had business folks and no tech folks. More often, it was that someone had a great idea and tech but didn’t have someone to really carry them on the commercial and business side. That was a huge issue that I don’t think that everyone got when he said it. There was a bit of, “well, we’ve carried it this far so what’s the problem?” and they couldn’t see how much of a difference the right MD/CEO would and could make to their startup.
  4. Demos matter. We only got 4 demos today out of all of the startups that we saw. That was a problem especially with a handful where we really didn’t get the product. A demo, wireframe, sketch, pretty pictures, ugly pictures or some type of visual would make a huge difference. There was one that I was all set to dismiss until I saw their short demo and was wowed. All of the sudden, I got it. The pitch might or might not be perfect but sometimes, like in this case, I was not familiar with the industry involved and the demo all of the sudden crystalized things for me.
  5. Mentor up. It was amazing to watch how things worked today. Every person who came and sat down with us were smart people who had been thinking about their business far longer than we had been. Yet, in 5-10 minutes, we were able to push every one of them to think about things that they hadn’t though of before. This wasn’t about us trying to be mean, just bringing our fairly vast experience to bear to help them think in different directions. It doesn’t matter how well you know your business, your product, your market, your team and all the rest of it, mentors can push you to think in new directions.

It was a fantastic day and I wish all of the startups the very best of luck!!! I’m looking forward to tomorrow as well…

Oh, and I’ve got a new camera and took a bunch of pictures of the day which I posted at – http://www.flickr.com/photos/joshholmes/sets/72157629032625343/

Some cool Windows Phone Controls

imageThere are a lot of very cool metro design controls that are out there that can a lot of the work and though process off of your plate if you just know where to look. For example, I just ran across this set of controls from the Coding4Fun guys that includes a duration picker, a number of different message boxes and notifications, several different colour pickers, helper classes for converting from Boolean to Visibility and the like and a whole lot more.

They’ve even done the hard work of optimizing for GPU acceleration and the like.

It’s released under the MS-PL which gives you a lot of flexibility to do what you need with it.

Check it out at – Coding4Fun Tools…

Using Windows Azure Storage from the Windows Phone

If you haven’t found Cloud Cover, it’s a great series on Channel9 that covers a lot of great Azure topics. What I particularly like is that it’s shows a lot of very practical knowledge things and doesn’t assume a tremendous amount of knowledge.

I found this one particularly useful with the amount of mobile development that I’ve been doing recently.

Join Wade and Steve each week as they cover the Windows Azure Platform. You can follow and interact with the show at @CloudCoverShow.

In this episode, Wade walks through the NuGet packages for Windows Azure storage and Windows Phone, highlighting how easy it is to interact with blobs, tables, and queues, both directly against storage and securely through proxy services.

Windows Phone Camp Online

The Denmark guys had a full two day conference staffed by corp speakers that they recorded and put on Channel 9. There’s a ton of great content here that you can check out.

Dev01 - Windows Phone 7.5 Overview for Developers

Dev01 – Windows Phone 7.5 Overview for Developers

Windows Phone 7.5 Overview for Developers

by Ben Riga

 

Dev02 - Building Windows Phone 7.5 Applications with Visual Studio 2010

Dev02 – Building Windows Phone 7.5 Applications with Visual Studio 2010

Building Windows Phone 7.5 Applications with Visual Studio 2010

by Ben Riga

Dev03 - Building Windows Phone 7.5 Apps with Silverlight

Dev03 – Building Windows Phone 7.5 Apps with Silverlight

Building Windows Phone 7.5 Apps with Silverlight

by Ben Riga

 

Dev04 - Windows Phone 7.5 Fast Application Switching, Tombstoning and Multitasking

Dev04 – Windows Phone 7.5 Fast Application Switching, Tombstoning and Multitasking

Windows Phone 7.5 Fast Application Switching, Tombstoning and Multitasking

by Ben Riga

Dev05 - Live Tiles and Push Notifications

Dev05 – Live Tiles and Push Notifications

Live Tiles and Push Notifications

by Ben Riga

 

 

Dev06 - Building Games for Windows Phone 7.5 with Farseer Physics Engine

Dev06 – Building Games for Windows Phone 7.5 with Farseer Physics Engine

Building Games for Windows Phone 7.5 with Farseer Physics Engineby Ian Qvist, project manager of Farseer Physics EngineGet the slides and demo code from Ian’s blog here:http://ianqvist.blogspot.com/2011/12/xna-and-farseer-physics-engine-33.html Get more samples and the framework at…

Dev07 - Monetizing a Windows Phone 7.5 Application

Dev07 – Monetizing a Windows Phone 7.5 Application

Monetizing a Windows Phone 7.5 Application

by Ben Riga

 

UX01 - METRO | the foundation

UX01 – METRO | the foundation

METRO | the foundationby Arturo Toledounderstanding Metrolayout, typography and motionembracing the phone experienceNote!The screen capture video feed got interrupted and therefore we only have the "in person" video available for this recording.We apologize for the inconvenience!

UX02 - Think | sketch, wireframe, prototype

UX02 – Think | sketch, wireframe, prototype

Think | sketch, wireframe, prototypeby Arturo Toledo,creative brainstormingsketching and wireframing techniquesexploring potential with prototypes Note!The screen capture video feed got interrupted and therefore we only have the "in person" video available for this recording.We…

UX03 - Design | Visual, interaction, motion

UX03 – Design | Visual, interaction, motion

Design | Visual, interaction, motion

by Arturo Toledo, visual language and inspiration application patterns, controls and interaction design adding motion to reinforce function

UX04 - Refine | best practices

UX04 – Refine | best practices

Jared-Potter

Refine | best practicesby Jared Potter,application design best practicesenhancing percevied performanceleveraging Windows Phone goodness (Tiles, Maps…)

 

UX05 - build | make it XAML

UX05 – build | make it XAML

Jared-Potter

build | make it XAMLby Jared Potter,importing assets into Expression Blendlayout, text and animationUI controls, data binding and code

 

There’s a ton of great content there – enjoy!!!

Visiting Norway

I had a blast visiting Oslo, Norway for Wordcamp Norway (#wcnorge). The last time that I went to Norway, it was just for a few hours as I flew in, did my talk and flew out. This time I made sure that I took an extra day to see part of the city.

I started off at the Thon Hotel next to the Central Station and walked up to the palace and on to Vigeland Park which is amazing. Then I walked back down to the water and through the Akershus Castle. It was a long walk and I was sore but I’d do it all again.

Oslo, despite being code in January, is a beautiful city. One of the things that I really appreciated is that there is art almost literally on every corner. I took a few (349) photos as I was walked around.

Some of that art was quite striking. However not all of that art was “pretty”. Some of it had some rather graphic depictions of violence and demons but it was all magnificent. It wasn’t gory or out of taste but it (at least to me) spoke to the human trial against our sins and frailty. It wasn’t censored as in there was nudity. It wasn’t pornographic in nature, just naked.

Being a I also appreciate the focus on theatre as I passed at least 6 theatres including the National Theatre which is a magnificent building.

I’m not moving there anytime soon, it gets even darker there during the winter than it does here in Dublin. But I’m definitely going back when I get a chance.

That said, next time I go back, I need to do it in the summer. It was cold. Not a ton of snow this time but cold. Also next time I want to get out of Oslo and see some of the rest of the country as I understand that the rest of the country is at least as beautiful at the city of Oslo.

I recommend that you, if you get a chance regardless of the time of year, go to Norway and do some site seeing.