this post was submitted on 30 Apr 2024
16 points (90.0% liked)

Programming

17351 readers
355 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Let's say I had a few microservices in different repositories and they communicated over HTTP using JSON. Some services are triggered directly by other microservices, but others can be triggered by events like a timer going off, a file being dropped into a bucket, a firewall rule blocking X amount of packets and hitting a threshold, etc.

Is there a way to document the microservices together in one holistic view? Maybe, how do you visualise the data, its schema (fields, types, ...), and its flow between the microservices?


Bonus (optional) question: Is there a way to handle schema updates? For example generate code from the documentation that triggers a CI build in affected repos to ensure it still works with the updates.

Anti Commercial-AI license

you are viewing a single comment's thread
view the rest of the comments
[–] onlinepersona@programming.dev 1 points 6 months ago (2 children)
[–] spacedogroy@feddit.uk 2 points 6 months ago* (last edited 6 months ago) (1 children)

More or less. Either Excalidraw for your quick and dirty diagrams or I've used PlantUML + C4 Plug-in for your larger, more long lived diagrams with some success.

[–] senkora@lemmy.zip 1 points 6 months ago

I just gave PlantUML + the C4 Plugin a try and generally liked it, thank you for the rec!

It seems like a good tool although it inherits all the joys and pains of automatic graph layout.

I think I’ll keep it in my arsenal for detailed diagrams that can handle being a little aesthetically wonky.

I hadn’t heard of C4 before and it seems like a solid idea.

[–] RonSijm@programming.dev 1 points 6 months ago

I manually redraw my service architecture because I can create higher quality documentation than when trying to auto-generate it.

But you can get a baseline depending on which Cloud you use. For example, in AWS you can use workload discovery - that generates a system overview.

Bonus (optional) question: Is there a way to handle schema updates? For example generate code from the documentation that triggers a CI build in affected repos to ensure it still works with the updates.

Yes, for example, if your build server exposes the API with an OpenAPI scheme, you can use the build server to generate a client library like a nuget or npn.

Then in the API consumer you can add a build step that checks if there are new version of the client library. Or setup dependabot that creates PRs to update those dependencies