SlideShare una empresa de Scribd logo
1 de 34
Nik Kalyani DotNetNuke Corporation Windows Azure: Building a Twitter Clone Session Code: NE.09
About Nik Kalyani ,[object Object]
Technology Entrepreneur, 15 years
Microsoft MVP (2005-2009)Online   ,[object Object]
Twitter: @techbubble
Blog: http://www.techbubble.net,[object Object]
Agenda Azure Architecture Storage Concepts Micro-blogging Application  Requirements Architecture Processing
Azure Architecture Your Applications … ServiceBus Workflow Database Analytics Identity Contacts AccessControl … Reporting … Devices … Compute Storage Manage …
Azure Application Architecture n m Worker Role Web Role LB Cloud Storage (blob, table, queue)
Azure Durable Storage Durable, scalable, available store Simple interface REST ADO.NET Data Services Simple abstractions Blobs Tables Queues …
Azure Data Storage Concepts  Container Blobs http://<account>.blob.core.windows.net/<container> Table Entities Account http://<account>.table.core.windows.net/<table> Queue Messages http://<account>.queue.core.windows.net/<queue>
Block Blob Container Account Blob Storage Concepts IMG001.JPG pictures IMG002.JPG erica Block  1 movies MOV1.AVI Block  2 Block  3
Blobs: Features and Functions Store large objects  Associate metadata with blob Metadata is <name, value> pairs Set/Get with or separate from blob data bits Standard REST Interface Limitations Block Id - 64 Bytes Per Block PutBlob - 64 MB Total Blob MetaData - 8 KB Per Blob PutBlock / PutBlockList - 50 GB Each Blocks - 4 MB Each
Table Storage Concepts Entity Table Account Name =… Email = … users Name =… Email = … erica Photo ID =… Date =… photo index Photo ID =… Date =…
Tables: Features and Functions Massively scalable, highly available and durable structured storage Not RDMS -- no joins, no maintenance of foreign keys LINQ and REST interfaces via ADO.Net Data Services Partition key is exposed to the application Limitations Up to 255 Entity Properties (including PartitionKey, RowKey, and Timestamp) 1 MB Max for Combined Size of All Data in an Entity's Properties
Queue Storage Concepts Message Queue Account 128x128, http://… thumbnail jobs 256x256, http://… erica http://… photo processing jobs http://…
Queues: Features and Functions An account can create many queues.. Queue Name is scoped by the account A Queue contains messages.. No limit on number of messages stored in a queue A message is stored for at most a week in a queue http://<Account>.queue.core.windows.net/<QueueName> Messages.. Message size  <= 8 KB To store larger data, store data in blob/entity storage, and the blob/entity name in the message
Micro-blogging ApplicationRequirements Relationships Any user can “follow” any other user A user can “unfollow” another user he/she is “following”
Micro-blogging ApplicationRequirements Micro-blogging Any user can post a message of up to 140 characters in length All message posts are public
Micro-blogging ApplicationRequirements Timeline A public timeline of all posted messages is available to anybody for up to 24 hours from the time the message was first posted A user timeline of all messages posted by a user is available to anybody forever A “following” timeline of all messages posted by all users that a user is following in the prior 24 hours is available to each user
Micro-blogging ApplicationArchitectural Considerations Micro-blogging The number of users will determine volume of messages However, common situation is that a small number of users will post majority of the messages
Micro-blogging ApplicationArchitectural Considerations Timelines The public timeline is transient and will have a high frequency of reads and writes A user timeline is permanent and will have a small number of writes and a large number of reads A “following” timeline is transient and will have a large number of irregularly timed writes and a small number of reads
Micro-blogging ApplicationProfile, Messages and Relationships Storage Table = User PartitionKey = Username RowKey=string.Format("{0:D19}",  DateTime.MaxValue.Ticks –  DateTime.UtcNow.Ticks); Use Table storage sharded by user Entities with the same PartitionKey are stored on the same storage node Obtaining recent messages, followers or following list require only a single query for each Adding or Deleting Follower or Following requires two writes (i.e. one for each user)
Micro-blogging ApplicationFollow User B Partition User A follows User B Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C]
Micro-blogging ApplicationFollow User B Partition Follower [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C] Following [User B]
Micro-blogging ApplicationFollow User B Partition User B follows User A Following [User D] Follower [User A] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C] Following [User B]
Micro-blogging ApplicationFollow User B Partition Follower [User A] Following [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
Micro-blogging ApplicationMessage Posting User B Partition User A posts a message Follower [User A] Following [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
Micro-blogging ApplicationMessage Posting User B Partition Message added to Message Queue Follower [User A] Following [User A] Following [User D] Message Queue User A Message Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
Micro-blogging ApplicationMessage Posting User B Partition After Message Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Maintenance Queue User B User C User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (A)
Micro-blogging ApplicationMessage Posting User B Partition After Maintenance Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (A)
Micro-blogging ApplicationMessage Maintenance User B Partition User A posts a message Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Msg (D) Msg (D) 25 hours Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A)
Micro-blogging ApplicationMessage Maintenance User B Partition Message added to Message Queue Follower [User A] Following [User A] Following [User D] Message Queue User A Message Msg (A) Msg (D) Msg (D) 25 hours Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A)
Micro-blogging ApplicationMessage Maintenance User B Partition After Message Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Msg (D) Msg (D) 25 hours Msg (A) Maintenance Queue User B User C User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A) Msg (A) Msg (A)

Más contenido relacionado

Similar a Hands On Windows Azure Building A Twitter Clone

Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIs
Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIsCloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIs
Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIsNishant Kumar
 
Developing New Data Types with Plone
Developing New Data Types with PloneDeveloping New Data Types with Plone
Developing New Data Types with Plonebrighteyes
 
Essay On Active Directory
Essay On Active DirectoryEssay On Active Directory
Essay On Active DirectoryTammy Moncrief
 
A Decentralized Reference Architecture for Cloud-native Applications V2.0
A Decentralized Reference Architecture for Cloud-native Applications  V2.0A Decentralized Reference Architecture for Cloud-native Applications  V2.0
A Decentralized Reference Architecture for Cloud-native Applications V2.0Asanka Abeysinghe
 
Multicast chat with file and desktop sharing
Multicast chat with file and desktop sharingMulticast chat with file and desktop sharing
Multicast chat with file and desktop sharingKhagendra Chapre
 
Voice based email system for physically challenged
Voice based email system for physically challengedVoice based email system for physically challenged
Voice based email system for physically challengedIbrahim Khalil Shakik
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agentrtfmpliz1
 
HCL Info Portal Report
HCL Info Portal ReportHCL Info Portal Report
HCL Info Portal ReportSathish Gp
 
Liferay Platform Overview
Liferay Platform OverviewLiferay Platform Overview
Liferay Platform OverviewFirmansyahIrma1
 
The Art of Message Queues
The Art of Message QueuesThe Art of Message Queues
The Art of Message QueuesMike Willbanks
 
Start Up Austin 2017: If How and When to Adopt Microservices
Start Up Austin 2017: If How and When to Adopt MicroservicesStart Up Austin 2017: If How and When to Adopt Microservices
Start Up Austin 2017: If How and When to Adopt MicroservicesAmazon Web Services
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Creating a Wiki-Based Online Help System (Abridged)
Creating a Wiki-Based Online Help System (Abridged)Creating a Wiki-Based Online Help System (Abridged)
Creating a Wiki-Based Online Help System (Abridged)Rand McKinney
 
Web 2.0: characteristics and tools (2010 eng)
Web 2.0: characteristics and tools (2010 eng)Web 2.0: characteristics and tools (2010 eng)
Web 2.0: characteristics and tools (2010 eng)Carlo Vaccari
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Nati Shalom
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2Shanmugapriya D
 

Similar a Hands On Windows Azure Building A Twitter Clone (20)

Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIs
Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIsCloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIs
Cloud as a GIFT: Exploiting Personal Cloud Free Accounts via Rest APIs
 
Developing New Data Types with Plone
Developing New Data Types with PloneDeveloping New Data Types with Plone
Developing New Data Types with Plone
 
Cloud as Gift
Cloud as GiftCloud as Gift
Cloud as Gift
 
Essay On Active Directory
Essay On Active DirectoryEssay On Active Directory
Essay On Active Directory
 
A Decentralized Reference Architecture for Cloud-native Applications V2.0
A Decentralized Reference Architecture for Cloud-native Applications  V2.0A Decentralized Reference Architecture for Cloud-native Applications  V2.0
A Decentralized Reference Architecture for Cloud-native Applications V2.0
 
Multicast chat with file and desktop sharing
Multicast chat with file and desktop sharingMulticast chat with file and desktop sharing
Multicast chat with file and desktop sharing
 
Voice based email system for physically challenged
Voice based email system for physically challengedVoice based email system for physically challenged
Voice based email system for physically challenged
 
Iot hub agent
Iot hub agentIot hub agent
Iot hub agent
 
Wiki1
Wiki1Wiki1
Wiki1
 
HCL Info Portal Report
HCL Info Portal ReportHCL Info Portal Report
HCL Info Portal Report
 
CIO Support Services Framework - Wikimedia
CIO Support Services Framework - WikimediaCIO Support Services Framework - Wikimedia
CIO Support Services Framework - Wikimedia
 
Liferay Platform Overview
Liferay Platform OverviewLiferay Platform Overview
Liferay Platform Overview
 
Liferay Platform Overview
Liferay Platform OverviewLiferay Platform Overview
Liferay Platform Overview
 
The Art of Message Queues
The Art of Message QueuesThe Art of Message Queues
The Art of Message Queues
 
Start Up Austin 2017: If How and When to Adopt Microservices
Start Up Austin 2017: If How and When to Adopt MicroservicesStart Up Austin 2017: If How and When to Adopt Microservices
Start Up Austin 2017: If How and When to Adopt Microservices
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Creating a Wiki-Based Online Help System (Abridged)
Creating a Wiki-Based Online Help System (Abridged)Creating a Wiki-Based Online Help System (Abridged)
Creating a Wiki-Based Online Help System (Abridged)
 
Web 2.0: characteristics and tools (2010 eng)
Web 2.0: characteristics and tools (2010 eng)Web 2.0: characteristics and tools (2010 eng)
Web 2.0: characteristics and tools (2010 eng)
 
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
Designing a Scalable Twitter - Patterns for Designing Scalable Real-Time Web ...
 
Android Trainning Session 2
Android Trainning  Session 2Android Trainning  Session 2
Android Trainning Session 2
 

Último

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Hands On Windows Azure Building A Twitter Clone

  • 1. Nik Kalyani DotNetNuke Corporation Windows Azure: Building a Twitter Clone Session Code: NE.09
  • 2.
  • 4.
  • 6.
  • 7. Agenda Azure Architecture Storage Concepts Micro-blogging Application Requirements Architecture Processing
  • 8. Azure Architecture Your Applications … ServiceBus Workflow Database Analytics Identity Contacts AccessControl … Reporting … Devices … Compute Storage Manage …
  • 9. Azure Application Architecture n m Worker Role Web Role LB Cloud Storage (blob, table, queue)
  • 10. Azure Durable Storage Durable, scalable, available store Simple interface REST ADO.NET Data Services Simple abstractions Blobs Tables Queues …
  • 11. Azure Data Storage Concepts Container Blobs http://<account>.blob.core.windows.net/<container> Table Entities Account http://<account>.table.core.windows.net/<table> Queue Messages http://<account>.queue.core.windows.net/<queue>
  • 12. Block Blob Container Account Blob Storage Concepts IMG001.JPG pictures IMG002.JPG erica Block 1 movies MOV1.AVI Block 2 Block 3
  • 13. Blobs: Features and Functions Store large objects Associate metadata with blob Metadata is <name, value> pairs Set/Get with or separate from blob data bits Standard REST Interface Limitations Block Id - 64 Bytes Per Block PutBlob - 64 MB Total Blob MetaData - 8 KB Per Blob PutBlock / PutBlockList - 50 GB Each Blocks - 4 MB Each
  • 14. Table Storage Concepts Entity Table Account Name =… Email = … users Name =… Email = … erica Photo ID =… Date =… photo index Photo ID =… Date =…
  • 15. Tables: Features and Functions Massively scalable, highly available and durable structured storage Not RDMS -- no joins, no maintenance of foreign keys LINQ and REST interfaces via ADO.Net Data Services Partition key is exposed to the application Limitations Up to 255 Entity Properties (including PartitionKey, RowKey, and Timestamp) 1 MB Max for Combined Size of All Data in an Entity's Properties
  • 16. Queue Storage Concepts Message Queue Account 128x128, http://… thumbnail jobs 256x256, http://… erica http://… photo processing jobs http://…
  • 17. Queues: Features and Functions An account can create many queues.. Queue Name is scoped by the account A Queue contains messages.. No limit on number of messages stored in a queue A message is stored for at most a week in a queue http://<Account>.queue.core.windows.net/<QueueName> Messages.. Message size <= 8 KB To store larger data, store data in blob/entity storage, and the blob/entity name in the message
  • 18. Micro-blogging ApplicationRequirements Relationships Any user can “follow” any other user A user can “unfollow” another user he/she is “following”
  • 19. Micro-blogging ApplicationRequirements Micro-blogging Any user can post a message of up to 140 characters in length All message posts are public
  • 20. Micro-blogging ApplicationRequirements Timeline A public timeline of all posted messages is available to anybody for up to 24 hours from the time the message was first posted A user timeline of all messages posted by a user is available to anybody forever A “following” timeline of all messages posted by all users that a user is following in the prior 24 hours is available to each user
  • 21. Micro-blogging ApplicationArchitectural Considerations Micro-blogging The number of users will determine volume of messages However, common situation is that a small number of users will post majority of the messages
  • 22. Micro-blogging ApplicationArchitectural Considerations Timelines The public timeline is transient and will have a high frequency of reads and writes A user timeline is permanent and will have a small number of writes and a large number of reads A “following” timeline is transient and will have a large number of irregularly timed writes and a small number of reads
  • 23. Micro-blogging ApplicationProfile, Messages and Relationships Storage Table = User PartitionKey = Username RowKey=string.Format("{0:D19}", DateTime.MaxValue.Ticks – DateTime.UtcNow.Ticks); Use Table storage sharded by user Entities with the same PartitionKey are stored on the same storage node Obtaining recent messages, followers or following list require only a single query for each Adding or Deleting Follower or Following requires two writes (i.e. one for each user)
  • 24. Micro-blogging ApplicationFollow User B Partition User A follows User B Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C]
  • 25. Micro-blogging ApplicationFollow User B Partition Follower [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C] Following [User B]
  • 26. Micro-blogging ApplicationFollow User B Partition User B follows User A Following [User D] Follower [User A] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User C] Following [User B]
  • 27. Micro-blogging ApplicationFollow User B Partition Follower [User A] Following [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
  • 28. Micro-blogging ApplicationMessage Posting User B Partition User A posts a message Follower [User A] Following [User A] Following [User D] Message Queue Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
  • 29. Micro-blogging ApplicationMessage Posting User B Partition Message added to Message Queue Follower [User A] Following [User A] Following [User D] Message Queue User A Message Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B]
  • 30. Micro-blogging ApplicationMessage Posting User B Partition After Message Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Maintenance Queue User B User C User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (A)
  • 31. Micro-blogging ApplicationMessage Posting User B Partition After Maintenance Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (A)
  • 32. Micro-blogging ApplicationMessage Maintenance User B Partition User A posts a message Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Msg (D) Msg (D) 25 hours Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A)
  • 33. Micro-blogging ApplicationMessage Maintenance User B Partition Message added to Message Queue Follower [User A] Following [User A] Following [User D] Message Queue User A Message Msg (A) Msg (D) Msg (D) 25 hours Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A)
  • 34. Micro-blogging ApplicationMessage Maintenance User B Partition After Message Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Msg (D) Msg (D) 25 hours Msg (A) Maintenance Queue User B User C User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A) Msg (A) Msg (A)
  • 35. Micro-blogging ApplicationMessage Maintenance User B Partition After Maintenance Worker Role processes… Follower [User A] Following [User A] Following [User D] Message Queue Msg (A) Msg (D) Msg (A) Maintenance Queue User C Partition User A Partition Follower [User Y] Follower [User Z] Following [User A] Following [User X] Follower [User B] Follower [User C] Following [User B] Msg (A) Msg (X) Msg (A) Msg (A) Msg (A)
  • 36. Micro-blogging ApplicationTakeaways Cloud app storage significantly different from RDMS…requires shift in thinking Queues make apps efficient … processing is done asynchronously Duplication of data is often required and this is OK Sharding is an important consideration for the scalability of your cloud application Absence of join, sort make application design challenging but with planning this is manageable
  • 37. Evaluation form Vul je evaluatieformulier in en maak kans op een van de prachtige prijzen!! Fill out your evaluation form and win one of the great prizes!! Session Code: NE.09