MagLev (software) explained

MagLev
Developer:GemTalk Systems
Latest Release Version:1.2.0 Alpha 4
Operating System:Cross-platform

Solaris, AIX, Linux, Mac OS X

Platform:GemStone/S
Programming Language:Smalltalk, Ruby
Genre:Ruby programming language interpreter
License:MIT, GPL, others[1]

MagLev is an alternative implementation of the Ruby programming language built on the GemStone/S virtual machine from GemTalk Systems. Much of Maglev was set out to be written in Ruby as much as possible, resulting in some collaboration with the Rubinius project. As of the first beta release, the project runs RubyGems 1.3.5 natively, with support for C and Smalltalk extensions. MagLev has a distinct VM architecture that allows it to share code and data between runtimes and execution cycles through a Ruby API.[2]

Architecture

Maglev runs inside an image like Smalltalk, offering transparent object persistence to Ruby objects and classes. Object persistence is based on ACID transactions that allow multiple running instances to see a shared object graph. Maglev uses a process-based concurrency model, mapping Ruby threads to Smalltalk Processes, which are scheduled in the VM as green threads. Using MagLev should yield performance increases when using Ruby, along with allowing Ruby processes over multiple machines to use the same objects at the same time.[3]

Installation

MagLev is installed with RVM, using the following code snippets, copied directly from the maglev github.[4]

rvm install maglev rvm use maglev

The status can be checked using

$ maglev status

Ruby compatibility

Maglev targets Ruby 1.8.7 and runs a significant number of RubySpec. It supports several C extensions including Nokogiri, JSON and bcrypt.

Notes and References

  1. Web site: 2023-02-21 . License agreements. raw.githubusercontent.com.
  2. Web site: Distributed Ruby with the MagLev VM - igvita.com. www.igvita.com. 21 February 2023.
  3. Web site: MagLev Alpha Released: A New, Scalable Ruby Implementation. www.rubyinside.com. 21 February 2023.
  4. Web site: Get Started with MagLev.