-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use Apache HTTP client #1128
Use Apache HTTP client #1128
Conversation
# Conflicts: # webapi/WebapiBuild.sbt # webapi/src/main/scala/org/knora/webapi/responders/v1/SipiResponderV1.scala # webapi/src/main/scala/org/knora/webapi/store/triplestore/http/HttpTriplestoreConnector.scala
yes, it works. Notice that I use: |
I don't think that |
I've sent you all a license. GraphDB-Free is resource intensive and slow. |
We tried it on Travis, and could never get it to work. Always had some timeouts. If you have a fast CPU and not a lot of data, then it will maybe work. |
Conf Docker:
ah ok, maybe it explains my noisy fan so often! Anyway I now use your license, thanks for that. |
@subotic Which GraphDB SE version should we be using now? |
8.5.0: https://github.com/dhlab-basel/Knora/blob/develop/project/Dependencies.scala If you run docker-compose from SBT, then this is already set correctly. There are some memory issues with later versions, which we are still working on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should run the load-tests
to be sure. I'm on vacation from tomorrow on, so I could do it in January, at the earliest. You just need to run run.py
from here: https://github.com/dhlab-basel/knora-tests/tree/master/import-test
Thanks, I‘ll do it tomorrow. |
Just to have it on record. I find this at most a temporary fix. The problem is not Akka HTTP, it is more likely that the way we are using Akka and Akka HTTP is producing the problem. Just exchanging one technology with another because we don't understand it, is not really the solution. Now we have Akka, Akka HTTP, and Apache HTTP. Our library dependency tree has yet again considerably. We are going to pay the price at some other point. Next year we should try to find a solution to the real problem. |
Perhaps. But all software has bugs. And newer software with a very innovative design is perhaps likely to have more bugs than older software with a more conventional design. When we first tried Akka HTTP, it had a memory leak, which I reported to them, and they confirmed and fixed it. And they thanked me for the bug report: akka/akka#16900 (comment) It actually seems to me that we use very few features of Akka in general, and perhaps we don't really need it at all. But let's talk about this next year. |
The load test completed without errors. |
This PR changes
HttpTriplestoreConnector
,SipiResponderV1
, andSipiResponderV2
to use Apache HttpClient instead of the Akka HTTP client API.The aim of this PR is to reduce the amount of time we have to spend on HTTP client issues. We've had a series of time-consuming issues involving difficult-to-explain Akka HTTP exceptions, including:
akka.http.impl.engine.client.OutgoingConnectionBlueprint$UnexpectedConnectionClosureException
: Load testing #741java.lang.IllegalStateException: Substream Source cannot be materialized more than once
: Triplestore connection error when using dockerComposeUp #1122There's also the problem of freezing on macOS: akka/akka#25605.
Akka HTTP is a relatively new project, while Apache HttpClient is nearly 20 years old and still actively developed. Its API also seems simpler and easier to understand. And I think we don't use or need most of the features of the Akka HTTP client API.
Fixes #1122.
Fixes #1081.