23,99 €
Learning Heroku Postgres is targeted at developers and database admins. Even if you're new to Heroku Postgres, you'll be able to master both the basic as well as advanced features of Heroku Postgres. Since Heroku Postgres is incredibly user-friendly, no previous experience in computer coding or programming is required.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 158
Veröffentlichungsjahr: 2015
Copyright © 2015 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(s), nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be 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.
First published: February 2015
Production reference: 1190215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78217-345-8
www.packtpub.com
Author
Patrick Espake
Reviewers
Razvan Draghici
Andrea Mostosi
Peter Robinett
Karanraj Sankaranarayanan
Ariejan de Vroom
Commissioning Editor
Amarabha Bannerjee
Acquisition Editor
Nikhil Karkal
Content Development Editor
Pooja Nair
Technical Editor
Bharat Patil
Copy Editors
Karuna Narayanan
Laxmi Subramanian
Project Coordinator
Leena Purkait
Proofreaders
Stephen Copestake
Martin Diver
Paul Hindle
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Sheetal Aute
Production Coordinator
Alwin Roy
Cover Work
Alwin Roy
Patrick Espake is passionate about technology, innovation, software development, and entrepreneurship. He has been professionally building and deploying web applications for over 10 years; with Heroku, it has been over 5 years, and he has worked on amazing projects for companies across the world. Currently, he is a cofounder of http://coursify.me. When Patrick isn't coding or writing, you will usually find him traveling to some wonderful place with his family.
I would like to thank my parents for their dedication and advice during my life, especially my mother, Elza, for not sparing effort and for her sacrifices to educate me and turn me into the person I am today. I would say that all your efforts were worthwhile and finishing this book together was a great achievement.
I also could never have finished this book without the support and encouraging words from my wife, Priscila. Through her infinite and pure love, she encouraged me and showed enormous patience during the several months that I've dedicated to this book. I would like to say that I am very grateful to be your husband.
I would also like to send a huge thank you to the Bard Kunenn family, who invited me numerous times for lunch during the weekends that I spent writing this book and provided me countless encouraging words for the creation of this book.
Finally, I would like to say thank you very much to my friend, Ana Carolina, for helping me in reviewing this book and for being so helpful with her suggestions for improvement.
Razvan Draghici is a full-stack software developer and scalability expert with over 7 years of experience in the field. In the past, he helped scale and develop high traffic applications for web properties, such as Sportsnet.ca, Bing Shopping Canada, and Canada Post Comparison Shopper. He is passionate about machine learning and data science, and while at Sportsnet he developed an NBA Playoffs winner prediction algorithm as part of a hackathon.
Razvan writes about software and technology at http://sleekd.com.
Andrea Mostosi is a technology enthusiast. An innovation lover since he was a child, he started his professional career in 2003 and worked on several projects, playing almost every role in the computer science environment. He is currently the CTO at The Fool, a company that tries to make sense of web and social data. During his free time, he likes to travel, run, cook, bike, and code.
I would like to thank my geek friends: Simone M, Daniele V, Luca T, Luigi P, Michele N, Luca O, Luca B, Diego C, and Fabio B. They are the smartest people I know and comparing myself with them has always pushed me to be better.
Peter Robinett is a backend and mobile developer, focusing on Scala and iOS development. He is a frequent user of the Heroku platform and is a fan of its power and extensibility.
He is currently a developer at Lua Technologies. He also works under the name Bubble Foundry and blogs occasionally at www.bubblefoundry.com.
Ariejan de Vroom is a software engineer from Son en Breugel, The Netherlands. He's been working professionally with Ruby on Rails at Kabisa since 2007. When not writing code, Ariejan likes to read, play the piano and experiment with electronics.
Karanraj Sankaranarayanan is a certified Salesforce.com developer and works as a Salesforce consultant at HCL Technologies. He holds a bachelor's degree in engineering from Anna University with specialization in computer science. He has more than 4 years of experience in the Salesforce platform and IT industry. He is passionate about the Salesforce platform and is an active member of and contributor to the Salesforce developer community. He writes technical blogs at http://clicksandcode.blogspot.in/.
He won second place in the Salesforce Summer of Hacks event in Bangalore. He is also the organizer of the Chennai Salesforce Platform Developer Group based in Chennai, India. His Twitter handle is @karanrajs
For support files and downloads related to your book, please visit www.PacktPub.com.
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.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter or the Packt Enterprise Facebook page.
This book is a definitive guide on how to use PostgreSQL on Heroku. Learn how to work with backups, dataclips, rollback, followers, forks, extensions, PostGIS, data caching, tuning, log statements, and common errors.
Heroku Postgres allows you to manage your PostgreSQL databases in a simple, worry-free way and from anywhere. Through the offered features, you can easily scale your database and extend functionalities.
This book is suitable for all Heroku Postgres user levels and offers knowledge that will help you manage your database with tranquility. The book covers simple topics until we reach more complex issues such as data caching and tuning. Through this book, you will be able to work with all the functionalities provided by Heroku Postgres.
Chapter 1, Getting Started with Heroku Postgres, introduces the Heroku architecture and how to build applications using Heroku Postgres. It also describes the key concepts about Heroku.
Chapter 2, Heroku Toolbelt, describes the Heroku Toolbelt and all the necessary tools to get started using Heroku at the command-line.
Chapter 3, Postgres Add-on, covers how to configure your local development environment, how to use the add-on, how to create your database, and how to connect using different programming languages. It also introduces the concepts of monitoring and information logs.
Chapter 4, PG Backups, introduces how to generate backups, import/export databases, data security, continuous protection, and how to upgrade your database plan.
Chapter 5, Dataclips, describes how dataclips work and how to share them with your colleagues. It also provides knowledge about security and limitations.
Chapter 6, Rollback, Followers, and Forks, covers important concepts related to security, stability, and experiments in using PostgreSQL database on the Heroku platform. It discusses topics related to rollback, followers, and forks.
Chapter 7, Understanding Log Statements and Common Errors, introduces how to view logs, how to collect metrics, and how to understand the most common errors.
Chapter 8, Extensions, PostGIS, Full Text Search Dictionaries, Data Caching, and Tuning, describes a collection of advanced features: how to install the main extensions of the Postgres database, how to enable PostGIS for work with spatial data, how to make optimizations, the text search tools, and the data cache.
Appendix A, Keyword List, contains a set of keywords used in this book, along with their definitions to facilitate better understanding of the concepts.
Appendix B, Self-test Answers, contains the answers to questions in each chapter that help test the knowledge you acquired.
The software needed for this book includes the Heroku Toolbelt (client) (https://toolbelt.heroku.com), your preferred IDE such as Sublime Text (http://www.sublimetext.com), PostgreSQL (http://www.postgresql.org), pgAdmin (http://www.pgadmin.org), the Google Chrome web browser, and a Terminal.
Learning Heroku Postgres is suitable for developers and database administrators. Even if you are new to Heroku Postgres, you will be able to master both the basic functions and the advanced features of Heroku Postgres. Since Heroku Postgres maintains an incredibly user-friendly interface, no previous experience in computer coding or programming is required.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
In the case of Ruby on Rails, these dependencies are found in Gemfile in Python requirements.txt, in Node.js package.json, and in Java pom.xml.
Any command-line input or output is written as follows:
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen".
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an email to <[email protected]>, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.
Heroku simplifies the infrastructure of web applications. With its architecture, it is possible to create robust, manageable, and scalable applications according to the needs of your business.
This book is focused on how Heroku works with PostgreSQL. It will cover pieces of architecture and how to build applications that benefit from Heroku Postgres. In this first chapter, you will learn about the key concepts of Heroku, how it works, what are the supported versions of PostgreSQL, how to choose the best plan according to your need, and how high availability works. The concepts covered in this chapter are fundamental to understanding the other chapters.
In this chapter, will cover the following topics:
Heroku is a multi-language cloud platform that enables you to deploy applications written in several programming languages such as Ruby, Java, Python, Clojure, Scala, and Node.js. The list of supported programming languages is always growing.