From: Panagiotis Atmatzidis Date: 2013-06-05T17:54:29+09:00 Subject: Re: TCPServer/Socket and Marshal problem --Apple-Mail=_9D9CF1EA-9034-410C-BB55-38BA61FDDD9E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello Robert, On 5 =CE=99=CE=BF=CF=85=CE=BD 2013, at 08:52 , Robert Klemme = wrote: >=20 >=20 >=20 > On Mon, Jun 3, 2013 at 8:47 PM, Panagiotis Atmatzidis = wrote: > I'm writing a client/server application using TCPSocket and TCPServer. = To serialize the objects at this point I use Marshal, since it comes = handy. >=20 > This is where I'd stop and use DRb instead. My first approach was a Sinatra app + YAML (that worked actually = although I didn't like it very much though, so I drop it).=20 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. 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. >=20 > Kind regards >=20 > robert >=20 > --=20 > remember.guy do |as, often| as.you_can - without end > http://blog.rubybestpractices.com/ Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0x1A7BFEC5 gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5 -- The wise man said: "Never argue with an idiot. They bring you down to = their level and beat you with experience." --Apple-Mail=_9D9CF1EA-9034-410C-BB55-38BA61FDDD9E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello = Robert,

On 5 =CE=99=CE=BF=CF=85=CE=BD 2013, at = 08:52 , Robert Klemme <shortcutter@googlemail.com&= gt; wrote:




On Mon, Jun 3, 2013 at 8:47 PM, Panagiotis = Atmatzidis <atma@convalesco.org> wrote:
I'm writing a = client/server application using TCPSocket and TCPServer. To serialize = the objects at this point I use Marshal, since it comes handy.

This is where I'd stop and = use DRb = instead.

My = first approach was a Sinatra app + YAML (that worked actually although I = didn't like it very much though, so I drop = it). 

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.

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.



Kind regards

robert

-- =
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.= com/

atma@convalesco.org
URL: = http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg = --keyserver pgp.mit.edu --recv-keys 1A7BFEC5
--
The wise man = said: "Never argue with an idiot. They bring you down to their = level and beat you with experience."

= --Apple-Mail=_9D9CF1EA-9034-410C-BB55-38BA61FDDD9E--