Continous Deployment and 50% Code Reduction with Java EE at Rakuten.com in Japan 📎
Arshal, could you please briefly introduce yourself?
Hello, my name is Arshal and I am working as a Team manager and Chief Engineer for Rakuten, Inc. I have been mainly developing enterprise solutions for credit card, payment gateways and other financial businesses. I also conduct Java and Java EE industry training every year at Kyushu University and Kyushu Institute of technology for undergraduates and post graduates. In my private life I am happily single and developing software solutions is one my passions. Hiking, poetry, jewelry design, fishing and jet ski water sports are my main hobbies.
What is Rakuten, Inc.?
Rakuten, Inc is a group of companies offering various services across the world, we have e-commerce marketplaces in Europe, Americas and in Asia. Rakuten also offers financial services like banking, credit card, payment services in USA, Europe and Asia region. Rakuten group consists of over 40 businesses and the services offered can be mainly classified in to online retail, banking, credit, content, media, travel, securities, sports and entertainment domains.
How popular is Java EE at Rakuten? Is Java EE also popular in Japan?
Rakuten gets huge traffic per day and to cope up with that we need a durable standardized system. Java EE is widely used in Rakuten for the backend and the service logic implementations in almost all services we have. We even became corporate JCP members from last year and are taking our first steps towards contributing to Java community. Popularity of Java EE in Japan has been improving a lot in last couple of years, the point of change was around launch of Java EE 6 where for the first time proper Japanese translated book on Java EE authored by @agoncal was made available. Many major companies are already in transition phase from legacy systems to open standard Java systems. Due to this the demand for Java engineers in Japan is on the rise.
You migrated your code base to Java EE. How much code could you delete?
We migrated our whole credit card enterprise solution from legacy system to Java EE 6 in 2012 and it took almost an year to complete it safely. Code size itself was reduced to 50% of original but the main advantage we admire is ability to do continuous deployment (CD). Service industry enterprise applications are expanded, modified, altered regularly, we do production releases almost every working day -- every day a new functionality gets added to service and this has been possible only because of DRY software development which we could achieve best with Java EE. We stick to framework code offered by Java EE and do customization on framework code level only if it is absolutely necessary as business requirement. We also restrict using third party libraries as much as possible removing external dependencies so to keep our code clean and future proof. Currently we have moved our code to Java EE 7 since the release of supported application server and the performance has been tremendously improved.
Which Java EE APIs are you using in your project?
We are using almost all Java EE APIs, some of the worthy mentions are EJB, JSF, CDI, JAX-WS, JAX-RS, JMS, JSON Processing, JTA, Persistence API, Bean validation and WebSockets. Enhanced simplification has been made on HTML5 since Java EE 7 through MVC support, Websockets and JSON. Java EE api for Websockets compliant with JSR356 has been very helpful in developing payment services since it is independent of vendor WebSocket implementation it allows far better choices of libraries to meet business requirements. We use JAX-RS and JAX-WS as server end point for our smartphone native apps and new features added in 2.0 enable more easier and more scalable application development. Bean validation has made data check easier and keeps data integrity with field and method level constraints. JBatch is easy to implement but it is difficult to manage sequential jobs where all jobs in sequence are mutually non-exclusive. JSF 2.2 flow definition and flow scope made it easier to develop multi page forms which couldn't be achieved flawlessly in conversation scope. CDI support made it easier and clearer to inject beans rather than messing around with ManagedProperty. Improvised CDI with order for interceptors and veto capability for POJO packages makes it easier to run old code with new side by side withoout any problem.
Which application servers, tools and IDEs are you using?
On production we use multiple application servers for each sub-service. Main application servers we use are Weblogic, Glassfish and Interstage (Fujitsu). We stick to single IDE and that is Netbeans, inherent support to latest Java standards is the reason for it. For source control and documentation we use git and atlassian tools. For automated code analysis we use sonar and veracode, for build and release management we use jenkins, for automated testing we use arquillian, JUnit and Jmockit, test rails serves as test management tool. We also use Jmeter to run our performance tests.
How important is the Java EE standard to you? Is your code dependent on application server specific features?
Java EE standard plays a key role in our softwares, the main goal of migration from legacy system to Java EE systems was to make it vendor independent and Java EE standards play a main role. We have no vendor specific code dependencies, funny fact is during migration we developed and did unit test on glassfish server(since weblogic support for Java EE 6 was not available yet) and deployed that code on weblogic in staging and production environments, so its have been our internal rule of development from day1 to not to use any non-standardized external libraries and also not to use any feature which can go erratic depending on server. Even if there was a requirement which requires use of vendor specific features, we made wrappers around them so that our code can work seamlessly even if application server was changed.
Is Java EE productive? What is your opinion?
Yes, it is. The main reason is for one to start using Java EE, all he needs to know is Java basics and find a Java EE annotation cheat sheet. Java EE has a very detailed api documentation and a quick read through this documentation is sufficient enough to build your first web app in an hour. Every thing related to framework is annotation based and default annotation setting are plausible enough to operate a simple web application. Programmer needs to concentrate only on business logic, boiler plate code is covered by APIs, configuration is done by annotations and mostly optional. Java EE APIs + a small guideline on when and how not to use Java EE APIs can give greater results, thanks to that we our software quality has improved, the frequency of bugs discovered after release has been significantly reduced too. Even with unpredictable in-process changes our software delivery has been on schedule.
Is you company hiring Java EE developers?
YES, a lot.
Any links you would like to share with us?
For more info on Rakuten, Inc. https://global.rakuten.com/corp/worldwide/ Contact arshal on www.arshal.org
Arshal, thank you for the interview!