Reddit Programming
190 subscribers
1.22K photos
127K links
I will send you newest post from subreddit /r/programming
Download Telegram
I need to keep some Slack connections alive. This should be easy.
https://www.reddit.com/r/programming/comments/1w4c3a6/i_need_to_keep_some_slack_connections_alive_this/

<!-- SC_OFF -->Okay, but I have multiple replicas. And it gets slightly worse: the number of physical connections is not equal to the number of replicas, and it is not equal to the number of business-level connectors either. Several business connectors may share one external identity. One external identity may require several physical connections. And those connections need to be spread across whatever replicas are currently alive and have capacity. So who actually owns the connection? Then the questions start piling up. What if one replica dies?
What if it doesn’t die, but loses access to the database?
What if two replicas race for the same connection?
What if the event that was supposed to wake the right worker never arrives?
What if most workers are already full? A few questions and 2 hours of midnight walk in headphones and ChatGPT later, I had leases, runtime slots, reconciliation, failover, capacity limits, and a distributed ownership problem on my hands. This is the architecture I ended up with, and I have mixed feelings about this design. On one hand, I’m proud that I managed to account for so many different edge cases. On the other, the whole thing feels worryingly complex. So I’d really value input from people who have built similar systems. What did I miss or do you see anything that can break?
And most importantly: what can be simplified without losing the guarantees? The full architecture description is a bit lengthy: AEON NEON - Connector Runtime - by Jarek J. (https://failedexperiments.substack.com/p/aeon-neon-connector-runtime) Many thanks if you decide to read it and share your thoughts. I’d really like this one not to become another failed experiment. <!-- SC_ON --> submitted by /u/doker0 (https://www.reddit.com/user/doker0)
[link] (https://failedexperiments.substack.com/p/aeon-neon-connector-runtime) [comments] (https://www.reddit.com/r/programming/comments/1w4c3a6/i_need_to_keep_some_slack_connections_alive_this/)
We are building an idiomatic RESTful API in Go 1.27
https://www.reddit.com/r/programming/comments/1w522x1/we_are_building_an_idiomatic_restful_api_in_go_127/

<!-- SC_OFF -->100% Human Authored - Both Code/Doc In this series, We build a production-ready containerized RESTful API server application using following packages and tools. Go Standard Library net/http: The most idiomatic way to write web API applications in Go. Chi: The most idiomatic router with middleware and route groups support. Zerolog: Zero Allocation JSON Logger and Faster than slog. Goose: The database migration CLI builder library with lease dependency. Gorm CLI: Generate Go generics-based, type safe, repository functions with no runtime wrappers. Swag and Validator v10: The most prominent OpenAPI specification generator and validation library in Go. Codebase: https://github.com/learning-cloud-native-go/myapp (1000+ GitHub stars- Since 2019) \ Doc: https://learning-cloud-native-go.github.io/docs/building-a-containerized-restful-api/ If anybody wanna check Rust implementation: https://learning-rust.github.io/labs/building-a-containerized-restful-api/ <!-- SC_ON --> submitted by /u/dumindunuwan (https://www.reddit.com/user/dumindunuwan)
[link] (https://learning-cloud-native-go.github.io/docs/building-a-containerized-restful-api/) [comments] (https://www.reddit.com/r/programming/comments/1w522x1/we_are_building_an_idiomatic_restful_api_in_go_127/)