Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6212

Re: I've been lazy

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: I've been lazy
Date 2011-07-15 08:30 -0700
Organization http://groups.google.com
Message-ID <76875584-1dec-49d9-8b4b-5f4099ae83aa@d1g2000yqm.googlegroups.com> (permalink)
References <c08ee4fe-df1e-4a2a-8c26-17137d64c60a@gc3g2000vbb.googlegroups.com> <a41afdf5-88cd-4d67-8f3c-e7881064fcc6@v11g2000prn.googlegroups.com>

Show all headers | View raw


On 15 Jul., 17:04, lewbloch <lewbl...@gmail.com> wrote:
> On Jul 15, 12:59 am, Ross <rossclem...@gmail.com> wrote:
>
> > I've just written a client/server application. Usually when I do this,
> > I have to spend some time getting the protocols right, with hung
> > clients or servers being a typical alpha debugging scenario. This time
> > I just decided that all communications from the client were a single
> > string (encoded and sent encrypted with the server's public key).
> > Where usually I'd have a sequence of steps for operations that require
> > multiple bits of data, I just encoded all data into the single string,
> > and the server unpacks them, executes the command potentially using
> > unpacked data, and then replies with a single packed string. This was
> > much easier than having multi-step protocols.
>
> > Next time I'm defining an XML schema for requests and replies to make
> > this even more robust/general.
>
> > Apologies for the stream of consciousness question-less post.
>
> This isn't a help desk but a discussion group, so your introduction of
> a discussion topic is entirely appropriate.  Sounds like RESTful
> services or other XML-based communication protocols.  Since there are
> plenty of robust, standard libraries for this out there, you might
> seriously want to use those.  It's hard enough to master the
> deployment and ops details without reinventing the programming wheels.

Another thought that came to mind when reading the original posting:
if both client and server are Java and there is zero chance that other
languages need to be supported RMI might be a good choice, too.  RMI
avoids to manually do the parsing process.  If other languages need to
be supported then CORBA's IIOP is also a good fit - especially since
it is less verbose than XML (and maybe also RMI).  Granted, nowadays
XML and SOAP / WS are hip and there are plenty tools around (and also
debugging of ASCII based messages is easier) so that's probably the
most reasonable way to go.

Kind regards

robert

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

I've been lazy Ross <rossclement@gmail.com> - 2011-07-15 00:59 -0700
  Re: I've been lazy lewbloch <lewbloch@gmail.com> - 2011-07-15 08:04 -0700
    Re: I've been lazy Robert Klemme <shortcutter@googlemail.com> - 2011-07-15 08:30 -0700
  Re: I've been lazy Paul Cager <paul.cager@googlemail.com> - 2011-07-15 08:35 -0700
    Re: I've been lazy Ross <rossclement@gmail.com> - 2011-07-15 09:38 -0700
      Re: I've been lazy Robert Klemme <shortcutter@googlemail.com> - 2011-07-16 14:48 +0200
        Re: I've been lazy Ross <rossclement@gmail.com> - 2011-07-16 08:48 -0700
          Re: I've been lazy lewbloch <lewbloch@gmail.com> - 2011-07-16 10:21 -0700
    Re: I've been lazy Ross <rossclement@gmail.com> - 2011-07-15 09:39 -0700

csiph-web