-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Question about multi thread #308
Comments
The authorization happens on one thread only and there's not much optimization that can be done. One additional thread is spawned for the websocket dealer connection, but that's strictly necessary. You may want to profile your application to let me know which methods take the most. A quick reminder:
|
Yeah, but maybe after some modifications authorization could happen on more than one thread thanks to ExecutorService. Is it possible? PS |
You can't do authentication on multiple threads simultaneously, it's a TCP socket. |
Yeah but I'm wondering why spotify mobile app using web request to authenticate |
I believe it's using a different API, we reverse engineered the desktop app. |
Well, it's not true i already used network traffic inspector on desktop app and it also using http request to authenticate. Could you look at it? |
Oh yeah that's part of the authentication in the new clients, but not all of it. They moved a good part of the API to HTTP, but there's still stuff on the Hermes protocol which needs to authenticate via the TCP socket like the audio key. |
But that new API have the same protobuf objects? |
It depends, all the proto definitions needed are in the repository. |
Could you look at this http authorization? It's much more efficient than socket one |
The desktop client requires the socket connection anyways as of a couple of months ago. I don't know if they removed that, but they probably didn't because it's their most secure channel and they'll still use it for the audio key. |
Yeah that's right, but could you look at it? More efficient way will be better for everyone |
Closing in favor of #322 |
Hello, I have a problem with auth service, how could I modify code or use library to achieve better results in authorize response time? Because when I'm using 50 threads, I'm only have 6-8 response in one second. Maybe it's limited in library or something need synchronized method?
The text was updated successfully, but these errors were encountered: