Hi guys! I hope this is the appropriate place to ask for clarifications.
We have a little piece of code in production that do a business critical operation. The application is really simple: is an HTTP server (supporting both CORS and JSONP) listening on a port that allows web pages to communicate with thermal printers in the local network, analyze the response code to ensure that the print job completed successfully and send to the webpage an OK or a KO. This application is written in Go and works like a charm. If not that on windows the socket read is slow as fuck and I cannot understand what is the issue. It’s just a minor annoyance, because it’s not blocking, just slower (+1s for print, easily noticeable). The problem is that is “forcing” our client to use linux, and I want to give them freedom of choice, and Go was chosen for his easy cross-compilation.
my question (sorry for the long introduction)
I finally got fed up with this issue and decided to use this as an excuse to finally learn Rust using a real project. The only problem that I have is that I’m not sure that Rust is the right choice for this kind of application because, as far I know hence me asking here, I cannot understand if it the existing HTTP libraries are blocking or not. My fear is that the trip
Browser -> HTTPlib -> socket -> printer -> socket -> HTTPlib -> Browser will result too slow because the I/O on the socket that could make unresponsive the application when reading/writing. So unfortunately the real issue here is my ignorance, but I haven’t time to research the issue at hand on my own. I’m not asking for code, only guidance towards the right libraries, pieces of literature or advices that could help me wrap my mind around this issue.