Jruby - The Love Saga : Talk at RubyConf India 2025

geekrakesh 10 views 37 slides Sep 17, 2025
Slide 1
Slide 1 of 37
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37

About This Presentation

This presentation was made at Ruby conf India 2025 in the talk explaining Jruby, its superpowers, application of Jruby in variety of use-cases like in Data platforms and Model Context Protocol.


Slide Content

{ Jruby - ‘ The Love Saga’ } [ RubyConf India 2025 ] title.rb jruby.css puts “ By Rakesh Jha ”

{ Recreation in Bollywood Style : The Proposal } } proposal .rb Github

{ The Flashback } } jruby.css jvm_ruby .rb

{ Who Am I ? } /in/imrakeshjha jrakesh.github.io < 13+ years experience < Vice President, S&C Engineering at MSCI

{ The Screenplay } < Starter Prologue < Main Course Saga < Dessert Epilogue screenplay.rb jruby.css

{ The Prologue} Pic credit . Flickr Who are these Champions?

} prologue_1.rb { What is Jruby ? } { How many of you used J ruby ? }

} prologue_2.rb

} prologue_3.rb

} prologue_4.rb

{ Concurrency vs Parallelism } } saga.rb

} saga.rb

{ Beyond GIL } Threads across multiple CPU cores. } saga.rb

{ Beyond GIL } Superior throughput for computationally intensive tasks. } saga.rb

Benchmark .bm do |x| x. report ( "JRuby Parallel" ) do threads = [] num_threads = 4 num_threads.times do threads << Thread.new { fibonacci(35) } end threads. each (&:join) … { Multi-core Parallelism }

{ Multi-core Parallelism }

{ Inter operability }

{ Inter operability } # Using standard Java ArrayList require 'java' java_import 'java.util.ArrayList' my_list = ArrayList.new my_list.add("JRuby") my_list.add("Rocks!") my_list . each do |item| puts "Item: #{item} " end

{ JIT Superpower } def calculate_sum(n) # logic end # Call many times 100000.times do calculate_sum(1000) end

Ruby to JVM bytecode { JIT Superpower } "H otspot " Identification Native machine code compilation

require 'java' java_import 'org.deeplearning4j.nn.model.TextSentiment' class SentimentAnalyzer … def analyze(text) sentiment = @model.predict(text) sentiment.to_s end … { AI/ML & Jruby }

{ Pipe line }

{Data Pipe line }

{Data Ingestion } Annual Report Electricity Consumed (kWh) Waste Generated (Kg) Employee Commute (Km)

{Model Calc } Convert to GHG Emissions Electricity Consumed (kWh) 100,000 kWh * 0.5 /kWh = 50,000 Co2e 50 tonnes Co2e

{Data Release } 50 tonnes Co2e Company’s total GHG emissions from electricity consumption for the year was 50 tonnes of Co2e 10% reduction from last year

{ Gen AI } { Wave-1: Magic } Write a song on pizza in the style of Ghalib Write a joke for my son to make him smile

{ Gen AI } { Wave-2: Adoption } { Wave-3: New Age Tools } Summarization of large document, Study plans Copilot, MS tools, Cursor, Perplexity etc.

{ Gen AI } { Problem of Multi verse } Multiple tools - Teams chat, VS Code etc Multiple AI Worlds Context

{ Gen AI } { Example from Data Platform world } Explain what caused the data change and share with me the E2E lineage

{ MCP } Data Analyst/Dev Teams Chat Docs DB JIRA Github

{ MCP } { Function Calling vs Model Context Protocol }

{ MCP } Bot Teams Chat Docs DB JIRA Github T T T T T

{ MCP } Bot Client Server DB Connector Heavy lifting

{ Data App } Article Github

{ Take Away } Evolution Superpowers and Core DNA Use-cases: Data Platform, MCP application

{ Thank You ! }