Code Generation as a Service

PACS_flow_diagram

It’s been a while since my last post, as I’ve been busy doing university work and figuring out a job for after my final year finishes this summer. Since April, I have been working on my summer project for my Masters degree. This is a bigger, longer project like PascalDE from my 3rd year, and will make up 55% of my final grade.

My project is in the field of model-driven engineering. This is an area of computer science that uses abstract models to design and develop a system before implementing it. This helps reduce accidental complexity. A UML diagram is an example of a model. Code generation is a transformation from models to text. The text could be code that serves as a basis to develop your application on after designing it with models. It could also be used for statistics or viewing models visually with HTML.

Currently, if you practice model-driven engineering, and you design models of your system then generate code from them to speed up the development process, you have to have all the tools available locally. If you have a very large model to generate from, this could take a lot of time to run and slow your productivity. If you have a team or a client, and develop generators to use with their models, they potentially have to acquire the generator software and learn how to use it.

My project cuts out the majority of the process from the term “input-process-output”, helping solve the problems mentioned above. The task is to create a web service that users can publish code generators to. Generators are publicly available so anyone can use them (think npm). A user can then upload their own models to use on a generator and in return receive the generated output. Essentially, the service offloads the generator’s work to the cloud, instead of your local machine.

The project is being implemented as a Java RESTful API, so anyone could write a client for it. The programming is coming along nicely, though I’m not too keen on writing the big report at the end.