Moving decisioning logic from run-time to build-time

Today’s post by Edoardo Vacchi stresses an important trend in the programming landscape: cloud-based applications (microservices) should be small, super-efficient, and quick to start, that brings us back to code generation. “Moving processing out of your run-time and into build-time, is a conceptually simple but extremely effective way to make your applications lighter.” Link

“This was sometimes received with little enthusiasm: the idea itself is in fact far from new. Yet, it is key to a lot of the most interesting recent innovations in the Java ecosystem.

For better or worst, run-time reflection is a peculiarity of the Java ecosystem. However, today a lot of modern Java frameworks are embracing code generation; which is ironic, because, as far as I know, run-time reflection was often embraced as a reaction to slow code generation procedures.

In Kogito, we are using code generation to pre-process and compile so-called “business assets” into executable code. In the following we will explore the history and the motivations for embracing code generation instead of run-time reflection, and how we plan to bring our approach to codegen forward, by taking hints from compiler design.


This entry was posted in Architecture, Java, Microservices. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s