Non-blocking queries
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 343
- Forks
- 82
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 9
Description
As someone trying to put an API in production that uses R to connect to a database, the ability to send a query without blocking the R process is sorely missed. (See https://github.com/r-dbi/DBI/issues/69.)
RPostgres is very close to supporting this already--it uses libpq's asynchronous API and already has an asynchronous loop to check for interrupts. In hacking on a local source install, I was able to very easily add async functionality. Of course, I'd probably need to add tests, error handling, etc before it could actually be merged.
@krlmlr Would you be open to a PR adding a dbSendQueryAsync method or similar?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review DBI issue 69 and the asynchronous loop in RPostgres pull request 193, then inspect the local source changes described in the issue. Define the async query API, add the needed tests and error handling, and confirm that sending a query no longer blocks the R process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, r
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100