Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Accesso ai dati con Azure Data Platform

396 views

Published on

Azure Data Platform
Tables - Queues - Blobs
Azure SQL
Azure Search

Published in: Software
  • Be the first to comment

  • Be the first to like this

Accesso ai dati con Azure Data Platform

  1. 1. Accesso ai dati con la Azure Data Platform Luca Di Fino Windows & Windows Phone developer dev.luke2375@live.it @luke2375 #azureit15
  2. 2. Microsoft Azure Data Platform + Database aggiuntivi
  3. 3. Types of Data You Can Store in Azure • Relational data (Azure SQL) • Flat semi-structured data (Azure Storage Tables) • Files (Azure Storage Blobs) • Serialized Object Graphs in Binary / Base64 (Azure Storage Blobs) • Messages between systems or processes (Azure Storage Queues) • Serialized Object Graphs in JSON (DocumentDb) • Cache (Redis) • Application data for PHP apps (MySQL managed by ClearDb) • NoSQL data (MongoDb managed by MongoLabs) • Big Data (Microsoft HDInsight
  4. 4. Azure Data Platform Demo
  5. 5. What is “NoSQL”? • Modeled using other mechanisms than tables and relations • Key-value stores (Azure Storage Tables) • Document databases (DocumentDb) • Graph databases for storing complex relationships (See: http://bit.do/graph-db Ex. Neo4j) • “Not Only SQL” • Vertical vs. Horizontal Scaling
  6. 6. Azure Table Storage
  7. 7. How Azure Storage Tables are structured
  8. 8. Anatomy of an Entity Required Properties •PartitionKey •RowKey •Timestamp •Etag (think: optimistic concurrency)
  9. 9. Even though Azure Storage Tables are represented in a tabular format, they are not to be confused with RDBMS tables
  10. 10. Comparing Azure Storage Tables with Azure SQL • You cannot design Azure Storage Tables using relational database theory (Codd, normal forms, etc.) These serve a different purpose http://bit.do/azure-tables-vs-sql Maximum row size 1 MB Max 255 properties 2 GB Max 1024 columns Maximum data size 200 TB per table 150 GB per database Maximum number of rows retrieved per query 1,000 Unlimited
  11. 11. Utilizing Tables in your application Azure Storage Client library (wrapper around RESTful HTTP Azure Management API) Basic course of events: • Create a connection to the storage account • Create a connection to a table (or create it if it doesn’t exist) • Insert entities (Batch insertion) • Entity classes (POCOs) must inherit from TableEntity class to be serialized for persistence in Azure Storage Tables • Perform some command (update, delete, retrieve / filter) • Retrieve / filter using TableQuery<T>
  12. 12. Storage Tables Demo
  13. 13. Azure Storage Queues
  14. 14. Azure Storage Queues • Messages are inserted into Queues and kept in order until they are “delivered” (de-queued) • Simple First-In-First-Out queue in the cloud • Each queue message can only be 64k (plenty!) but a queue can hold 200 TB of messages! • Enables highly scalable applications allowing multiple queue writers to work with multiple queue readers. • Handles unexpected spikes in traffic
  15. 15. Anatomy of Messages • Messages can be strings (UTF-8) or byte arrays • Typical messages contain: • some proprietary message format (an XML document, comma-delimited file, etc.) • A serialized object or object graph (Ideally both writer and reader would depend on the same interfaces) • Messages have an expiration date which is, by default, 1 week
  16. 16. Processing Queues • To process (read) a queue, a reader will grab a bunch of messages (max: 32) off a queue in a single request • These are hidden – not removed – until the reader deletes (de-queues) them OR the reader times out, at which point they are un-hidden allowing another reader to attempt to process them. • Message contents and timeouts can be modified • Messages can be “peeked” at, which does not hide them on the queue (you can also peek at the number of messages on the queue)
  17. 17. Why queues are awesome • Reduces the possibility that data is lost due to timeouts to the data store or long running processes • Allows applications to accept data from a user then throw it over the wall to the reader (i.e., a web job, worker role, backend process, etc.) • The reader will get to it eventually – or to handle more load, just add more instances of the reader temporarily • Send messages between disparate systems
  18. 18. Storage Queues Demo
  19. 19. Azure Storage Blobs
  20. 20. Azure Storage Blobs • Blob = Binary Large Object • Many practical uses inside and outside of Azure (i.e., Virtual Machines, logs, CDN origin, backups, etc.)
  21. 21. Anatomy of a Blob • Any file type and size can be stored in a blob • Most of the time, you’ll use “block blobs” – 200 GB • Need to modify ranges of bytes inside of a blob frequently? Use “page blobs” – up to 1 TB • Blobs are accessible via URL format: http://<storage-account>.blob.core.windows.net/<container>/<blob> • Blobs can live inside of folders (and sub-folders) of a container
  22. 22. Securing Blobs - Management Keys • Container Access: • Private => Default, only visible by owner • Public Blob => Read access for blobs only (not container stuff) • Public Container => Full read access for blob and container • Shared Access Signature – Restricted rights for a specific time interval (Actually works on tables and queues, too)
  23. 23. Storage Blobs Demo
  24. 24. Azure SQL Server
  25. 25. What is Azure SQL? Core RDBMS SQL Server functionality in the cloud. High availability, low learning curve, inexpensive starting point, elastic capacity, low management overhead.
  26. 26. What you get: • Tables, Views, Stored Procedures, Security Roles and Users • Limited T-SQL functionality • Automatic backups • Auditing • Monitoring • Geo-replication • Client tools you already know + online administration
  27. 27. Service Tier Performance Level Common App Pattern Performance Business Continuity Max DB Size Transaction Perf. Objective DTU PITR DR / GEO-Rep Basic Basic Small DB, SQL opp 2 GB Reliability / Hr. 5 7 Days DB Copy + Manual Export Standard S0 S1 S2 Wrkgp/cloud app, multiple concurrent operations 250 GB Reliability / Min. 10 20 50 14 Days DB Copy + Manual Export Premium P1 P2 P3 Mission Critical, High volume, Many concurrent Users 500 GB Reliability / sec. 100 200 800 35 Days Active Geo- replication Scegliere l’edizione corretta di SQL Database Queste informazioni potrebbero cambiare nel tempo. http://bit.do/azure-sql-pricing
  28. 28. RavenHQ è un database documentale (RavenDB SaaS). MongoDB è un database documentale (JSON). Cassandra è un database per grandi quantità di dati con una eccellente replica. HBase è un database Big Data (Hadoop) disponibile in HDInsight. Macchine Virtuali con Oracle sono supportate in Azure. MySQL è offerto com SaaS dal partner ClearDB. Ulteriori Database in Azure
  29. 29. Azure Search
  30. 30. Azure Search Incorpora una sofisticata esperienza di ricerca in applicazioni web e mobile, senza doversi preoccupare delle complessità di ricerca full-text e senza dover installare, mantenere o gestire qualsiasi infrastruttura.
  31. 31. Azure Search Ideale per gli sviluppatori cloud enterprise, produttori di software sul cloud, architetti che necessitano di una soluzione di ricerca completamente gestita.
  32. 32. API HTTP/JSON per la creazione di indici, aggounta di documenti e ricerca Parole chiave di ricerca con operatori user-friendly (+, - , *, “”, etc.) Evidenza dei risultati Faceting (istogrammi su range di dati, tipicamente utilizzati nella navigazione di cataloghi) Funzionalità di ricerca
  33. 33. Suggerimenti (auto-completamento) Query strutturate e complesse (filter, select, sort) combinate con la ricerca Profili con punteggio per modellare la rilevanza dei risultati di ricerca Supporto geo-spaziale integrato nei filtri, nel sort e nel ranking Funzionalità di Ricerca
  34. 34. Documentazione • Azure Documentation - All languages • Blob Storage feature guide • Table Storage feature guide • Queue Storage feature guide • SQL Database feature guide
  35. 35. SQL Database SQL on IaaS DocumentDB Search HDInsight MongoDB, MySQL, Oracle, Cassandra, Neo4j e altri Microsoft Azure Data Platform
  36. 36. Highlights Pick the right storage tool for the job Azure can do most of it (or you can host in a VM) RDBMS vs. NoSQL
  37. 37. Feedback & Q&A http://aka.ms/evalazurebcamp

×