maglev
GemStone Maglev Ruby Repository
MagLev
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 maglev is being used in production in the wild, let alone for a high-security purpose.
Has anyone successfully deployed mission-critical applications using MagLev? If so, can you provide details about your experience and maybe name the application?
Source: (StackOverflow)
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?
Source: (StackOverflow)
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 the problems you had?
- If you haven't tried it, do you anticipate any major problems?
TIA
Source: (StackOverflow)
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 using
maglev-ruby --stone experimental -e <code>
as expected and it reported the expected stone_name. However I could not get maglev-irb to run with a similar option, judging from the usage info they do not seem to be supported. Trying
maglev-irb --stone experimental
anyway results in an error like
ERROR 2730 , a NameError occurred (error 2730), , global $@ is a read-only variable (NameError)
Maybe there is a less obvious way I am missing? It would really be convenient to play around with maglev features interactively without destroying the default VM in the process.
Source: (StackOverflow)
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 changed in the Firewall pane of
Security preferences.
After some googling, I worked out it wasn't a malicous app (and definitely not this stoned!), but maglev (presumably "stoned" being "stone daemon").
Unless I'm serving web content or otherwise acting over the network, do I need to enable "stoned"?
Source: (StackOverflow)
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: 'http://glass-downloads.gemstone.com/maglev/MagLev-26852.Darwin-i386.tar.gz'
which does not seem too helpful, as it just points out that the respective file does not exist on the gemstone server. Google does not seem to know about this, so I thought about asking a question here. However, before doing so I tried some more and and got a little further running
rvm install maglev-head
as mentioned in some blog posts. This finally finds an appropriate file, downloads a bunch of things and starts to compile. It starts to look really well at a point where it says
Installing maglev to /[user-dir]/.rvm/rubies/maglev-head
in green, but unfortunately it does not get much further. The installation hangs after saying
Creating default 'maglev' repository.
Generating maglev HTML documentation
Generating smalltalk FFI.
or at least it takes forever (more than 30 minutes) without saying anything.
Stopping the installation at this point still looks promising giving me
$ rvm list
rvm rubies
maglev-head [ x86_64 ]
but unfortunately
rvm use maglev-head
results in
startstone[Info]: Starting Stone repository monitor 'maglev'.
startstone[Error]: Stone process (id=61119) has died.
startstone[Error]: Examine '/[user-dir]/.rvm/rubies/maglev-head/log/maglev/maglev.log' for more information. Excerpt follows:
without displaying an excerpt and even without stopping. Actually the log file does exist and has a few error messages, the most telling seems to be
GemStone is unable to open the file !TCP@localhost6#dbf!/[user-dir]/.rvm/rubies/maglev-head/data/maglev/extent/extent0.ruby.dbf
but the directory does exist, it would just be the file that is missing, and I would expect the server to create that one on an new image. Still, the situation does not look too bad as i get
which irb
giving me
/[user-dir]/.rvm/rubies/maglev-head/bin/irb
but when I try to start up irb I get
maglev-ruby: [Error] The MagLev server "maglev" is not running.
To fix this run "rake maglev:start" before running maglev-ruby.
but if I call the rake task as instructed I again get
maglev-ruby: [Error] The MagLev server "maglev" is not running.
To fix this run "rake maglev:start" before running maglev-ruby.
putting me in a recursive causality loop. Trying to start the maglev server by hand using
maglev start
as I did on a previous installation using the shell scripts does not work either, giving me
startstone[Info]: Starting Stone repository monitor 'maglev'.
startstone[Error]: Stone process (id=61400) has died.
startstone[Error]: Examine '/[user-dir]/.rvm/rubies/maglev-head/log/maglev/maglev.log' for more information. Excerpt follows:
again without displaying an excerpt and hanging.
Any help would be appreciated as Maglev looks like a really promising piece of infrastructure.
Source: (StackOverflow)
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 PDF-library.
Being on rvm I generated a gemset for the application which is setup in a .rvmrc for the invoice directory. It gets used when I cd into it:
Using /Users/patru/.rvm/gems/maglev-head with gemset invoice
When I install prawn everything starts out fine, the gem seems to be installed and the ri-docs are being generated. However, trouble starts when rdoc should be created, the maglev provided gem command gives me
gem install prawn
[INFO] The MagLev team publishes customized versions of some gems.
...
Successfully installed prawn-0.12.0
1 gem installed
Installing ri documentation for prawn-0.12.0...
RDoc failure in lib/prawn/images/jpg.rb at or around line 20 column 26
Before reporting this, could you check that the file
you're documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.
The internal error was:
ERROR: While generating documentation for prawn-0.12.0
... MESSAGE: global $@ is a read-only variable
... RDOC args: --ri --op /Users/patru/.rvm/gems/maglev-head@invoice/doc/prawn-0.12.0/ri --title Prawn Documentation --main README -q lib README.md LICENSE COPYING GPLv2 GPLv3 --title prawn-0.12.0 Documentation --quiet
a RubySystemExit occurred (error 2752)
No big deal to live without documentation, it is good enough, but something else seems to go wrong, gem list says
Ascii85 (1.0.1)
bundler (1.0.21)
erector (0.8.3)
pdf-reader (0.10.1)
polyglot (0.3.3)
prawn (0.12.0)
rake (0.9.2)
treetop (1.4.10)
ttfunk (1.0.3)
so all seems to be well, but if I do
require 'ruby gems'
require 'prawn'
in irb (which works perfectly on my ree-1.8.7) I get a strange
NoMethodError: NoMethodError: undefined method `ruby_18' for
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:246:in `__compileClass'
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:14:in `__compileClass'
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:13:in `__compileClass'
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core/object_store.rb:12
from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require'
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn/core.rb:78
from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require'
from /Users/patru/.rvm/gems/maglev-head@invoice/gems/prawn-0.12.0/lib/prawn.rb:11
from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require'
from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:831:in `gem_original_require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:57:in `require'
from (irb):5:in `__compileEval'
from (irb):7:in `__compileEval'
from /Users/patru/.rvm/rubies/maglev-head/src/kernel/bootstrap/Kernel.rb:394:in `eval'
from /Users/patru/.rvm/rubies/maglev-head/lib/ruby/1.8/irb.rb:159:in `eval_input'
...
I am probably missing something obvious here. Suffice it to say that the 'erector' gem I installed as well (see the gem list above) can be required without problems, so I do not do everything wrong ;-)
Source: (StackOverflow)
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 -704540831. semget() error = errno=28,ENOSPC, There is no space left on the device (or, in fcntl(), there are no more record locks).
Full logs are available in a gist.
Does it really lack space? I have 7 GB available. Are there any other issues in my case?
Source: (StackOverflow)