4 ms·
Here I'm thinking that sending an email to get data back like this an odd choice compared to something like an API sending back JSON or XML or anything other th
by dylan604 4y ago
Here I'm thinking that sending an email to get data back like this an odd choice compared to something like an API sending back JSON or XML or anything other than a friggin email.
- kelnos 4y agoI'm pretty sure this API doesn't run synchronously. You're not going to sit with a request open for hours (days?) waiting for the server to return data to you. Email is maybe not ideal, but a lot of the other ways of returning results from an API asynchronously require clients to set up their own infrastructure (or pay to use someone else's), which might not be desirable for this particular API's users.
- crote 4y agoNonetheless, it is a bit surprising that a single query results in 100 emails. It seems to send one email for each object observed, rather than a single email informing the user that their job has finished.
- dwrowe 4y agoIt’s really a great solution in a long-running job situation, the more I think about it. Especially on your point about setting up infrastructure. Email, in this case, is effectively a webhook handler for their results. Doesn’t require the end user to maintain the endpoint though, and can leverage the existing redelivery attempts, etc. May not be the “coolest” - but leverages decades of accumulated knowledge and reusable solutions.