5 ms·
DNS lookup stalls as motivating concurrency .. messy, complicated code with known bugs .. seriously? It's not that hard to call getaddrinfo() in a thread and f
by saywatnow 10y ago
DNS lookup stalls as motivating concurrency .. messy, complicated code with known bugs .. seriously? It's not that hard to call getaddrinfo() in a thread and feed results back (atomically) over a pipe. No shared memory or mutexes needed.
Looking at Android as a representative of "embedded" also seems a bit fallacious. The lowest-end android device I can buy has a lot more ram, storage and clocks than an average home router.
EDIT: this comes across pretty snarky - more so than is warranted. I'm surprised by the first part, but have no right to impugn the whole project based on that. The surprise remains, but I apologise for my tone.
- StreamBright 10y agoDepends on the situation, if you are in a server that needs to handle millions of requests and you create a million thread probably wont fly. If your concurrency is limited to a low enough number than you can create and terminate threads, so the proposed threading solution works well on mobile devices.
- bluejekyll 10y agoDNS gets so much blame, and yet so little time is spent to make it better. If DNS is that important to your application, you should install a caching resolver locally on your system.
- pjmlp 10y ago> Looking at Android as a representative of "embedded" also seems a bit fallacious. The lowest-end android device I can buy has a lot more ram, storage and clocks than an average home router. Well you can look at ARM Cortex-M3 running MicroEJ instead. http://www.microej.com/resources/supported-platforms/ http://www.microej.com/resources/supported-platforms/
- saywatnow 10y agoI don't understand the relevance?
- pjmlp 10y agoMicroEJ OS, a Java based OS for micro-controlers like the ARM Cortex-M3, with 128 MB NAND FLASH + 512 kB internal for storage and 32 MB SDRAM + 96 KB internal for program data, running at 12 MHz is far away from the average Android device configuration, yet can still run a mix of Java/C stack.
- saywatnow 10y agoOP: go has an interest in suiting embedded because Android. Me: Android doesn't need to meet constraints anywhere near a home router (which needs to run ntpd) You: there's a proprietary Java-based OS for Cortex-M3 .. still don't get it. Are you trying to sell me something?