small medium large xlarge

Deploying with JRuby 9k: Deliver Scalable Web Apps Using the JVM

by

Cover image for Deploying with JRuby 9k

Deploying with JRuby 9k

by

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.

Choose Your Format(s)

  • $32.00 In Stock

    Save $10.00 on the combo pack.

  • $26.00 In Stock
  • $16.00 In Stock
  • Ebooks are DRM free.

  • Ebook delivery options.

About this Title

Skill-meter-3-6
Pages: 178
Published: 2016-06-20
Release: P1.0 (2016-07-19)
ISBN: 978-1-68050-169-8

JRuby is a fast, scalable, and powerful JVM language with all the benefits of a traditional Ruby environment. JRuby deployments have fewer moving parts and consume less memory than traditional Ruby. With this book, you can now use JRuby in the real world to build high-performance, scalable applications.

Deploying your apps on the JVM requires some new approaches. Start by creating a JRuby microservice that takes advantage of the JVM’s native concurrency. Then use Docker to build a virtual production environment that’s a stable, reproducible place to explore JRuby deployment. Next, port an existing Rails application to JRuby, preparing the app to take advantage of the JVM platform—all while keeping everything that’s friendly and familiar to Ruby developers. Deploy the Rails app to Docker with a multi-threaded Puma server to Heroku or your own private cloud.

Take advantage of powerful Java libraries. See how JRuby fits into the enterprise by switching your app to use TorqueBox, an all-in-one JRuby environment that includes built-in support for messaging, scheduling, and daemons—perfect for handling the big jobs. Finally, take a deep dive into JVM performance tuning and set up a continuous deployment environment with Travis CI.

Read the reviews .

What You Need

To run the examples in this book, you’ll need a computer that can run the Java Virtual Machine and a connection to the Internet.

Contents & Extracts

  • Acknowledgments
  • Preface
    • The No-Java-Code Promise
    • What’s in This Book?
    • What’s Not in This Book?
    • Who Is This Book For?
    • Conventions
    • Getting the Source Code
    • Online Resources
  • Getting Started with JRuby
  • Creating a Deployment Environment
    • Installing Docker
    • Getting Started with Docker
    • Creating a Docker Image
    • Deploying to the Cloud
    • Wrapping Up
  • Deploying a Rails Application
    • What Is Traditional Deployment?
    • Porting to JRuby
    • Configuring Rails for Production
    • Creating the Deployment Environment
    • Deploying to the Public Cloud
    • Deploying to Private Infrastructure
    • Wrapping Up
  • Consuming Backing Services with JRuby
  • Deploying JRuby in the Enterprise
    • What Is an Application Server?
    • Getting Started with TorqueBox
    • Scheduling a Recurring Job
    • Using the Cache
    • Deploying to the Public Cloud
    • Deploying to Private Infrastructure
    • Using a Commercially Supported Server
    • Wrapping Up
  • Managing a JRuby Application
    • Creating a Memory Leak
    • Inspecting the Runtime with VisualVM
    • Inspecting the Runtime with JMX
    • Invoking MBeans Programmatically
    • Creating a Management Bean
    • Using the JRuby Profiler
    • Analyzing a Heap Dump
    • Wrapping Up
  • Tuning a JRuby Application
    • Setting the Heap Size
    • Setting Metaspace size
    • Configuring Heap Generations
    • Choosing a Garbage Collector
    • Benchmarking the Garbage Collector
    • Using invokedynamic
    • Wrapping Up
  • Monitoring JRuby in Production
    • Installing the New Relic Gem
    • Creating a New Relic Alert
    • Handling Errors with Rollbar
    • Customizing Rollbar Reporting
    • Wrapping Up
  • Using a Continuous Integration Server
    • Installing Jenkins
    • Installing Jenkins Plugins
    • Creating a Git Depot
    • Creating a Jenkins Job
    • Enabling Continuous Delivery
    • Wrapping Up

Author

Joe Kutner has been building JRuby applications since 2007 for clients including IBM and NASA. Today, he is the JVM Platform Owner at Heroku, a Platform as a Service support for JRuby and Rails. Joe also contributes to several JRuby projects, including Warbler and Torquebox.