Skip to content

Artur-Sulej/ruby_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Node

Code for the talk Ruby as a Node on Code BEAM America 2024

It contains two solutions:

  • Erlang Distribution Protocol in Ruby: erldp
  • Elixir proxy with Port: port

Erlang Distribution Protocol in Ruby

This is an implementation of ErlDP handshake in Ruby. How to run it:

Start Elixir node:

iex --sname elixir_node

Start Ruby node:

ruby erldp/run.rb

In Elixir node, you can check that Ruby node is connected:

Node.list()

Call from Elixir node (although it's not fully implemented):

:rpc.call(:"ruby_node@Artur-Sulej-MacBook-Pro", Reverse, :reverse, ["No palindromes!"], 5000)

Elixir proxy with Port

Run Elixir proxy node:

elixir --sname elixir_proxy -S mix run --no-halt

Run the other node:

iex --sname other_node

In the other node send the RPC:

:rpc.call(:"elixir_proxy@Artur-Sulej-MacBook-Pro", Reverse, :reverse, ["No palindromes!"], 5000)

About

Code BEAM US '24 – Two solutions to make Ruby act like Elixir/Erlang node

Topics

Resources

Stars

Watchers

Forks