Even though I barely got my hands dirty with #golang I really enjoy working with #fiber and #entgo for #REST APIs so far.

Would be nice to autogenerate entities/endpoints via #OpenAPI definition so I end up having Ent schema structs and Fiber endpoints 🤔

#dev #webdev

@graves501 I think that what my library does is the opposite of what you're asking, but if you could have a look and see if it's interesting to you, or not, I'm taking any feedback 😃

https://github.com/dolanor/rip

(I haven't documented the automatic OpenAPI schema generation of v0.9.x because I'm not totally done with it yet)

GitHub - dolanor/rip: REST in peace

REST in peace. Contribute to dolanor/rip development by creating an account on GitHub.

GitHub

@dolanor

Hi, thanks for your post!

I don't think this counts as feedback since I'm using Ent BECAUSE I don't necessarily like using Gorm 😅 So once I saw Gorm mentioned, I stopped reading...

@graves501 that's just an implementation detail 😅
I put gorm because it is well known, but I don't necessarily use it myself. I didn't think about ent because I don't use it either. I could add it as one of the providers, I just lacked time to do it. I need to improve docs first.

You can implement your provider as you want. Once you have that, normally every HTTP logic is handled by rip and no need to deal with it.
You just implement the rip.EntityProvider, and you're good to go.

Anyway, I count this as a valid feedback, thanks 😃

@dolanor

Ok, well if that was useful for you, what about using other HTTP framework libraries like Gin or Fiber? Seems like you're stuck with net/http - at least at first glance 🤔

@graves501 for me it's not stuck. For me it's one less dependency.
And the goal of my lib is for you to not care about HTTP.

It's more to make you able to have some basic HTTP CRUD in 3-5 effective lines of code. So you can start hacking on your project with business rules instead of HTTP details.

@dolanor

Yeah, but you will end up caring about your HTTP requests as soon as you notice that other HTTP libraries have better performance or you run into performance issues with the standard package 😅

@graves501 I achieved 50k req/s on real traffic with net/http on https on the cheapest droplet of DigitalOcean. So, performance of net/http was not a big problem for what I'm trying to build.
If there is more interest in having a pluggable http server implementation, I could work on it, I don't see this as a blocking problem. But for now, net/http is more than enough for what I'm trying to achieve.
It's more about reducing cognitive load than server load. So you can focus on business rules and not http detail and optimization.

@dolanor

Once again, take the feedback or not. People are using other HTTP libraries for various reasons. I've listed performance so far, but then they also provide other features like auth middleware etc.

So yes, in the long run if you want people to adopt your library, then let the people decide which HTTP framework THEY want to use, not what YOU want to use.

At this point you seem pretty ignorant regarding the original post. I've stated I'm using Fiber and Entgo.

1/2

@dolanor

And all you do is hijack this thread with self-advertisment and not actually listening to valid feedback. Seems pretty boneheaded and ignorant to me.

Look up Gin and Fiber. Just look at how wildly popular their repositories are. Do you think this is by chance? People have reasons to use these frameworks over the standard HTTP package.

2/2

@graves501 I've listened to your feedback and I think it is a valid reasoning. I'm gonna actually put it on the issue tracker so I can work on it when I've already advanced on the other topics that I'm on.
I just thought maybe I could share why I didn't see it such as a priority IMO. I didn't want to hijack and reject, that was not my intention.

Anyway it seems you don't see the point of my library in this current state and that's OK.
Thank you again for having a look and sharing your point of view.

@graves501 and I used gin 10 years ago, I was also attracted to it somehow, but then I found some limitations. Anyway, I explained why, for me, net/http was enough.
Fiber, just didn't have the time to explore, yet.
And there is echo, and some others.

@dolanor

Just to be clear: I think your attempt of solving the issue of repetitive HTTP boilerplate code makes sense and will be helpful once fleshed out!

Best of luck to you and your project!