Say I have two tables, `Product` and `ProductDetails`. Traditionally I'd put a FK for `ProductDetails` on `Product`. But the Rails guide says otherwise, to add `belongs_to` on `ProductDetails` (so `ProductDetails` will have the foreign key instead).
This somehow just doesn't feel right to me, but on the other hand `Product belongs_to ProductDetails` wouldn't make sense either
However due to the single-threaded and sync nature of ruby this blocks the entire server from responding to any other requests in the meantime, pages don't load, api calls don't go through, etc.
What can I do to work around this? I've seen people recommend moving the API call to a background job and polling the server from the client for updates, but that solution seems suboptimal
tbuehlmann: Yes, that's the plan. Ruby processes = number of cores is what's used right?