www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What is best way to communicate between computer in local network ?

reply "bioinfornatics" <bioinfornatics fedoraproject.org> writes:
Hi,

I have a linux network and i would like to know if they are a D 
library to  communicate between computer efficiently.

I do not know if that is better to use websocket and if they 
exists into dlang:
- 
http://planet.jboss.org/post/rest_vs_websocket_comparison_and_benchmarks

Thanks for your help

Regards
Jun 27 2014
next sibling parent reply "Adam D. Ruppe" <destructionator gmail.com> writes:
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
 I do not know if that is better to use websocket and if they 
 exists into dlang:
you could use websocket in D but if you are talking between two separate D programs you can just use a regular socket http://dlang.org/phobos/std_socket.html If you have a copy of my book, I have a brief how-to on std.socket in chapter 2. But for two computers just talking to one another all you have to do is on one: new Socket bind accept and on the other one: new Socket connect See the documentation for info on each of those methods.
Jun 27 2014
parent "bioinfornatics" <bioinfornatics fedoraproject.org> writes:
On Friday, 27 June 2014 at 13:02:55 UTC, Adam D. Ruppe wrote:
 On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
 I do not know if that is better to use websocket and if they 
 exists into dlang:
you could use websocket in D but if you are talking between two separate D programs you can just use a regular socket http://dlang.org/phobos/std_socket.html If you have a copy of my book, I have a brief how-to on std.socket in chapter 2. But for two computers just talking to one another all you have to do is on one: new Socket bind accept and on the other one: new Socket connect See the documentation for info on each of those methods.
Yes I bought your book i will read this chapter. Thanks
Jun 27 2014
prev sibling next sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
 Hi,

 I have a linux network and i would like to know if they are a D 
 library to  communicate between computer efficiently.

 I do not know if that is better to use websocket and if they 
 exists into dlang:
 - 
 http://planet.jboss.org/post/rest_vs_websocket_comparison_and_benchmarks

 Thanks for your help

 Regards
It's an application and network dependant decision, but I would suggest http://code.dlang.org/packages/zmqd as suitable for most situations.
Jun 27 2014
next sibling parent "bioinfornatics" <bioinfornatics fedoraproject.org> writes:
On Friday, 27 June 2014 at 13:03:20 UTC, John Colvin wrote:
 On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
 Hi,

 I have a linux network and i would like to know if they are a 
 D library to  communicate between computer efficiently.

 I do not know if that is better to use websocket and if they 
 exists into dlang:
 - 
 http://planet.jboss.org/post/rest_vs_websocket_comparison_and_benchmarks

 Thanks for your help

 Regards
It's an application and network dependant decision, but I would suggest http://code.dlang.org/packages/zmqd as suitable for most situations.
Thanks i go to take a look
Jun 27 2014
prev sibling parent reply "Sean Kelly" <sean invisibleduck.org> writes:
On Friday, 27 June 2014 at 13:03:20 UTC, John Colvin wrote:
 It's an application and network dependant decision, but I would 
 suggest http://code.dlang.org/packages/zmqd as suitable for 
 most situations.
Yeah, this would be my first choice. Or HTTP if integration with other applications is an option. I really like JSON-RPC, though it seems to not get much attention. Longer term, I'd like to extend the messaging in std.concurrency to allow interprocess communication as well.
Jun 28 2014
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Saturday, 28 June 2014 at 16:08:18 UTC, Sean Kelly wrote:
 On Friday, 27 June 2014 at 13:03:20 UTC, John Colvin wrote:
 It's an application and network dependant decision, but I 
 would suggest http://code.dlang.org/packages/zmqd as suitable 
 for most situations.
Yeah, this would be my first choice. Or HTTP if integration with other applications is an option. I really like JSON-RPC, though it seems to not get much attention. Longer term, I'd like to extend the messaging in std.concurrency to allow interprocess communication as well.
An MPI backend for std.concurrency would be a game-changer for D in certain scientific circles.
Jun 28 2014
parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Saturday, 28 June 2014 at 16:20:31 UTC, John Colvin wrote:
 On Saturday, 28 June 2014 at 16:08:18 UTC, Sean Kelly wrote:
 On Friday, 27 June 2014 at 13:03:20 UTC, John Colvin wrote:
 It's an application and network dependant decision, but I 
 would suggest http://code.dlang.org/packages/zmqd as suitable 
 for most situations.
Yeah, this would be my first choice. Or HTTP if integration with other applications is an option. I really like JSON-RPC, though it seems to not get much attention. Longer term, I'd like to extend the messaging in std.concurrency to allow interprocess communication as well.
An MPI backend for std.concurrency would be a game-changer for D in certain scientific circles.
Note: I don't have much love for MPI, but it's the only practical option on many clusters currently.
Jun 28 2014
parent reply Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Sat, 2014-06-28 at 16:21 +0000, John Colvin via Digitalmars-d-learn
wrote:

 An MPI backend for std.concurrency would be a game-changer for=20
 D in certain scientific circles.
Pragmatically, I think this would be a good idea=E2=80=A6
 Note: I don't have much love for MPI, but it's the only practical
 option on many clusters currently.
=E2=80=A6philosophically MPI sucks. The problem is that C, C++, Fortran, Chapel, X10 all assume MPI is the cluster transport. Fortunately in the Groovy, GPars, Java, Scala, Akka world, there are other options, ones that are much nicer :-) Sadly, I don't have time to contribute to any constructive work on this just now. And I ought to be doing a review and update to std.parallelism=E2=80=A6 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jun 28 2014
parent "Sean Kelly" <sean invisibleduck.org> writes:
On Saturday, 28 June 2014 at 17:11:51 UTC, Russel Winder via 
Digitalmars-d-learn wrote:
 Sadly, I don't have time to contribute to any constructive work 
 on this
 just now. And I ought to be doing a review and update to
 std.parallelism…
That's fine. I have zero free time until August.
Jun 28 2014
prev sibling parent "ponce" <contact gam3sfrommars.fr> writes:
On Friday, 27 June 2014 at 12:51:45 UTC, bioinfornatics wrote:
 Hi,

 I have a linux network and i would like to know if they are a D 
 library to  communicate between computer efficiently.

 I do not know if that is better to use websocket and if they 
 exists into dlang:
 - 
 http://planet.jboss.org/post/rest_vs_websocket_comparison_and_benchmarks

 Thanks for your help

 Regards
Not efficient in any means, but DHSL allows to create super simple webservers. https://github.com/canidae/DHSL
Jun 29 2014