digitalmars.D - Flagshit concurrency
- Gilbert Dawson <why needed.com> May 15 2011
- Robert Clipsham <robert octarineparrot.com> May 15 2011
- Nick_B <nick.NOSPAMbarbalich gmail.com> May 16 2011
- Jonas Drewsen <jdrewsen nospam.com> May 16 2011
Hello I'm new to D. I've been studying new languages for new concurrency ideas. I'd like to implement a small and lightweight Lighttpd replacement and replace the scripting with MiniD. One has heard in many places that D supports a new idea of "flagship message passing". So I'd like to use this with async i/o and one threaded server process. Is it suitable for this?
May 15 2011
On 15/05/2011 10:08, Gilbert Dawson wrote:Hello I'm new to D.
Welcome :)I've been studying new languages for new concurrency ideas. I'd like to implement a small and lightweight Lighttpd replacement and replace the scripting with MiniD. One has heard in many places that D supports a new idea of "flagship message passing".
You've hit your first roadblock here - MiniD is written in D1/Tango, the concurrency model you speak of is D2 only (not that it couldn't be implemented in D1). Your options are then - port MiniD to D2 - that will take a while, it's heavily dependent on Tango, which is D1 only (currently, D2 support is underway it seems); Use another scripting language that has D bindings; Use D - dmd is fast enough that you could in fact use D as a scripting language.So I'd like to use this with async i/o and one threaded server process. Is it suitable for this?
I believe someone is working on async i/o as a GSoC project. I don't believe support for it exists in Phobos currently - I could be wrong. Again, you could use bindings to C for this. -- Robert http://octarineparrot.com/
May 15 2011
On 16/05/2011 5:49 a.m., Robert Clipsham wrote:On 15/05/2011 10:08, Gilbert Dawson wrote:Hello I'm new to D.
Welcome :)I've been studying new languages for new concurrency ideas. I'd like to implement a small and lightweight Lighttpd replacement and replace the scripting with MiniD. One has heard in many places that D supports a new idea of "flagship message passing".
You've hit your first roadblock here - MiniD is written in D1/Tango, the concurrency model you speak of is D2 only (not that it couldn't be implemented in D1).
if you want to learn d1 & tango I suggest that you get the book: http://www.amazon.com/Learn-Tango-Macleod-Kris-Bell/dp/1590599608 and the community can be found here: www.dsource.org/projects/tango Tango is in the process of being ported to D2. cheers Nick
May 16 2011
On 15/05/11 19.49, Robert Clipsham wrote:On 15/05/2011 10:08, Gilbert Dawson wrote:Hello I'm new to D.
Welcome :)I've been studying new languages for new concurrency ideas. I'd like to implement a small and lightweight Lighttpd replacement and replace the scripting with MiniD. One has heard in many places that D supports a new idea of "flagship message passing".
You've hit your first roadblock here - MiniD is written in D1/Tango, the concurrency model you speak of is D2 only (not that it couldn't be implemented in D1). Your options are then - port MiniD to D2 - that will take a while, it's heavily dependent on Tango, which is D1 only (currently, D2 support is underway it seems); Use another scripting language that has D bindings; Use D - dmd is fast enough that you could in fact use D as a scripting language.So I'd like to use this with async i/o and one threaded server process. Is it suitable for this?
I believe someone is working on async i/o as a GSoC project. I don't believe support for it exists in Phobos currently - I could be wrong. Again, you could use bindings to C for this.
Noone is working on the async I/O project for GSoC unfortunately since we did not get enough GSoC slots assigned. Message passing is mostly used for multithreaded use. Since your app is single threaded I do not believe message passing is the way to go. A pure async reactor based design would probably give the best performance. /Jonas
May 16 2011









Nick_B <nick.NOSPAMbarbalich gmail.com> 