-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for async database access #251
Comments
Hi, there is no such plan (and I doubt any would be able to keep Anorm simple design with such hybrid sync/async approach). |
I'm playing with the thought of forking anorm to see where I get by just replacing JDBC with e.g. jasync-sql and making the relevant APIs async. |
There is a anorm-postgres for specific Postgres function, anyway Kotlin dependency won't be accepted for Anorm (jasync-sql). |
I don't see how I could replace anorm's query handling just in the postgresql module and this wouldn't actually be postgresql specific (even though my specific use-cases involves that db). Also jasync-sql was just the first thing that came to my mind without looking more into it. There are other projects like e.g. R2DBC that implement async DB drivers in pure Java. |
It's recommended to start with a specific case/DB, before thinking to generalize, to walk before running. |
Haven't worked on anything using Anorm for a while, however I helped a friend in implementing an anorm-inspired C# library, that is fully async. I might try to apply what we did there to an Anorm fork once I work on the project again, that needs this. |
@pschichtel have you looked at skunk project? It has similar idea with Anorm, but uses only Postgres in async way, without jdbc. |
I did not yet, but it looks interesting, thanks for the hint @feoktant |
You could try https://github.com/simao/anorm-async/ |
@simao Please avoid the confusing name |
@cchantep Ok, why is it confusing? |
Even if anorm is not a registered name, naming a library not based on anorm named as |
The second paragraph of the readme from anorm-async states:
I have not looked at the code itself. @cchantep what makes you claim that it is in fact not based on anorm? |
As far as I seen, there is no anorm import the |
I have changed the name of the project. Initially I had a different idea, but I ended up implementing something different. |
I do understand that Anorm builds on top of JDBC which is inherently synchronous, just like most of the underlying drivers and protocols. However there are some databases that natively support asynchronous queries such as the postgresql and there are new database APIs like jasync-sql coming up that try to support this.
I like the simplicity Anorm, but I'd also like to use the asynchronous query support of the postgresql.
Are there any plans for supporting asychronous querying?
The text was updated successfully, but these errors were encountered: