You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The table design of the WCA DB is a total shitshow and organically grown out of a shitty PHP app (afaik). Doesn't follow any best practices for naming etc. It's kinda hacky to make it work with ActiveRecord (but possible).
Contra API
Feels like additional complexity
Two codebases written in two different languages
Deployment becomes more complicated (now I need to deploy both a Rails and a Rust app)
Operation becomes more complicated (API goes down)
We need to think about stuff like "what to do when the API server is down or is slow"
Doesn't feel very flexible. Adding things like batching or other queries seems tedious. Would be much easier (for me at least) in MySQL/ActiveRecord.
@timhabermaas thoughts/comments? Feel free to add things.
Not trying to kill this idea, I just want to reevaluate it (and find the best way to implement the remaining missing WCA API related features).
The text was updated successfully, but these errors were encountered:
The pro/contra list seems to be spot-on. I don't think it's necessarily "more complex", though. Conceptually I feel a separate API is simpler since it's self-contained and there's no state to manage. [1] The network failures add a bit of complexity, though.
That being said: I can't compile the API right now. Rust is currently in beta and they've disabled a few features I rely on during the beta stage. I simply don't have the time to sit down and rewrite the code to not use these features.
So, I think the best course of action would be to use the MySQL import and setup a separate database (just like you did with the old app). Trying to comply with the current WCAGateway interface (or generally using some kind of gateway) would probably a good idea since a) there might be an official WCA API in the future and b) we might change our minds.
It's kinda hacky to make it work with ActiveRecord (but possible).
I'd probably just use raw SQL instead of dealing with associations/overriding table names.
[1] My implementation isn't there, yet. It's definitely missing a simple way to deploy and update the current data.
I'm starting to have some doubts about the external WCA API.
In the old version of cubecomp, I just had the app connect to a separate MySQL database that holds the WCA data import. That seemed a lot simpler.
I want to use this issue to collect some pros and cons about using a HTTP API vs. using the raw MySQL db.
Related issues: #53, #52, #51, #49
Pro API
Contra API
@timhabermaas thoughts/comments? Feel free to add things.
Not trying to kill this idea, I just want to reevaluate it (and find the best way to implement the remaining missing WCA API related features).
The text was updated successfully, but these errors were encountered: