Giter Site home page Giter Site logo

connect blocks about crystal-pg HOT 4 CLOSED

will avatar will commented on May 20, 2024
connect blocks

from crystal-pg.

Comments (4)

asterite avatar asterite commented on May 20, 2024

The ideal solution is to implement the postgres protocol using Crystal's IO classes (like Socket) which are non-blocking by default. It's a lot of work, but it's the best solution (many other languages implement it this way too, for example Go)

from crystal-pg.

jsaak avatar jsaak commented on May 20, 2024

Is there any workaround until that day comes?

from crystal-pg.

will avatar will commented on May 20, 2024

Currently, while postgres is working on the query, that is async. It's only while sending and receiving data that is sync due to libpq. There is no workaround for that.

Going native does have both that upside, and would fix the linking problems (#13 and crystal-lang/crystal#1269). However we'd no longer get new authentication schemes for free (it's looking like SCRAM will make it in soon), and small nice things like the default socket location being known will be lost or have to be reimplemented. At least the protocol isn't too complicated, especially compared to others.

from crystal-pg.

will avatar will commented on May 20, 2024

The driver is now native

from crystal-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.