You are previewing Deploying with JRuby 9k.
O'Reilly logo
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.

Table of Contents

  1. <span xmlns="" xmlns:epub="" class="toc-secnum">&#160;</span>AcknowledgmentsAcknowledgments
  2. <span xmlns="" xmlns:epub="" class="toc-secnum">&#160;</span>PrefacePreface
    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. <span xmlns="" xmlns:epub="" class="toc-secnum">1. </span>Getting Started with JRubyGetting 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. <span xmlns="" xmlns:epub="" class="toc-secnum">2. </span>Creating a Deployment EnvironmentCreating 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. <span xmlns="" xmlns:epub="" class="toc-secnum">3. </span>Deploying a Rails ApplicationDeploying 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. <span xmlns="" xmlns:epub="" class="toc-secnum">4. </span>Consuming Backing Services with JRubyConsuming 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. <span xmlns="" xmlns:epub="" class="toc-secnum">5. </span>Deploying JRuby in the EnterpriseDeploying 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. <span xmlns="" xmlns:epub="" class="toc-secnum">6. </span>Managing a JRuby ApplicationManaging 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. <span xmlns="" xmlns:epub="" class="toc-secnum">7. </span>Tuning a JRuby ApplicationTuning 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. <span xmlns="" xmlns:epub="" class="toc-secnum">8. </span>Monitoring JRuby in ProductionMonitoring 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. <span xmlns="" xmlns:epub="" class="toc-secnum">9. </span>Using a Continuous Integration ServerUsing 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