An update on the Stock Trader cloud-native application

John Alcorn
AI+ Enterprise Engineering
5 min readDec 7, 2021

2021 was an eventful year

It’s been a while since I’ve written an article here about the cloud-native application known as the IBM Stock Trader. The world has endured a global pandemic, and as a result, the move to the cloud has accelerated, as employees have been forced to work from home, away from on-premises hardware. During that time, I co-authored a book on MicroProfile 4.1 (https://www.amazon.com/Practical-Cloud-Native-Java-Development-MicroProfile/dp/1801078807/), which uses the IBM Stock Trader application throughout as its example. I also rewrote its operator to leverage the Operator Lifecycle Management (OLM) framework, so it could integrate with OperatorHub (stay tuned for an article about that topic). And IBM split in two, spinning off its roughly 90,000 employees in its Global Technology Services (GTS) division into its own separate company named Kyndryl.

The move to Kyndryl

After 28 years with IBM, I find myself, along with many of my former colleagues, among that group that moved to Kyndryl. We now call ourselves the Cloud Journey Optimization Team, and we remain focused on helping customers migrate their applications and data to the cloud — though now that includes additional clouds beyond IBM Cloud, which we are eagerly learning about, including AWS, Azure, and GCP. As a result, we have been getting our microservices-based application running in these other clouds, which has been an interesting journey into how truly compatible things are across different Kubernetes distributions. After this (re-)introduction, stay tuned for a series of articles soon about that compatibility experience.

Kyndryl swag!

The first thing we had to decide was whether to rename the GitHub org for the application. Back in the earliest days (in 2017, when it was just three microservices), it was just called StockTrader, when we were using IBM’s GitHub Enterprise. But when we decided to open-source it and move it to public GitHub, we found that name was already in use by someone, so we put an “IBM” prefix on it. We discussed whether we should rename it to KyndrylStockTrader, or to something generic like CloudNativeStockTrader. But in the end, we decided to keep the original org name, so as not to break links people already had saved to it, and to files in its various repositories. So now, the “IBM” part of the name shows its original heritage, even though it is now primarily maintained by Kyndryl (though some IBMers are still opening issues and submitting PRs — as everyone is always welcome and encouraged to do!).

The org-level readme

I did recently figure out how to make an org-level readme; the net is you make a public repo under the org named “.github”, and put the file there named profile/README.md. So now if you visit https://github.com/IBMStockTrader, you’ll see more than just a list of repositories. Note that the readme can (and does) contain images, but they need to have their paths fully qualified; I couldn’t get relative paths to work.

The new org-level readme for the Stock Trader application

Embracing Gitter for communications

Splitting from IBM meant we needed a new way to communicate, as there are both people newly in Kyndryl and people remaining in IBM that have a lot invested in this application and who need to stay up to date on changes. In the past, we used an internal Slack channel, but as separate companies now (who can’t see each other’s Slack servers), we have moved to using Gitter to communicate (much like how the MicroProfile community communicates across companies via Gitter, in a public/open-source manner). So we created https://gitter.im/IBMStockTrader/community, and have ongoing discussions there, that all are welcome to sign up and join in on.

Gitter community for Stock Trader

Liberty-related changes

I’ve also made a few recent decisions about Stock Trader that are worth mentioning. For one, I moved from the “kernel-slim” to the “full” images of Open Liberty, to improve pipeline build times (note we have a GitHub Actions pipeline for each microservice now, that automatically kicks in whenever code is committed, that builds and pushes the image to the appropriate subdirectory of quay.io/ibmstocktrader, and a stocktrader-gitops repo that has a CR yaml that gets auto-applied to a configured cluster whenever such a commit occurs). It was taking too long to have to start from just the Liberty kernel and then have it pull down the extra features needed by each microservice during the docker build (in the “features.sh” script run in the Dockerfile), and then have it push those extra layers you just produced up to the image registry (especially if you had a slow internet connection). Shaving a minute or so off of the devOps pipeline build/deploy was a worthwhile change to improve productivity during iterative dev/test.

I also decided to back off from always being on the bleeding edge of Open Liberty builds, moving from their monthly builds to their Long Term Service (LTS) builds, which are the quarterly ones ending in a multiple of 3; so I just moved from 21.0.0.9 to 21.0.0.12, to ensure any given build of one of my microservices is built atop a Liberty image that will remain supported for some time. So at the moment, most of my microservices are using docker.io/openliberty/open-liberty:21.0.0.12-full-java11-openj9-ubi as their starting point image. And the Stock Trader application runs like usual, though I did update the footer image to get a Kyndryl logo added, and to add usage of the Kyndryl ticker symbol (KD) in its Looper performance/stress tests.

Stock Trader running in AWS

Summary

OK, that was the news for 2021 with Stock Trader. Stay tuned for a series of articles that will go into detail on what we experienced moving the application from IBM Cloud to the other major cloud vendors. And as always, feel free to reach out to discuss things further, either on Twitter (I’m @jwalcorn), on Gitter, as issues or PRs on GitHub, or via old-fashioned e-mail (I’m now John.Alcorn@kyndryl.com). Thanks for your time, and for any feedback on how to improve the application going forward!

--

--

John Alcorn
AI+ Enterprise Engineering

Member of the Cloud Journey Optimization Team at Kyndryl. Usually busy writing/testing code, or teaching others what I’ve learned.