Deploying with JRuby 9k

Book description

Deploy using the JVM's high performance while building your apps in the language you love. This book introduces you to three JRuby deployment strategies that give you the performance and scalability you need, while you use a language designed for rapid development. Explore common deployment scenarios, including consolidating an MRI-based Ruby deployment onto a single JVM process and porting a Rails application to JRuby, getting it into production, and keeping it running. This new edition has new chapters on Puma, performance tuning, and Java integration, and is updated to the latest versions of JRuby 9k, Rails 4, and JDK 8.

Publisher resources

View/Submit Errata

Table of contents

  1.  Acknowledgments
  2.  Preface
    1. The No-Java-Code Promise
    2. What’s in This Book?
    3. What’s Not in This Book?
    4. Who Is This Book For?
    5. Conventions
    6. Getting the Source Code
    7. Online Resources
  3. 1. Getting Started with JRuby
    1. What Makes JRuby So Great?
    2. Preparing Your Environment
    3. Introducing Warbler
    4. Creating a JRuby Microservice
    5. Wrapping Up
  4. 2. Creating a Deployment Environment
    1. Installing Docker
    2. Getting Started with Docker
    3. Creating a Docker Image
    4. Deploying to the Cloud
    5. Wrapping Up
  5. 3. Deploying a Rails Application
    1. What Is Traditional Deployment?
    2. Porting to JRuby
    3. Configuring Rails for Production
    4. Creating the Deployment Environment
    5. Deploying to the Public Cloud
    6. Deploying to Private Infrastructure
    7. Wrapping Up
  6. 4. Consuming Backing Services with JRuby
    1. What Are Backing Services?
    2. Storing Sessions in Memcached
    3. Running Background Jobs with Sidekiq
    4. Message Passing with RabbitMQ
    5. Wrapping Up
  7. 5. Deploying JRuby in the Enterprise
    1. What Is an Application Server?
    2. Getting Started with TorqueBox
    3. Scheduling a Recurring Job
    4. Using the Cache
    5. Deploying to the Public Cloud
    6. Deploying to Private Infrastructure
    7. Using a Commercially Supported Server
    8. Wrapping Up
  8. 6. Managing a JRuby Application
    1. Creating a Memory Leak
    2. Inspecting the Runtime with VisualVM
    3. Inspecting the Runtime with JMX
    4. Invoking MBeans Programmatically
    5. Creating a Management Bean
    6. Using the JRuby Profiler
    7. Analyzing a Heap Dump
    8. Wrapping Up
  9. 7. Tuning a JRuby Application
    1. Setting the Heap Size
    2. Setting Metaspace Size
    3. Configuring Heap Generations
    4. Choosing a Garbage Collector
    5. Benchmarking the Garbage Collector
    6. Using invokedynamic
    7. Wrapping Up
  10. 8. Monitoring JRuby in Production
    1. Installing the New Relic Gem
    2. Creating a New Relic Alert
    3. Handling Errors with Rollbar
    4. Customizing Rollbar Reporting
    5. Wrapping Up
  11. 9. Using a Continuous Integration Server
    1. Installing Jenkins
    2. Installing Jenkins Plugins
    3. Creating a Git Depot
    4. Creating a Jenkins Job
    5. Enabling Continuous Delivery
    6. Wrapping Up

Product information

  • Title: Deploying with JRuby 9k
  • Author(s): Joe Kutner
  • Release date: July 2016
  • Publisher(s): Pragmatic Bookshelf
  • ISBN: 9781680501698