New from SAP Research: Blue Ruby – a Ruby VM in ABAP
The programming language Ruby has gotten a lot of attention lately. Developers love Ruby for its elegance and efficiency – especially in conjunction with the popular Web Application Framework Ruby on Rails. Analysts love Ruby: Gartner predicts a significant growth of the Ruby developers community during the next years, Forrester Research simply calls dynamic languages “hot”. And the software industry loves Ruby as can be seen by the efforts Sun and Microsoft are making with their JRuby respective IronRuby projects.
At SAP Research Labs in Palo Alto and Shanghai, we wanted to find out if and how the use of dynamic programming languages could complement SAP’s traditional ABAP development and our existing enterprise application codebase. Discussions quickly converged towards these ‘adaptation & composition’ scenarios, where developers use a scripting language to pull data out of the backend, using and freely combining the existing APIs, and turning the – usually quite broad and complicated – interfaces into something lean and simple. And so we came up with Blue Ruby:
A Virtual Machine (VM) that runs Ruby inside the SAP NetWeaver Application Server ABAP.
Blue Ruby understands Ruby code – well, at least some of it, we are still quite far from being 100% compatible – and can run it inside a normal ABAP work process. ABAP programs can invoke Ruby code and Ruby programs can access ABAP code – all locally, on the same call stack. For example, the Internet Communications Manager (ICM) of the ABAP backend could route an HTTP request to a Ruby program. The Ruby program calls a BAPI (or several BAPIs) to read some data. The ABAP code in that BAPI invokes a customer extension contained in a Business AddIn (BAdI), which in turn is implemented in Ruby. All the communication between Ruby and ABAP happens locally, within the same user session, same transactional context, etc.
Sounds interesting? On our SDN Wiki page, we share some information on Blue Ruby, the status of our implementation and ongoing activities. If you want to learn more about what’s possible with Blue Ruby today, a SDN article provides more detailed information on the technical approach of our research project and briefly describes the various libraries we built for Ruby <-> ABAP integration. And if you want to explore Blue Ruby on your own, stay tuned: We are in the process of setting up a trial system and hope to have it available by mid of April.