Elixir and Ruby can talk to each other using Erlix
blog.fazibear.me
blog.fazibear.me
If all you want is message passing you should just use something like zeromq which would allow for a lot more than just Elixir to Ruby.
Unless I'm mistaken, it's using Erlang's distribution protocol, which is not 'just text'.
http://erlang.org/doc/apps/erts/erl_dist_protocol.html
As to whether some other form of sharing data between Ruby and Erlang is more appropriate, I'm sure it depends entirely on the application. At $current_job - 1 we used the Java/Erlang libs to let Android and Erlang talk, and it worked pretty well. We did not need other systems to access the same data, or the additional overhead an extra piece of software would have required.
P.S. zeromq doesn't require you to run another system, it's just a lib.
Based on those facts, I decided to build a Bert-rpc but using message pack and geared for embedded devices. Just released (as in tonight!) the initial code for an Arduino RPC library. It uses the msg pack for Arduino (https://github.com/HEADS-project/arduino_msgpack), a great little library. Enjoying it much more than most JSON libraries.
It's intended purpose is to make interacting with sub-1ghz radios and be easy to interface with elixir. Only have basic Call and Cast semantics at the moment, but it's only two days old. :-) If anyone's interested in helping, I think C++11 lambda might be a feasible way to create rpc callbacks that non-devs could use (maybe...).
We use JInterface at work to leverage a bunch of stuff on the JVM that we already built. Integrating it with our Elixir project took less than a day and to be frank there's significantly less fucking around than there would have been had we deployed the JVM functionality as a microservice, and locality is preserved, which is nice.
JInterace (and i'm assuming Erlix because it's the same model) has been a really nice, low friction way to re-use a bunch of code that already works.
I agree it is incredibly fun! All of the hard work put into BEAM plus the easy-of-use of Ruby and the joys of functional programming make for a wonderful developer experience.
The only issue so far is that the libraries ecosystem is indeed quite young but that is natural.
Still, Ruby (even without Rails) is at the moment a more productive environment.
I really hope Ruby "3x3" [0] will be released soon enough and projects like Hanami [1] become production ready so that it can coexist in a complementary way rather than becoming replaceable.
[0] - https://blog.heroku.com/ruby-3-by-3
[1] - http://hanamirb.org
We're starting new projects in Elixir. We haven't ported anything from Ruby to Elixir yet, but we have a 9 year old ~100k lines of code (not counting views/tests) Rails app that we could make an argument to extract some functionality from.
But, yeah, I don't often stump for people around here but Pete is good people to work with if you're looking. I would rather have fire ants poured in my pants than do web work, but I'd jump at the opportunity to work with him again and if you're looking, you could do a lot worse.
Elixir for the services and Node for the client/frontend is how we're rolling now. I don't think any of the Ruby guys want to go back.
While we're not against Ruby - and as I said, we still use it - at our scale Elixir is much more performant & scales better.
I really like lispness of Ruby and the rails ecosystem. For a lot of things it's still numero uno technology.
- true parallelism (this is why we need guilds in Ruby 3)
- the BEAM
- functional yet OO at a higher level [0]
- all the Erlang/OTP goodies for free
- Phoenix/Ecto are quite nice frameworks and solid alternatives to the server-side JS world
- “looks” like Ruby though is an entirely different beast
Crystal on the other hand looks more like a Rust alternative to implement almost-as-C-fast Ruby gems. I'm sure it can evolve into an ecosystem but since it's quite far from being stable it will take some time, time in which the Elixir ecosystem will grow because its Erlang foundation already fixed the big issues.
[0] - https://www.infoq.com/interviews/johnson-armstrong-oop
https://github.com/johnlinvc/erruby
Like JRuby, but s/Java/Erlang.
Different use cases
At least to me, as a story.
Latency is part of that.
Start Ruby process, get Erlang node.
Witches are connected to the BEAM? :) funny typo.
We have our Elixir backend where we need some combination of:
- Low latency -- Lambda + API Gateway requests typically incur a ~200ms invocation latency
- Persistent connections, e.g. WebSockets
- High performance
- Continuous usage, let's say at least ten calls per second all day every day forever
For everything else, Lambda and API Gateway have been fantastic, even without a framework like Serverless. It's so cheap! It's so convenient! It's so reliable-enough!
But we couldn't get along on a 100% Lambda backend, far from it.