From: Robert Klemme Date: 2013-06-05T19:08:16+09:00 Subject: Re: TCPServer/Socket and Marshal problem --001a11c374641cec6904de654af6 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jun 5, 2013 at 10:54 AM, Panagiotis Atmatzidis wrote: > Second approach was DRuby, but you can't have bi-directional communication > in DRuby without turning the client into a server, which requires opening > another port and this in a real-case scenario won't cut it for me. > That depends on how you set it up: if avoiding that other port is so important you could have a queue on client side which is read from the server in an endless loop. Whenever the queue is empty the call blocks. Yeah, I know, ugly workaround. > TCPServer/Socket seems a lot cleaner + I have the chance of learning one > thing or two about how a client/server app works at this level. Since > time is not an issue and learning as much as possible on the process is one > of the goals, all I need to do (in my case) is ti implement 'MuTex' and > handle TCPServer/Socket connection errors in a graceful way and I'm on. > Fair enough. What is your application supposed to do? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ --001a11c374641cec6904de654af6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Wed, Jun 5, 2013 at 10:54 AM, Panagiotis Atmatzidis <atma@con= valesco.org> wrote:
=A0
Second approach was DRuby, but you can't have= =A0bi-directional communication in DRuby without turning the client into a = server, which requires opening another port and this in a real-case scenari= o=A0won't cut it for me.

That depends= on how you set it up: if avoiding that other port is so important you coul= d have a queue on client side which is read from the server in an endless l= oop. =A0Whenever the queue is empty the call blocks. =A0Yeah, I know, ugly = workaround.
=A0
TCPServer/Socket seems a lot cleaner + I have the cha= nce of learning one thing or two about how a client/server app works at thi= s level. Since time=A0is not an issue and learning as much as possible on t= he process is one of the goals, all I need to do (in my case) is ti impleme= nt 'MuTex' and handle TCPServer/Socket=A0connection errors in a gra= ceful way and I'm on.

Fair enough. =A0What is your application= supposed to do?

Kind regards

robert

--
remember.guy do |as, often| a= s.you_can - without end
h= ttp://blog.rubybestpractices.com/
--001a11c374641cec6904de654af6--