Software Architecture in Golang: C4 Model for Diagraming and Documentation

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 22

  • @MarioCarrion
    @MarioCarrion  3 ปีที่แล้ว +5

    *Blog* mariocarrion.com/
    *Learning Golang* th-cam.com/play/PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy.html
    *Building Microservices in Go* th-cam.com/play/PL7yAAGMOat_Fn8sAXIk0WyBfK_sT1pohu.html
    *Software Architecture in Go* th-cam.com/play/PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-.html
    *Go Tools and Packages* th-cam.com/play/PL7yAAGMOat_HEEOvH99agDs_5g51A0Ls3.html
    *Testing in Go* th-cam.com/play/PL7yAAGMOat_HSeW4zF0uRL9EaHadE4ZZq.html
    *Keep it up!*

  • @piyusht20
    @piyusht20 3 ปีที่แล้ว +2

    Amazing content! Extremely practical and useful, your channel is way underrated. I hope the channel gains the popularity it deserves.

    • @MarioCarrion
      @MarioCarrion  3 ปีที่แล้ว

      Thanks Piyush! Take care.

  • @bjugdbjk
    @bjugdbjk 2 ปีที่แล้ว

    Ur channel is a treasure man !! u r a legend.
    Amazing content !!

  • @zikomo8913
    @zikomo8913 2 หลายเดือนก่อน

    Awesome channel for Go

  • @martinnorberg7940
    @martinnorberg7940 3 ปีที่แล้ว

    How would you maintain a C4 Model that describes multiple microservices and the communication between them? A separate repo? Document it in the api gateway (if you have one)? Let each microservice push it's own C4 Models to a service that collects & combines them?
    Cheers!

    • @MarioCarrion
      @MarioCarrion  3 ปีที่แล้ว

      Hello Martin, thanks for the question.
      What you're asking is *really* interesting and all your ideas make sense to me. I made a similar decision for the projects I currently oversee, there's repository that aggregates all the documentation for all of our services and consolidates everything using a combination of markdown files and the generated diagrams; this documentation monorepo is linked to the other repos via submodules and gets its "build/publish" CI/CD step triggered after any of the other upstream projects pushes any change to the main branch.
      With that said, all projects still maintain their own documentation and have control of what to document but this documentation monorepo is in charge of aggregating and consolidating everything that we think makes sense to make available to other teams.
      I hope that helps,
      Best

    • @flonnblad
      @flonnblad 3 ปีที่แล้ว

      One approach I have been a bit interested in is to utilise a Distributed Tracing tool like Open Telemetry to capture the communication between C4-containers and then basically auto-create the C4 model that describes the connections between multiple micro-services.
      The main benefit in my view with this is that you don't end up with a model that is wrong because someone updated the code, but not the documentation.

    • @MarioCarrion
      @MarioCarrion  3 ปีที่แล้ว

      Fredrik, that's a great idea; I'm not sure if OpenTelemetry supports anything like that just yet, but I assume implementing something to collect those metrics to build diagrams automatically could be possible; I know some third party providers like NewRelic automatically create diagrams (not C4 though) that allow you to see how the different services talk to each other.

    • @flonnblad
      @flonnblad 3 ปีที่แล้ว

      ​@@MarioCarrion I don't think OTel will ever support building C4 diagrams, but as you say, you could have another tool use the OTel data to build C4 diagrams.
      At my previous job, we used Datadog, which also builds a dynamic service-map based on the metrics, but you didn't get the layering as with the C4 model.
      The cool thing with using a tool like Datadog is that you technically could get all info you would need to build the first three C4 layers. By using tracing across all your applications, tagging client-actions with user-roles and tagging your services and infrastructure with things like system or product, etc. Unfortunately, Datadog doesn't really support exporting its data for this purpose...

  • @MuscleTeamOfficial
    @MuscleTeamOfficial 3 ปีที่แล้ว

    Thanks for making this brudduh

  • @brianonango
    @brianonango 2 ปีที่แล้ว

    I think mermaid.js can also be used to create and visualize c4 models. Especially because of the ability to click on nodes in mermaid.

    • @MarioCarrion
      @MarioCarrion  2 ปีที่แล้ว +1

      Hey Brian, do you have a link to an example where nodes are clickable? I used mermaid in the past but I'm not familiar with that feature.

    • @DaarShnik
      @DaarShnik 2 ปีที่แล้ว

      I don't think mermaid has this feature

    • @brianonango
      @brianonango 2 ปีที่แล้ว

      @@MarioCarrion I wrote a short article to give this example. I've posted it here twice, but it keeps disappearing so I will not repost. But ​ @Vikram Singh Rawat ज्ञानखोजी seems to be asking about a similar example.

  • @lzZxxZzl
    @lzZxxZzl 3 ปีที่แล้ว

    Thank u for sharing

  • @maei9189
    @maei9189 3 ปีที่แล้ว

    Really great content!!! Thank you so much! Any udemy courses planned?

    • @MarioCarrion
      @MarioCarrion  3 ปีที่แล้ว +2

      Hello, yes I'm working on a few courses. I will share the news when those are available.

    • @charliecooper7655
      @charliecooper7655 3 ปีที่แล้ว

      @@MarioCarrion do you have a mailing list where we can get updated?

    • @MarioCarrion
      @MarioCarrion  3 ปีที่แล้ว +1

      @@charliecooper7655 I do not, but I will share the news in the channel as soon as I have more details.