23,99 €
Gain an in-depth understanding of Azure Cosmos DB — a multi-model database from Microsoft
Microsoft has introduced a new globally distributed database, called Azure Cosmos DB. It is a superset of Microsoft's existing NoSQL Document DB service. Azure Cosmos DB enables you to scale throughput and storage elastically and independently across any number of Azure's geographic regions.
This book is a must-have for anyone who wants to get introduced to the world of Cosmos DB. This book will focus on building globally-distributed applications without the hassle of complex, multiple datacenter configurations. This book will shed light on how Cosmos DB offers multimodal NoSQL database capabilities in the cloud at a scale that is one product with different database engines, such as key-value, document, graph, and wide column store. We will cover detailed practical examples on how to create a CRUD application using Cosmos DB with a frontend framework of your choice. This book will empower developers to choose their favorite database engines to perform integration, along with other systems that utilize the most popular languages, such as Node.js. This book will take you through the tips and trick, of Cosmos DB deployment, management, and the security offered by Azure Cosmos DB in order to detect, prevent, and respond to database breaches.
By the end of this book, you will not only be aware of the best capabilities of relational and non-relational databases, but you will also be able to build scalable, globally distributed, and highly responsive applications.
This book is intended to anyone who wants to get well versed with Microsoft's new NoSQL database called Azure Cosmos DB. Get the database into work with the practical examples mentioned.
Shahid Shaikh is an engineer, published author, and a blogger. He has written tons of tutorials on Node.js and various databases on his blog. He is a believer in open source and almost all his source code is on GitHub. He has also developed and launched a SaaS product called Spark to handle content sharing automation. Currently, he is building a next-generation email marketing tool called Hashmailer.Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 124
Veröffentlichungsjahr: 2018
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Sunith ShettyAcquisition Editor: Chandan KumarContent Development Editor: Amrita NoronhaTechnical Editor: Nilesh SawakhandeCopy Editor: Safis EditingProject Coordinator: Shweta H BirwatkarProofreader: Safis EditingIndexer: Aishwarya GangawaneGraphics: Tania DuttaProduction Coordinator: Aparna Bhagat
First published: May 2018
Production reference: 1290518
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-78847-617-1
www.packtpub.com
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Shahid Shaikh is an engineer, published author, and a blogger. He has written tons of tutorials on Node.js and various databases on his blog. He is a believer in open source and almost all his source code is on GitHub. He has also developed and launched a SaaS product called Spark to handle content sharing automation. Currently, he is building a next-generation email marketing tool called Hashmailer.
I would like to acknowledge my parents for supporting me throughout the book-writing phase. I had to work on weekends and cancel lots of plans to deliver the chapters on time, and my family and friends canceled various things because of me and supported me while I was writing the book, which I am very thankful for.
Kasam Ahmed Shaikh is a seasoned professional with a 'could be' attitude with 10 years of determined industry experience with one of the leading IT companies in Mumbai, India. He is a certified Azure architect, recognized as C# Corner MVP. He is also a speaker, and has written a book on Azure cognitive services. He is also the founder of DearAzure.net and Shaikh Academy.
Very first, I would like to thank Almighty Allah, my family, and in particular, my better half for motivating me throughout the process. I am very thankful to Packt Publishing for believing and considering me for this opportunity.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Learning Azure Cosmos DB
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Introducing Microsoft Azure Cloud and Cosmos DB
Microsoft Azure Cloud features
Microsoft Azure as an SPI
Azure as PaaS
Azure as IaaS
Azure components
Getting started with Azure
Compute modules
Data management modules
Networking module
Big data modules
Caching module
Messaging module
Identity module
Mobile service module
IoT modules
Azure Cosmos DB
Turnkey global distribution
Multilevel data models
Scale on demand
High response with less latency
Consistency models
Money-back guarantee and SLA
Cosmos DB use cases
IoT
Retail and marketing
Gaming
Web and mobile applications
Summary
Cosmos DB Global Turnkey Distribution
Setting up an Azure subscription
Creating an Azure Cosmos DB database
Adding data in MongoDB
Distributing data using global turnkey distribution
Failover handling
Automatic failover
Manual failover
Summary
Cosmos DB Multi-model Databases
Cosmos DB data models
ARS
DocumentDB API
The MongoDB data model
The tables data model
The graph (Gremlin) data model
Cassandra API
The Cosmos DB consistency levels
Summary
Querying Cosmos DB
Performing CRUD operations in DocumentDB
DocumentDB query basics
Creating data in Cosmos DB
Reading data from DocumentDB
Updating and deleting documents
Performing CRUD operations in MongoDB
Performing CRUD operations in Graph DB
Performing CRUD operations in tables (key value store)
Performing CRUD operations in Cassandra.
Summary
Integrating Cosmos DB with Node.js
Node.js setup
Cosmos DB MongoDB setup
Connecting Cosmos DB with the Node.js app
App data in Cosmos DB
Integrating the DocumentDB API with Node.js
Integrating the Table API with Node.js
Integrating the Graph API with Node.js
Summary
Building a High-Performance Link Shortening and Tracking System Using Cosmos DB
Why do we need URL shortening?
Requirements of the system
Capacity estimation
Database design
Encoding URL algorithms
Node app development
Security and permission
Summary
Building a Highly Available, Real-Time Email Tracking System using Cosmos
Is email tracking legal?
System design and assumptions
Choosing the database API in Cosmos DB
Writing our email sender
Tracking emails and storing tracking data
Summary
Cosmos DB Deployment and Management
Turnkey distribution
Failover handling
Automatic failover
Manual failover
Database deployment
Backup and restore
Deploying a custom app over the Azure network
Monitoring traffic and usage
Database security
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
Azure Cosmos DB is Microsoft's managed database solution for individuals and enterprise with the industry standard service-level agreement. Azure Cosmos DB provides multi-model database support that can scale across more than 30 regions across the world. Azure Cosmos DB provides a turn key distribution that enables the database admins to scale and replicate their database with a few clicks.
This book covers the major concepts and features of Azure Cosmos DB. This book also covers the development of web applications using Cosmos DB and their integration using the software development kit provided by Azure Cosmos DB.
This book is intended for anyone who wants to get well versed with Microsoft's new NoSQL database called Azure Cosmos DB. You should have prior experience of dealing with any SQL or NoSQL databases.
Chapter 1, Introducing Microsoft Azure Cloud and Cosmos DB, aims to provide an introduction to the Microsoft Azure platform. The reader will get to know the various interfaces and modules provided by the Microsoft Azure cloud. Another part of this chapter provides an introduction to Cosmos DB, which is the main topic of the book.
Chapter 2, Cosmos DB Global Turnkey Distribution, covers one of the key features of Cosmos DB, which is its global turn key distribution system. You can replicate your database more than 30 regions scattered across the globe using a very simple interface.
Chapter 3, Cosmos DB Multi-model Databases, provides the four (five after publishing state of this book) database models that you can pick from. This chapter covers these database models in detail.
Chapter 4, Querying Cosmos DB, covers the different types of queries required for multi-model databases. This chapter segregates these queries in the CRUD (Create, Read, Update, and Delete) way to explain it better.
Chapter 5, Integrating Cosmos DB with Node.js, covers all integration with one of the popular backend runtime engines, Node.js. We have covered how to connect to the database models of Cosmos DB with Node.js.
Chapter 6, Building High-Performance Link Shortening and Tracking System Using Cosmos DB, covers the development of a simple and high-performance link shortening and tracking system that's very similar to bit.ly using Cosmos DB and Node.js. The reader will learn and relate how they can build a complex system like this using a Cosmos DB-managed database solution.
Chapter 7, Building Highly Available and Real-Time Email Tracking System Using Cosmos DB, covers the development of a system that handles the email tracking that is open rates of the email by millions of users and stores them in the database for further analytics.
Chapter 8, Cosmos DB Deployment and Management, covers all of the deployment of your custom application and Cosmos DB database to the production environment.
Get the latest version of Node.js installed and learn MongoDB query basics to get the most out of this book.
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at
www.packtpub.com
.
Select the
SUPPORT
tab.
Click on
Code Downloads & Errata
.
Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub athttps://github.com/PacktPublishing/Learning-Azure-Cosmos-DB. We also have other code bundles from our rich catalog of books and videos available athttps://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/LearningAzureCosmosDB_ColorImages.pdf.
Feedback from our readers is always welcome.
General feedback: Email [email protected] and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packtpub.com.
The public cloud provides services such as virtual private servers and databases hosted as a service to the general public on a subscription basis. Some platforms, such as Amazon, charge an hourly subscription or offer pay-as-you use (Lambda) services, while others charge a fixed amount for a month, such as DigitalOcean, and so on. The Windows Azure public cloud platform is one of the important pillars of Microsoft's Cloud OS vision
