The framework contains behavior for routing and authorizing HTTP requests, persisting data in PostgreSQL, testing, and more.
One thing that makes Aqueduct really interesting is that it runs the application on a few isolated-memory threads. This is a concept interpreted from the Erlang/Elixir that leverages Dart 'Isolate's. (Here's some documentation on that: https://aqueduct.io/docs/http/structure/)
The aqueduct command-line tool serves applications, manages database schemas and OAuth 2.0 clients, and generates OpenAPI specifications.
Related question: Is multi-threading accomplished via these Isolates, or is there a threading model within each Isolate too?
Thanks!
Yes, multi-threading is accomplished through isolates. The application is run as a replica on a number of isolates, configurable by a command line option.
Each isolate has its own database connection, etc., but operate exactly the same. This behavior doesn't require any additional effort by the developer. (edit: The initialization code sets up a reactive channel for requests, each isolate instantiates that channel, and Dart's VM manages delivering an HTTP request to the most appropriate isolate.)
So, it's not quite like Erlang/Elixir where each connection gets its own process, rather the default number of isolates is 3. Isolates have their own heap, so memory isn't shared across them, but there is a message hub that isolates can send values across. This is useful when say you have websockets connected to different isolates and you want to broadcast a message to all of them.
You can spawn additional isolates from a 'web server isolate' to move computation to another thread.
"Compose modular maintainable code" or "Achieve the productivity of a cohesive framework" doesn't really say anything at all - you can replace that whole thing with a random code snippet and a big title that says "Aqueduct - now, more than ever!".
How have you found Dart as a server-side language? What's the performance like and the ease of development?
First impressions of Dart are positive. However, the server-side (interpreted) language landscape is dominated by Python, Ruby, PHP etc. Any thoughts on choosing Dart for server-side programming over these other common languages and what you think the advantages are? Many thanks.
I am unable to read the examples on the homepage as they scroll by too fast. Could you please do both of: increase the time each example stays on screen; and disable the automatic scrolling if the user makes an effort to select a particular example either by clicking the side arrows or the selector tabs on the bottom.
It's command-line tool runs the application, but there isn't much from stopping you from just using the `dart` command line tool and a Dart script to start it.
edit: Basically, you can run this on any machine that can install Dart.
And yeah, as a native iOS developer for many years, I finally sat down and built something in Flutter this weekend and really liked it.
The interesting thing about the Dart VM is there's no JavaScript at all. You can even link to C and C++ code from Dart.
1: Here's a discussion on how the Dart VM is implemented: https://groups.google.com/a/dartlang.org/forum/#!topic/misc/...)