Skip to main content

Liam Allan on Node.js and Open Source

Charlie Guarino: Hi everybody. This is Charlie Guarino. Welcome to another edition of TechTalk SMB. This month I am very happy to be joined by Liam Allan, who is a friend first but he is certainly a very large figure in our IBM i community. Liam is an IBM Champion and a consultant. He does help IBM i development teams transform their applications and I’ve seen this first hand, so I can speak to that personally. He’s a huge advocate for Node.js, ILE modern development tools and things like that, open-source technologies, and he’s also a very big player in the community with advocating the community spirit, and I really think he’s made a significant splash when he came on the scene about five years ago. I’m really very proud to call him a friend first. What’s most impressive to me is just his passion for technology in general and how he just so willingly and freely gives back to the community. So Liam, welcome to our podcast today.
 
Liam Allan: Howdy. Thanks for having me. I appreciate it.
 
Charlie: Of course. Of course. So Liam, I do have a lot of things that I want to talk to you about, but when I think of you lately what comes to my mind is Node. I mean I kind of associate you with just Node and how you really are really running with that technology, especially on IBM i, but I think there are a lot of people who don’t quite understand where that fits in, what Node actually is and how it fits on your platform. So what can you say about that in general?

Liam: Absolutely. So I mean, there’s a few points to be made. I guess I’ll start with the fact that you know, it is 80% of my working life is writing typescript and Javascript. So I spend most of my days in it now, which is great. A few years ago, it was more like 50% and each year it’s growing more and more. So I usually focus on how it can integrate with IBM i. So you know having Node.js code, whether it’s typescript or Javascript talking to IBM i via the database—so, calling programs, fetching data, updating data; you know, the minimal standard kind of driver type stuff that you do, crud, things like that. What I especially like about Node on IBM i is that it is made for high input/outputs. It’s great at handling large volumes of data and most people that are using IBM i tend to have tons of data, right? Db2 for i has been around for centuries at this point; it’s older than I am, and I can make that joke. No one else can make that joke but I can make it and you know it’s been around for the longest time. And so people have got all of this data and in my opinion Node.js is just a great way to express that data—you know, via an API. I think it’s fast. It’s got high throughput and yeah, it’s a synchronous in its standard. It’s easy to use, it’s easy to deploy, it’s easy to write code for especially. One of the reasons I like is the fact that I can have something working within 20 minutes. It’s a fantastic piece of technology and it’s been out for a while. I mean it’s been out for like 10 years, 10 years plus at this point. It’s just fun to use. I really enjoy it and I encourage other people to use it too.
 
Charlie: And I have to concur with you on that, Liam, because I mean I’ve seen you develop code right in front of my own eyes in Node and I’m just amazed how quickly things just appear. I mean I was really blown away by that. There are so many other languages or technologies out there that are open-source. There’s obviously Python and PHP come to mind also, but what is it about—if you could say—I mean you’ve already said some cool things about Node, but is there one defining point about Node that you would say that really sets it apart from the other open-source technologies that are available for developers?

Liam: A good question. I guess one thing that I haven’t mentioned yet and it’s probably my favorite part is definitely the integration and the amount of open-source packages that there are that you can utilize within your application. So something that I’ve been working on as of late is PDF generation and Excel document generation from an API. So for example just as of late I’m building an API that generates both a PDF and an Excel document from a list of orders for a client, and doing that in Node is fast. The typescript code for it is small. It can be ugly but if you do it right it can be very clean, manageable. I mean at the end of the day there’s so many packages available; like for example if you use OpenAPI, there’s a really great module for utilizing that package—sorry—utilizing that schema that you define and use it as a validator in your API. So you can define the APIs in the schema, in your OpenAPI schema and then utilize it in your web app for you know, API validation for the requests and the response. That integration with all the modules is definitely my favorite thing for sure.
 
Charlie: And you know the tool that I’ve seen you really go 100 miles an hour on is the tool itself using the VS Code. I’ve seen you use that and I think you’re a wizard at that. Tell me maybe how that plays a part in your rapid application development.
 
Liam: Absolutely. VS Code is a wonderful piece of technology. I wouldn’t write—and I suspect this is the same for a lot of people who wouldn’t write any typescript or Javascript without VS Code, because well not only does it have the syntax highline, as you would expect, but it has a vast amount of extensions. So you know there’s an extension for ESLint, which is a code formatter and syntax checker. It does a magnitude of things, but it’s a great piece of functionality that VS Code has. Another good example is something called Thunder Client. It’s basically Postman but it’s embedded in VS Code, and I love that. I love keeping everything in the editor. It’s my favorite thing but there’s so much integration and you know, debugging. It actually has integrated debugging for typescript and Javascript and it’s just a fantastic tool to know and to utilize when writing these kinds of apps. I’d be lost without it that’s for sure. It has all the refactoring. It knows your project structure. It really is a gorgeous piece of technology. I would be so lost without it, so definitely a big fan.
 
Charlie: And I would be remiss if I didn’t bring up your own project that you’ve been working on with VS Code of course, and that’s the RPG that you’ve been working with on VS Code. Tell me a little bit about that.
 
Liam: Yeah, absolutely so it’s an extension so again it’s not a separate product. If you have VS Code, it’s just an extension you can install and really all it does is it just adds the ability to the connect to the IBM i open-source code and change it. You know edit the code as you’d expect, compile it. It does all the basic necessities but it also has lots of cool things like it has the outline view for RPG and COBOL, you know the peak definitions and the go-to definitions and references. You know all the content assessed works for RPG and COBOL for example, as well as in the future there will be some excellent SQL tools coming out. You know the idea behind the extension and other extensions that work alongside it is just to enhance the development life cycles for IBM i developers. That’s really the goal for that extension is to make development like fun and easy again and it’s fast, too. That’s the goal with it, really.
 
Charlie: Let’s get back to the Node because I still think there’s still a lot of newbies—even the most seasoned RPG developers are still newbies—and open-source makes them nervous, perhaps because it’s a whole different paradigm, a whole different vernacular. Everything about it is different, yet obviously there are so many similarities, but the terminology is very different. Let’s focus back on Node for a minute. You mentioned it already but give me some other ideas or some examples of how somebody could use Node. I mean I guess the question is it integrates quite well with RPG. Would you use it to replace RPG, or would it coexist nicely?

Liam: It would definitely coexist nicely. So you know they are effectively in their own environment as you can probably imagine, but the easiest way for a Node application to talk to RPG is definitely through the database, because you know a Node app—whether it’s in Javascript or typescript—can utilize ODBC to talk to Db2, and of course Db2 has very, very easy access to RPG programs, COBOL programs, any application, any program, service program you have can be called through Db2, which means it can be utilized from your Node environment. And of course that also applies to PHP, Python and so on and so forth, but what specifically stands out for the—you know the Node.js side is writing typescript and Javascript is quick—you know, you get stuff done quickly. That plays a major role in it, I would say.
 
Charlie: And I’ve seen these open-source technologies, I guess Node included in this discussion, used in some of the newer emerging technologies—like for example IoT comes to my mind immediately. I know there’s a lot of cool things happening in that space and I know you specifically have been dabbling in that, and even in your personal life you have some IoT devices. Why don’t you tell us a little bit about that?

Liam: Absolutely and I’ll just make this time to point out that I absolutely hope that we can see more IoT content from you as well in the future.
 
Charlie: Oh sure.
 
Liam: That would be excellent.
 
Charlie: I’ve written it down already.
 
Liam: Good, good. So yeah so what’s really cool about Node.js is that it plays really well in the IoT world, Charlie, and I guess you know this already but Node-RED is a huge player in IoT. Whether it’s IBM i or whether it’s any platform, Node-RED can absolutely be a driver in connecting IoT devices and everyone probably knows this, but Node-RED does run on IBM i. People are using it. I’ve seen dashboards being built with it. It’s a really cool tool. I know Matt Seeburger has written a bunch of stuff about Node-RED on IBM i. I would absolutely recommend that you check it out. From my own experience, I’ve only had the pleasure of kind of using it at home. I have a very fancy electric kettle, and it has a dial on it where you can change the temperature as well as turn it on and off, but you can actually connect it up to the network. It actually is a Rasberry Pi, you know, inside. So I’ve got it hooked up and I can turn it on and off. I can change the temperature so it, you know, I can set it. For example, it’s 8:00 in the morning, so I might pre-fill it the night before, and I can set up something in Node-RED that says "oh, it’s 8:00 in the morning. I’m due to wake up at you know, ten past 8:00. Why don’t I have it turn on automatically and set it to a temperature that I want too?" When it reaches a certain temperature, I can get that from the device and then say turn the kettle off and let the hot water sit there. You know I can do that. That’s all IoT. That’s a small device talking to another device, and imagine if I had a coffee shop and I wanted to control all my coffee machines automatically, which believe it or not apparently people do. You could do that through IoT. That’s the only use case I've had for it so far. I haven’t had the pleasure yet of using it too much but it’s really fun. It is fun.
 
Charlie: Yeah, IoT has really been one area that I’ve been doing a lot of exploring on myself. I know it’s very highly used in manufacturing and things like that, but I also do my studies on it. It's turning things on and off and checking different conditions or different statuses is important but really what I’ve been seeing is the real value of that is when you look at it over a period of time and you can start making predictions based on that so I think that’s where the future is. I can see how Node would play into that space very nicely.
 
Liam: Oh absolutely. I mean if you had tens of hundreds of sensors just collecting data all the time, you could average out and learn so much about how things work. There’s so much potential there. I really do wish I had the potential to actually use it sometimes. I’m kind of jealous actually of people that get to do IoT. So that’s a pretty cool technology.
 
Charlie: It’s cool technology for sure. Yeah well, the fact that you even have your kettle going on and off is really amazing. It’s a simple example but it just speaks to how many devices there are in the world. I think my last count, it was like 40 billion I think was the number I heard.
 
Liam: Yeah, I mean you know the most basic IoT device that actually a lot of people have is a Philips Hue. It’s a little computer inside of a light bulb that connects to the Wi-Fi and you can treat it as an IoT device you know, and that’s something that a lot of people have and when they control the light from their phone. That is IoT right there you know, in their own home and they don’t even know it, the term, and that’s a really fun one as well as obviously playing with the lights.
 
Charlie: Yeah.
 
Liam: So, I could actually have it so you know, when my kettle is down boiling, I’m going to trigger it to turn the light on in my bedroom so it knows I need to wake up and take the kettle off. You know there’s a lot of cool little things how it would work and yeah, it’s really neat.
 
Charlie: And that’s just the start of it. You know we have so many other home appliances that connect: washing machines, refrigerators, ovens.
 
Liam: I mean air conditioning has kind of done it for a while. You have temperature gauges in your house and if it gets too hot, then it will whack the AC on. You know that’s really just the start of IoT. So it’s a fun and exciting challenge.
 
Charlie: Well I can hear how excited you are about this topic. Obviously it speaks to your passion, which actually I do want to talk about that because you know, the years that I’ve known you, you just ooze passion about technology and programming in general. It’s something that I’ve always admired about you. It’s just anybody who speaks to you that just comes across so clearly and one of the things that I really admire about you is just, you know I said your passion, but also how willing you are to give information away, so freely giving it away. And the community is so much better off I think because of what you’ve contributed, but I know community is so important to you. Tell me about your commitment or why you feel so strongly as you do to give back to the community?

Liam: That is a hard question to answer, actually. I think the passion comes from maybe being an extrovert and I think it’s definitely got to do with that because if I can give back to the community and I can have that engagement, it definitely fulfills me. Like being able to help people is a fulfillment in my life, you know. Of course if I can help people and help people with technology—you know something that I think I can do okay—you know I can bring those two worlds together then I’m all for it. I just love the feeling that I get when I get to help people and you know, when I get to help to teach people, but what I get from helping other people is that other people help me. You know teaching other people is almost just like you’re learning about them and what they can offer you as well. It’s actually you know, a learning experience. Helping others is a learning experience almost all the time, and that’s kind of why I like open-source. It's like I have this idea and I’m going to put it out as open-source because I hope maybe I’m helping someone else, that someone else can offer me an improvement and I’m learning from their improvements, you know on stuff that I’ve made freely available. And I love teamwork. You know, I love working together. I love bringing people together. I guess that’s why. I really enjoy working with other people. It’s a great feeling.
 
Charlie: That’s the funny thing about goodwill. You can never get rid of it because the more you give, the more you keep getting back, right?

Liam: That’s true. Yeah, open-source has definitely changed my life. I mean a lot of the work that I do is working in open-source technologies and actually writing code that ends up being open-source. It’s one of the pleasures that I have in my life.
 
Charlie: You know speaking in that same spirit of community engagements like that, I know one thing that you were very proud of, rightly so, is last year we had this online event. I know you hosted—or you created, I should say—but you hosted it as well. Tell everybody what it is and maybe about the success of it.
 
Liam: Okay are you referring the Twitter Spaces Event—
 
Charlie: Yes.
 
Liam: That was posted. So really what it was—and it was totally informal. A month prior I made a little landing page and I was like yeah, we’re going to have a bunch of people come onto this Twitter Space and I’ll talk about Twitter Spaces in a moment, but it was just a bunch of people that came on and spoke about what cool stuff they’re doing with IBM i. So you know we had Alan Seiden; King Harrison came on as well. Jesse [Gorzinski] even came on, and you know what was cool about it is that it was informal. It was on my cellular device and we just chatted for a few hours between the four of us on and off. What was really cool about that is how easily accessible it was. So you know we hosted it on Twitter but nobody needed an account to listen and that’s why like the fact that it’s accessible. Now Twitter Spaces is a really, really great piece of technology that I only just saw come out in the last year more publicly, but what it is it’s like a room where you can up to ten speakers and you can have as many listeners as you want. It’s a great space for having open discussion and getting opinions from different people. It’s a really great piece of technology and I think we reached a peak of 200 or so, maybe just over 212, but I loved that it was accessible and it turned out really great. We got some excellent feedback and I really do hope that we can do another one as well. Yeah, that would be excellent if we did.
 
Charlie: I have a feeling that that is going to happen. I know you. I know how much you like to give back and how exciting these events are to you, so I’m sure if that can get pulled off, it will get pulled off for sure. There’s no question in my mind.
 
Liam: Yeah, for sure. I think something that I would like to try this year is while we’ll have kind of pre-organized speakers. I would like to do kind of the panel-type discussion because what you can do is you can invite a listener to speak and they could ask a question. Then we could have the panel answer it you know, and I want to maybe bring that interaction with the listeners in. I think that’s my goal for this year bring that interaction to the event, so yeah.
 
Charlie: Well, I can’t wait to hear. I know it’s going to be a great event the next time you host it, so I’m looking forward to that if and when. Let’s switch gears here and talk about some of your favorite technologies. I know the few times we talk about the technology, you and I, one thing that comes up often is OpenAPI. You know that’s something that comes up quite often. For those who may not exactly know what that is, I mean there was the old term—swagger comes to mind also with OpenAPI—but tell me more about that. You know if I’m a complete newbie, tell me more about OpenAPI and why is it so relevant to you and to anybody who might be getting into this space.
 
Liam: Absolutely. So there are two viewpoints to this. There is the developer viewpoint and also it can be used from a business viewpoint, and really what you can consider it is documentation for how your API should work. So I’ll use a prime example: Just four months ago I was starting with a brand new client and they wanted to build new Node.js APIs. Most of it was for inventory listing and making a purchase so they could actually put in a purchase order through an API. Now before we did any development, I sat down with the front-end team, which was two people, and what we did was we documented everything that they needed from the back end. So of course they needed APIs to get pages of inventory, okay? So that would give them a list—you know, of 20 items at a time, for example—and then there would be another API for getting a specific item which may have more detailed information. Then there’d be another API for placing the order, just as an example. Now what’s cool is I can take the information that they’ve given me before I’ve written any code and I can document how these APIs should look—you know, what are the inputs on the request, what the JSON body needs to look like—and then I can also document what the output is. So then the front-end people know what to expect you know from the API. Again, this is before I’ve done any development. Then what is really nice is I can take that API—that specification that I made, the schema if you will—and I can generate basically an express app, you know from the document. I don’t even have to write any code to get the groundwork done for me based on the documentation that I’ve created and the specification. Now following that I could also use the specification as the API validator. So for example if I’ve built an order API, you know the JSON body may have to include a list of items that they want, the quantity that they also want and maybe a shipping address and things like that, striped information if they’re making a payment. And I can use my specification from within my Node app to validate the request. So if it’s missing a quantity somewhere or it’s missing shipping information, my specification is going to capture it before it even touches my code. So I can actually not only use it for documentation, but I can also use it for validation. That’s why it’s powerful, because it can be used in both ways now and I think that adding that extra layer of validation that the developer doesn’t have to worry about really, really makes life easy for everybody, and I think that that is fantastic. I think making stuff easier for the developers and for the front-end team in one snap is great. And of course it’s great to have documentation too. It’s great to get everyone on the same page before you write any code. OpenAPI is—and I’ve used it for every project now, every one of them if there’s APIs involved—an absolutely fantastic piece of technology.
 
Charlie: So how about we continue this discussion because we talk about APIs and we mention OpenAPI, but then of course the other technology that I know kind of relates into the same discussion is GraphQL, right?

Liam: Yeah, absolutely.
 
Charlie: So that also I think is going to be another new term for many developers who are you know, new to this space. So tell us what GraphQL is. I mean I’m looking on the website right now. The main page says a query language for your API. What does that mean exactly?

Liam: Absolutely. So let’s [provide] an example okay? You have a database and usually what you would do to call that database is you would write an SQL statement. For example you know, you do a select all from departments and then join on the employees and you’d get information about those things. You know you’d write an SQL statement; that’s query language. GraphQL is its own kind of query language in theory. So I can say I want the department’s model and I want the department ID, the department name. I want this, that, and the other from the department, but also I want all of the employees that’s in that department. I write it in a single query. I don’t have to do any joins. It will do all of the joins for me—you know under the hood it does all of the work for you—but it’s really just a different way of accessing the data from your database. And then what’s really nice about GraphQL is the tooling for it is great. So there are GraphQL clients for the front end, there are GraphQL clients for the back end as express integration, and there’s validators for it and it’s really nice. Now in terms of you know, Db2, it can get more complex because there isn’t generally a lot of support for Db2 and there’s a magnitude of reasons why. It’s mostly because you know, each different database has a different version of it. You know SQL the way that they run their queries and so maybe I hope this is okay, but I actually have written a blog post about how you can use GraphQL with Db2. Basically the developer would define the schema of your database in GraphQL and then it lets you use GraphQL queries to get the data out of your database, and the blog post that I’m talking about actually uses the departments and employees example, but it’s just a different way of getting data out of the database really, and it's model-based instead. It’s really, really fantastic. It’s really nice.
 
Charlie: I should point out that if you want to follow Liam, he has a lot of great posts on Twitter and his handle is @notesofbarry. That’s a good handle and I think if you follow that you will find a lot of useful information on there. I also know Liam, you’re a big contributor to GitHub and you put a lot of things on GitHub as well, right?

Liam: Oh yeah, absolutely. So even the GraphQL stuff I was talking about: You know my blog is also hosted on GitHub but the actual example code for GraphQL is also hosted on GitHub, so that’s where you would find it. I believe my handle on that is worksofliam, so not quite in line, but you know everything I do pretty much ends up on GitHub. I have nothing to hide. I am a contractor by trade and as someone who’s in my line of work, you know sharing is caring. You know stuff that I learn again as I said earlier, I love to share and learn more from. I’ve only really benefited from being part of the open-source world really, so lots of stuff that I do ends up on GitHub. Yeah, it’s a really fantastic website. It’s a great tool. It’s great for the community as well, the open-source community. It’s like the de facto place for open-source projects these days you know, so it’s really great piece of work.
 
Charlie: Liam, the final thing I want to talk to you about before we kind of wrap this up is just speaking in general. I know this—again, another passion of yours—speaking in person, I should say, to the community. Getting out there and meeting everybody. It’s important. It’s important for all of us who love to do that to actually do that, and it’s been a rough couple of years obviously not being able to do that. So first of all I will just say if anybody has an opportunity to see Liam in action at a conference wherever that might be, I encourage you to attend one of his sessions because they’re always a lot of fun and he does a lot of live demos. But what do you want to just say to the people who are considering going to a conference maybe or how do you feel when you’re at a conference? I mean I can see what it does to you, it makes you even more excited, but what goes through your head when you get an opportunity to speak in front of a large group of people?

Liam: I mean you can kind of compare it to doing open-source. You know much like open-source I’m there to share information with you and also learn from you. You know while I give a talk and I do a demo of something that I’m working for example, you see something but you might think "huh, I think that’s cool but I know a different way that it could work too," and I could learn from you on that. So while I love to give the experience to teach, it’s also the time for me to connect and learn about you, and you know as someone that is mostly person-focused, it’s a good time for me to just talk and get a general vibe and maybe learn about what other people are working on. That’s the best part for me. You know I love it. Charlie and I met, I think, for the first time in a little while last year in California. We hadn’t seen each other for a little bit, obviously due to Covid, and it was great. I mean we hadn’t seen each other in the longest time and I think it was a very happy feeling. It was fantastic to see friends that you haven’t seen in such a long time and of course in California, it’s a gorgeous place to be. But yeah, I love speaking just to see people. Really that’s the crux, isn’t it a little?

Charlie: A people person.
 
Liam: A people person.
 
Charlie: That’s for sure. Well, I’ll tell you what: Let’s wrap it up there. You know you blink your eyes and 30 minutes goes by so quickly. Isn’t it amazing?

Liam: Oh, blimey yeah.
 
Charlie: Yeah. Liam, what else what can I tell you? It’s always a treat to see you and I can’t wait to see you in person again this year. I think this is going to be the year to do that. I think we are booked at a couple of conferences or hope to be together again so it will nice to see you in person of course, but I just wanted to say thank you for your time of course and thank you for your passion and all you do for the community. I know so many people—you know they speak your name and just what always follows that is just how giving you are and things you put out there. The content you put out there is really amazing. One last question I do want to ask you because a lot of these technology is so new to everybody. What would be your final advice to somebody who is just considering going down this road, thinking of or considering it? Is it a big mountain to climb or is it something that they can just kind of get into fairly easily?

Liam: Yeah. So one, if you are going to do Node.js, you’ve made the right choice. In my opinion, it’s the easiest thing to get started with and there are so many tutorials online for Javascript. There are so many—and typescript is the same. You can even do tutorials in your browser. You know you don’t have to even download VS Code. You can learn Javascript and understand Node.js just from doing interactive tutorials online. I think that’s a great way to get started if you really just want to get your feet wet and see what’s happening. What’s the situation? You can do it in a browser these days, you know. I would recommend that to everybody and of course the next step is getting VS Code and getting Node.js installed locally and having a go, but it’s so easy to get started. Do not be afraid. Yeah, it’s so easy, a couple of clicks away.
 
Charlie: And you have the community to help you.
 
Liam: Absolutely. I mean, I would help. If anyone needs help, please do not hesitate to reach out on Twitter. Send me a DM; we’ll sort it out, love to help. And also, I’d like to just add all those things that you were just saying about me could definitely go both ways. You know you do so much for the community now, and I don’t take that for granted. You carry a lot on your shoulders. It’s a lot of work and you do a great job of it so you know, appreciate you as well.
 
Charlie: Wow. Thank you for that. That was totally unsolicited. I appreciate that. Thank you for those kind words of course. All right. Let’s leave it there. Liam, always a pleasure. I do look forward to seeing you again in person as we said and I just—more importantly, I just look forward to watching you, watching your success in our community. It’s a great asset to all of us. So thank you very much.
 
Liam: Thank you very much for having me, and thanks for the many kind words.
 
Charlie: Sure. All right, everybody. That kind of wraps up our podcast for this month. I look forward to speaking to you again next month. Keep in mind there is always some great things on TechChannel. Make sure you check out what they have to offer. They have a lot of great resources on there and really worth your time. With that, we’ll wrap it up. Thanks very much, everybody. Take care now. Bye bye.