Book Image

Heroku Cloud Application Development

By : Anubhav Hanjura
Book Image

Heroku Cloud Application Development

By: Anubhav Hanjura

Overview of this book

Table of Contents (17 chapters)
Heroku Cloud Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The slug compiler


The slug compiler is responsible for creating an executable application from raw code by building the application, linking required binaries, and compressing the executable for faster deployment. The end product of the slug compilation process is what is termed as the slug.

Once the slugs are generated, they are compressed to decrease their size. Slugs are pre-packaged copies of the application optimized for quick distribution across the dyno manifold—Heroku's process execution environment. When we git push to Heroku, the code is sent to the slug compiler that transforms the user repository into a slug. Scaling an application then causes the slug to be downloaded and expanded for execution on a dyno.

The slug compiler is invoked by a Git pre-receive hook—a custom script that gets invoked when code is pushed to the Heroku platform by the developer. The slug compiler uses the following steps during its run:

The following is the description of slug compilation steps:

  1. Create a...