diff --git a/Gemfile.lock b/Gemfile.lock index 252c26993..2d5d90dda 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,41 +11,49 @@ PATH GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) colorator (1.1.0) - concurrent-ruby (1.1.10) + concurrent-ruby (1.3.3) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.15.5) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) forwardable-extended (2.6.0) + google-protobuf (3.25.3-aarch64-linux) + google-protobuf (3.25.3-arm64-darwin) + google-protobuf (3.25.3-x86_64-darwin) + google-protobuf (3.25.3-x86_64-linux) http_parser.rb (0.8.0) - i18n (1.10.0) + i18n (1.14.5) concurrent-ruby (~> 1.0) - jekyll (4.2.2) + jekyll (4.3.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 1.0) - jekyll-sass-converter (~> 2.0) + jekyll-sass-converter (>= 2.0, < 4.0) jekyll-watch (~> 2.0) - kramdown (~> 2.3) + kramdown (~> 2.3, >= 2.3.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.4.0) + mercenary (>= 0.3.6, < 0.5) pathutil (~> 0.9) - rouge (~> 3.0) + rouge (>= 3.0, < 5.0) safe_yaml (~> 1.0) - terminal-table (~> 2.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) jekyll-feed (0.15.1) jekyll (>= 3.7, < 5.0) jekyll-paginate (1.1.0) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) - jekyll-sass-converter (2.2.0) - sassc (> 2.0.1, < 3.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) jekyll-seo-tag (2.7.1) jekyll (>= 3.8, < 5.0) jekyll-twitter-plugin (2.1.0) @@ -55,25 +63,33 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - liquid (4.0.3) - listen (3.7.1) + liquid (4.0.4) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.7) - rb-fsevent (0.11.1) - rb-inotify (0.10.1) + public_suffix (6.0.0) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.2.5) - rouge (3.29.0) + rexml (3.3.2) + strscan + rouge (4.3.0) safe_yaml (1.0.5) - sassc (2.4.0) - ffi (~> 1.9) - terminal-table (2.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) - unicode-display_width (1.8.0) + sass-embedded (1.69.5-aarch64-linux-gnu) + google-protobuf (~> 3.23) + sass-embedded (1.69.5-arm64-darwin) + google-protobuf (~> 3.23) + sass-embedded (1.69.5-x86_64-darwin) + google-protobuf (~> 3.23) + sass-embedded (1.69.5-x86_64-linux-gnu) + google-protobuf (~> 3.23) + strscan (3.1.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.5.0) webrick (1.7.0) PLATFORMS diff --git a/_data/authors.yml b/_data/authors.yml index 48db21ae9..c22b0efc1 100644 --- a/_data/authors.yml +++ b/_data/authors.yml @@ -52,7 +52,7 @@ c_chaplin: c_cousin: name: Camille Cousin c_goffoy: - name: Cédric Goffoy + name: Cédric Goffoy c_niel: name: Camille Niel url: https://www.camilleniel.com/ @@ -165,6 +165,8 @@ m_blanc: name: Maxime Blanc avatar: /images/avatar/m_blanc.jpeg url: https://maximeblanc.fr +m_millet: + name: Morgan Millet m_mure: name: Mathieu Mure url: https://twitter.com/mathieumure @@ -182,6 +184,9 @@ m_schneider: avatar: /images/avatar/m_schneider.png n_alscher: name: Nicolas Alscher +n_boiron: + name: Nathan Boiron + url: https://mopolo.dev n_galais: name: Nicolas Galais n_saby: @@ -264,6 +269,7 @@ t_falconnet: avatar: /images/avatar/t_falconnet.jpg t_geindre: name: Thierry Geindre + url: https://github.com/t-geindre/ t_gianella: name: Théo Gianella t_jarrand: @@ -282,6 +288,8 @@ v_gallissot: v_pelus: name: Valentin Pelus url: https://github.com/valentinpelus +y_chauvel: + name: Yann Chauvel y_clauss: name: Yves Clauss avatar: /images/avatar/y_clauss.png diff --git a/_posts/2024-07-18-gophercon-eu-berlin-2024.md b/_posts/2024-07-18-gophercon-eu-berlin-2024.md new file mode 100644 index 000000000..92ca5854f --- /dev/null +++ b/_posts/2024-07-18-gophercon-eu-berlin-2024.md @@ -0,0 +1,235 @@ +--- +layout: post +title: Bedrock GopherCon Berlin 2024 +description: The 2024 GopherCon Europe took place in Berlin. Four of us had the opportunity to take part in the event in-person while others could attend the talks virtually. +author: [k_phan, m_millet, n_boiron, pa_bedu, t_geindre, y_chauvel] +tags: [golang, opensource, community, conference, 2024] +color: rgb(251,87,66) +thumbnail: "/images/posts/2024-07-18-gophercon-eu-berlin-2024/thumbnail.png" +--- + +The 2024 GopherCon Europe took place in Berlin. Four of us had the opportunity to take part in the event in-person while +others could attend the talks virtually. + +# Talks + +## The Business of Go - Cameron Balahan Go Product Manager + +Cameron Balahan, a Product Manager at the Golang Team, kicked off GopherCon 2024 with a compelling talk on the business +side of Go. He shared insights into the strategic decisions that shape the development of the Go language, emphasizing +the importance of balancing innovation with stability to meet the needs of both enterprise users and the broader +developer community. + +![Business of Go, developpers stack in 2024](/images/posts/2024-07-18-gophercon-eu-berlin-2024/01-the-business-of-go-01.png) +![Business of Go, growth in open source contribution leads to growth in adoption](/images/posts/2024-07-18-gophercon-eu-berlin-2024/02-the-business-of-go-02.png) + +## Memory Optimization - Diana Shevchenko + +Diana Shevchenko from Datadog delivered an enlightening session on memory management in Go, particularly focusing on how +data on the heap is stored in chunks known as `mspans`. She highlighted the benefits of this approach, such as efficient +memory access and CPU cache optimization, while also discussing potential pitfalls like logical grouping and code +readability challenges. + +### Key Takeaways: + - **Benefits**: Efficient memory access, CPU cache optimization. + - **Challenges**: Logical grouping, code readability, versioning, and backward compatibility. + +## Domain Driven Design - Robert Laszcak + +Robert, a principal engineer, shared valuable insights on simplifying Go projects using Domain-Driven Design (DDD). He +highlighted a recurring challenge: project complexity. Both accidental complexity, stemming from over-engineering, and +essential complexity, inherent in each feature, were identified as major hurdles. Ignoring essential complexity often +leads to increased accidental complexity, making projects cumbersome and prone to becoming legacy systems quickly. + +![DDD, don't need it yet ?](/images/posts/2024-07-18-gophercon-eu-berlin-2024/03-ddd-01.png) + +To illustrate the problem, the engineer introduced a fictional company, Bing Mate, which developed an API for issuing +invoices and processing payments. Initially, the company delivered new features weekly. However, a year later, despite +maintaining a healthy codebase, they struggled to implement similar features promptly, triggering concerns about their +productivity. + +### The Initial Solution: Microservices and Kubernetes + +Bing Mate attempted to solve their issue by hiring more developers and transitioning from a monolithic application to a +microservices architecture on Kubernetes. Despite achieving the ideal Kubernetes setup, they still faced slow software +delivery. This led to a realization that the complexity of their microservices architecture might be the root cause. + +In this Fake company, Emily conducted an investigation. She discovered that Bing Mate had split their monolithic +application by database tables, resulting in closely related services that increased complexity. The solution proposed +was to merge these related services into a more cohesive microservice, or a "micro-monolith", reducing the need for +extensive inter-service communication. To manage the complexity of this new service, Domain-Driven Design (DDD) was +introduced. + +### Key DDD Patterns To Take Home + +1. Always Keep Valid State in Memory: +The first pattern emphasizes maintaining valid state within the application. By encapsulating the state and ensuring +that only valid data can be instantiated, the integrity of the application is preserved. This is achieved by using +private properties and constructors that enforce validation rules, ensuring that no invalid state can exist in memory. + +2. Keep Domain Database-Agnostic: +The second pattern involves separating domain logic from database logic. By using the repository pattern, interactions +with the database are abstracted, allowing the domain logic to remain clean and focused on business rules. This +separation not only makes the code more maintainable but also facilitates testing and potential database changes in the +future. + +3. Reflect Business Logic in Code: +The third pattern advocates for aligning code with business terminology. By using the same language and terms that +business stakeholders use, the code becomes more readable and understandable for non-technical team members. This +alignment enhances communication and ensures that the software accurately represents business requirements. + +### Conclusion + +While these patterns provide a solid starting point, they represent just a fraction of what DDD offers. Domain-Driven +Design encompasses a wide array of techniques that address various aspects of software development, from architecture to +requirement gathering. By integrating these patterns into their projects, developers can create more maintainable and +scalable systems, ultimately leading to more efficient software delivery. + +![Github wild-workouts-go-ddd-example repository for DDD example application in GO](/images/posts/2024-07-18-gophercon-eu-berlin-2024/04-ddd-02.png) + +The engineer concluded the talk by emphasizing the importance of understanding and utilizing DDD, especially in complex +projects. They also provided materials and resources for further learning, encouraging developers to explore and +implement DDD in their own projects. + +## DB Connection Pool - Agniva De Sarker + +Agniva De Sarker of Mattermost delivered a detailed presentation on the intricacies of database connection pooling in Go. + +He emphasized the importance of using an efficient database schema for logical database operations and discussed the +limitations of pgbouncer. Agniva highlighted that the ideal solution is a single pool serving multiple requests, +although Mattermost itself is not designed to be multi-tenant. + +### Highlights + + - **Key Concepts**: Efficient database schema, pgbouncer. + - **Project**: Mattermost's Perseus project was discontinued due to security concerns. + - **Resource**: [Mattermost Perseus Project](https://github.com/mattermost/perseus) + +Agniva's insights into database connection pooling underscored the importance of an efficiently designed database +schema, which defines how data is logically organized within a relational database. This includes logical constraints +such as table names, fields, data types, and the relationships between these entities, all crucial for optimal +performance and scalability in Go applications. + +![DB connection pool, DB hierarchy](/images/posts/2024-07-18-gophercon-eu-berlin-2024/05-db-connection-pool-01.png) +![DB connection pool, ideal scenario](/images/posts/2024-07-18-gophercon-eu-berlin-2024/06-db-connection-pool-02.png) +![DB connection pool, github.com/mattermost/perseus](/images/posts/2024-07-18-gophercon-eu-berlin-2024/07-db-connection-pool-03.png) + +## AI Application in Go - Travis Cline + +Travis Cline introduced `LangChainGo`, a library designed to integrate Go with the generative AI ecosystem. This library +simplifies writing LLM-based programs in Go, supporting various models like `ChatGPT`. Travis outlined current +capabilities and future plans for LangChainGo, including core simplification, advanced agent support, and deeper +integration with tools like `LangSmith`. + +### Capabilities + + - Structured Output + - Tool Calling + - Vector Database (Sequoia) + +### Future Plans + + - Core Simplification + - Documentation + - Advanced Agent Support + - Deeper Integration + +![Generative AI Ecosystem: Major Suppliers](/images/posts/2024-07-18-gophercon-eu-berlin-2024/08-ai-app-in-go-01.png) +![Generative AI Ecosystem: Infrastructure Stack](/images/posts/2024-07-18-gophercon-eu-berlin-2024/09-ai-app-in-go-02.png) +![LangchainGO: Using LangchainGo](/images/posts/2024-07-18-gophercon-eu-berlin-2024/10-ai-app-in-go-04.png) + +## Concurrent Go - Raghav Roy + +Raghav Roy introduced the `TLA+` specification language, a formal method for verifying distributed and concurrent systems. + +He demonstrated how TLA+ can be used to model and verify concurrent Go programs, ensuring that they are free from unexpected behaviors. + +![TLA+ Definition](/images/posts/2024-07-18-gophercon-eu-berlin-2024/11-concurrent-go-01.png) + +## Technical Docs - Hila Fish + +Hila Fish provided a comprehensive guide on creating effective technical documentation. She stressed the importance of +various document types, including system design briefs, on-call runbooks, and project planning documents. Hila also +discussed the benefits of thorough documentation, such as reducing work volume and enabling self-service, thereby +increasing developer velocity. + +### Documentation Types + + - System Logical Design/Brief + - On-Call Runbooks + - Code README + - Onboarding Docs + - Project Planning Docs + - Docs as Code + - Slack Pinned Messages + - Slack bot + +### General Guidelines + + 1. **Know Your Audience**: Tailor documentation for internal maintainers or external users. Make sure people understand it + 2. **Decide/Abide by Documentation Type**: Use markdown for docs as code, integrate diagrams, and ensure CI/CD validations. + +![Your code is now no more self documented](/images/posts/2024-07-18-gophercon-eu-berlin-2024/18-documentation-01.png) + +Her tips aim to have a well-documented code and not a self-documented one. She recommends that we should not feel forced +to write everything but at least documente whatever we can and keep it simple. + +Below are some of the suggested links shared to help us: +1. [Go Official Style Guide](https://go.dev/blog/godoc) +2. [Google Style Guide](https://google.github.io/styleguide/go/) +3. [Technical Writing Tips](https://docs.google.com/document/u/0/d/1naq4pq0otqb78hkQ8enJBLd_yHqLeMC93fFJAnaK0Rc/mobilebasic) by Hila Fish + +## Frames & Pointers - Felix Geisendörfer + +Felix Geisendörfer's session focused on performance profiling and tracing tools in Go, including pprof, frame pointers, +and various tracing utilities like Gotraceui and Traceutils. He demonstrated how these tools can help developers +understand and optimize their Go applications. + +### Tools Highlighted + + - pprof + - Frame Pointers + - Gotraceui + - Traceutils + +![Frames and pointer - tracing](/images/posts/2024-07-18-gophercon-eu-berlin-2024/13-frames-and-pointers-01.png) +![Frames and pointer - Execution Tracer Data](/images/posts/2024-07-18-gophercon-eu-berlin-2024/14-frames-and-pointers-02.png) +![Frames and pointer - Why is this a big deal?](/images/posts/2024-07-18-gophercon-eu-berlin-2024/15-frames-and-pointers-03.png) + +## Securing Containers - Zvonimir Pavlinovic + +Zvonimir Pavlinovic discussed container security, introducing `govulncheck`, a vulnerability scanning tool developed by +the Go team. He presented data on vulnerability findings in containers and discussed the capabilities of `Scalibr`, a +software composition analysis library that works across different types of binaries. + +### Key Points + + - **Tool**: govulncheck + - **Vulnerability** Findings: Detected symbols in 54% of containers, mostly Go vulnerabilities. + - **Library**: Scalibr, supports various binary types. + +### Resources + + - [govulncheck](https://go.dev/doc/security/vuln/) + - [Scalibr](https://github.com/google/osv-scalibr) + +## Anti Patterns - Rabieh Fashwall + +Rabieh proposes some good practices: + +- when using generics is relevant +- that can be resumed in “don’t reinvent the wheel” i.e. use native go functions instead of homemade code can have + impact on performances. He shares simple examples and validates them with simple benchmarks. + +![Antipattern](/images/posts/2024-07-18-gophercon-eu-berlin-2024/16-anti-patterns-01.png) +![Antipattern - Error Handling](/images/posts/2024-07-18-gophercon-eu-berlin-2024/17-anti-patterns-02.png) + +# Conclusion + +These two days were a great chance to meet people involved in the language's development and learn more about a wide +range of topics related to the Go language. Because the event was so well-organized, we were able to exchange in general +benevolence with a large number of GO users. + +Our only regret is the somewhat short duration of the talks, which occasionally prevented us from digging deeper into +certain subjects and the lack of a Q&A period with the speakers at the conclusion of their presentation though you can +still ask them questions all along the event. diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/01-the-business-of-go-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/01-the-business-of-go-01.png new file mode 100644 index 000000000..dc44546ca Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/01-the-business-of-go-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/02-the-business-of-go-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/02-the-business-of-go-02.png new file mode 100644 index 000000000..83ede725c Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/02-the-business-of-go-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/03-ddd-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/03-ddd-01.png new file mode 100644 index 000000000..4336bcf7f Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/03-ddd-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/04-ddd-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/04-ddd-02.png new file mode 100644 index 000000000..b3d73b25b Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/04-ddd-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/05-db-connection-pool-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/05-db-connection-pool-01.png new file mode 100644 index 000000000..edc844497 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/05-db-connection-pool-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/06-db-connection-pool-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/06-db-connection-pool-02.png new file mode 100644 index 000000000..8e9c61428 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/06-db-connection-pool-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/07-db-connection-pool-03.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/07-db-connection-pool-03.png new file mode 100644 index 000000000..ff6db0988 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/07-db-connection-pool-03.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/08-ai-app-in-go-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/08-ai-app-in-go-01.png new file mode 100644 index 000000000..aeb42cac4 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/08-ai-app-in-go-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/09-ai-app-in-go-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/09-ai-app-in-go-02.png new file mode 100644 index 000000000..ddf29d2f2 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/09-ai-app-in-go-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/10-ai-app-in-go-04.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/10-ai-app-in-go-04.png new file mode 100644 index 000000000..4ad3c5c30 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/10-ai-app-in-go-04.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/11-concurrent-go-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/11-concurrent-go-01.png new file mode 100644 index 000000000..243decc76 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/11-concurrent-go-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/13-frames-and-pointers-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/13-frames-and-pointers-01.png new file mode 100644 index 000000000..3c59e7d70 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/13-frames-and-pointers-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/14-frames-and-pointers-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/14-frames-and-pointers-02.png new file mode 100644 index 000000000..092694781 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/14-frames-and-pointers-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/15-frames-and-pointers-03.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/15-frames-and-pointers-03.png new file mode 100644 index 000000000..e33f334c9 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/15-frames-and-pointers-03.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/16-anti-patterns-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/16-anti-patterns-01.png new file mode 100644 index 000000000..72ee3aad9 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/16-anti-patterns-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/17-anti-patterns-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/17-anti-patterns-02.png new file mode 100644 index 000000000..2cd10296d Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/17-anti-patterns-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/18-documentation-01.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/18-documentation-01.png new file mode 100644 index 000000000..fbc92e30f Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/18-documentation-01.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/19-documentation-02.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/19-documentation-02.png new file mode 100644 index 000000000..b17705d96 Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/19-documentation-02.png differ diff --git a/images/posts/2024-07-18-gophercon-eu-berlin-2024/thumbnail.png b/images/posts/2024-07-18-gophercon-eu-berlin-2024/thumbnail.png new file mode 100644 index 000000000..f1a9893fa Binary files /dev/null and b/images/posts/2024-07-18-gophercon-eu-berlin-2024/thumbnail.png differ