windows azure - cloud service development best practices
DESCRIPTION
Talk from PDC 2008TRANSCRIPT
![Page 1: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/1.jpg)
Windows Azure: Cloud service development best practices
Sriram KrishnanProgram ManagerMicrosoft Corporation
![Page 2: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/2.jpg)
1980
![Page 3: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/3.jpg)
![Page 4: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/4.jpg)
void quicksort(int* array, int left, int right)
{
if(left >= right)
return;
int index = partition(array, left, right);
quicksort(array, left, index - 1);
quicksort(array, index + 1, right);
}
![Page 5: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/5.jpg)
![Page 6: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/6.jpg)
![Page 7: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/7.jpg)
simplicity
![Page 8: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/8.jpg)
Act IArchitecture
![Page 9: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/9.jpg)
Networks are unreliable
![Page 10: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/10.jpg)
Hardware fails
![Page 11: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/11.jpg)
![Page 12: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/12.jpg)
![Page 13: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/13.jpg)
A few design choices
![Page 14: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/14.jpg)
Big, reliable,
expensive machine
![Page 15: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/15.jpg)
Several commodity machines
![Page 16: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/16.jpg)
Lots and lots of commodity machines
![Page 17: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/17.jpg)
A few challenges
![Page 18: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/18.jpg)
What do you do about that pesky thing called state?
![Page 19: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/19.jpg)
![Page 20: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/20.jpg)
Go horizontalGo stateless
![Page 21: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/21.jpg)
Store state in Windows Azure storage
![Page 22: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/22.jpg)
And it is the default out of the box!
![Page 23: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/23.jpg)
Session state provider
<system.web>
...<sessionState mode="Custom"
customProvider="TableStorageSessionStateProvider"> <providers>
<add name="TableStorageSessionStateProvider“
type="Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider"
applicationName=“Foo” />
</providers></sessionState>
</system.web>
![Page 24: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/24.jpg)
How do you deal with unreliable components?
![Page 25: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/25.jpg)
![Page 26: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/26.jpg)
Be loosely coupled
![Page 27: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/27.jpg)
Use Windows Azure queues for separation of work
![Page 28: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/28.jpg)
Default.aspx(Input + Making
Coffee)
LB
![Page 29: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/29.jpg)
Tight coupling : Default.aspx.cs
public partial class _Default : System.Web.UI.Page { protected void Button1_Click(object sender,EventArgs e) { var order = txtOrder.Text; ProcessOrder(order); }
protected void ProcessOrder(string order) { //Make some coffee!
... }
}
![Page 30: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/30.jpg)
Default.aspx(Input)
Windows Azure Queues
LB
Worker.cs(Make Coffee)
![Page 31: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/31.jpg)
Loose coupling : Default.aspx.cs
public partial class _Default : System.Web.UI.Page { protected void Button1_Click(object sender,EventArgs e) { var order = txtOrder.Text;
QueueStorage qStore = QueueStorage.Create(_account);
MessageQueue orderQ = qStore.GetQueue("OrderQueue");
orderQ.PutMessage(new Message(order)); }
}
![Page 32: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/32.jpg)
Loose coupling : WorkerRole.cs
public class WorkerRole : RoleEntryPoint { public override void Start() {
QueueStorage qStore = QueueStorage.Create(_account); MessageQueue orderQ = qStore.GetQueue("OrderQueue"); while (true) { Message msg = orderQ.GetMessage();
if( msg != null) ProcessOrder(msg.ContentAsString()); } } protected void ProcessOrder(string order) {
//Make some coffee! ...
}
![Page 33: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/33.jpg)
How do you deal with varying load?
![Page 34: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/34.jpg)
Build a thermostat for your service
![Page 35: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/35.jpg)
How do you deal with failures?
![Page 36: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/36.jpg)
Use Windows Azure storage for valuable data
![Page 37: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/37.jpg)
Be prepared to reconstruct local state…
![Page 38: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/38.jpg)
…since it can disappear any time
![Page 39: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/39.jpg)
Retry on transient failures
But…
![Page 40: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/40.jpg)
Be idempotent
![Page 41: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/41.jpg)
Don’t launch a DoS attack on yourself
![Page 42: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/42.jpg)
Be predictable
![Page 43: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/43.jpg)
Avoid shutdown code
![Page 44: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/44.jpg)
Know when to throttle and shed load
![Page 45: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/45.jpg)
Case study: SmugMug and SkyNet
![Page 46: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/46.jpg)
When is ‘good enough’ good enough?
![Page 47: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/47.jpg)
The resiliency of email
![Page 48: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/48.jpg)
Do all apps need the same guarantees?
![Page 49: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/49.jpg)
It's a knob
![Page 50: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/50.jpg)
![Page 51: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/51.jpg)
![Page 52: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/52.jpg)
Stateless front-endsLoose couplingBuilding a thermostatRetrying on failuresLoosening consistency
Recap
![Page 53: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/53.jpg)
End of Act I
![Page 54: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/54.jpg)
Act IIUpdates
![Page 55: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/55.jpg)
Updates are hard
![Page 56: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/56.jpg)
Hard to ‘undo’ a failed deployment
![Page 57: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/57.jpg)
Need to deal with both code and schema changes
![Page 58: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/58.jpg)
Code + data
Update only one at a time
![Page 59: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/59.jpg)
Code vN Data vN
![Page 60: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/60.jpg)
Code vN
Data vN
Code vN +1
![Page 61: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/61.jpg)
Code vN
Data vN
Data vN+1
![Page 62: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/62.jpg)
Be compatible
![Page 63: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/63.jpg)
If it looks like a duck and walks like a duck…
http://www.flickr.com/photos/gaetanlee/298160415/
![Page 64: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/64.jpg)
Use version numbers in schema
![Page 65: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/65.jpg)
class Employee : TableStorageEntity { public Employee(string firstName, string lastName) : base(firstName, lastName) //partition key, row key {} public string JobTitle { get; set; } }
... var qResult = from emp in
svc.CreateQuery<Employee>(EmployeeDataServiceContext.EmployeeTable)
where emp.PartitionKey == "Steve" && emp.RowKey == "Marx select emp;
Schema without versioning }
![Page 66: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/66.jpg)
class Employee : TableStorageEntity { public Employee(string firstName, string lastName) : base(firstName, lastName) {} public string JobTitle { get; set; }
public int Version { get; set;
}
} ... var qResult = from emp in
svc.CreateQuery<Employee>(EmployeeDataServiceContext.EmployeeTable)
where emp.PartitionKey == "Steve" && emp.RowKey == "Marx
&& emp.Version == 1 select emp;
Schema *with* versioning }
![Page 67: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/67.jpg)
How do you do upgrades without downtime?
![Page 68: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/68.jpg)
Windows Azure’s rolling upgrades
![Page 69: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/69.jpg)
Stage Deployment Production Deployment
Swap for zero downtime upgrade
![Page 70: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/70.jpg)
+Stop + start for big changes or if
downtime isn’t an issue
![Page 71: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/71.jpg)
Future: Precise control
![Page 72: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/72.jpg)
When is the best time to update a service?
![Page 73: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/73.jpg)
Use the Pacific Ocean
![Page 74: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/74.jpg)
Case study: Windows Live ID
![Page 75: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/75.jpg)
Update code or dataMaintain compatVersioning in schemasRolling upgrades
Recap
![Page 76: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/76.jpg)
End of Act II
![Page 77: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/77.jpg)
December 4th, 1996
![Page 78: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/78.jpg)
![Page 79: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/79.jpg)
![Page 80: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/80.jpg)
![Page 81: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/81.jpg)
Oh Oh!
![Page 82: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/82.jpg)
![Page 83: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/83.jpg)
Trace logs
![Page 84: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/84.jpg)
Trickiest patch ever
![Page 85: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/85.jpg)
![Page 86: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/86.jpg)
Act IIIWhen things go wrong…
![Page 87: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/87.jpg)
How do I debug?
![Page 88: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/88.jpg)
Use the Windows Azure SDK and debug locally to find bugs
![Page 89: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/89.jpg)
Separate code and config
![Page 90: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/90.jpg)
ServiceDefinition.csdef
<ServiceDefinition name="DemoService"> <WebRole name="WebRole"> <ConfigurationSettings>
<Setting name="Color"/>
</ConfigurationSettings> </WebRole></ServiceDefinition>
ServiceConfiguration.cscfg
<ServiceConfiguration serviceName="DemoService"> <Role name="WebRole"> <ConfigurationSettings>
<Setting name ="Color" value ="Red"/>
</ConfigurationSettings> </Role></ServiceConfiguration>
Configuration files
![Page 91: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/91.jpg)
Windows Azure’s configuration update mechanism
![Page 92: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/92.jpg)
How do I debug the cloud?
![Page 93: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/93.jpg)
Logging
![Page 94: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/94.jpg)
<?xml version="1.0"?><ServiceConfiguration serviceName=“DemoService”>
<Role name="WebRole">
<Instances count="1"/> <ConfigurationSettings>
<Setting name ="LogLevel" value ="Verbose"/>
</ConfigurationSettings> </Role></ServiceConfiguration>
...
Configurable logging
if (RoleManager.GetConfigurationSetting("LogLevel") == "Verbose") RoleManager.WriteToLog("Information", "Some log message");
![Page 95: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/95.jpg)
Tag data with unique ID to track across the system
{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
![Page 96: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/96.jpg)
How do I get notified when something bad happens?
![Page 97: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/97.jpg)
!
Windows Azure’s alerts
![Page 98: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/98.jpg)
!
Email / IM / Phone
![Page 99: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/99.jpg)
The Big Red Button
![Page 100: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/100.jpg)
Use the SDKSeparate code and configConfigurable loggingAlertsThe Big Red Button
Recap
![Page 101: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/101.jpg)
End of Act III
![Page 102: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/102.jpg)
James Hamilton http://research.microsoft.com/~jamesrh/
Emre Kiciman http://research.microsoft.com/~emrek/
Pat Helland http://blogs.msdn.com/pathelland/
What really happened on Mars http://research.microsoft.com/~mbj/mars_pathfinder/
Flickr blog post http://code.flickr.com/blog/2008/09/26/flickr-engineers-do-it-offline/
Don MacAskill http://blogs.smugmug.com/don/
Credits & Acknowledgements
![Page 103: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/103.jpg)
One final story
![Page 104: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/104.jpg)
William of Ockhamc. 1288 - c. 1348
![Page 105: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/105.jpg)
Numquam ponenda est pluralitas sine necessitate
Plurality ought never be posited without necessity
![Page 106: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/106.jpg)
KISS
![Page 107: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/107.jpg)
simplicity
![Page 109: Windows Azure - Cloud Service Development Best Practices](https://reader033.vdocument.in/reader033/viewer/2022051514/5482c587b4af9f27448b4598/html5/thumbnails/109.jpg)
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.