Heroku Cloud Application Development


Heroku Cloud Application Development
eBook: $32.99
Formats: PDF, PacktLib, ePub and Mobi formats
$28.05
save 15%!
Print + free eBook + free PacktLib access to the book: $87.98    Print cover: $54.99
$83.04
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Understand the concepts of the Heroku platform: how it works, the application development stack, and security features
  • Learn how to build, deploy, and troubleshoot a cloud application in the most popular programming languages easily and quickly using Heroku
  • Leverage the book's practical examples to build your own "real" Heroku cloud applications in no time

Book Details

Language : English
Paperback : 336 pages [ 235mm x 191mm ]
Release Date : April 2014
ISBN : 178355097X
ISBN 13 : 9781783550975
Author(s) : Anubhav Hanjura
Topics and Technologies : All Books, Other


Table of Contents

Preface
Chapter 1: Hello Heroku
Chapter 2: Inside Heroku
Chapter 3: Building Heroku Applications
Chapter 4: Deploying Heroku Applications
Chapter 5: Running Heroku Applications
Chapter 6: Putting It All Together
Chapter 7: Heroku Best Practices
Chapter 8: Heroku Security
Chapter 9: Troubleshooting Heroku Applications
Chapter 10: Advanced Heroku Usage
Index
  • Chapter 1: Hello Heroku
    • What is cloud computing?
    • Cloud service models
    • What is cloud application development?
    • Key advantages of cloud application development
    • Introducing Heroku
    • Walking down the memory lane
    • An overview of Heroku's architecture
      • Process management
      • Logging
      • HTTP routing
      • Heroku interfaces
    • The Heroku feature set
      • Let's play Heroku
        • Getting ready for the ride – the prerequisites
        • Signing up
        • Installing the Heroku toolbelt
        • Logging in and generating a new SSH key
    • Test driving Heroku
    • Summary
  • Chapter 2: Inside Heroku
    • The Heroku platform stack
      • The Celadon Cedar stack
    • Request routing in Heroku
      • The execution environment - dynos and the dyno manifold
    • Heroku's logging infrastructure – the Logplex system
    • The Heroku add-on architecture
    • Programmatically consuming Heroku services
      • The Heroku Platform API
        • Security
        • Schema
        • Data
      • Accessing the API
        • API clients
        • Calling the API
        • Response
        • Limits on API calls
    • The Heroku process architecture
      • Procfile
      • Declaring process types
      • The Procfile format
        • A sample Procfile
      • Adding Procfile to Heroku
    • Running applications locally
    • Setting local environment variables
    • Process formation
      • Process scaling
      • Stopping a process type
      • Checking on your processes
        • Process logs
    • Running a one-off process
    • Running anything
    • Summary
  • Chapter 3: Building Heroku Applications
    • Heroku's guiding influence – the Twelve-Factor App methodology
      • A codebase is always versioned and it can have multiple deploys
      • Declare and isolate dependencies explicitly (always)
      • Configuration should be stored in the environment
      • Backend services should be treated as attached (loosely-coupled) resources
      • Strict separation of the build, release, and run stages of an app
      • An app in execution is a process or many processes
      • Services should be exported through port binding
      • An app should scale out through its process model
      • Faster startup and graceful shutdown is the way to app agility and scalability
      • Development and production (and everything in between) should be as similar as possible
      • The app should just log the event not manage it
      • App's administrative or management task should be run as a one-off process
    • Creating a Heroku application
    • Configuring your Heroku application
      • The Heroku application configuration API
      • Examples of using application configuration
        • The persistence of configuration variables
        • Accessing configuration variables at runtime
        • Limits on configuration data
        • Using the Heroku config plugin
    • Introducing buildpacks
      • Using a custom buildpack
      • Specifying a custom buildpack at the app creation stage
      • Third-party buildpacks
      • The buildpack API
      • Components of a buildpack API
        • The bin/detect script
        • The bin/compile script
        • The bin/release script
      • Writing a buildpack
    • The slug compiler
      • Optimizing the slug
      • Size limits
    • Summary
  • Chapter 4: Deploying Heroku Applications
    • Deployment on Heroku
    • Getting a Heroku account
    • Installing the toolbelt client kit
    • Logging into the Heroku account
      • Setting up SSH
    • Writing your application
    • Pushing your application to Heroku
    • The Git vocabulary
      • Getting started with Git
        • Tracking a new project
        • Using an existing Git project
        • The life cycle of an artifact in Git
        • Tracking files in a Git project
        • When you don't need Git to track your files
        • The git diff command – knowing what changed
        • Committing your changes
        • Deleting a file
        • Moving a file
        • Viewing commit history
        • Undoing a change
        • You can use some Git help
      • The local repository
        • Remote repositories
    • Creating a Heroku remote
    • Renaming an application
    • Sending code to Heroku
    • Optimizing slug size
    • Cloning existing Heroku applications
    • Forking an application
      • Side effects of forking an application
    • Transferring Apps
    • Optimizing deployments
    • The choice of a region
    • Tracking application changes
      • Setting up Deploy Hooks
        • Basecamp
        • Campfire
        • E-mail
        • HTTP
        • IRC
    • Release management
      • Checking installed releases
      • Verifying the new release
      • Rolling back the release
    • Summary
  • Chapter 5: Running Heroku Applications
    • The Heroku app lifecycle
    • The Heroku CLI
      • How to get the Heroku client tool
      • Verifying the tool
      • How to get the latest Heroku client tool
      • Where is the Heroku client stored?
        • What if my client installation is corrupted or not working?
      • The Heroku CLI commands
      • Heroku CLI commands by function
      • Extending the Heroku CLI
      • The Heroku CLI and add-ons
      • A note on Heroku CLI and security
    • Running your cloud apps locally
      • Using Foreman to check Procfiles
      • Using Foreman to run apps directly
      • Running one-off commands
      • Foreman command-line options
    • The Apps page
      • The Resources tab
      • Managing resources
      • The Activity tab
      • The Access tab
      • The Settings tab
      • The Run Production Check tab
      • Heroku support
    • Summary
  • Chapter 6: Putting It All Together
    • Heroku's support for Java
      • General support for Java
      • Database support for Java apps
      • Environment configuration
    • Integrating Eclipse with Heroku
      • Prerequisites
      • Configuring Heroku in Eclipse
      • Installing the Eclipse plugin for Heroku
      • Setting up Heroku for development
      • Setting up SSH support
      • Creating a new Heroku Java app in Eclipse
      • Using an existing Heroku application
      • Pushing code to Heroku
      • Pushing code to the Git repository
    • Managing Heroku apps in Eclipse
      • Viewing your Heroku application
        • Getting to the application's details
        • Reviewing the application's details
        • Going deeper into the application information
      • Adding collaborators to the application
      • Changing the environment variables
      • Heroku's process management in Eclipse
      • Scaling your app dynos
      • Restarting your web app
    • Summary
  • Chapter 7: Heroku Best Practices
    • The One Cloud development platform
      • Introducing the Cloud 9 IDE
        • The C9 user interface
        • The C9 project view
        • Setting up preferences in the C9 IDE environment
      • Deploying on Heroku
      • Performing Git operations using the C9 IDE
    • Heroku and the data store
    • Creating a Heroku Postgres database
      • Logging in to the database
      • Creating more databases – the fork
      • Synchronizing databases via database followers
      • Checking database logs
      • Performance and the Heroku Postgres database
    • Disaster recovery in Heroku PostgreSQL
      • Importing data into Postgres
      • Deleting a Heroku Postgres database
      • Accessing Heroku Postgres externally
      • Accessing the database credentials
      • Connecting from outside of Heroku
    • High availability Postgres
      • Choosing the right plan
    • When does Heroku Postgres failover?
      • Effect of the failover
        • Checking the availability status after failover
    • Configuring domains the right way
      • Overview of DNS
      • Working with DNS in Heroku
        • Configuring your domain
        • Domain addition rules
      • Adding a custom domain to Heroku
      • Configuring domain DNS
      • Checking DNS configuration
      • Removing Heroku custom subdomains
      • Other domain-related considerations
    • Optimizing applications
      • The 2X dyno effect
      • When do I need the 2X dynos?
      • Checking whether you need 2X dynos
      • What if I use 2X dynos?
      • Now some examples...
      • Notes on 2X dynos
    • Managing your app dynos
    • Using the Heroku scheduler
    • Using NewRelic to keep the dyno alive
    • Summary
  • Chapter 8: Heroku Security
    • Overview
    • Communication between the developer's machine and the Heroku platform
      • General concepts of security
      • Security of developer communication with Heroku
      • A look inside the SSH protocol
        • Client authentication
      • App security and the Heroku dashboard
        • Your Heroku account and the dashboard
      • Security of applications and data resident on Heroku and third-party servers
        • Heroku security practices
        • Source code security
        • Build and deploy security
        • Application security
        • Data security
        • Configuration and metadata
        • Infrastructure security
        • Security in add-ons
        • Securing the logging infrastructure
        • Network security
        • Security standards and compliance
        • Securing web requests
        • Piggyback SSL
        • SSL for a custom domain
    • Application security tools
      • wwwhisper
        • A sample wwwhisper app
        • Getting wwwhisper
        • Removing wwwhisper
        • Enabling wwwhisper in your application
        • Post wwwhisper enablement
        • Local setup for wwwhisper
        • Using wwwhisper locally
        • Disabling wwwhisper in a local environment
      • Tinfoil website security scanner
        • Upgrading the add-on
        • The TINFOILSECURITY_SCAN_SCHEDULE configuration parameter
      • The Tinfoil security scanner dashboard
      • The scanning process
    • Summary
  • Chapter 9: Troubleshooting Heroku Applications
    • The need for troubleshooting
    • Your window to the running app – the logs
      • A little more about Logplex – Heroku's logging system
        • Sources and drains
        • The message limit
      • Retrieving Heroku logs
        • Getting last 'n' log messages
        • Getting live log messages
        • Setting up logging levels
        • Dissecting the Heroku log message
      • Log message types
      • Log filters
        • Examples of log filtering
      • Getting more from logging – other logging tools
    • Techniques for troubleshooting your app
      • Troubleshooting application downtime
      • Debugging HTTP requests and APIs
      • Validating your process formation
      • Checking your database
      • When everything else fails
      • Production check
    • A recommended Heroku configuration
      • The stack
      • The process formation
      • Database service
      • Domain and security considerations
      • Proactive health monitoring
    • Maintenance windows
      • Checking the maintenance status
      • Enabling the maintenance mode
      • Disabling the maintenance mode
      • The maintenance window – behind the scenes
      • Customizing site content
      • Customizing error pages
      • Testing custom maintenance and error pages
      • When requests time out
    • Error classification in Heroku
    • Summary
  • Chapter 10: Advanced Heroku Usage
    • Experimenting with Heroku Labs
      • Using Heroku Labs features
        • Seamless deployment using pipelines
        • Enabling the pipelines feature
        • Performance monitoring
        • Switching on monitoring
        • Log snapshot
        • Watching your app closely using the Request ID
        • Supporting the Request ID
    • Introducing Websockets
      • Websocket versus HTTP
      • Websocket is not HTTP
      • Websocket use cases
      • Typical apps using Websockets
      • Supporting Websockets in your app
      • Establishing a Websocket connection
      • Disadvantages of using Websockets
    • Heroku and Websockets
      • Switching on Websocket support
      • Turning Websockets off
      • The Websockets example
        • The server code
        • The client code
    • Your first Heroku Platform API call
      • Before we get started
      • Supported API methods
      • Sample uses of the platform API
      • Creating an application
        • Create an application API response
        • Retrieving application information
        • Modifying application information
        • Deleting an application
      • Interpreting an API response
        • Error operations
        • Error format
        • An example error response
        • Warnings
    • Sharing your app on Heroku
      • Prerequisites for collaboration
        • Adding app collaborators to the Heroku dashboard
        • Deleting a collaborator
      • Adding collaborators via the Heroku CLI
        • Listing collaborators
        • Removing a collaborator
      • Collaborator actions
        • Working on the app
        • Viewing the app
    • Summary

Anubhav Hanjura

Anubhav Hanjura is a cloud technology enthusiast and a software architect. He specializes in server-side development (C++, C, and Java) for distributed software platforms, and is an avid blog reader. When he is not designing software systems, you can find him collecting books, pondering over puzzles, or bookmarking general trivia. He is a passionate mentor, has authored several white papers, and has also served as a project guide for students on many occasions. He holds a Bachelor's degree in Computer Engineering from NIT, Surat.

Sorry, we don't have any reviews for this title yet.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 2 submitted: last submission 28 May 2014

Type: Grammar | Page: 11

Third bullet point: Cloud application development also means reduced the cost of building and
maintaining your web apps.

Should be: Cloud application development also means reduced cost of building and
maintaining your web apps.

Type: Grammar | Page 13

Third paragraph: Heroku Git's focused workflow makes it easy to share code, collaborate with other
developers, and deploy code frequently, thereby cutting down on the time it takes
the app to reach its users.

Should be: The Heroku use of Git's focused workflow makes it easy to share code, collaborate with other
developers, and deploy code frequently, thereby cutting down on the time it takes
the app to reach its users.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Heroku Cloud Application Development +    Microsoft Dynamics GP 2013 Cookbook =
50% Off
the second eBook
Price for both: $47.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Recognize the components of the Heroku infrastructure and how they work together to give a seamless platform experience
  • Write an application using any supported language (Ruby, Java, PHP, Python, and more) and deploy it easily and instantly
  • Run and scale your cloud application on demand using a variety of useful Heroku commands
  • Secure and debug your cloud application faster using popular techniques and tools
  • Reuse the provided samples to build agile and robust applications
  • Extend your application features by using simple plugins and add-ons
  • Manage all your applications intuitively using the one-stop Heroku dashboard

In Detail

Heroku is one of the leading cloud platforms supported by several programming languages. It lets you develop applications without worrying about the infrastructure. You can instantly build, deploy, and troubleshoot the most advanced and robust cloud applications using a rich set of available tools. Just write your application and leave the rest to Heroku. Heroku helps you build the most feature-rich web applications using add-ons and multiple data sources that can be easily configured.

This book is about Heroku, but more importantly, it is about the ease with which a developer with limited availability or knowledge of deployment infrastructure can run and manage a cloud app 24/7/365. It will show how Heroku is language independent and does not lock the user to a particular operating environment.

Approach

An easy-to-follow, hands-on guide that clearly explains the various components of the Heroku platform and provides step-by-step guidance as well as numerous examples on how to build and troubleshoot robust and scalable production-ready web applications on the Heroku platform.

Who this book is for

This book is intended for those who want to learn Heroku the right way. Perhaps you are new to Heroku or are someone who has heard about Heroku but have not built anything significant with it. You should have knowledge or familiarity with cloud computing and basic knowledge of database and network deployment.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software