Best API for low latency
I have a small client application that does simple calculations. Now i want to make it report the results to my asp server. Other clients in the same wifi network should take the results and also work on those calculations. So they have to exchange their results as fast as possible. The rest api is too slow for that though. I thought that a gRPC stream would be more suitable for this Task. UDP maybe? Does a faster API even help even if i want exchange data without a direct ethernet connection?
35 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It seems that my application spends more time reporting the results, than actually calculating
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
The application should work on the traveling salesman problem, so in best case every calculation uses the results of the previous calcolation
Work on the salesman problem? As in use the best algorithm for the problem, or try to find a better algorithm?
Unless you have a university level supercomputer then the latter will be pointless I think
The different top algorithms for the problem are like 0.0001% apart in performance, and have been for years so it'll be hard to improve
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
well i wont be able to create a better algorithm than anything that already exists, but thats not the point, im just trying things out
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
1.) Yes
2.) No
3.) No
4.) No
5.) Yes
6.) ?
7.) No
8.) Yes
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
sry pls give me some time i have to translate
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i tried to measure it on client
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
makes sense
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Stopwatch 😅
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Isn't there a github repo for benchmarks that could be helpful to determine the application code is not what's making it slow?
edit: found it - https://github.com/dotnet/BenchmarkDotNet
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Yea I meant he could use it to rule out his application code before he moves on to infra
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
If i start the client locally it's as fast as i expect it to be
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
tebeco#0205
you will need to tell more or show your actual repo link if you want more help
Quoted by
<@!689473681302224947> from #Best API for low latency (click here)
React with ❌ to remove this embed.
yes ill do that first. I thought that a different API could eventually resolve my problems somewhere else. But I can see now that i should start somwhere else.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
i also have to change the way i report my results
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
currently my application stops calculating until it finished checking the results on the server
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
and thanks for those. Ill try checking all of these afterwards
changing the way i report it could make the network issue less relevant
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Ok, thanks. There are quite a few thing i want to check before that.
Basically the only thing i know so far is that the entire thing is factor 10 slower if the client is running on a different machine than the server application. Ill adapt the measuring if the rougher issues are solved.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View