Skip to content

Support for HAProxy Lua non-blocking core.Socket #114

Open
@mecampbellsoup

Description

@mecampbellsoup

Description

We are using pgmoon inside of HAProxy Lua to connect to our Postgres DB server, make queries, establish LISTEN pgnotify clients, etc.

However the standard Lua Socket class is blocking as you can see from the source code.

TODO: describe the blocking nature of luasocket more clearly above

From an HAProxy blog post:

The Socket class is a replacement for the standard Lua Socket class and is compatible with HAProxy’s non-blocking nature. When you want to use socket functions in your actions, you must use this class.

As such we forked pgmoon and simply replaced luasocket with HAProxy's non-blocking Lua Socket class.

We'd like to discuss how to get his merged upstream so that others can benefit and we can get back onto using a non-forked pgmoon implementation.

I'll open a PR and link it to this issue with our naive implementation but we'd like to hear thoughts/suggestions on getting this feature merged.

Merry X-mas @leafo! 😄

cc @kriscode1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions