Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!postnews.google.com!v11g2000prn.googlegroups.com!not-for-mail From: lewbloch Newsgroups: comp.lang.java.programmer Subject: Re: I've been lazy Date: Fri, 15 Jul 2011 08:04:31 -0700 (PDT) Organization: http://groups.google.com Lines: 26 Message-ID: References: NNTP-Posting-Host: 172.19.13.108 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1310742271 11606 127.0.0.1 (15 Jul 2011 15:04:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 15 Jul 2011 15:04:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v11g2000prn.googlegroups.com; posting-host=172.19.13.108; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ASELCHRU X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6210 On Jul 15, 12:59=A0am, Ross 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. -- Lew