aspnet / Benchmarks

Benchmarks for ASP.NET Core
Other
1.18k stars 242 forks source link

Add a Go implementation of the TodosApi "stage 2" app #1868

Open DamianEdwards opened 1 year ago

DamianEdwards commented 1 year ago

It should be a Go port of https://github.com/aspnet/Benchmarks/tree/main/src/BenchmarksApps/TodosApi and thus include:

Which framework should it use? Gin? https://dev.to/xngwng/top-5-go-rest-api-frameworks-k0e https://nordicapis.com/7-frameworks-to-build-a-rest-api-in-go/ https://www.slant.co/topics/1412/~best-web-frameworks-for-go

kokizzu commented 1 year ago

Gin (most popular), Echo, Fiber (most performant) image

dandago commented 1 year ago

I work with Go and Gin (also a former .NET dev), and I can recommend Gin as an easy and performant way to build an API in Go. Look into the following:

For error responses there are a few different options - you can probably use Gin's AbortWithStatusJSON() to return a JSON object along with a 500 or similar status code.

Not sure what you need with DB health checks exactly. Tell me more and I can advise.

tg123 commented 1 year ago

may i know where to send PR?

WIP https://github.com/tg123/TodosApi

WahidinAji commented 1 year ago

may i know where to send PR?

WIP https://github.com/tg123/TodosApi

you need to add the benchmark test, I guess. and if you wanna contribute to this project. you need Fork this repo, write your code there, and do PR

davidfowl commented 1 year ago

We can do the benchmarkification! Thank you for the starting point @tg123 !