Skip to content

Remove curl dependency #593

Closed
Closed

Description

@jesperpedersen

Remove the dependency on curl as a library by porting the functionality from pgexporter, and expanding it if necessary

Activity

  1. added
    community
    feature
    on Apr 12, 2025
  2. bassamadnan commented on Apr 23, 2025

    @bassamadnan
    Collaborator

    expanding it would be necessary right? Forgive me if im mistaken-- currently pgexporter uses vappend (example) and GET related functionality (Link) as of now. I think we would have to extend this for PUT as well if we were to use it in pgmoneta ?

  3. jesperpedersen commented on Apr 23, 2025

    @jesperpedersen
    MemberAuthor

    @bassamadnan Yes, we should the different HTTP operations

  4. bassamadnan commented on Apr 24, 2025

    @bassamadnan
    Collaborator

    okay i think we are using the curl dependency only as clients for our HTTP requests, this makes thing easier. We can use pgexporter_connect to create a TCP connection socket on port 443 (Since calls to Azure and S3 are HTTPS) and then create SSL context and client and connect it with our socket and then send request and get response via SSL_write/read?

  5. jesperpedersen commented on Apr 25, 2025

    @jesperpedersen
    MemberAuthor

    @bassamadnan Sounds like the right direction - remember to look at pgexporter's implementation.

    We need to find all the requirements and then sync across the 3 project

  6. bassamadnan commented on Apr 25, 2025

    @bassamadnan
    Collaborator

    agreed, will be happy to take this up. my pace might be slow due to exams but I welcome any help i can get from anyone!

    BTW could I also add a wrapper to our vappend function to create a _http_add_header function?

  7. jesperpedersen commented on Apr 25, 2025

    @jesperpedersen
    MemberAuthor

    @bassamadnan Yes, that is ok - e.g. use vappend for add_header.

    We probably don't have all the HTTP(S) requirements since the storage modules isn't done yet... but I think we can could come closer

  8. bassamadnan commented on Apr 25, 2025

    @bassamadnan
    Collaborator

    @jesperpedersen Oh, i was under the assumption that src/libpgmoneta/se_azure.c and src/libpgmoneta/se_s3.c had complete implementation; is it something missing? I did not run it.

  9. jesperpedersen commented on Apr 25, 2025

    @jesperpedersen
    MemberAuthor
  10. bassamadnan commented on Apr 28, 2025

    @bassamadnan
    Collaborator

    @jesperpedersen should i start by removing the curl dependancy and use home-grown http functionality? I'll test them with the existing HTTP(s) setup we have atleast.

  11. jesperpedersen commented on Apr 28, 2025

    @jesperpedersen
    MemberAuthor

    @bassamadnan Yes, precisely

  12. bassamadnan commented on May 1, 2025

    @bassamadnan
    Collaborator

    @jesperpedersen why do we not use poll for checking if data is available through network sockets? I encounter seg faults when using pgmoneta_read_block_message

  13. jesperpedersen commented on May 1, 2025

    @jesperpedersen
    MemberAuthor

    @bassamadnan That sounds weird - investigate, please

  14. 11 remaining items

  15. bassamadnan commented on May 5, 2025

    @bassamadnan
    Collaborator

    @jesperpedersen found the issue, its more of a uncaught error (azure_storage_account) can not contain spaces, otherwise it translates to the wrong URL for auth, this can be validated to prevent crashes. Will include this.

  16. added 11 commits that reference this issue on May 6, 2025
  17. added a commit that references this issue on May 27, 2025
  18. added a commit that references this issue on Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

communityfeature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions