A complete guide to building and deploying web apps with
Heroku
A cloud application platform, Heroku is currently the only
approved platform for creating apps within Facebook, and its number
of users is growing at rapid pace. However, there are very few
books on the market that offer professional-level coverage of this
platform, until now. The author duo begins with an introduction to
the Heroku platform and its associated core concepts and then goes
on to explain how writing for this platform differs from that of
traditional development systems. Example applications, additional
resources, and advice for your next steps round out this resource,
making it a thorough, indispensable guide.
* Features information not found anywhere else, as both authors
work for Heroku
* Explains the inner workings of Heroku with special emphasis
placed on building web and mobile applications
* Introduces GIT-based development workflow and the process model
within the Heroku platform
* Details coding, building, deploying, and scaling effectively
using the Heroku tool base
Providing you with fully functional code and downloadable code
examples, Professional Heroku Programming is your complete
guide to mastering this platform.
Autorentext
Chris Kemp is on the Salesforce.com Advanced Technical Solutions team. He is the global leader of the Heroku expert group and is generally acknowledged to be one of the leading Heroku experts at Salesforce.com.
Brad Gyger is the Manager of the Customer Advocacy Team at Heroku. He and his team are tasked with ensuring that all users are able to optimize their experience on the Heroku platform.
Zusammenfassung
A complete guide to building and deploying web apps with Heroku
A cloud application platform, Heroku is currently the only approved platform for creating apps within Facebook, and its number of users is growing at rapid pace. However, there are very few books on the market that offer professional-level coverage of this platform, until now. The author duo begins with an introduction to the Heroku platform and its associated core concepts and then goes on to explain how writing for this platform differs from that of traditional development systems. Example applications, additional resources, and advice for your next steps round out this resource, making it a thorough, indispensable guide.
- Features information not found anywhere else, as both authors work for Heroku
- Explains the inner workings of Heroku with special emphasis placed on building web and mobile applications
- Introduces GIT-based development workflow and the process model within the Heroku platform
- Details coding, building, deploying, and scaling effectively using the Heroku tool base
Providing you with fully functional code and downloadable code examples, Professional Heroku Programming is your complete guide to mastering this platform.
Inhalt
INTRODUCTION xxv
PART I: AN OVERVIEW OF HEROKU
CHAPTER 1: HOW HEROKU WORKS 3
How the Stacks Stack Up 4
Understanding Dynos and the Dyno Manifold 6
Understanding Dyno Isolation 8
Exploring the Process Model 8
Understanding Erosion Resistance 10
Managing Version Control 11
Understanding the Slug Compiler 12
Routing HTTP Requests 13
Summary 15
CHAPTER 2: ARCHITECTURAL CONSIDERATIONS 17
Building Twelve-Factor Applications 18
Managing Your Application Portfolio with Pace Layering 21
Systems of Record 21
Systems of Differentiation 21
Systems of Innovation 22
Classification 22
Security and Reliability 22
Governance 23
Application Portfolio Management 23
Ensuring Security and Compliance 25
Physical Security and Safeguards 25
Network Security 25
Dyno- and Stack-Layer Security 26
Data Retention 27
Dealing with Security Issues 27
Certifications, Accreditations, and Compliance 27
Understanding Redundancy and Reliability 28
Disaster Recovery and Availability Zones 28
Availability and Transparency 29
Securing Your Heroku Application 31
Use a Strong Password for Your Heroku Account 31
Encrypt All Data in Transit 32
Encrypt Sensitive Data at Rest 32
Use Best Practices for Secure Development 32
Don't Reinvent the Wheel 32
Verify Security and Compliance Needs with
Third-Party Providers 32
Monitor Your Application's Logs 33
Encrypting Communications with SSL 33
Piggybacking on Heroku's SSL Certificate 33
Using SSL Endpoint 34
Storing Static Assets and Using CDNs 36
Storing Static Assets on Amazon S3 36
Speeding Up International Applications with Amazon CloudFront 41
Summary 43
CHAPTER 3: PORTING YOUR APPLICATIONS TO HEROKU 45
Understanding Differences from Traditional Filesystems 46
Ephemeral Filesystems 47
Multi-Dyno Applications 47
Considerations for Porting Existing Applications 47
Choosing a Data Store 48
Using Heroku Postgres as a Data Store 48
Using Database.com as a Data Store 49
Using Add-On Data Stores 50
Using a Third-Party Data-as-a-Service Provider 50
Using Multiple Data Stores 51
Considerations for Porting Existing Applications 51
Managing Sessions 51
Understanding Caching 52
Storing Static Assets 54
Managing Configuration Variables 54
Replacing Web Servers and Containers 55
Managing Dependencies 56
E-Mailing from Your Application 57
Running Cron Jobs 57
Understanding Logging 59
Relying on External Programs 61
Scaling Up versus Scaling Out 62
Binding to Ports 62
Managing Long-Running Processes 63
Shutting Down Gracefully 65
Moving Your Domain 66
HTTPS over SSL 66
Considerations for Porting Existing Applications 67
Summary 68
PART II: CREATING AND MANAGING HEROKU APPLICATIONS
CHAPTER 4: DEPLOYING YOUR APPLICATIONS TO HEROKU 73
Installing the Heroku Toolbelt 73
Git 74
Foreman 75
The Heroku Client 76
Interacting with Heroku via the Command-Line Interface 77
The Magic of git push 79
Post Deploy Hooks 80
Navigating the Heroku Dashboard 80
Changing Your Application's Name 82
Adding Custom Domains 83
Adding Custom Collaborators 83
Scaling Resources 84
Summary 87
CHAPTER 5: MANAGING RELEASES WITH HEROKU 89
Managing Multiple Environments 90
Managing Configuration Variables 94
Securing Development Environments 97
Versioning and Rolling Back Releases 100
Using Deploy Hooks 102
Managing Planned Downtime and Custom Error Pages 103
Implementing Continuous Integration 107
Summary 114
CHAPTER 6: WORKING WITH ADD-ONS 115
The Heroku Add-On Ecosystem 116
Architectural Considerations 117
Exploring Popular Add-Ons 117
SQL-Based Data Stores 118
NoSQL-Based Data Stores 118
Search 119
Logging and Monitoring 120
Installing Add-Ons 121
Installing Add-Ons from the Heroku Dashboard 122
Installing Add-Ons from the Command-Line Interface 125
Creating Add-Ons 127
Summary 131
CHAPTER 7: MANAGING, MONITORING, AND SCALING YOUR HEROKU APPLICATIONS 133
Adding Custom Domains 133
Viewing Logs and Associated Tools 136
Managing and Tuning Performance 140
Performance Management with New Relic 141
Performance T…