290 likes | 537 Views
3-025. Advanced cloud services development. Haishi Bai Windows Azure Technical Evangelist Advanced Cloud Services Development 3-025. 3-040. Getting started with cloud service (Paul Yuknewicz ). Agenda. Faster cloud services. Hybrid cloud services. Devices + cloud services.
E N D
3-025 Advanced cloud services development HaishiBai Windows Azure Technical Evangelist Advanced Cloud Services Development 3-025 3-040 Getting started with cloud service (Paul Yuknewicz)
Agenda Faster cloud services • Hybrid cloud services Devices + cloud services
Why performance matters • In the world of Internet, a slow service equals to a broken service • Reduce resource consumption means saving money • Increasing system throughputs means higher profitability • Performance by Design
Performance by process • Measure • Performance baseline • Analyze • Establish goals • Identify bottlenecks • Check against exit conditions • Execute • Design • Techniques • Refactor
Measurement and monitoring • What to measure • Response time (Client perceived response time, server processing time) • Throughput • Resource utilization (CPU, memory, disk I/O, network bandwidth) • Queues, cache utilization, sessions, view states, page size, etc. • What to use • Performance counters • System.Diagnostics, WMI, … • Tools (profilers, monitors, etc.)
Performance opportunities • .Net framework 4.5–parallel, async • Windows Azure caching (GA) • SignalR and Websocket enable new application opportunities
Performance at scale opportunities • CDN • Traffic manager • IIS 8 • CPU throttling • Centralized SSL certificate management • Dynamic IP filtering
Hybrid cloud challenges • Enterprises typically comprised of hundreds of applications • Custom built • Acquired from 3rd parties • Part of legacy systems • Customers do not think about these system boundaries • They interact with the business • Common processes and data sharing needs to be supported=integration • This is not an easy task • Different data types and formats • Different types of extensibility/states of modifications possible • Different application platforms and systems
Windows Azure connectivity • Virtual network • PaaS and IaaS working together • Service bus relay
Instance Input Endpoint Public Endpoint [1] Relay Endpoint Internal Endpoint [0] 2-011 Introduction to Windows Azure IaaS (Mark Russinovich) 3-026 Advanced Windows Azure IaaS (Michael Washam)
Integration based on messaging • Windows Azure Service Bus messaging • Loose-coupling • Asynchronous communication • Rich set of integration patterns • Publish/subscribe • Load balancing • Content-based routing • Ensured delivery • Scheduling • … 3-033 Building hybrid apps using service bus (David Ingham)
Facts of device applications • 84% of Time Techland Top 50 iPhone applications, 73% of PC Magazine Top 100 Android applications have cloud backbones or have web integrations supporting primary features. http://techland.time.com/2012/02/15/50-best-iphone-apps-2012 http://www.pcmag.com/article2/0,2817,2393097,00.asp
BrokeredMessagereceivedMessage = null; receivedMessage= QueueClient.Receive(); if(receivedMessage != null) { //Read message properties intwidth = (int)receivedMessage.Properties["Width"]; … //Convert message body, which is a byte array, into a Bitmap vararray = receivedMessage.GetBody<byte[]> (newDataContractJsonSerializer(typeof(byte[]))); … } The architecture Messagemsg = newMessage(buffer); msg.Properties.Add("Width", thumb.OriginalWidth); msg.Properties.Add("Height", thumb.OriginalHeight); awaitmQueueClient.SendAsync(msg); varcaptureUI = newWindows.Media.Capture.CameraCaptureUI(); StorageFilefile = awaitcaptureUI.CaptureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.Photo); BitmapImageimage = newBitmapImage(newUri(file.Path)); varthumb = awaitfile.GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode.SingleItem, 95); BitmapImagethumbImage = newBitmapImage(); … byte[] buffer = awaitconverThumbnailtoByteArray(thumb); … BrokeredMessagemsg = newBrokeredMessage(); msg.Properties["Result"] = payload; msg.Properties["AssessmentLevel"] = result.AssessmentLevel; … TopicClient.Send(msg); … receivedMessage.Complete(); Bitmapbw = toBinaryImage(picture); varret = erode(bw).countHoldes(bw).markFeatures(bw); … ret.AssessmentLevel= mEnforcer.Assess(ret); ret.MissingFeatures= mEnforcer.FindMissingParts(ret); … if(!manager.SubscriptionExists("ProcessingResult", "FactoryAlert")) { SubscriptionDescriptiondescription = new SubscriptionDescription("ProcessingResult", "FactoryAlert"); SqlFilterfilter = newSqlFilter("AssessmentLevel = 3"); manager.CreateSubscription(description, filter); } …
Summary • Performance • Process, portal, 3rd party tool, Performance counters, .Net 4.5 async, Windows Azure caching, IIS 8 • Hybrid • Inter-role communication, virtual network, service bus relay, messaging patterns • Device • Hybrid design, Windows 8 client, worker role, service bus messaging
Windows Azure resources • Windows Azure training kit: • https://www.windowsazure.com/en-us/develop/net/other-resources/training-kit/ • Windows Azure samples: • https://github.com/WindowsAzure-Samples • blog.haishibai.com @HaishiBai2010 trontron@sina.cn
Resources • Follow us on Twitter @WindowsAzure • Get Started: www.windowsazure.com/build Please submit session evals on the Build Windows 8 App or at http://aka.ms/BuildSessions