Skip to content

494 verify http client and connection reuse for recurrent calls to the same federation member#495

Merged
hartig merged 11 commits intomainfrom
494-verify-http-client-and-connection-reuse-for-recurrent-calls-to-the-same-federation-member
Feb 6, 2026
Merged

494 verify http client and connection reuse for recurrent calls to the same federation member#495
hartig merged 11 commits intomainfrom
494-verify-http-client-and-connection-reuse-for-recurrent-calls-to-the-same-federation-member

Conversation

@keski
Copy link
Collaborator

@keski keski commented Feb 3, 2026

This PR add support for HTTP connection reuse in:

  • SPARQLRequestProcessorImpl
  • TPFRequestProcessorImpl
  • BRTPFRequestProcessorImpl
  • RESTRequestProcessorImpl
  • Neo4jRequestProcessorImpl
  • GraphQLRequestProcessorImpl

For all request types except GraphQLRequestProcessorImpl the changes are minor, since the implementations for the connections were already built on java.net.http.HttpClient.

For GraphQLRequestProcessorImpl, there are more substantial changes in GraphQLConnection. During testing with a public endpoint I noticed that the raw key caused exceptions so removed it for now. (What is/was the purpose of this key originally? Is it related to Apollo and GraphiQL somehow?)

Btw, is there any documentation on how to setup the servers (and the data needed) for GraphQLRequestProcessorImplTest and Neo4jRequestProcessorImplTest?

The HttpClientProvider is currently in hefquin-base, but we may wish to move it before merge according to the ungoing discussion in #494.

Copy link
Member

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks generally very good. Just a few comments.

@hartig
Copy link
Member

hartig commented Feb 5, 2026

For GraphQLRequestProcessorImpl, there are more substantial changes in GraphQLConnection. During testing with a public endpoint I noticed that the raw key caused exceptions so removed it for now. (What is/was the purpose of this key originally? Is it related to Apollo and GraphiQL somehow?)

I honestly have no idea. The whole GraphQL connector was written by a student under the supervison of @scferrada . I didn't look so closely at that code, but I remember that it is generally not as well-designed as the core parts of the engine. Using it for real would require quite a bit of additional work. In this sense, if you managed to make GraphQLConnection work now, then that's fine for the moment.

Btw, is there any documentation on how to setup the servers (and the data needed) for GraphQLRequestProcessorImplTest and Neo4jRequestProcessorImplTest?

I'm afraid not. But maybe @scferrada can provide some insight. He wrote the Neo4j connector. If I remember correctly, for these tests, he simply used an out-of-box Neo4j server with one of their demo databases.

The HttpClientProvider is currently in hefquin-base, but we may wish to move it before merge according to the ungoing discussion in #494.

As I mentioned over there, I would like HttpClientProvider to be moved to hefquin-access, but that may better be done in a new PR after this one is merged.

Something else that just comes to my mind:
Can you please update the Changelog in this PR to add a bullet point about the change done by the PR.

@keski
Copy link
Collaborator Author

keski commented Feb 6, 2026

Can you please update the Changelog in this PR to add a bullet point about the change done by the PR.

Absolutely. Changelog updated in cebeb7b.

@keski keski requested a review from hartig February 6, 2026 13:53
Copy link
Member

@hartig hartig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for addressing my comments!

The PR is ready to merge now.

Notice that I have removed issue #494 as being resolved by this PR. The remaining TODO still to be addressed in a follow-up PR is to reverse the dependency between hefquin-access and hefquin-pgconnector/hefquin-graphqlconnector, and then to move HttpClientProvider to hefquin-access. Can you please give this a try based on what I have outlined in the issue.

@hartig hartig merged commit e8314b9 into main Feb 6, 2026
1 check passed
@hartig hartig deleted the 494-verify-http-client-and-connection-reuse-for-recurrent-calls-to-the-same-federation-member branch February 6, 2026 16:06
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

Successfully merging this pull request may close these issues.

2 participants