How We Scaled a VB6 App into the Cloud and Added AI

For the readers who may not be familiar with the VB6 abbreviation, it stands for Visual Basic 6. Here is Wiki: Visual Basic is a third-generation event-driven programming language from Microsoft for its Component Object Model (COM) programming model first released in 1991 and declared legacy during 2008.

I used VB6 to program an application for a hotshot delivery service about 15 years back. We have not kept in touch except for friendly hello and good memories.

They were still using this application when somebody pointed out that their business continuity plan could stand some improvement. There was more to do, however. Can we take a legacy app and put it into the cloud while adding AI?

Legacy Architecture

The legacy app is deployed in the client’s office in each of the four different cities. Each office has a server with a SQL Server database and a few workstations connecting to the database over the LAN. Here is the picture of the architecture

 

Meanwhile, my team and I were teaching AWS, AI, and other advanced software technologies as part of the Elephant Scale (you will recognize that our start was in Hadoop). So, we taught others how to apply the best cloud practices, ensure scalability, make your software smart. Now was our chance to prove that we can do what we preach. We wanted to avoid data silos, centralize the app, and make it highly available and scalable.

Here are the possible architectures that we have considered.

 

In option 1, we were imitating a large website to which are dispatchers would be connecting. The connection would have to be with the Microsoft Remote Desktop Protocol (RDP). But the cost of the RDP license was prohibitive. RDP is not designed as a replacement for a website. Besides, we were not sure if it can handle dozens of simultaneous users.

Option 2 felt safe: we would only replace the local database with a cloud-based one. But it was too much of a forklift approach. I would never recommend it to my AWS students. Neither should I use it.

Option 3 did the magic when we found out that you can run a full Windows machine on an AWS micro instance. At $140/year, we could give each dispatcher their own Windows instance in the cloud! Now, that was AWS best practice as well: treat each instance as replaceable, scale up and down according to the need. We could use AWS Autoscaling Group (ASG), run in different availability zones for fault-tolerance, and even configure the ASG to automatically shut down those instances that were not in use lately. All without custom code, but using standard AWS components and best architectural practices. Who could have thought that we can take a VB6 app into the 21st century with the cloud!

Into the Future

Delivery services are already clearly our future. Amazon, Uber, and Lyft showed us why. Delivery services have their own place in this market: they deliver critical blood transfusions to hospitals, they do highly reliable and scheduled operations, and they often serve as the last leg in a complex logistics operation.

Blockchain

Delivery services are ripe for Blockchain implementations similar to Maersk on-going Blockchain logistics transformation. Here is the latest from their implementation done in partnership with IBM.

Oracle Cloud is a convenient place for Blockchain implementations. It places the blockchain deployment with an easy reach of developers. Oracle Cloud has a special place in our development: in order to run the unsupported VB6 environment, we package it into a VirtualBox. But in the modern style of shared development, we maintain this VirtualBox for every developer in the Oracle Cloud.

AI

 

The leading transportation companies are open about their use of AI and give you the tools for your AI implementations. Here is Uber teaching you how to add conversation agents to your delivery service.

Here is Lyft open-sourcing its AI for pricing, locations, estimate time of arrivals, and mapping.

And here is Amazon helping itself and others to use AI to deliver better.

Let’s look at specific improvement areas.

  • Dynamic model-based pricing. Today, people are not surprised by individual pricing and even expect it. Each delivery has its own particular difficulties and by pricing it accordingly, you can maximize the happiness of both the driver and the client.
  • Resource Optimization and Utilization problems. You only have that many drivers and that many cars, so you better use them well. That is exactly what AI Resource Optimization allows.
  • Route Optimization. That was one of the first AI practical problems; the technology for it was developed back in the 1940s and in fact, it was one of the example of military technology opened to the world. Later, AI added much bigger models and faster planning. Just think of how many routes do Uber, Lyft, and Amazon optimize simultaneously!
  • NLP for customer engagement, feedback analysis. This can be done in many ways, either by automating, say, English-to-Spanish translation, or by improving customer interactions with customer service robots. Another very practical use case here is customer complaints about a problem delivery. The customer will usually say something like “I called and told you!” while the driver denies it. With AI, you can store, digitize, and analyze the phone conversations connected to the given order. People do make honest mistakes while having a verifiable record helps to keep things straight.
  • Recommendations and Site Personalization. With a delivery service, customers may have specific preferences. Based on that you can give them recommendations based either on their history or on the history of similar clients.

We add the AI component with our Scaia AI Advisor. We designed it to bring AI to the practical level, where AI is delivered as a service to the subscribing apps.

Real-world Implementation

We have invested a lot of work into the original VB6 application and are not planning to rewrite it. Instead, every new feature goes into the other applications, part of the hotshot delivery suite. Orders can be entered through the web or through a phone app. Optimizations can be deployed to the web-based middleware. So instead of a rewrite, we plan to gradually replace it and allow it to rest.

 
 
 
 
 
 
Mark Kerzner
Written by:

Mark Kerzner

Mark Kerzner is the co-founder of Elephantscale. He is a Trainer, Author(AI, Machine Learning, Spark, Hadoop, NoSQL, Blockchain)

Leave a Reply

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