Michele Costa
2017-10-03 09:15:25 UTC
Hi,
i am the maintainer of a micro-benchmark branch for several different
languages: i test a plain "Hello World" HTTP server by using the `wrk`
loading tool.
I've recently added Dart to the benchmark, by relying on the async HTTP
server implementation
<https://github.com/costajob/app-servers/blob/master/servers/dart_server.dart>
i've found on official tutorials.
The resulting throughput is not disappointing, but nonetheless far from the
Node.js one, which uses the cluster library to pre-fork several processes.
Dart HTTP server implementation does not run in parallel, as confirmed by
inspecting the CPUs usage via Activity Monitor.
I read that Dart deliver parallelism on a multi-core server via the Isolate
library.
Unfortunately i have found no concrete examples of how to use Isolate on
the standard APIs and the code-snippets i found online are not relevant
and/or obsolete.
Any suggestions on how to implement a HTTP server by using Isolate.spawn
will be really appreciated.
Many Thanks
Mike
i am the maintainer of a micro-benchmark branch for several different
languages: i test a plain "Hello World" HTTP server by using the `wrk`
loading tool.
I've recently added Dart to the benchmark, by relying on the async HTTP
server implementation
<https://github.com/costajob/app-servers/blob/master/servers/dart_server.dart>
i've found on official tutorials.
The resulting throughput is not disappointing, but nonetheless far from the
Node.js one, which uses the cluster library to pre-fork several processes.
Dart HTTP server implementation does not run in parallel, as confirmed by
inspecting the CPUs usage via Activity Monitor.
I read that Dart deliver parallelism on a multi-core server via the Isolate
library.
Unfortunately i have found no concrete examples of how to use Isolate on
the standard APIs and the code-snippets i found online are not relevant
and/or obsolete.
Any suggestions on how to implement a HTTP server by using Isolate.spawn
will be really appreciated.
Many Thanks
Mike
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.