Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!news.swapon.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?ISO-8859-1?Q?Sven_K=F6hler?= Newsgroups: comp.lang.java.programmer Subject: Re: JMS vs Sockets -- bandwidth, size, speed, etc. Date: Thu, 27 Dec 2012 14:26:05 +0100 Lines: 17 Message-ID: References: <94fcfac6-eff5-4e84-956a-8a7970867867@googlegroups.com> <50db8fbd$0$288$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.dfncis.de VKLrhPzXi6FCYtceMx5GvAw23mnAZR5qeSOPbSd6cwDTRC+BjqmtqmNU9rgfl5W7wpPKHB5LW7 Cancel-Lock: sha1:FFbmA1gEeA88l92oVfXNpe3HPgo= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <50db8fbd$0$288$14726298@news.sunsite.dk> Xref: csiph.com comp.lang.java.programmer:20724 Am 27.12.2012 01:00, schrieb Arne Vajhøj: > So the question is whether to use socket API or JMS API. > A third option would be RMI. If performance is a concern, better not use RMI. One call to a method (e.g. in order to deliver some data to the peer) will always take at least one roundtrip, as the caller side has to wait until the method (even if it is void) returns. A fourth option is to use object serialization without RMI, i.e. ObjectOutputStream and ObjectInputStream. It is worth it, if your protocol allows you to send multiple objects (or messages for that matter) without having to wait for a reply. Regards, Sven