high performance client server solution in D?

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 23 12:14:30 PDT 2017


On Thursday, 23 March 2017 at 13:07:54 UTC, biocyberman wrote:
> I am considering to use D and its library to build a high 
> performance client-server application. The client will be a 
> cross platform (Windows, Mac, Linux) GUI program that can 
> synchronize analysis results with the remote central server, 
> and analyze data locally. It will also visualize big data files 
> (about 10GB of binary data each). The term 'high performance' 
> means it can serve several hundreds users with desktop 
> application speed. Further more, heavy computation tasks will 
> be done locally on the client side. This description is still 
> vague, I know. But that's the best I can give for now.
>
> I would choose 'dlangui' and check 'vibe.d' for a start. 
> However, I do not need to access the central server via web 
> browsers. Hope that you can give some thoughts about this 
> design, what GUI library to use, and what back-end library to 
> use.

cerealed, orange, and msgpack for serialisation/deserialisation 
(see code.dlang.org).  Depends how complicated your D structures 
are.  I found of those three msgpack handles more (for what I am 
doing), but vibed json serialiseToPrettyJSON (sp?) etc covers 
some that msgpack chokes on (trouble with Algebraic and 
TaggedAlgebraic from what I remember).  However for speed asdf 
has better performance.  But I guess for binary data you may as 
well use msgpack.

I use nanomsg over 0MQ as I was burned a couple of years back by 
a problem I encountered using Salt Stack (which was then based on 
0MQ) where I think if the server hangs up mid-connection than 
it's not completely straightforward to get the clients talking to 
it again.  0MQ is certainly more stable.  I find nanomsg easier 
to use, and I haven't found too many problems with it (IPC on 
Windows not implemented/didn't work).

If you use either, you might want to protect sockets if it isn't 
on internal network.  stunnel worked fine for me.

Dlangui was fine for GUI and very happy with it on linux and 
Windows.  Much quicker to develop for that than in browser, was 
our experience.


More information about the Digitalmars-d-learn mailing list