7 Key Things for Building a Highly-Scalable SharePoint 2013 App


Published on

My slides from SharePoint Summit Vancouver 2013 talk.

Learn best practices and patterns to build your next superscalable SharePoint 2013 App. You will see how to pair the power of the browser and the cloud to build a SharePoint app that runs like a cheetah. We will go in depth on how the modern SharePoint 2013 app is build on Windows Azure, demo and learn how to manage the different mechanisms for scaling that are available to us, such as non-relational databases, cache, asynchronous API calls and queuing. You will take away code samples and guidance that will enable you to scale you next SharePoint 2013 app.

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • CAP Theorem: Consistency, Availiability, PartitionTolerance
  • ParallelizedqueryacrossShards
  • Bridge in Ohio after a locomotiveloosefreefrom a flatbedimpacted on thepillars. Thepillarshad redundant designs
  • 7 Key Things for Building a Highly-Scalable SharePoint 2013 App

    1. 1. 7 Key Things for Building a Highly-Scalable SharePoint App Edin Kapić – SharePoint Architect, Spenta
    2. 2. Edin Kapić www.sharepointsummit.org SharePoint Architect Works for Spenta / Beezy in Barcelona SharePoint Server MVP President of Catalonian SharePoint User Group (SUG.CAT) @ekapic www.edinkapic.com sug.cat 2
    3. 3. www.sharepointsummit.org Scalability 3
    4. 4. Scalability www.sharepointsummit.org Hey boss, we have 1M new users for our web app!! ...and they all sign up tomorrow!
    5. 5. Scalability www.sharepointsummit.org Not scalable Scalable 5
    6. 6. Scalability www.sharepointsummit.org 6
    7. 7. Scalability www.sharepointsummit.org 7
    8. 8. www.sharepointsummit.org SharePoint 2013 Apps Architecture
    9. 9. SharePoint 2013 Application Architecture www.sharepointsummit.org SharePoint 2013 Apps are cloud-based
    10. 10. SharePoint 2013 Application Architecture www.sharepointsummit.org SharePoint is now just another external system Mechanisms to minimize round trips 10
    11. 11. SharePoint 2013 Application Architecture www.sharepointsummit.org With the cloud, we have potential for scalability and high availability But the architecture must enable it (It doesn’t come out of the box) 11
    12. 12. SharePoint 2013 Application Architecture www.sharepointsummit.org 12
    13. 13. Session Overview www.sharepointsummit.org Avoiding Roundtrips Effective Caching Mechanisms Content-Delivery Networks Avoiding Bottlenecks Avoiding Storage Locks Waiting in a Queue is Not Bad Acting Asynchronously Avoiding Single Point of Failure Redundant Design 13
    14. 14. SharePoint 2013 Application Architecture www.sharepointsummit.org 14
    15. 15. www.sharepointsummit.org Effective Caching Mechanisms
    16. 16. Effective Caching Mechanisms www.sharepointsummit.org Caching is the cheapest way to avoid unnecessary roundtrips Local Cache Small, static data, very frequently accessed Distributed Cache Everything that you reasonably can Stale Data
    17. 17. www.sharepointsummit.org Content Delivery Networks (CDN)
    18. 18. BLOB Storage www.sharepointsummit.org Big binary storage in the cloud Bypass the Processing Public BLOBs can be accessed by URL Shared Signatures Private BLOBs can be accessed by special URL
    19. 19. Content Delivery Networks (CDN) www.sharepointsummit.org Big binary storage close to the user No need to serve from the cloud First user pays the “toll”, others get it free Offload all that you can Images Scripts Media Files Versioned URLs
    20. 20. www.sharepointsummit.org Avoiding Storage Locks
    21. 21. Avoiding Storage Locks www.sharepointsummit.org NoSQL vs RDBMS Table Storage vs SQL Azure Eventual vs Immediate Consistency
    22. 22. Avoiding Storage Locks www.sharepointsummit.org Partition Keys Sharding Partition your data across multiple databases or storages A-F G-O JOINs across shards Data Access SQL Azure Federations P-Z Shards
    23. 23. Avoiding Storage Locks www.sharepointsummit.org Command-Query Responsibility Segregation Source: Udi Dahan 23
    24. 24. www.sharepointsummit.org Waiting in a Queue is Not Bad
    25. 25. Waiting in a Queue is Not Bad www.sharepointsummit.org Request/Response doesn’t scale well Web Back-End Message Queue By queuing the requests we have control To decouple the request and the response To do retries and accomodate node loss To throttle the rate of service To scale up and down depending on the workload
    26. 26. Waiting in a Queue is Not Bad www.sharepointsummit.org Azure Queues Low-Level Pass messages between roles and sites Fully decoupled R/W operations Automatic Load Balancing Azure Service Bus Queues High-Level Messaging framework with queues Publisher-Subscriber Transactions 26
    27. 27. Waiting in a Queue is Not Bad www.sharepointsummit.org Azure Queues Storage Account Queue Submitqueue my-account Calc-queue Message Joe’s Job Mary’s Job Andy’s Job 27
    28. 28. www.sharepointsummit.org Acting Asynchronously
    29. 29. Acting Asynchronously www.sharepointsummit.org We can optimize the server throughput with async calls to the next tier Web Tier Web Tier Request 1 Response 1 Request 2 Request 1 Thread #1 Data Tier Response 1 Thread #1 Request 2 Just got easier in NET 4.5 with async/await Data Tier
    30. 30. www.sharepointsummit.org Redundant Design 30
    31. 31. Redundant Design www.sharepointsummit.org If any single node goes down, your app must continue unhindered Although some delay is OK Idempotent operations Load-balancing 31
    32. 32. Redundant Design www.sharepointsummit.org Azure Traffic Manager 32
    33. 33. Redundant Design www.sharepointsummit.org 33
    34. 34. www.sharepointsummit.org Summary
    35. 35. 7 Key Things for Building a HighlyScalable SharePoint App www.sharepointsummit.org 1. Caching 2. Content Delivery Network / BLOB Storage 3. NoSQL 4. Sharding 5. Queuing 6. Asynchronous Processing 7. Redundant Design
    36. 36. Additional Resources www.sharepointsummit.org High Scalability http://highscalability.com/ Advanced Patterns in Cloud-Hosted Apps for Microsoft SharePoint http://channel9.msdn.com/Events/TechEd/NorthAme rica/2013/SES-B301 36
    37. 37. Thank you for your attention! This presentation will be available on the Vancouver SharePoint Summit web site a few days after the event.
    38. 38. Please rate this session! Fill out the survey and get a chance to win a Surface