Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Werner Schuster on Jan 16, 2008 07:00 AM
Launching multiple Ruby instances - without having to resort toexecuting the Ruby binary is available in a few shapes and forms. JRuby allows to have multiple JRuby instances inside one process, each running on its own native thread. For MRI, why the lucky stiff provides the Sandbox Hack to do the same thing. vm = Rubinius::VM.spawn "blah", "-e", "puts 'hello\n'"To understand the implications of this, we talked to Evan Phoenix of the Rubinius project.
vm.join
p vm.stdout.gets
I've always know we'd have this kind of functionality in one form or another. The plan for the feature is mixed. Yes, it makes it much easier to start a new VM to do some work. The real question is what that work is and how it's performed [..].Evan continues with some implementation details:
Currently, each VM is started in it's own native thread (pthread on unix). This lets each VM run without any knowledge of the other VMs and keeps scheduling exactly the same inside the VM.Note that the last statement is true of all other Multi VM solutions as well - a JRuby instance that calls global, static methods like
Rubinius is a very well behaved C program in that it uses no globals or anything, allowing multiple copies of it to mingle in the same address space peacefully.
Since they are running one per native thread, one can crash and bring the whole process down, yes.
System.exit() or uses JNI code that crashes the JVM will bring down all other JRuby instances as well. Pipes are one [way], and yes, stdio is redirected to pipes for sub VMs. I've also added a very simple shared message passing system. One VM can send message to another using a single, toplevel mechanism. This mechanism is the only place where one VM interacts with another. It also marshals the messages into it's shared storage, so there is no pointer sharing between the VMs.This feature is available in Rubinius git repository now (see InfoQ's coverage of using git to access the Rubinius repository) . If you just want a quick look at the Rubinius source, there's a web interface to the Rubinius git repository. For instance, here the commit for the mentioned message passing system.
The existing shared message passing mechanism could also be extended to use shared memory to allow messages to be passed between [OS] processes easily.
Ensuring Code Quality in Multi-threaded Applications
Download the Free Adobe® Flex® Builder 3 Trial
The Role of Open Source in Data Integration
The Agile Business Analyst: Skills and Techniques needed for Agile
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
No comments
Watch Thread Reply