Microservices Annotator Plugin
Learn about a small IDE plugin that annotates any important places in your codebase and will make your microservices code easier to read and navigate.
Join the DZone community and get the full member experience.Join For Free
Writing microservices has never been easy and does not become easier with growing codebases. All the complexity strives from tons of interactions between the moving parts of your applications.
And then we had this year's holidays and I had enough free time to think about it. Many complex measures can be used to make the code of microservices more readable, numerous expressive APIs, modern languages, we already use all of these, but the situation does not get better.
Finally, I've found a stupid simple approach to simplify the reading of code — just show a couple of icons for the most dangerous places where services interact with file systems, networks, make database queries, etc. And wow! It finally makes the code easier to read for me; I clearly see those important interaction points where things may go wrong.
Please welcome, the result of my Christmas holidays: Microservices Annotator plugin for IntelliJ IDEA. Because what else do developers from the IntelliJ IDEA team do on holidays — of course, they do plugins for IntelliJ IDEA!
In a nutshell, it just shows line markers for method calls in Java and Kotlin code where you call some well-known API methods, such as Spring Data or Spring Feign Client calls.
But that is just the tip of the iceberg. I know for sure, people use tons of custom APIs and not only OSS things like Spring Framework. That's why this plugin also enables you to mark any method in your codebase as some meaningful interaction point.
There are many interaction types supported:
Then the plugin just remembers your method signature in the project settings and you will be able to share the
.idea/microserviceCalls.xml file with your colleagues. Also, if you try to annotate some API from a known public library, such as code inside
org.springframework package, this usage will be reported to our server so this setting can be distributed to all users of the plugin after moderation. You can check APIs that have been recently approved on https://msa.strangeway.org/.
And this is a community-driven project, so all the data of marked public APIs are available on Github.
Finally, it is just that simple for you:
Please try and give us some feedback!
Would be great to hear not only positive feedback but also some criticism of this approach, maybe some better options exist. What do you think?
Opinions expressed by DZone contributors are their own.