www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - need liitle help: Multithreaded + Network

reply "Björn" <bjoern.diwald gmx.de> writes:
Greetings,

I'm not very familar with D (by now) but reading this newsgroup on a regular
basis, not each of the posts, because some of them are too complicated for
me (again by now).

Now, happily, I've got some time to restart my programming hobby. To use
this very little time as efficient as possible I'm asking you about some
hints and advices, maybe a kick in the right direction ...

Application Description:
- runable on WinXP and Linux (Win because we are using it in my company with
one hour of lunch break  :), main Plattform is Linux)
- POSIX (NPTL) multithreaded
- Network communication via UDP/TCP:Port
- a little time critical (much operations as possible by defined timeslice,
repeating)
- no GUI
- many floating point opertions

I'm willing to do this in D, because of my understanding it could be the
right one, but there are some questions:
- can D handle threads in POSIX way or is it better to do it in C/C++ ?
- which should I use: Win32/DMD, Cygwin/LinuxDMD, GNU gcc/DMD ?
- which is the right lib for threads- std.thread, std.process, any other ?
- which lib for using network communication ?
- any projects out there, which can be used as thread/network tutorial ?

Some questions and a lot more in my mind  :))
which require an answer. Yes, I've searched the newsgroup and I'm aware of
dsource.org ... but not all question could be answered, without the
communication to expierenced programmers as they are here to find.

Thanks in advance for your help.

Björn
Feb 02 2005
parent pragma <pragma_member pathlink.com> writes:
In article <ctquep$djq$1 digitaldaemon.com>, Björn says...
Application Description:
- runable on WinXP and Linux (Win because we are using it in my company with
one hour of lunch break  :), main Plattform is Linux)
- POSIX (NPTL) multithreaded
- Network communication via UDP/TCP:Port
- a little time critical (much operations as possible by defined timeslice,
repeating)
- no GUI
- many floating point opertions
Sounds like mango would be a good library to use, however it may be a bit cumbersome at first. Take a good look at it, sleep on it, and then look again. Your portable network code is all in there. http://mango.dsource.org/ As for threading, D's threading model in phobos is enough for most applications. If you find yourself needing some locks/smaphores that are more sophisticated than the 'synchronized' attribute, then take a look at 'Concurrent' http://www.dsource.org/projects/concurrent/ There are other multithreading libraries for D out there. Ben Hinkle's MinTL library has some great concurrent structures to use, without all the extras that 'Concurrent' gives you: http://home.comcast.net/~benhinkle/mintl/
- which should I use: Win32/DMD, Cygwin/LinuxDMD, GNU gcc/DMD ?
Personally, I'm using Win32 for development. But if I had a linux box, I'd use that instead since it represents the lowest-common-denominator for D code compatibility (GDC releases tend to lag behind DMD). - EricAnderton at yahoo
Feb 02 2005