|
|
|
|
|
by pron
4095 days ago
|
|
> That's what I mean when I write "most of the time". I absolutely agree that in the scenarios you've described, the thread implementation makes no difference (again Little's Law), and that this is "most of the time" for traditional web apps. But we're working with people who are working on IoT, where there is constant ingest (and queries) from all sorts of devices, where we're easily surpassing 100K concurrent request, and expected to grow beyond that by several orders of magnitude. > No matter what you do, you have to do it now as the UI is being displayed, because you can't de-schedule the user that is looking at the screen. Ah, now I understand what you mean (thanks for being patient)! Still, I think this pseudo code (which gets run in a fiber for every image): display stub image
fetch image
display image
is easier than any callback-based alternative. You can even make it more interesting: Future<Image> image = get image
while(!image.isDone) {
display spinner frame
sleep 20 ms
}
display image
This is a lot easier than the async alternative. |
|