1 / 23

Scalable By Design The Orleans Actor Framework for Azure

Scalable By Design The Orleans Actor Framework for Azure. @ johnazariah @ maheshkrishnan. Get your idea to market fast! Scale on-demand Drag the slider to the right AutoScale No need to manage underlying machines Economies of scale. Why Are We Going To The Cloud?. Latency. Scalable.

mconnie
Download Presentation

Scalable By Design The Orleans Actor Framework for Azure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scalable By DesignThe Orleans Actor Framework for Azure @johnazariah @maheshkrishnan

  2. Get your idea to market fast! • Scale on-demand • Drag the slider to the right • AutoScale • No need to manage underlying machines • Economies of scale Why Are We Going To The Cloud?

  3. Latency Scalable Unpredictability Challenges Errors Decoupled Responsive Performance Concurrency Load Resilient Failure Unreliability Data Consistency

  4. Typical 3-tier architecture Database is coordination layer Poor data locality Slow reads -> add a cache More complexity Cache Invalidation is hard Concurrency bugs Fine for single-user applications! Coding Like You’re The Only One Around

  5. Make the middle-tier stateful Coordinate in the middle-tier instead of database Lazily load objects from database Single authority for an entity at any point Single-threaded objects Improving The Situation

  6. Halo 4 11+ million players 1.5 billion games 270 million hours

  7. Orleans is a runtime & programming model for building distributed systems.

  8. To: 0438 "Hi!" 0424 0488 0419 To: 0438 "Hi!" 0431 0438

  9. IGrainWithIntegerKey or IGrainWithGuidKey or public interfaceISmsGrain:IGrainWithStringKey { TaskNewMessage(string message); Task<List<string>> GetMessages(); }

  10. varbill = GrainFactory.GetGrain<ISmsGrain>("0438"); await bill.NewMessage("Hi!");

  11. [StorageProvider(ProviderName= "MyStore")] public classSmsGrain : Grain<IMessageState>, ISmsGrain{ public asyncTaskNewMessage(stringmessage) { this.State.Messages.Add(message); awaitthis.State.WriteStateAsync(); } publicTask<List<string>> GetMessages() { returnTask.FromResult(this.State.Messages); } } public interface IMessageState : IGrainState { List<string> Messages { get; set; } }

  12. Clustering • Location Transparency • Fault Tolerance • Error Propagation • Push Messaging • Persistence • Asyncvia async/await • Object Lifecycle/Cleanup Orleans Is Designed For The Cloud

  13. A cloud native runtime New Activation New Activations Unavailable Silo New Silo

  14. Simple Messagingsmsorleans.cloudapp.net

  15. Push Messaging Clients subscribe to grains Grains message clients using simple method calls Note: All methods are void: unreliable messaging Use for progressive enhancement: supplement polling

  16. public interfaceISmsObserver:IGrainObserver { void NewMessage(stringmessage); }

  17. Observe Closely

  18. Case Study: FreeBay Mobile App Users can give away unwanted household items by taking a picture Users can see nearby items, claim them, then organise pickup

  19. Suburb Name Items Observers Suburb Name Items Observers Location Items Auth Location Items Auth Images Location Owner Tags Images Location Owner Tags

  20. A Tour of FreeBay

  21. Summary Designing for the Cloud is hard to get right Actor systems are resilient, scalable, & a great tool to have Orleans is engineered for the Cloud (Use it!)

  22. Related Content Visit: http://orleans.codeplex.com Follow: @sbykov_work @richorama @CaitieM20 @reubenbond @johnazariah Watch: “Halo 4: High Demand with Low Latency and High Availability”

More Related