7 ms·
Yes, in 2017 and 3 companies later I've never looked back. Current application is an event-sourced system that includes a REST API, asynchronous event processin
by kareemsabri 4y ago
Yes, in 2017 and 3 companies later I've never looked back. Current application is an event-sourced system that includes a REST API, asynchronous event processing over SSE, and a scheduled job runner.
It's been great. We don't use any frameworks, just the http package. It's blazing fast and highly reliable (low bug occurrence and easy refactors due to the safety provided by strong typing).
- Cwizard 4y agoWhat were you using before Go? I notice in the relies that a lot of people are coming from Python. Did you consider using Java? And if so what made you use Go in the end?
- kareemsabri 4y agoI've used many languages in my career, including Java, Scala, Ruby, and Node. I didn't really consider Java, for a couple of reasons. - I didn't love the Java tooling at the time. Maven for example. - I don't love OOP. Go has just enough OOP patterns for me. I tried Go as an experiment, but didn't know it would become my go-to language. What I found was super fast build times (big win), built in testing, and a simple language that almost anyone can understand (versus the relative sophistication of something like Scala).
- jjice 4y agoIf you're open to it, I'm curious about a few things: 1. How do you handle DB interactions? A data mapper/repository pattern? 2. Do you have a service layer to coordinate between the different "inputs" (the REST API, event processing, and scheduled jobs) 3. Is this REST API used by a web front end or other services? Interested in how people handle token auth and/or using session tokens. I've been reading about architecture patterns more and I've realized which patterns I've used without knowing it, so now I'm interested in how others handle similar situations in different languages and ecosystems.
- deniswsrosa 4y agoWhich framework do you use to create your rest endpoints?
- kareemsabri 4y agoWe use a mux router https://github.com/gorilla/mux#matching-routes https://github.com/gorilla/mux#matching-routes