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.

CDays15 - AZ08 - DocumentDB: il NoSql secondo Azure

298 views

Published on

DocumentDB è il nuovo database documentale NoSQL disponibile su Microsoft Azure, particolarmente adatto agli scenari in cui è richiesta una grande scalabilità ed alte prestazioni nell'accesso ai dati.
In questa sessione analizzeremo le sue caratteristiche, capiremo come si usa e come poter sviluppare applicazioni reali che lo utilizzano.

  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

CDays15 - AZ08 - DocumentDB: il NoSql secondo Azure

  1. 1. AZ08 – DocumentDB: il NoSql secondo Azure Davide Benvegnù davide.benvegnu@outlook.com - @davidebenvegnu http://blog.dbtek.it/ GetLatestVersion
  2. 2. #CDays15 – Milano 24, 25 e 26 Marzo 2015 Grazie a Platinum Sponsor
  3. 3. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Chi Sono? DAVIDE BENVEGNU’ • International Development Manager @ Aruba.it • DBTek.it => Managing Director & CTO @ DBTek Ltd • Microsoft MVP in Visual Studio ALM • Speaker ad eventi nazionali (CDays, SMAU, Festival ICT…) • Membro DotNetToscana e GetLatestVersion • MSDN – MVA – CodePlex – NuGet – Slideshare… @davidebenvegnu – blog.dbtek.it GetLatestVersion
  4. 4. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Agenda • Panoramica su DocumentDB • Funzionalità • Struttura ed organizzazione • Stored Procedure, Trigger e Funzioni • Sviluppare in .Net su DocumentDB • Demo
  5. 5. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 DocumentDB • È un database NoSql documentale • Un altro database NoSQL? Non bastavano quelli esistenti? • NO! Non esiste un servizio come questo • Fully managed (Saas) • Schema free… con data model JSON • Indici automatici • Supporta l’esecuzione di JavaScript server-side (Stored Procedure, Trigger e Function)
  6. 6. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Killer feature Ma soprattutto: SELECT * FROM MyCollection
  7. 7. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Features • Interrogabile via SDK che con REST API • SDK disponibile per .Net, Node.js, JavaScript, Java e Python • Multiutente • È possibile creare utenti con SDK o REST API • Ogni user può avere permission diverse • Livello di consistenza personalizzabile (4 tipi) • Supporta le query parametriche (con @) • Supporta scenari multitenant • Supporta lo sharding e l’elastic scale
  8. 8. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Struttura
  9. 9. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Struttura • Ogni risorsa ha un ID => manuale o automatico • Ogni risorsa ha un Link univoco • Per gli attachment sono disponibili al max 2 Gb per account
  10. 10. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Organizzazione
  11. 11. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Organizzazione: Da notare Preview • Max 3 collections • Max 50 (era 5) CU • 1 CU: • 10 GB SSD • 2000 RU/sec GA (dal 08/04/2015) • Max 100 collections • Max 100 CU (soft limit) • 1 CU: • 10 GB SSD • S1: 250 RU/sec • S2: 1000 RU/sec • S3: 2500 RU/sec CU = Capacity Unit RU = Request Unit
  12. 12. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Consistenza (Coerenza) A livello Account (tutti i DB, tutte le collection) • Assoluta: garanzia totale sulla coerenza, bassa performance • Scritture ok quando commit permanente sulla maggioranza delle repliche • Letture confermate sulla maggioranza delle repliche (no letture parziali) • Associata: alta latenza in lettura • Definizione di intervalli max di operazioni e secondi • Sessione: default, media latenza in lettura • Scritture di sessione garantite • Letture di sessione garantite, altre no • Eventuale: minor garanzia sul dato, max prestazioni • Scritture e letture potenzialmente su repliche diverse
  13. 13. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 REST API Il servizio espone delle API RESTful con autenticazione HMAC • Anche l’SDK usa queste API • API Base Url https://{account_name}.documents.azure.com • Document Path: /dbs/{database_link}/colls/{collection_link}/docs/{document_link} • Esempio: https://dbtekddb.documents.azure.com/dbs/QDo9AA==/colls/QDo9AM- JWAE=/docs/ ju1TAP hIFAAJAAAAAAAAAA==
  14. 14. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Stored Procedure, Trigger e Funzioni • Definiti a Collection level • Scritti in JavaScript, eseguiti server-side • Possono operare su tutti i Document della Collection • Stored procedure • Trigger • Eseguiti “Pre” oppure “Post” • Operazioni di Create, Replace e Delete • Funzioni (UDF) • Funzioni scalari • Invocabili solo dentro le query
  15. 15. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Un esempio: UDF • Non esiste l’operatore «like». Quindi? UserDefinedFunction func1 = new UserDefinedFunction() { Id = "IndexOfString", Body = @"function(t, s) { return t.search (s); }" }; SELECT * FROM c WHERE udf.IndexOfString (c.MyText, “abc123") > -1
  16. 16. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Sviluppare in .Net su DocumentDB • Nuget: • Install-Package Microsoft.Azure.Documents.Client -Pre • Versione corrente: 0.9.2-preview • Usa «Newtonsoft.Json» • Supporta LINQ!!!! • Per la connessione servono: • Endpoint url • Master Key (o Secondary Key o Read only keys…) • Praticamente tutte le operazioni sono Async • Si basa tutto sul “SelfLink”
  17. 17. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Sviluppare in .Net su DocumentDB • Uso con i Mobile Service: https://github.com/Azure/azure-documentdb-net/tree/master/azure- mobileservices-net • Domain manager e controller WebAPI che abilitano l’uso di DocumentDB come backend • Attualmente non esiste emulatore o istanza locale
  18. 18. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 demo WebDocDB & DocumentDBBlog
  19. 19. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Performance Tips • Usare un DocumentClient singleton • Cache dei SelfLink di collection e documenti • Tuning del «page size» (numero di risultati, default 100 o 1MB) • Tuning del livello di consistenza: ‘< Consistency level’ = ‘< Read latency’
  20. 20. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Riferimenti • Documentazione ufficiale di DocumentDB: http://documentdb.com • WebDocDB https://webdocdb.codeplex.com • Query playground: http://www.documentdb.com/sql/demo • Channel9: http://channel9.msdn.com/Shows/Data-Exposed/Introduction-to-Azure- DocumentDB
  21. 21. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Q&A Tutto il materiale di questa sessione su http://www.communitydays.it/ Lascia subito il feedback su questa sessione, potrai essere estratto per i nostri premi! Seguici su Twitter @CommunityDaysIT Facebook http://facebook.com/cdaysit #CDays15

×