X-Received: by 10.66.78.6 with SMTP id x6mr4229831paw.42.1356729868523; Fri, 28 Dec 2012 13:24:28 -0800 (PST) Received: by 10.50.158.227 with SMTP id wx3mr11790427igb.2.1356729868268; Fri, 28 Dec 2012 13:24:28 -0800 (PST) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!newsfeed.news.ucla.edu!usenet.stanford.edu!f6no9744748pbd.1!news-out.google.com!6ni67770pbd.1!nntp.google.com!kr7no2953405pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Fri, 28 Dec 2012 13:24:27 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 173.164.137.214 References: <94fcfac6-eff5-4e84-956a-8a7970867867@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <36274da1-b2c3-4ff2-98cc-bfef9ae418e0@googlegroups.com> Subject: Re: JMS vs Sockets -- bandwidth, size, speed, etc. From: Lew Injection-Date: Fri, 28 Dec 2012 21:24:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:20779 me2 wrote: > I think that I didn't phrase my question well enough. You are mistaken. You phrased it just fine. > There are two metrics that I am curious about--bandwidth usage and speed. We understood that. We are not stupid. The advice given stands. > For X messages of N length (assume a constant size) going to each of Y consumers (so, X * Y messages total), what is the comparison? Okay ... > I can test the speed and so far, the sockets seem to win as long as there Good. > are not a lot of consumers (otherwise the threading seems to choke it). This is consistent with the advice you've been given - measure under conditions approximating your projected deployment, compare costs and benefits, and to consider that faster than fast enough might not be worth it. It is not usually simple to create meaningful benchmarks, and without knowing the protocols, as pointed out upthread, it is impossible to make meaningful statements about the results. You state that you've run tests. Good on ye. Other people's experience is in general not at all comparable to yours. The answers upthread gave as much as possible given your parameters here. > That leaves the bandwidth question--how much larger (if any) is a JMS message > on the wire vs in a socket. I would hazard (as a newbie) that the socket is That depends entirely on the protocol used to encode the message in either case. > smaller--you don't have wrappers or envelopes or meta data but instead just The use of sockets vs. JMS is not germane to message size. Sockets have nothing to say about message size whatsoever. Zip. Nada. The train will grow as many cars as it needs to carry however much cargo you lade. JMS is an API. There is some overhead in coordinating message senders and recipients. That overhead exists also in roll-your-own schemes. > the data. So how much larger is the JMS message? Sigh. -- Lew