On Friday, 18 May 2012 at 06:35:59 UTC, Jarl André wrote:
I am a Java developer who is tired of java.nio and similar
complex socket libraries.
In Java you got QuickServer, the ultimate protocol creation
centered socket library. You don't have to write any channels
and readers and what not. You just instantiate a server,
configures the handlers (fill in classes that extends a handler
interface) and there you go.
Shouldn't there exist a similar library in any programming
language? Not doing so is assuming that developers always need
control of the lower layers. Its not true. I care about
protocol. Not sockets.
Is there any abstraction layers in phobos? Or is everything
just as complex as before?
Check out arsd:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff
I used cgi.d to make my own server easily (compile with
-version=embedded_httpd). If you want more lower-level control,
try a ListeningConnectionManager. To see how it's used, look at
the code starting on line #1926.
It has some pitfalls (e.g. I can't find a good way to stop the
server), but it is very nice in _easily_ starting up, with _zero_
config.
NMS