sensu / sensu-go

Simple. Scalable. Multi-cloud monitoring.
https://sensu.io
MIT License
1.02k stars 175 forks source link

Prototype GraphQL/Relay server & implementation #403

Closed jamesdphillips closed 7 years ago

jamesdphillips commented 7 years ago

TODO

High Level

Practical elements that must be supported.

Issues

jamesdphillips commented 7 years ago

Options

REST & Redux

Pros

Cons

Conclusion

Judged purely from a productivity viewpoint I'm not confident this is the right approach.

GraphQL, Redux, & Apollo Client

Pros

Cons

Conclusion

This porridge is too hot.

GraphQL + Relay

Pros

Cons

Conclusions

I think Relay is described as a 'framework' and while I know this can be a dirty word to some, I think from our perspective it is the option that is going to make us the most productive.

That isn't to say it isn't without it's faults. It's going to require an up front investment (2-3 days to get the initial GraphQL endpoint written) and whatever maintenance costs there may be over time.

jamesdphillips commented 7 years ago

@grepory when you have a moment do you mind reading over the above? Considering the minor time-investment required, I'm wary to make this decision without some form of buy-in from others.

portertech commented 7 years ago

@jamesdphillips can you elaborate on your conclusion, "This porridge is too hot."?

portertech commented 7 years ago

Resource links for reference:

Redux: http://redux.js.org/ GraphQL: http://graphql.org/ Apollo Client: http://dev.apollodata.com/react/ Relay: https://facebook.github.io/relay/

portertech commented 7 years ago

@palourde are you able to spend some time reading over the above? I'd love to read/hear your thoughts. I trust @jamesdphillips and his evaluation, but I too would like to see some buy-in from others that are more informed than myself :)

palourde commented 7 years ago

@jamesdphillips Do you have any feedback about using github.com/graphql-go/graphql for the golang server? I already quickly looked at it in the past and I had some concerns. The first being that on the github page, they state that the project is A work-in-progress implementation of GraphQL in Go. Also, the reviews I've read were not that good and most people recommended to use github.com/neelance/graphql-go instead, which you mentioned wouldn't work with relay :(

jamesdphillips commented 7 years ago

Great feedback, thank you. 🙏❤️

Do you have any feedback about using graphql-go/graphql for the golang server? I already quickly looked at it in the past and I had some concerns.

Yup, it's not perfect.

My main concern when I started this task wasn't found, Relay, etc. it was that two major GraphQL libraries available in Go were seemingly under-developed. However, after some time with both, I think the deficiencies of graphql-go/graphql are irrelevant in the short to medium term.

The main areas in which I see deficiencies the moment are:

Outside of the last point, every deficiency I found is largely related to optimization, the ability to accurately make optimizations or arguably minor developer experience features. Since we won't have a strong grasp of what we need to optimize until we have large customers frequently throwing many requests at our API, I think it won't be a major issue that these pieces are missing. And, if were lucky by the time we do someone will have already done the work for us.

most people recommended to use github.com/neelance/graphql-go instead, which you mentioned wouldn't work with Relay :(

We could definitely make it work with Relay, it would really be that much work, but it is work that we wouldn't have to do w/ graphql-go/graphql.

More so, my problems with neelance/graphql-go are: