Questions tagged [maglev]

MagLev is a 64-bit open source implementation of the Ruby programming language and libraries built on top of VMware’s GemStone/S 3.1 Virtual Machine.

MagLev

MagLev is a ruby implementation which allows to store ruby objects persistently. Quoting from the MagLev site:

MagLev is a fast, stable, 64-bit open source implementation of the Ruby programming language and libraries built on top of VMware’s GemStone/S 3.1 Virtual Machine.

Why it differs

On the first look, MagLev is just another implementation of ruby 1.8.7. The big difference between MagLev and other ruby interpreters is, that it carries its own database with it. This is not just your ordinary sqlite3 database which lives in its own file, its a fully persistent object store which allows to store any kind of objects, inheritance hierarchies and object relations. Calling it a mere "database" is therefore a gross understatement. However, introducing a new model does come with new responsibilities, as the MagLev model does not quite fit in with rails and it is not quite the same as the Smalltalk model in which everything in an image is persistent. Let me try to summarize this in a little table:

            | Rails               | Maglev              | Smalltalk 
------------+---------------------+---------------------+----------------------- 
data        | database            | image / stone       | image / stone 
------------+---------------------+---------------------+----------------------- 
logic/code  | files/VCS           | ?files/VCS?/image   | ?files/VCS?/image 
------------+---------------------+---------------------+----------------------- 
classes are | open, transient     | open, persistent    | invariant, persistent 
            |                     | single definition   | version history 
------------+---------------------+---------------------+----------------------- 
structure   | DB-structure        | class definitions,  | class definitions, 
definition  |                     | persistent objects  | all objects persist 
------------+---------------------+---------------------+----------------------- 
metadata    | schema.rb automatic | ??                  | ?not necessary? 
------------+---------------------+---------------------+----------------------- 
migrate     | database structure  | data structure      | data structure 
            |                     | some code changes   | all code changes 
------------+---------------------+---------------------+----------------------- 
deployment  | deploy VCS delta    | ?deploy VCS delta?  | ?run all data and 
            | run all migrations  | run all data and    | code migrations? 
            |                     | some code migrations| 

At the moment there is little explicit metadata for MagLev objects, only the ruby methods method which does not include type information. For basic rails this should not be a big deal, as schema.rb seems to be mostly used to cast database data correctly as it basically comes across an SQL connection as a string. Maglev does not need to do this as it is very well aware of the type of data it stored.

10 questions
21
votes
5 answers

Does an (experimental) class browser exist for Ruby?

Does an (experimental) class browser exist for Ruby? I am talking about a class browser/editor combination similar to that of most Smalltalk implementations (i.e. focused on [runtime] classes/objects instead of .rb files) P.S.: it looks like pry is…
Erik
  • 4,268
  • 5
  • 33
  • 49
14
votes
1 answer

Is it possible to build a production web application using MagLev for ruby?

I'm a fan of Rails and ruby in general, and may embark upon building enterprise applications for financial institutions. I really like the idea of maglev, and wonder whether it's worth consideration. I haven't found much information as to whether…
aceofspades
  • 7,568
  • 1
  • 35
  • 48
2
votes
1 answer

How can I install Maglev with rvm on Mac OS X Lion?

I am trying to install Maglev on Mac OS X Lion with rvm, but running rvm install maglev as instructed on the github page only yields a 404 error: curl: (22) The requested URL returned error: 404 ERROR: The requested url does not exist:…
Patru
  • 4,481
  • 2
  • 32
  • 42
2
votes
2 answers

How can I run Rails on Maglev?

How can I run Rails on Maglev? It seems that it can run Sinatra, but not full blown Rails.
yazz.com
  • 57,320
  • 66
  • 234
  • 385
1
vote
2 answers

Do I need to allow the application "stoned" to accept incoming networking connections?

I recently turned my firewall on, and while running multiple rubies, I got the question Do you want the application "stoned" to accept incoming network connections? Clicking Deny may limit the application's behaviour. This setting can be…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
1
vote
1 answer

Can Jekyll run on MagLev?

MagLev tries to be compatible with ruby 1.8.7 So it seems to me that Jekyll should be able to run on it... And based on this previous question, seems that even some rails applications can run on it... But has anyone actually tried it? What were…
elviejo79
  • 4,592
  • 2
  • 32
  • 35
0
votes
1 answer

How to use prawn on maglev

Being new to maglev I wanted to start with a small, but still useful example. So i decided to start moving the ruby classes I use to generate my invoices to maglev. However I ran in an unexpected problem using the (excellent) prawn…
Patru
  • 4,481
  • 2
  • 32
  • 42
0
votes
1 answer

How can I run maglev-irb with an alternate stone?

Now that rvm seams to handle maglev with ease I wanted to start experimenting with an image different from the standard maglev image. I created a new image using rake stone:create[experimental] I could now run code in a VM connected to that stone…
Patru
  • 4,481
  • 2
  • 32
  • 42
0
votes
3 answers

How can I search a Ruby Maglev array of objects?

How can I search a maglev array of objects? Maglev is great but it doesn't seem to have any querying capabilities. Are there any external libraries for this?
yazz.com
  • 57,320
  • 66
  • 234
  • 385
0
votes
1 answer

GemStone doesn't start, says "no space left"

I'm trying to start GemStone for MagLev. Here is an error that I get in a log: GemStone could not create the semaphore array required for the cache. Reason: GemStone could not retrieve the IPC identifier associated with the semaphore key…
Simon Perepelitsa
  • 20,350
  • 8
  • 55
  • 74