Wednesday, April 24, 2024
HomeJavaHow to decide on the goal for a migration from RPG -...

How to decide on the goal for a migration from RPG – Java Code Geeks


On this article, we’ll mirror on how to decide on the goal for a migration from RPG. RPG is a programming language that has been efficiently used for many years to create numerous software program. These days there are numerous very massive and beneficial functions written in RPG, and their house owners are questioning: ought to we transfer to a different language?

There are a number of good causes to contemplate this: particularly the shortage of RPG builders and the curiosity in transferring to the cloud. But, this isn’t a straightforward option to make, so on this article, we’ll examine the issue from totally different views and share our findings. Hopefully, it will give concrete arguments and steerage to the numerous contemplating the way to maintain their software program beneficial for the approaching a long time.

Why migrate from RPG to a different programming language?

We’ve already listed within the introduction the 2 extra widespread causes for contemplating migrating from RPG to a different language: the shortage of RPG builders and the curiosity in transferring to the cloud. Let’s have a look at these two causes individually.

The shortage of RPG builders. If discovering builders is all the time troublesome, discovering builders who know RPG is extraordinarily troublesome, as everybody making an attempt to rent them would have seen. There are approach fewer RPG builders than, let’s say Javascript or Python builders, however in addition they are usually older. Whereas expertise is a good high quality for builders, this makes us assume that 5 years from now a few of them could have retired, and discovering RPG builders will probably be even more durable. To get some knowledge, in line with the TIOBE index, RPG is the fortieth hottest language. Searching for RPG builders on LinkedIn we are able to discover 73,000 of them in the complete world. For comparability, we are able to discover a number of thousands and thousands of Python builders or JavaScript builders. In different phrases, RPG builders are over 100 instances rarer than Python or JavaScript builders, and the development appears to be towards RPG, with the typical age of RPG builders being excessive.

RPG doesn’t run on the cloud. If we have a look at AWS, Azure, and Google Cloud, none of them helps natively RPG functions. Which means RPG code, as-is, can’t be simply run on the cloud. In different phrases, by sticking to RPG one has to personal, function and preserve their very own {hardware}. Scalability is harder because it requires shopping for particular person IBM i sequence machines. The issue is once you would want one machine and a half, or once you would want just a few extra machines however only for a brief time period. With out the cloud, you shouldn’t have entry to that flexibility.

There are extra causes for eager to migrate from RPG, just like the uncertainty about the way forward for the IBM i Platform, however we predict it is sensible to deal with these two.

How one can migrate your codebase? Handbook vs Automated Migration

Most corporations assume that migrating from RPG will be performed solely by rewriting the code into one other language, line by line. For big functions, that is merely unsustainable, and due to this fact many corporations don’t even look into migrating to a different language.

We predict extra corporations ought to pay attention to the truth that it’s as an alternative doable to carry out automated or semi-automatic migrations to translate the enterprise logic expressed in RPG into one other language. This removes the opportunity of human errors and significantly reduces the hassle wanted, bringing down the time vital for the migration and the prices. 

Automated migrations will be carried out through the use of a transpiler. We find out about this subject as we have now written a number of transpilers, together with transpilers from RPG to different programming languages. If you wish to study extra about how we design transpilers yow will discover extra on this article: How one can write a transpiler.

What’s written in RPG?

RPG has been used to write down largely ERP or enterprise software program. In line with our examine, two-thirds of the functions written in RPG belong to this class.

That is one thing to keep in mind when contemplating the language emigrate to: it must be a language properly suited to writing ERP software program.

RPG can be generally used to write down monetary software program, with roughly 30% of RPG functions falling on this class.

What traits ought to a candidate programming language have?

When selecting a very good candidate language for migrating away from RPG we must always, to begin with, think about a language that enables us to resolve the 2 primary challenges we have now with RPG: lack of builders and lack of assist for deployment within the cloud.

Let’s see which languages we are able to think about based mostly on these two elements.

Recognition

If the rationale for migrating from RPG is the shortage of builders, we must always think about solely languages which have not less than 10 instances the variety of RPG builders and languages that are ideally gaining recognition, in order that the development signifies that we can discover builders accustomed to that language within the midterm.

To search out standard programming languages we proceeded on this approach:

  1. We to begin with compiled an inventory of candidates. To do that we checked out a number of assets, together with the TIOBE index
  2. We then excluded the languages which had been clearly not suited to the duty as they weren’t general-purpose languages (for instance, we excluded SQL, HTML, CSS).
  3. Lastly we estimated what number of builders had been accustomed to that language. To do this we used numerous sources: from LinkedIn to surveys and articles. Assessing the variety of builders who’re accustomed to a sure programming language could be very troublesome, however for our wants, it’s ample to get the precise order of magnitude, and that’s a lot simpler.

The results of this course of is the next desk:

  Hundreds of thousands of builders Not less than 10 instances extra builders than RPG?
Python 6.0-6.6 Sure
C 2.4-2.5 Sure
Java 4.1-6.0 Sure
C++ 2.8-3.1 Sure
C# 2.9-3.5 Sure
Visible Fundamental 0.5-0.6 No
Javascript 7.7-8.5 Sure
Go 1.4-2.4 Sure
Ruby 0.6-0.8 No
Rust 1.0-1.1 No
Swift 0.6-0.9 No
RPG 0.06 – 0.08 No 😀

Capability to run on the cloud

The second facet to contemplate is which languages can “run within the cloud”. To do that we appeared into which languages are supported by the three primary cloud suppliers: AWS, Azure, and Google Cloud. We then picked the languages that are supported by not less than two cloud suppliers, as this offers us some reassurance that not less than one main supplier could provide assist within the mid-term interval. I.e., even when one supplier eliminated assist, we’ll nonetheless be left with not less than one other supplier.

That is the end result we bought:

  AWS Azure Google Cloud Supported by not less than 2 cloud suppliers
Python Sure Sure Sure Sure
C Sure No No No
Java Sure Sure Sure Sure
C++ Sure No No No
C# Sure Sure No Sure
Visible Fundamental Sure Sure No Sure
Javascript Sure Sure Sure Sure
Go Sure No Sure Sure
Kotlin Sure Sure Sure Sure
Ruby Sure No Sure Sure
Rust Sure No No No
Swift Sure No No No

Which candidates are price contemplating as a substitute for RPG?

Based mostly on what we have now seen, let’s see which languages are each standard and have sustainable assist for the foremost cloud suppliers.

Right here there are our outcomes:

  Fashionable Cloud assist Price contemplating?
Python Sure Sure Sure
C Sure No No
Java Sure Sure Sure
C++ Sure No No
C# Sure Sure Sure
Visible Fundamental No Sure No
Javascript Sure Sure Sure
Go Sure Sure Sure
Kotlin No Sure No
Ruby No Sure No
Rust No No No
Swift No No No
RPG No No No 🙂

So these are the languages that we consider it is sensible to contemplate when migrating away from RPG:

Within the subsequent part we’ll focus on every of those languages individually.

How one can choose the precise goal language?

We’ve seen that there are 5 general-purpose programming languages which can be utilized by thousands and thousands of builders and supported by cloud companies suppliers. This nonetheless doesn’t inform us something about them being a very good match for changing particularly RPG. That is what we’re going to dive into on this part.

Python

The Python language has a vibrant neighborhood, and, regardless of being over 30 years previous, it’s rising in recognition.

What are a few of its robust factors? 

Initially, it’s fairly straightforward to study. We predict this particularly a very good issue for it for use as a substitute for RPG. The reason being that many RPG builders will be thought-about good analysts who additionally double as builders. That is to say that their area information, that’s, their means to grasp necessities and supply enterprise options, is commonly extra essential than their information of the newest programming paradigm. For this type of person, Python could be an excellent match. We count on people who find themselves at this time defining enterprise logic for his or her ERP written in RPG to want Python with respect to the alternate options on this checklist. 

A second benefit of Python is the speedy improvement and good productiveness that comes from it. That is significantly helpful when working in shut contact with purchasers and having the necessity to prototype options shortly to shortly acquire suggestions from the purchasers. Once more, an excellent match for builders writing enterprise logic inside ERP techniques.

As a testomony to the great match of Python for writing ERP software program, we are able to level to present ERP platforms being written in Python, notably Odoo.

A weak spot of Python is as an alternative absolute efficiency. Normally, packages written in Python usually are not as environment friendly as packages written in Java or C#. That mentioned, this downside will be circumvented by way of the adoption of acceptable C extensions, and on this approach, libraries like Numpy enable us to acquire good efficiency additionally in Python.

Java

Java is a really steady language, created in 1995, and utilized by thousands and thousands of builders. It has a really massive ecosystem: there are numerous totally different nice IDEs for Java, and an unimaginable quantity of open-source libraries and frameworks. All of those traits make Java a really stable and dependable selection.

Java has arguably been the first language for writing enterprise functions within the final a long time. It’s a language that helps stop errors and gives good efficiency. Late innovation, like GraalVM and Quarkus, permits to make Java even quicker.

Normally, we’d counsel transferring from RPG to Java if you’re writing functions within the finance area, the place catching errors and having good efficiency will be significantly essential. In that area the necessity for speedy prototyping can’t be as essential, so the truth that Java requires extra “ceremony” for writing functions in comparison with Python wouldn’t be a hurdle.

C#

C# is arguably a really well-designed language, which has discovered from Java and improved upon it. It has additionally been a language that advanced extra quickly than Java, till lately and the result’s sensible. C# has additionally a very good ecosystem. It might not have as many libraries as Python, Java, or Javascript, however high quality libraries and frameworks can be found, and the ecosystem appears steady.

C# will not be a language on the rise, however at this stage, there are undoubtedly many younger builders studying it.

In comparison with different languages C# has historically been related to at least one specific operative system: Home windows. This has modified in the previous couple of years. 

A platform that demonstrates the ERP options which will be written with C# is Microsoft Dynamics 365 Enterprise Central (previously Microsoft Dynamics NAV).

Regardless of its benefits, in all probability in lots of circumstances, Java could be a better option than C#, except your group is particularly oriented to the Home windows OS, or different Microsoft options, or if in case you have already numerous C# builders in-house. If that’s your state of affairs, you possibly can transfer from RPG to C# confidently. 

Javascript

Javascript might be the most well-liked programming language on the earth. One other big benefit of Javascript is the unimaginable variety of libraries out there.

One other essential benefit is that, if builders study Javascript to write down what you are promoting logic, they are going to be capable to use the identical language additionally to write down internet functions that will act as a frontend. For corporations with very small improvement groups, this can be a giant benefit, whereas it could possibly be much less related for bigger organizations we could have totally different groups for writing the enterprise logic and the frontend.

The principle disadvantages of Javascript are:

  1. The instability of the ecosystem: new constructing instruments and frameworks emerge and are deserted, and the perfect practices differ shortly. This isn’t a perfect setting for corporations on the lookout for stability. The businesses that at this time are contemplating transferring from RPG are sometimes favoring stability over being consistently on the sting of latest improvements.
  2. The language will not be designed with solidity in thoughts, however extra for fast prototyping and for constructing functions the place errors have restricted penalties. In different phrases, if a button doesn’t show in the precise place it isn’t a giant deal, whereas if an bill can’t be generated that will be a difficulty.
  3. Javascript will not be designed for parallel computations and enormous calculations. This may make it a horrible implementation language for giant batch jobs at the moment being executed on the IBM i Sequence.

All in all, we consider that the disadvantages make Javascript not a very good match for changing RPG. It may make sense to contemplate it for small organizations who would respect how straightforward it’s to recruit builders (and presumably additionally builders on the lookout for decrease salaries) and to rent just a few builders who may each write the enterprise logic and the frontend. 

Go

Go is a language with rising recognition, and utilized by numerous builders, particularly in Asia.

Go is a system language, sometimes used to write down environment friendly code with excessive parallelism. We didn’t discover many examples of enterprise software program being written utilizing Go. Go can be a slightly low-level programming language.

Go doesn’t appear to have such a powerful ecosystem as the opposite languages thought-about, and we can not discover a cause to advocate migrating from RPG to Go. We consider that, of the candidates we thought-about, Go could be the worst selection usually.

What to do subsequent?

In case you are contemplating migrating from RPG to a different language, we hope that the data offered was helpful to you. We’d love to listen to your suggestions.

At this stage, you might be able to make a selection and resolve emigrate from RPG to Python or to Java. In that case, nice! Chances are you’ll be excited about studying how we sometimes plan for language migrations. If that’s the case you might need to learn this text: Audit & Evaluation for Language Migration Venture.

If in case you have restricted the selection to a couple candidates and also you want to focus on the alternate options with us, be at liberty to succeed in us and we’ll assist you attain a call.

Abstract

On this article we have now seen to which language it is sensible emigrate our RPG codebases. We’ve thought-about the principle causes for migrating away from RPG (lack of builders and cloud assist) and based mostly on that we recognized the 5 greatest candidates for changing RPG: Python, Java, C#, Javascript, and Go.

We then checked out every of them and we are able to conclude that usually Java or Python could be the perfect selections. In some particular circumstances additionally C# may make sense, whereas Javascript and Go are sometimes not your best option, except there are very particular causes.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments