Me and my escape from… Java

Tram Ho

Run now, before… your computer gets hot (because running Netbeans with Eclipse)

An obsession has always followed the poor IT guy until now – build Java app .

First things first

Yes, it’s Minh Monmen again in a story about the arduous journey of escaping from the world’s most popular Old Language – JAVA .

As paradoxical as it sounds, it feels like I’m trying to run away from English even though it’s an international language and a ladder to heaven for all extroverts. But human preferences are inherently strange, and dislikes are even more strange. Right from the first contact, I have had a very unsuitable feeling for Java. This is gradually accumulated in the process of learning and even when going to work, I always want to avoid anything related to Java.

But life is very ironic, but love is like a dog, the more you run, the more it chases you. The more I try to avoid Java, the more it shows up in my work. Let’s see it together.

From the first days of acquaintance

In 2015…

I, a brand new bachelor from Vietnam’s leading economic university – NEU, entered Aptech with a newly purchased 18-inch laptop with the following configuration:

  • Intel Core i5 4200H (H chip for sure)
  • 4GB RAM (in 2015 that was amazing)
  • 1TB hard drive full of movies one eight and one no eight (1080p)

After finishing the first semester of HTML, I went to work as an intern PHP because I couldn’t grind my ass in school for another 3 semesters without doing something useful in life. And while going to work and school, Java hit my life like a rock. Starting from Basic Java to Advanced Java, from Java console to Java Web, and even Java GUI for apps, all the curriculum at that time surrounded me with Java with the goal of producing good Java candidates. for leading technology corporations (because they all use Java).

At that time, I was also quite excited because it was this explicit language, the IDE suggested this, learn 1 and know how to do 10 (both web, app and console). But my interest in this language only lasted a few months until…

100% CPU

My brother started to chirp because of the whirring fan noises a few times when running the app. Before that, I was still proud because the machine I bought was also in the high configuration form, but IDE and Java it ate up. My application started to slow down every time I had to build or run debug and a web developer like me at that time began to understand why in my company mobile app guys (and specifically android) often had time. Reading comics =)

It’s not okay, I’m usually a person who is in a hurry and can’t wait patiently for her brand new computer to hum while reading comic books. And of course, I’m silently kicking Java out of my working languages.

Until the days pass each other

I met Java again on a sunny and windy afternoon, when I was allowed to visit a company also working in the banking and finance sector. Specifically, the company specializes in software outsourcing for banks to use. Of course, I am not allowed to sit in and look at your code, but according to my research and the sharing from the CTO, for the first time I have a rather specific view of how banks are doing. how to use their god software.

The first impression is close . Code closes, processes close, people close, everything closes. Of course it’s a job specificity. But that closure it exudes not only from the completely closed source code, but also from the extremely formal style of dress, the mindset of making products that is not much towards change and the people who are always just doing the same thing. something that repeats itself until old age.

Well, my impression of the Java guys at that time was that the skilled workers were afraid to step out of their own comfort zone, living a closed, confidential life and not communicating with the outside world. .

It’s not okay, I’m a person who loves to share, loves to learn new things and quickly gets bored with the same things over and over again. Also, I don’t like formal clothes anymore. So after that, I also made a secret promise to myself: Well, avoid all the companies with a closed mindset like banks. And in general, banks are associated with Java, so they also avoid Java.

Actually, digital transformation banks look really good now, but that’s just my thinking in 2017-2018, before the digital transformation wave took place. At that time, the technology of the banks was almost closed and their investment in the technology team was not as strong as it is now. If anyone thinks like me right now, think again =)))))

And then the day we meet again

By 2019, I was reunited with Java many more times. Although I tried to avoid it from the first days of work like having to build a data analytic system based on node, php but decided not to touch java software, but at this point, it can’t be avoided anymore. .

At this point I also discovered: All the tools for Big Data are mostly coded in Java or derived from Java. That is a very strong slap on young people who have prejudice against closed languages ​​when most of those tools are open source =)))

Oh my friend, stepping into the Big Data world without knowing Java is like coming to Vietnam without eating pho. When I was approached with SMACK stack, although I tried really hard to see if I could use another language to code instead of Java like Scala or python, but eventually had to give up. Although there are many products that support multiple languages, in the end Java is still almost native. The same Java writing company can work with any product while Scala or Python have many limitations. (I haven’t even mentioned NodeJS or PHP yet).

SMACK stack is a stack including Spark, Mesos, Akka, Cassandra, Kafka dedicated to building big data processing systems. This stack is tools for frameworks, orchestrators, streaming platforms, and even databases.

Even now I can dodge the code, I do DevOps. That is, the person who installs and configures those tools. So I’m surrounded by application properties and then JVM configuration. It is true that running can’t escape the sun.

2020 is when I step into a large, multinational and… all Java corporation. Ahihi not surprised yet. I am one of four people who have worked as Python on a Java backend team of a few dozen people and probably the only one who has worked on Golang for the project.

Even though I work in Golang, I cannot avoid the fate of using Java products when I have to work with Kafka and Apache Camel. And the series of headaches because of the Java config continues…

Apache Camel is a framework for integrating the systems I use with Kafka to backup and restore Kafka partitions to AWS S3. It has the feature of Just work, that is, it works without any additional code, but it is extremely laborious in configuring it to work.

Well, life is ironic to me. A brother in the company also told me: “In my company, it’s all Java, so Java guys have a lot of land to act, and can hold a lot of big projects. But my brothers are just a minority…”.

At that time, I didn’t know whether to be happy or sad because I didn’t follow Java anymore. I’m happy because I’m a pioneer, sad because I’m a loner. But in my mind, I also accepted that: Perhaps during my dev life, there will still be a shadow of Java.

I like Docker, but Java doesn’t… no

I thought my love affair with Java would be smooth when I accepted Java as an indispensable part of life. But no, just living together for a few days, I was shocked to realize one fact: Java doesn’t like Docker like I do.

This is a distinction that is hard to reconcile. I like Docker, I like containers and cloud applications with a pretty small footprint like Golang’s. But Java is different, Java loves Bare Metal and VM (Virtual Machine), more optimized for VM. Java applications (old) also come with a heavy virtual machine environment to run.

I still remember when a guy working for a rather large telecommunications corporation said to me: “My department is going digital, and I really like to go to Kubernetes and the container that Docker image builds, weighs 10 and 20GB , and then just runs. If you have a single instance, the JVM is fully configurable to use 16 with 32GB of RAM. Using kubernetes, each container is like a giant VPS virtual machine. So what to do?

Of course, I have no choice but to introduce you to another lover that is more suitable for Java than using Openstack to provision the VM, but Containers do nothing more.

One piece of advice for you: With the legacy app in Java and still doing fine on the VM, don’t try to break their love to make Java run under the container. Whether the love is right or wrong, the one who suffers is still you (operators).

Of course, now Java has changed a lot to better fit the modern container architecture, even many Java applications have abandoned the JVM to run on other, lighter runtime environments. However, the long build and heavy image are still the weak points of Java when packaging with Docker images that you will have to pay attention to.

Finally see you again

Java is an archaic language and it certainly doesn’t give the impression of love at first sight like golang, python or nodejs. Because it is ancient, it has both a glorious past and a lot of prejudices about a closed mindset. But there’s no denying that a developer’s life without Java is an incomparable loss.

What if I don’t have Studio 3T I use to access mongodb every day? Without Apache Kafka, what would the modern generation of Micro-services look like? Without Cassandra, Spark or countless other terrible tools of the enterprise world, what would Big Data be like?

So from someone who has prejudices with Java, I also advise you not to follow me. Too bad you can’t avoid Java. Equip yourself with at least the knowledge of how Java runs, how is it configured, what is the JVM,…

The last time I dodged a Java product was building a calling system. Instead of using jitsi (built in java), I switched to another opensource product using Golang. I have to make a lot of trade-offs when the other product is still in beta, not as stable as jitsi. However the future of the other product is very promising and I take the risk now for it.

Java of the new century also has a very promising game, Reactive Programming as the foundation for non-blocking applications with much better responsiveness and much better scaling than traditional blocking applications. This is a very formidable transformation of such a so-called archaic language.

Well, it’s too long to write, friends and see you next time.

P/s: I still hate Java because the build process is so long that the app is still heavy. Especially when you have to work with docker, the Java app is full of large capacity and then it starts to slow like a turtle. Still not suitable for someone with a compact body like me.

Share the news now

Source : Viblo