The great open source mashup on IBM i

To the outside world and perhaps 80% of the established IBM i community running open source applications on the IBM i operating system is irrelevant.  This is a crime of monumental proportions in that folks are standing up *NIX and Windows servers while they let their IBM i’s languish with “legacy” applications.  How sad for them. They are missing out on the benefits of leveraging those legacy apps with open source frameworks that could make their shops more productive, scalable and secure.

Node is getting the latest buzz on the web and in the small but active open source community on IBM i.  I gotta admit that getting that first node app up was my goal (be first!) when it was first announced but my younger alter-ego, Aaron Bartell beat me to it (as usual).  But getting node.js stood up as a server is only the first step.  Getting a “hello world” app working is perhaps the second but the real fun is taking a few existing technologies and putting together a mashup that leverages old with new.  You IBM i folks have a boatload of RPG apps, how the heck would you hook them up with node.js?

socket.io and express.js being TCP/HTTP friendly make that a good place to start!  The IBM i is a rock solid HTTP server platform.  There are plenty of open source technologies that leverage HTTP on IBM i so using HTTP is a logical place to start.  How could we link things up so that node.js serves up apps that can communicate with and use other HTTP technologies?  Well, I threw together an RPG app that uses an HTTP POST to post data to the chat application example.  Check out a quick and dirty example I put together on my Github repo here. It isn’t as robust as I want it to be but I am just getting started here (and wanted to do more than just ‘Hello World’!)

Just think of the possibilities!  HTTP is the perfect way to mash up all things IBM i.  More to come!

Comments Off on The great open source mashup on IBM i

Stumbling startup with node.js on IBM i

My 7.2 upgrade was done specifically to get going with an “officially” supported version of node.js.  Installing 5733OPS is a no brainer (either RSTLICPGM or just using the option to install a licensed program in the LICPGM menu will work).  Node worked great.  Already creating much mayhem with socket.io, express.js, and a bunch of other stuff I will eventually break.  The problem I had is that I could only do this stuff when I was in the Node/bin folder.  Otherwise I would see:

node -v
exec(): 0509-036 Cannot load program node because of the following errors:
0509-150   Dependent module libstdc++.a(libstdc++.so.6) could not be loaded.
0509-022 Cannot load module libstdc++.a(libstdc++.so.6).
0509-026 System error: A file or directory in the path name does not exist.

What?   I am only a noob when it comes to *NIX environments and I know there are a bunch of moving parts that need to be correctly aligned.  I thought my PATH was the only thing I needed to look at but I was missing something essential: The LIBPATH environment variable.  Many executables share functionality so the “helper” objects need to be in the PATH as well so they can be found (like service programs or DLL’s) so the LIBPATH needs to be set as well.  My “Brogrammer” in the Open Source space, Aaron Bartell, turned me on to that fact and he proposes a couple of solutions.  You could just manually set the PATH and LIBPATH:

[Depending on the shell you use you can either do it in one step like this]

export PATH=/QOpenSys/QIBM/ProdData/Node/bin:$PATH
export LIBPATH=/QOpenSys/QIBM/ProdData/Node/bin:$LIBPATH

[or your shell may require that you do it in two steps like this]

PATH=/QOpenSys/QIBM/ProdData/Node/bin:$PATH
export PATH
LIBPATH=/QOpenSys/QIBM/ProdData/Node/bin:$LIBPATH
export LIBPATH

Or you could create a script and just run it when needed.  Here are some screen shots that show the problem and solutions:

node_error

So the problem occurs in #1 above even though I have the node/bin folder on my path (#2).  If I check the LIBPATH environment variable, it is empty so I append the path to the shared library to the LIBPATH (which just happens to be the same as the node/bin folder).  Adding the path and exporting it makes it available to my environment so now when I run node – v I get the version listed rather than an error.  Nice!  Aaron pointed me here to find this info and recommended that I post questions here so that others might benefit.  Agreed!  But I’ll probably also post here since I tend to forget where I posted solutions to my issues.

The script to do this is simple as well.  You should have a folder in your IBM i “home” folder under your IBM i user name.  Mine would be /home/PETE/  You could either use this command on IBM i:

EDTF ‘node_env.sh’   (you can call the script whatever you want) :

edtf_node_env

If you want to up your *NIX geek cred, you could use vi in SSH (or call qp2term):

vi /home/PETE/node_env.sh

vi_node_env

However you get there!  Then when you are in the console you can just execute the script:

node_script_fix

So, all is well.  Just remember to execute the node_env.sh script, OR, if you are going to launch a node server instance using CL, I usually create a script and then just execute the script in the CL program so you don’t have to have multiple entries to set the environment.  Just do your heavy lifting in the script, let your CL do the easy part.

So, that’s it!  There is probably more detail here than most folks need but for folks who are new to open source on IBM i, a little extra instruction can fill in a lot of blanks.

 

Comments Off on Stumbling startup with node.js on IBM i

Moving to IBM i 7.2

Been meaning to do this for at least 6 months and finally bit the bullet and MOVED!  Naturally, the website has been down for days as I worked through several wrinkles.  On the IBM i OS side, I failed to pull my keys ahead of time.  Actually I DID download and install the keys. I also downloaded the updated OS and licensed programs and the latest CUME BUT the one thing I failed to do was to choose to “upgrade” on the IBM ESS site so although I had everything, the only keys it originally pulled was for base OS.  After I choose to “upgrade” on the ESS site, I suddenly had a boatload of keys which installed just fine.

When you upgrade once every few years there are always things you forget about, so it took a few IPL’s to get the everything running again.  So now I have a 7.2 and a 7.1 partition on my JS12 blade.  All is right with the world.

Well, ALMOST!  The web sites I had were mostly on their feet with a couple of exceptions.  My PHP sites were falling over and examining the logs revealed an interesting error:

exec(): 0509-036 Cannot load program /usr/local/ZendSvr/bin/php-cgi.bin because of the following errors:
rtld: 0712-001 Symbol EVP_md2 was referenced
from module php-cgi.bin(), but a runtime definition
of the symbol was not found.

Hmmm…not sure what was up with that.  I knew my Zendsvr install was relatively ancient (5.xx) so I decided to contact Mike Pavlak at Zend and see what I should do.   UPGRADE!   Of course that is what he said (duh!) so I downloaded the latest Zend Server version and installed it.  The beautiful new server access pages worked great!  But, my WordPress sites, and any other PHP based pages were still falling over.  So, back to Mike!  With a little bit of looking over the shoulder, Mike noticed that perhaps I was still back in the dark ages, referencing the wrong server (might it be the old Zend Core?) and he pointed me to a very helpful page that triggered enough neurons to get me thinking along the right lines….the problem might have been in the directives so he pointed me here.  Turns out it was the fast cgi directives….kind of.  Here is the deal.  I DID have the two things recommended by the page set up correctly:

LoadModule zend_enabler_module /QSYS.LIB/QHTTPSVR.LIB/QZFAST.SRVPGM

and

AddHandler fastcgi-script .php

So, I was a bit stumped….until I read on and saw the recommendation for the contents of the fastcgi.conf file.  My clue was at the very beginning of the file:

CommandLine=”/usr/local/zendsvr6/bin/php-cgi.bin”

Scroll back up and take a look at the path mentioned in the error I encountered:

Cannot load program /usr/local/ZendSvr/bin/php-cgi.bin

AHA! The fastcgi.conf is where the Apache directive finds how to execute the php page!   So, all I had to do was change any reference from /ZendSvr/ to /zendsvr6 in any of the fastcgi.conf files that I have.  Voila!  All is well!  All happily running under Zend Server 8.0 now.  Thanks Mike!

Next I had to update WordPress.  The automatic update has never really worked correctly so I did a manual update and made the mistake of using the readme.html in the WordPress bundle file to guide me.  Don’t use that for upgrading!  Use the instructions found here. Once I took the proper approach, WordPress was up and running in no time.

So, now it is time to play, play, play with all that IBM i has new in 7.2!

Comments Off on Moving to IBM i 7.2

Handouts for the Common Spring Conference 2014

They will eventually make it to the Common website but here are the quick links to get them now:
Developing defensible web applications on IBM i

Open Source Tools and Applications for the IBM i

Developing Mobile Applications for i Using Open Source Tools

Open Source Report Writing Tools for IBM i

Ruby on Rails on IBM i

 

Comments Off on Handouts for the Common Spring Conference 2014

Common Spring Conference – Whats App?

Can’t believe that the spring conference has rolled around again.  Seems like we just finished fall and I haven’t blogged, Tweeted or been “Social” at all in the interim.  I have been BUSY and I plan to get back to blogging (at least) as soon as I can get through the conference.

First off,  I have been deep in midst of fleshing out my Mobile App Development workshop for THIS Saturday (yikes).   Trying to pull together 7 hours of content that is both useful and fun has been a bigger challenge than I expected but I am putting the finishing touches on all of it now primarily so I can get on with updating the other presentations I am giving at the conference.

One of the fruits of that effort is the update to the Common Schedule Organizer.  You can read about the functionality in earlier posts here.  I hoped to add some new function to this revision but things have just been too busy for me.  So I have the new schedules and maps loaded and they are ready to go!  You will find the new web app here. You’ll find the Android APK (Android 2.1 compatible) here. You will want to access that link from your Android device and you’ll be alerted to the fact that you need to change settings to allow an “unknown” app to install.

Once you have the app installed on your device, you may notice that the prompt dialog that asks you for email address for your Common Personal Grid will only appear briefly and then will disappear.  I am not sure where this bug resides but the workaround is to the “My Schedule” page and click on the “Change Grid Email Address” button.  This time the prompt should stay open for you so you can type in the email address and retrieve your schedule.

Based on what I have seen so far this conference will be very well attended and have some pretty exciting sessions. Enjoy the CSO app!  See you there!

Comments Off on Common Spring Conference – Whats App?

Common Schedule Organizer – Fall Edition 2013

Yep, it is that time again!  Common Fall conference and I had to deal with a couple of API changes and I implemented a few of the suggestions from the Spring Conference so, as usual, I am late to the party.

You will find the web application version here:

You can download the Android APK here:

Same drill as before:

If this is the first time you have used the app, or you have updated, you will be prompted for your email address that you use to access the Personal Grid on the Common website.  Your personal grid information will be pulled into the app but remember it is a one way street: As you add items to your schedule in the CSO they will NOT update your personal grid info (still working on the best way to handle it both ways).

Once you have entered that info and are on the main app screen, click on the “Load Schedule” button.  It will turn yellow and after 30 seconds or so you will see a “Loading” message appear and flash on the screen.  It took me about 2 minutes to download the initial schedule.  At that point the message should change to “Ready” and you are ready to go.  If you have personal grid items, go ahead and visit your schedule to make sure they downloaded.  From then on you can update the schedules, both the master schedule and the personal grid info and it will update the app with the latest and greatest.

I have added conference maps and I have added a list of local restaurants.  Perhaps I can add a “Yelp” type feature that will late you folks rate them.

If you have something other than an Android device, you can use the web application version of the app.  It will still save your stuff to the device you use so it is still plenty handy it just won’t be “native”.

If you have a question or a suggestion you can always email me (you know my name) at the company domain (valadd dot com).  I’ll try to get back to you and patch things as necessary.

Enjoy! See you at the conference!

Comments Off on Common Schedule Organizer – Fall Edition 2013

The Austin Challenge!

Bummer if you are not here in Austin for the Common Annual Conference.  Perhaps you have heard of ‘Austin City Limits’ a program that showcases Austin’s music and night life (its all true!) Or maybe you have heard of that intimate gathering of music and tech aficionados  called South by Southwest (SXSW)?  Anyway, Austin is buzzin with IBM i excitement and all it takes for me to get a flare up of creative energy is a fun environment and a little free time.  So when I saw a post by Eric Lehti on Midrange-L that said of the iPhone application: “It does not list the Austin Barbeque restaurants in this release though. Big fail!” I thought “Why not add that to a REAL application like the Common Scheduler Organizer I developed for Android?”  Not hobbled by IOS I went ahead and knocked it out for Eric.  Sorry Eric, I haven’t compiled and deployed it for iPhone yet so you’ll have to use the web application version found here.  If the rest of you happen to be fortunate enough to be running Android, go ahead and download the APK found here (use ‘save as’ or navigate to the link with your Android device).

Downloading the new APK may wipe any additions to your personal grid that you have already added (working on how to do that smoothly).  You might also have to hit F5 refresh on the web application version to get the list of Austin restaurants.   The list isn’t JUST barbeque places but I was in a board meeting all yesterday, out with friends last night, running in the Common Cares 5k this morning so I have only had a few minutes to throw this together.

Enjoy!

Comments Off on The Austin Challenge!

Common Schedule Organizer 2013

Just in the nick of time, the Common Schedule Organizer, a free mobile app for Android, is now available!  There isn’t much new functionality (always willing to take suggestions) but it has been updated with the latest Phonegap libraries and the latest jQuery mobile.  It is still written for Android 2.1 devices and up so even that ancient Samsung Galaxy Spica I own can run the app.  It is still lean and mean and can be downloaded here.

If this is the first time you have used the app, you will be prompted for your email address that you use to access the Personal Grid on the Common website.  Your personal grid information will be pulled into the app but remember it is a one way street: As you add items to your schedule in the CSO they will NOT update your personal grid info (still working on the best way to handle it both ways).

Once you have entered that info and are on the main app screen, click on the “Load Schedule” button.  It will turn yellow and after 30 seconds or so you will see a “Loading” message appear and flash on the screen.  It took me about 2 minutes to download the initial schedule.  At that point the message should change to “Ready” and you are ready to go.  If you have personal grid items, go ahead and visit your schedule to make sure they downloaded.  From then on you can update the schedules, both the master schedule and the personal grid info and it will update the app with the latest and greatest.

If you have something other than an Android device, you can use the web application version of the app.  It will still save your stuff to the device you use so it is still plenty handy it just won’t be “native”.  You will find the web application available here.

If you have a question or a suggestion you can always email me (you know my name) at the company domain (valadd dot com).  I’ll try to get back to you and patch things as necessary.

See you at the conference!  Enjoy!

Comments Off on Common Schedule Organizer 2013

Rational comes through

Or maybe it was just IBM….but in any case I would be remiss if I didn’t post that after multiple emails and phone calls my friends at IBM/Rational found a way to sort through the licensing, notices and documentation and get the SWMA renewals sorted out!  I have put the SWMA dates into my calendar so that I won’t miss the boat the next time around and I can always hope that next year everything will go smoothly…well, I can always hope.

Thanks Rational team!

Comments Off on Rational comes through

More (ir)-Rationality

I love Rational tools but as I mentioned to my IBM sales representative “I am beginning to suspect that the Rational Marketing team has never left the 60’s and is still “tripping” when they decide to put their pricing together.  That or they took their sales class from PT Barnum (“There’s a sucker born every minute…”). ”  The source of the pain here is that as a developer enrolled in IBM’s wonderful (and it IS wonderful) developer discount program, I had two primary complaints:

1) You receive no notification of expiring Software Maintenance Agreements (SWMA)

2) Trying to sort out what the final costs will be based on the various discounts and product ID’s is nothing short of alchemy….

#1, I am happy to say, has been “fixed”.  I did receive notification that my SWMA was expiring. But every year is an adventure and this year was no exception! The IBM OS and licensed programs are very simple, I never have a problem with them.  But when it comes to the Rational products, you can never really know how the pricing will come out.  Fortunately, I only have ONE Rational product – RDP (it has been through many naming conventions: WDSc, WDSCi, RDi, RDP and if I can believe what my IBM sales rep says, it is now RDG) but the constant name game leads to confusion every year as to *what* exactly, needs software support.  This year I was finally able to narrow it down to my two licenses of RDG.  “Send me the quote” I said!

What I received first surprised and then confused me.  The quote I *thought* I would receive was $548 for *both* my licenses. You have to remember that this is a developer *discount* program and everything on the i IS heavily discounted.  Everything BUT the Rational tools.  The cost of the OS (nada).  The cost of the supporting OS products, nada!  Cost of the Rational tools? 131% of list!  Yeah, you read that correctly.  For a developer ‘discount’ program the actual tools cost you MORE than if you purchased them retail.  Tis the “Smarter Planet” at work at IBM!  I am just hoping that Microsoft (which *discounts* it’s tools) doesn’t catch wind of this cash cow approachfor IBM…..

My SWMA on *each* copy of RDG is $548.  My cost if I buy a license with 1 year of support from IBM “retail”: $416.00  You would *think* that a developer discount would produce a *lower* cost for the developer.  Gee, I wonder why RPG developers *don’t* move to use Rational tooling?  Hmmm, could it be the (ir)-Rational pricing?

Just once I would love to be surprised in a happy way by Rational pricing.  Developers should get a discount when there is a ‘developer discount’ offering don’t you think?  Apparently the Rational division thinks not…..

Comments Off on More (ir)-Rationality

WP Login