Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit4.readnews.com!postnews.google.com!gc3g2000vbb.googlegroups.com!not-for-mail From: Ross Newsgroups: comp.lang.java.programmer Subject: I've been lazy Date: Fri, 15 Jul 2011 00:59:32 -0700 (PDT) Organization: http://groups.google.com Lines: 15 Message-ID: NNTP-Posting-Host: 80.176.151.208 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1310716772 14861 127.0.0.1 (15 Jul 2011 07:59:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 15 Jul 2011 07:59:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: gc3g2000vbb.googlegroups.com; posting-host=80.176.151.208; posting-account=e1CBswoAAACHfb-egdiJeDKz3WQXJQFe User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6203 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.