• September 28, 2020

Mixology: 2 ounces of IBM Bluemix, 1 ounce of VSAM, and ½ ounce of MongoDB Driver

Shaken_not_stirred

In mixing glass or cocktail shaker filled with Bluemix, combine VSAM and node.js.

Shake well (about 20 seconds) then strain into a jade glass.

Garnish with MongoDB Driver and serve.

OK.  I promise you won’t be forced to drink what you mixed; we need a break after the festivities of the year end. But I will write about mixing some interesting stuff together.

 

 

One of the luxuries of our recent Rocket.Build hackathon was the time we were given to explore, learn, and try new things. In our team, Steve Able and David Romo and I spun off a project to investigate how the mainframe can play a role in a cloud application. We started off by playing with IBM Bluemix, which is IBM’s platform-as-a-service solution based on CloudFoundry. In no time, we had accounts set up and we were investigating all the interesting tiles in the Bluemix collection, including those very cool cognitive apps backed up by Watson.

bm2

Next thing on the agenda was to actually build something. We started off by creating a Web application and selecting node.js as our SDK. A few more clicks, and our application was up and running.

bm6

It wasn’t doing much beyond displaying a “hello world!” page, so we started pondering how we could connect a mainframe to that. We chose to work with Rocket Data Virtualization Server to take advantage of our NoSQL BSON support and bring the VSAM data into the cloud app. First we added mongodb to our package.json to get the MongoDB Driver:

“dependencies”: {
“express”: “3.4.7”,
“jade”: “1.1.4”,
“mongodb”:”*”
},

We pointed the driver to a public demo instance of Rocket Data Virtualization Server, which supports the popular JSON-oriented query language created by MongoDB to interact with mainframe data :

var mongonative = require(‘mongodb’).MongoClient;
var dbURI = “mongodb://mainframe.rocketsoftware.com:port/db”;
mongonative.connect(dbURI, function(err, db) {
assert.equal(null, err);
// render employee  page
app.get(‘/employee’, function(req, res){
var collection = db.collection(‘vsam_staff’);
collection.find({}).toArray(function (err, docs){
res.render(’employee’, {“employeelist”: docs});
});
});
});

Then we sprinkled a simple jade page on top of that :

div
table
thead
tr
th Employee
th Position
tbody
each employee, i in employeelist
tr
td  #{employee.name}
td  #{employee.job}

Et voilà! From this to this.

bm_final

Why is it cool? The data is still securely in VSAM. We didn’t have to move it anywhere just to make it available to a modern Web or mobile application. And we just made it part of our mix, like every current developer is doing–pick a piece here, pick a piece there and assemble a new application with a new purpose. So while we haven’t moved the mainframe to the cloud, we are definitely bringing it closer.

And hopefully we added one more point for Stephan’s big Post-It note. What do you think?

Contact us to learn more about our mainframe solutions.

 

Avatar

Patrycja Grzesznik 9 Posts

I am a Product Manager at Rocket by day and an artist by night. I love to paint, sketch, sculpt and make hats. Yes, hats.

1 Comments

  • Avatar

    Steve Able Reply

    January 15, 2015 at 11:30 am

    “Laisser le bon temps rouler”… Yes, we all had a good time at the Rocket Hackathon!

    This project provides great insight to what can be accomplished with a little innovative thinking along with a “Can Do Attitude”.

    By using off the shelf tooling provided with Bluemix and Rocket DVS a simple solution to a complex problem was proven. I’m sure most people in the industry would view this as an impossible task.

    Doubt will kill more dreams than failure ever does.

    So today strive to do the impossible, then tomorrow do it again.

    Great post Pat, and BTW Love the hat.

    Go Team Rocket!

    Cheers,

    Steve Able

Leave a Comment

Your email address will not be published. Required fields are marked *