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

Joe Kutner

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2016-07-29
  • 定價: $860
  • 售價: 8.0$688
  • 語言: 英文
  • 頁數: 180
  • 裝訂: Paperback
  • ISBN: 1680501690
  • ISBN-13: 9781680501698
  • 相關分類: RubyJVM 語言
  • 立即出貨 (庫存 < 4)

商品描述

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.

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.

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.

商品描述(中文翻譯)

使用JVM的高性能部署您喜愛的程式語言,同時構建您的應用程式。本書介紹了三種JRuby部署策略,讓您獲得所需的性能和可擴展性,同時使用一種專為快速開發而設計的語言。探索常見的部署場景,包括將基於MRI的Ruby部署整合到單個JVM進程中,並將Rails應用程式移植到JRuby,將其投入生產並保持運行。本新版增加了關於Puma、性能調優和Java集成的新章節,並更新到JRuby 9k、Rails 4和JDK 8的最新版本。

JRuby是一種快速、可擴展且功能強大的JVM語言,具有傳統Ruby環境的所有優點。JRuby部署具有較少的移動部件,並且消耗的記憶體比傳統Ruby少。通過本書,您現在可以在現實世界中使用JRuby來構建高性能、可擴展的應用程式。

在JVM上部署您的應用程式需要一些新的方法。首先,創建一個利用JVM的本機並發性的JRuby微服務。然後使用Docker構建一個虛擬的生產環境,這是一個穩定、可重現的探索JRuby部署的地方。接下來,將現有的Rails應用程式移植到JRuby,準備好利用JVM平台的應用程式,同時保持對Ruby開發人員友好和熟悉的一切。使用多線程的Puma伺服器將Rails應用程式部署到Heroku或您自己的私有雲中的Docker。

利用強大的Java庫。了解JRuby如何適應企業,通過將應用程式切換到TorqueBox來使用,這是一個全功能的JRuby環境,包括內置的消息傳遞、排程和守護程序支援,非常適合處理大型任務。最後,深入研究JVM性能調優,並使用Travis CI設置持續部署環境。

您需要的工具:
要運行本書中的示例,您需要一台能運行Java虛擬機的電腦和一個連接到互聯網的網絡。