sps stockholm 7 key things for building a highly-scalable sharepoint 2013 app
DESCRIPTION
Learn best practices and patterns to build your next super-scalable 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 built 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.TRANSCRIPT
![Page 1: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/1.jpg)
7 Key Things for Building a Highly-Scalable SharePoint 2013 App
#SPSSTHLM08Edin KapićJanuary 25th, 2014
SharePoint Saturday
Stockholm
![Page 2: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/2.jpg)
Thanks to our sponsors!
SharePint
Silver
Bronze
Raffle
Platinum
Gold
![Page 3: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/3.jpg)
Works for Spenta / Beezy in Barcelona
SharePoint Server MVP
President of Catalonian SharePoint User Group (SUG.CAT)
Edin Kapić
I wonder if this beer could be
SharePint compatible
![Page 4: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/4.jpg)
Scalability[skeɪləˈbɪlɪtɪ] n, the ability of something to adapt to increased demands
4
![Page 5: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/5.jpg)
Hey boss, we have 1M new users for our web app!!...and they all sign up tomorrow!
Scalability
![Page 6: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/6.jpg)
Scalability
Not scalable Scalable
![Page 7: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/7.jpg)
Scalability
#FAIL
![Page 8: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/8.jpg)
Scalability
#COOL
![Page 9: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/9.jpg)
SharePoint 2013 Apps Architecture
![Page 10: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/10.jpg)
SharePoint 2013 Application Architecture SharePoint 2013 Apps are cloud-based
![Page 11: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/11.jpg)
SharePoint is now just another external system
Minimize round trips
![Page 12: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/12.jpg)
What can we learn from Star Wars?...beyond who is Luke’s father...
![Page 13: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/13.jpg)
13
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)
![Page 14: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/14.jpg)
I assure you, Emperor, that this Death Star
has been designed to withstand any attack.
![Page 15: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/15.jpg)
![Page 16: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/16.jpg)
I find your lack of failover
disturbing…
![Page 17: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/17.jpg)
Now back to our regular programme
![Page 18: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/18.jpg)
SharePoint 2013 Application Architecture
![Page 19: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/19.jpg)
Session Overview 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
SUM
MARY
![Page 20: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/20.jpg)
SharePoint 2013 Application Architecture
![Page 21: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/21.jpg)
Effective Caching Mechanisms
![Page 22: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/22.jpg)
Effective Caching Mechanisms 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
![Page 23: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/23.jpg)
Content Delivery Networks (CDN)
![Page 24: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/24.jpg)
• 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
BLOB Storage
![Page 25: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/25.jpg)
Content Delivery Networks (CDN) Big binary storage close to the user
No need to serve from the cloud First user pays the “toll”, others get it free
Offload Images Scripts Media Files
Versioned URLs
![Page 26: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/26.jpg)
Avoiding Storage Locks
![Page 27: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/27.jpg)
Click to insert photo.
Storage Locks
(in essence)
![Page 28: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/28.jpg)
Avoiding Storage Locks
RDBMS vs NoSQL SQL Azure vs Table Storage
Immediate Consistency vs Eventual Consistency. ..
![Page 29: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/29.jpg)
Avoiding Storage Locks
Sharding Partition your data across
multiple databases or storages
JOINs across shards
SQL Azure Federations
Shards
A-F
G-O
P-Z
Data Access
Partition Keys
![Page 30: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/30.jpg)
Avoiding Storage Locks
Command-Query Responsibility Segregation(CQRS)
30
Source: Udi Dahan
![Page 31: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/31.jpg)
Waiting in a Queue is Not Bad
![Page 32: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/32.jpg)
Waiting in a Queue is Not Bad Request/Response doesn’t scale well
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
Web Back-End
Message Queue
![Page 33: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/33.jpg)
Waiting in a Queue is Not Bad
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
![Page 34: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/34.jpg)
Waiting in a Queue is Not Bad
my-account
Submit-queue
Joe’s Job
Mary’s Job
Calc-queue
Andy’s Job
Storage Account
Queue
Message
Azure Queues
Submitter
Processer
![Page 35: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/35.jpg)
Acting Asynchronously
![Page 36: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/36.jpg)
Mr. Sync and Mr. Async
(and a customer)
![Page 37: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/37.jpg)
Web Tier
DataTier
Acting Asynchronously We can optimize the server throughput with async calls to the next tier
Just got easier in NET 4.5 with async/await
Web Tier
Thread#1
DataTier
Request 1
Response 1
Request 2
Thread#1
Request 1
Response 1
Request 2
![Page 38: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/38.jpg)
Redundant Design
![Page 39: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/39.jpg)
Redundant Design If any single node goes down, your app must continue unhindered
Although some delay is OK
Idempotent operations Load-balancing
Image: Rainer Knäpper, License: artlibre
![Page 40: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/40.jpg)
Redundant Design Azure Traffic Manager
![Page 41: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/41.jpg)
Redundant Design
![Page 42: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/42.jpg)
Summary
![Page 43: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/43.jpg)
7 Key Things for Building a Highly-Scalable SharePoint App1. Caching2. Content Delivery Network / BLOB Storage3. NoSQL4. Sharding5. Queuing6. Asynchronous Processing7. Redundant Design
SUM
MARY
![Page 44: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/44.jpg)
Additional Resources High Scalability
http://highscalability.com/
Advanced Patterns in Cloud-Hosted Apps for Microsoft SharePoint http://
channel9.msdn.com/Events/TechEd/NorthAmerica/2013/SES-B301
![Page 45: SPS Stockholm 7 Key Things for Building a Highly-Scalable SharePoint 2013 App](https://reader034.vdocuments.mx/reader034/viewer/2022051819/54c85b3d4a7959a54d8b45e0/html5/thumbnails/45.jpg)
...and visit our sponsors who made this day possible!
Thank you!
Please rate this session...