MagLev is an alternative implementation of the
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum (aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapp ...
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
Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by ...
extensions. MagLev has a distinct VM architecture that allows it to share code and data between runtimes and execution cycles through a Ruby API.
Architecture
Maglev runs inside an image like
Smalltalk
Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by ...
, 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
Concurrent means happening at the same time. Concurrency, concurrent, or concurrence may refer to:
Law
* Concurrence, in jurisprudence, the need to prove both ''actus reus'' and ''mens rea''
* Concurring opinion (also called a "concurrence"), a ...
model, mapping Ruby
threads
Thread may refer to:
Objects
* Thread (yarn), a kind of thin yarn used for sewing
** Thread (unit of measurement), a cotton yarn measure
* Screw thread, a helical ridge on a cylindrical fastener
Arts and entertainment
* ''Thread'' (film), 2016 ...
to Smalltalk Processes, which are
scheduled
A schedule or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things are i ...
in the
VM as
green threads
In computer programming, a green thread is a thread that is scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system (OS). Green threads emulate multithreaded environments without relying on any ...
. 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.
Installation
MagLev is installed with RVM, using the following code snippets, copied directly from the maglev github.
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
bcrypt is a password-hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher and presented at USENIX in 1999. Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive ...
.
Gemstone/S Resources
*
References
External links
*
*
*
*
Free software programmed in Ruby
{{free-software-stub