Skip to content
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

Motivation? #14

Closed
istathar opened this issue Jun 6, 2022 · 3 comments
Closed

Motivation? #14

istathar opened this issue Jun 6, 2022 · 3 comments

Comments

@istathar
Copy link

istathar commented Jun 6, 2022

Hey Nikita. I hesitated to ask this because I can see you've been working really hard to refine hasql-pool. I'm sure you're aware (but maybe you're not) that resource-pool was adopted and resuscitated by the community. Notably

with the result that a 0.3.0 has been released to Hackage with a number of performance and correctness fixes.

I assume you want nothing to do with it at this point, but we're using resource-pool elsewhere in our system and so noticed that suddenly hasql-pool wasn't anymore. Which is entirely fine but hey, thought I'd mention. Go ahead and close this :). All the best.

@nikita-volkov
Copy link
Owner

The original implementation based on resource-pool required hacks to accommodate to the requirements of resource-pool. It had something to do with exceptions but I don't remember precisely. There were several issues caused by those hacks, which you can see in the closed issues of this tracker. At some point I realised that it would be easier to just implement the pool directly. As you can see in the source code, the whole implementation now is like 80 lines of code.

@istathar istathar closed this as completed Jun 6, 2022
@avanov
Copy link

avanov commented Jun 12, 2022

@istathar FYI, as I still need to rely on resource-pool in my projects, I released hasql-resource-pool fork of v0.5.2.2 that was the last one using resource-pool internally. I intend making a switch to the recent v0.3.x release maintained by scrive (I only need to port the missing stats thing). So if you're interested in a resource-pool based implementation, feel free to contribute.

@nikita-volkov given resource-pool is redundant now, and your previous suggestion to use it for things that require dynamic settings acquisition, would you be open to consider IO-based connection settings API in the new hasql-pool implementation? The current version still doesn't allow me to use it with AWS RDS token-based authentication, and this is a predominantly mandatory setup in corporate environments I've been working with.

@nikita-volkov
Copy link
Owner

@avanov I've answered to your question in the according issue linked above. Thanks for bringing this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants