Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 947
aceofspades Avatar asked Apr 16 '13 20:04

aceofspades


1 Answers

TL;DR: We're about to release a production application on MagLev. You should probably wait.

I apologize for the length; I have a lot of disconnected thoughts on this that I'm still trying to connect.

My team is about to launch the first production application on MagLev. It's been a bumpy road, but we're pretty confident that in the end it will prove to have been the right decision. I'm speaking about our experiences at a few conferences this year, and I'm happy to chat about it in more detail, but here's a (long) overview.

As you may already know, GemStone has a long and proud history supporting companies in the finance industry. We are primarily a Ruby shop, and we develop finance applications. We care about our data, so GemStone was an obvious choice for us. MagLev allows us to use our existing Ruby knowledge, and much of our code, and store our data in GemStone. It was (seemingly) the perfect marriage.

We opted to start with a small application which was new to our users, and would be the easiest and lowest risk to move. We chose our invoice presentment application which ties into our hosted checkout platform. Being able to simply persist objects without worrying about mapping or conversions has made development very fast and enjoyable, and we've avoided many of the problems associated with ORMs and persistence in general. We are planning to continue moving the rest of our existing applications to MagLev.

That said, you should probably wait unless all of the following are true:

  1. You are (or work with) Ruby experts who are familiar enough with the language and its implementations to investigate and fix implementation details, many of which are written in Smalltalk.

  2. You are (or with with) developers who understand the nuances of working in Smalltalk specifically, but an image-based environment generally.

  3. You are able to get intimately familiar with the GemStone/S platform, language, deployment mechanisms, and tooling.

  4. You are prepared to scrap everything and re-write your application in Smalltalk if you hit a brick wall. (I'll admit it: I hope for MagLev to fall completely flat sometimes, just to have an excuse.)

There are a few things we have issues with on an ongoing basis. Because, for us, all of the above are true, we went ahead with it. We work through each of the following "issues" often. Sometimes daily.

  1. Backtraces are nearly impossible to read on their own, and when you encounter many exceptions you have to play with the command line debugger from GemStone Smalltalk. There is quite a learning curve here.

  2. Ruby library compatibility is... less than you'd hope for. Basically, you can count on most things that are written in pure Ruby to be fine. Basically anything that uses C extensions without ffi are out. This is a surprising amount of stuff. Libraries that ridiculously over-use meta-programming confuse MagLev. This is many things in Rails land.

  3. Code reloading and migrations are manual. When you change the class definition of a persisted object on disk, you have to manage loading the new code and migrating the existing persisted instances manually.

All of that said, the thing that has helped us most is that I'm friends with most (all?) of the guys who are (and were) knowledgable about MagLev at GemStone. They've been fantastic to us. The students at HPI have also been invaluable fixing bugs and helping us figure out problems.

About my team, because the team that I have is basically what makes this possible. We're four developers. Each of us have more than a decade of experience (I think we're all actually over 12-15). Some of us (me, at least) have over a decade of just Ruby experience. We have varying degrees of experience with Smalltalk, although none of us have shipped production applications that made money on it. I am active in the Ruby and Smalltalk communities (and am sort of "transitioning" from the former to the latter).

Our experience has been a bit rocky, but mostly enjoyable. If I knew then what I know now, I'd do it again. My hope is that our work on this will help others do the same in the future. I see MagLev as a valuable tool in the future.

like image 88
Steven R. Baker Avatar answered Oct 14 '22 12:10

Steven R. Baker