fastify-example-twitter icon indicating copy to clipboard operation
fastify-example-twitter copied to clipboard

Feedback needed

Open allevo opened this issue 7 years ago • 5 comments

I need a feedback from @fastify/fastify here. Any kind of feedbacks are appreciated. Really....

allevo avatar Nov 13 '17 21:11 allevo

I have a suspicion this is awesome. I will review when I have some time to dig through it.

jsumners avatar Nov 13 '17 21:11 jsumners

Good work!

  • Use async / await where possible I saw many mixings with callbacks, use promisify when required. It's a great project to show the state of the art.

  • Don't provide http clients it's out of topic in my opinion. The swagger backend can describe the api in detail.

StarpTech avatar Nov 13 '17 22:11 StarpTech

Use async / await where possible I saw many mixings with callbacks, use promisify when required. It's a great project to show the state of the art.

good point (https://github.com/fastify/fastify-example-twitter/issues/13)

Don't provide http clients it's out of topic in my opinion. The swagger backend can describe the api in detail.

They are introduced for this reason. IMHO, the main aim of this project is how to use fastify encapsulation in order to split your project into microservices when it is needed. This is awesome feature! In my dreads I'd like to create a guide how to lead a "simple" project like this into a serie of microservices! This's why I thought the http clients.

Anyway @StarpTech this is a incoming project, so nothing is decided! Please continue to give your contribution

allevo avatar Nov 13 '17 22:11 allevo

I'm a bit lost on the need for clients in the "monolith" scenario, while they make sense in the microservices one. I think we can have two plugins that offer the same interface: one calling the microservice, and one using the direct library. Does that make sense?

mcollina avatar Nov 14 '17 08:11 mcollina

@mcollina yeah. I like that scenario! Fixing the "client" interface, I need to figure out how to choose the interface implementations (http or method call)

allevo avatar Nov 14 '17 09:11 allevo