C
C#2y ago
DeaDo

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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
It seems that my application spends more time reporting the results, than actually calculating
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
The application should work on the traveling salesman problem, so in best case every calculation uses the results of the previous calcolation
Esa
Esa2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
1.) Yes 2.) No 3.) No 4.) No 5.) Yes 6.) ? 7.) No 8.) Yes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
sry pls give me some time i have to translate
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
i tried to measure it on client
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
makes sense
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
Stopwatch 😅
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Esa
Esa2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Esa
Esa2y ago
Yea I meant he could use it to rule out his application code before he moves on to infra
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
If i start the client locally it's as fast as i expect it to be
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX2y ago
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.
DeaDo
DeaDo2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
i also have to change the way i report my results
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
currently my application stops calculating until it finished checking the results on the server
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
DeaDo
DeaDo2y ago
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
Unknown User2y ago
Message Not Public
Sign In & Join Server To View