Return-Path: X-Original-To: apmail-river-dev-archive@www.apache.org Delivered-To: apmail-river-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 049CE18A9B for ; Tue, 9 Jun 2015 18:38:59 +0000 (UTC) Received: (qmail 4957 invoked by uid 500); 9 Jun 2015 18:38:58 -0000 Delivered-To: apmail-river-dev-archive@river.apache.org Received: (qmail 4932 invoked by uid 500); 9 Jun 2015 18:38:58 -0000 Mailing-List: contact dev-help@river.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@river.apache.org Delivered-To: mailing list dev@river.apache.org Received: (qmail 4921 invoked by uid 99); 9 Jun 2015 18:38:58 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 18:38:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 301C61A48D8 for ; Tue, 9 Jun 2015 18:38:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.009 X-Spam-Level: X-Spam-Status: No, score=-0.009 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UgjhgXLCV-Pv for ; Tue, 9 Jun 2015 18:38:45 +0000 (UTC) Received: from walmailout09.yourhostingaccount.com (walmailout09.yourhostingaccount.com [65.254.253.77]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id B15BE27635 for ; Tue, 9 Jun 2015 18:38:44 +0000 (UTC) Received: from mailscan10.yourhostingaccount.com ([10.1.15.10] helo=walmailscan10.yourhostingaccount.com) by walmailout09.yourhostingaccount.com with esmtp (Exim) id 1Z2OQ2-0003ZI-4Z for dev@river.apache.org; Tue, 09 Jun 2015 14:38:38 -0400 Received: from [10.114.3.33] (helo=walimpout13) by walmailscan10.yourhostingaccount.com with esmtp (Exim) id 1Z2OQ2-0003MN-2v for dev@river.apache.org; Tue, 09 Jun 2015 14:38:38 -0400 Received: from walauthsmtp16.yourhostingaccount.com ([10.1.18.16]) by walimpout13 with id eJeb1q0040LoD9W01JeeG3; Tue, 09 Jun 2015 14:38:38 -0400 X-Authority-Analysis: v=2.1 cv=W7G2VHmk c=1 sm=1 tr=0 a=ltXMujfcukYoTVgNOHxvog==:117 a=VOtBY0qENhNzfw3MFyfBNg==:17 a=pq4jwCggAAAA:8 a=OF-CdTOGAAAA:8 a=AOeTiE0eja0A:10 a=IkcTkHD0fZMA:10 a=HCB_ZTjGAAAA:8 a=e6QiDVruAAAA:8 a=XAFQembCKUMA:10 a=pGLkceISAAAA:8 a=OE378B6pAAAA:8 a=NEAV23lmAAAA:8 a=N54-gffFAAAA:8 a=4tNoURZwAAAA:8 a=XczjXgE3AAAA:8 a=wDxMj8E_ZOa9Uo8fvwgA:9 a=QEXdDO2ut3YA:10 a=v1HM0KTT8dQA:10 a=S2gPqjIAjAYA:10 Received: from mobile-166-173-184-248.mycingular.net ([166.173.184.248]:55138 helo=[10.158.205.109]) by walauthsmtp16.yourhostingaccount.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim) id 1Z2OPy-0000IR-GZ for dev@river.apache.org; Tue, 09 Jun 2015 14:38:35 -0400 From: Gregg Wonderly Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: Clustered Jini Server? Was: Re: Mirroring to GitHub Message-Id: Date: Tue, 9 Jun 2015 13:38:31 -0500 References: <18AB9DDD-7131-48A0-A419-7F9AC391EB32@stratuscom.com> <94144018-71D0-4127-9E3E-480C4CB07CFA@stratuscom.com> <8859C632-0B54-44DF-B48A-0F6C61CED3DE@stratuscom.com> <556DF292.7060407@acm.org> In-Reply-To: To: "dev@river.apache.org" X-Mailer: iPhone Mail (12F70) X-EN-UserInfo: 24f77bb6787a3c6fdcb90c6ee26c5426:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: greggwon@pop.powweb.com Sender: Gregg Wonderly X-EN-OrigIP: 166.173.184.248 X-EN-OrigHost: mobile-166-173-184-248.mycingular.net Any Java spaces client spends most of its time blocked on a read/take from t= he space which makes it a very synchronous interface. You would put work into the space and then turn right around an make a block= ing take in most cases. Gregg Sent from my iPhone > On Jun 3, 2015, at 6:42 AM, Palash Ray wrote: >=20 > Interesting thought about using Java Spaces. However, for us, there is an > extra maintenance of the Java Spaces server in production, which is my > worry. Moreover, in our application, it is always a synchronous call from > the Swing client to the Jini server. It would be a lot of effort to make > this an asynchronous call to Java Sapces. So for our kind of application, > this would not be suitable. >=20 > Thanks, > Palash. >=20 > On Wed, Jun 3, 2015 at 1:14 AM, Simon Roberts < > simon@dancingcloudservices.com> wrote: >=20 >> Hard to be sure if this is a sensible comment without knowing more about >> what you're trying to do, but the typical "load balance" in a Jini >> environment has traditionally been a Java Spaces server, into which "jobs= " >> (probably simply Runnable implementations) are placed. The clustered work= >> engines are configured to take (in a transaction) a job from the space, >> process it, and put it back with an attribute indicating completion. On >> putting the job back, the original take transaction is committed. >> Therefore, if the server crashes before the job is completed, the "take" >> evaporates, and some other work engine gets to re-take, hopefully >> completing successfully. This model allows any number of work engines to b= e >> load balanced for essentially zero communication between them, and no >> actual load balancer exists (in the sense that no active component has to= >> keep track of the work engines). The workers take as fast at they're able= >> to do work, but no faster, so they don't get overloaded. You can bring >> workers up, and shut them down, with zero reconfiguration. >>=20 >> Cheers, >> Simon >>=20 >>=20 >>> On Tue, Jun 2, 2015 at 8:13 PM, Palash Ray wrote: >>>=20 >>> Thanks Dennis, I will definitely explore that option. >>>=20 >>> On Tue, Jun 2, 2015 at 9:37 PM, Dennis Reedy >>> wrote: >>>=20 >>>> Hi Palash, >>>>=20 >>>> Using reggie as a load balancer does not make the most sense, what you >>> may >>>> want to consider to to maintain a collection of discovered services and= >>>> simply round robin across them. You might want to start looking at the >>>> ServiceDiscoveryManager and the LookupCache for this. >>>>=20 >>>> HTH >>>>=20 >>>> Dennis >>>>=20 >>>>=20 >>>>> On Tue, Jun 2, 2015 at 9:16 PM, Palash Ray wrote: >>>>>=20 >>>>> Excellent. May be we can help each other here. >>>>>=20 >>>>> Let me start by giving some more context around the problem. >>>>>=20 >>>>> *Problem* >>>>> Our middle tier that is a Jini-based rmi server. We have a Swing >> client >>>>> that connects to it. In the middle tier, we have lot of processing >>> logic: >>>>> fetch something from the database, do some calculation intensive >>>>> processing, write the results back to the database. >>>>>=20 >>>>> Of late there has been a huge increase of the loads: the no. of Swing >>>>> clients has increased, as has the bulk of the data to be processed. >> It >>>> has >>>>> come to a point, where our production server, which is a single >>> machine, >>>> is >>>>> creaking under the load. >>>>>=20 >>>>> So, we have decided to cluster it. We are planning to have at least 3 >>> or >>>> 4 >>>>> Jini servers and a load balancer to spread out the load evenly. >>>>>=20 >>>>> I was doing a proof of concept using the Jini infrasctrure itself. >>> These >>>>> were my thoughts: >>>>>=20 >>>>> *Option 1* >> https://github.com/paawak/blog/tree/master/code/jini/unsecure/load-balanc= ing >>>>>=20 >>>>> The load balancing architecture here is very very simple. There is a >>>>> single load balancer with its own reggie running at 6670. This is the >>>>> primary contact point for all clients. >>>>>=20 >>>>> There are multiple reggie involved for load balancing. The following >>>>> convention is followed: >>>>>=20 >>>>> 1. The reggie for load balancer is at 6670 >>>>> 2. The reggie for the actual jini servers are at 5561, 5562, 5563, >> etc. >>>>>=20 >>>>> When the load-balancer recieves a request from client, it does the >>>>> look-up at the appropriate jini-server and returns the remote >> service. >>>>>=20 >>>>> *Option 2* >>>>> https://github.com/paawak/jini-in-a-war >>>>>=20 >>>>> I figured that if we can embed the Jini in a Tomcat and then >> clustering >>>> the >>>>> Tomcat would be very easy. But this is still work in progress, and >>> there >>>>> are lot of details that I need to figure out. >>>>>=20 >>>>> Please let me know if the above makes sense or is around the same >>> things >>>>> that interest you. I would like to have a out of the box Jini >> solution >>>>> that *just >>>>> works*. And I am happy to code for any solution that you guys think >>>> should >>>>> be the way forward. >>>>>=20 >>>>> Thanks, >>>>> Palash. >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>>=20 >>>>> On Tue, Jun 2, 2015 at 2:14 PM, Patricia Shanahan >>> wrote: >>>>>=20 >>>>>> Also, if there is any chance the bottleneck is in River, I would be >>>> very, >>>>>> very interested in constructing a benchmark based on your workload >>> that >>>>>> demonstrates the scaling problem. I would like to run it against >> the >>>>> latest >>>>>> unreleased version, which I think may fix some scaling issues. If >> it >>>>> still >>>>>> shows scaling problems, I want to track them down and see whether >>> they >>>>> are >>>>>> fixable without clustering. >>>>>>=20 >>>>>> My most recent professional background, before retiring, was as a >>>>>> performance architect working on multiprocessor servers for Cray >>>> Research >>>>>> and Sun Microsystems. When I first got involved in River I was >>> thinking >>>>> of >>>>>> doing some performance analysis and improvement, one of my favorite >>>>> games, >>>>>> but could not find a suitable benchmark, or an actual user with a >>>> scaling >>>>>> problem. >>>>>>=20 >>>>>> Patricia >>>>>>=20 >>>>>>=20 >>>>>>> On 6/2/2015 10:24 AM, Greg Trasuk wrote: >>>>>>>=20 >>>>>>>=20 >>>>>>> Palash: >>>>>>>=20 >>>>>>> Could you expand on your need for a =E2=80=9Cclustered Jini server=E2= =80=9D? What >>>>>>> features are you looking for, and what aspects of the application >>> need >>>>> to >>>>>>> be clustered? This might provide fertile grounds for development. >>>>>>>=20 >>>>>>> Cheers, >>>>>>>=20 >>>>>>> Greg Trasuk >>>>>>>=20 >>>>>>> On Jun 2, 2015, at 12:38 PM, Palash Ray >> wrote: >>>>>>>>=20 >>>>>>>> Hi Greg, Patricia, >>>>>>>>=20 >>>>>>>> Really happy to see: >>>>>>>> https://github.com/trasukg/river-container >>>>>>>>=20 >>>>>>>> I think we are off in the right direction. I have been using >> river >>>> for >>>>>>>> almost 2 years now, but only recently started taking an interest >> in >>>>>>>> the code that makes it tick. >>>>>>>>=20 >>>>>>>> Our organisation is facing some scalability issues with Jini of >>> late, >>>>>>>> well, I am not blaming Jini here, its just that we need a >> clustered >>>>>>>> Jini server. >>>>>>>>=20 >>>>>>>> To that end I was playing around the code a bit. I have some >> ideas >>>>>>>> which I can discuss with this group later. >>>>>>>>=20 >>>>>>>> I have created a small proof of concept of embedding Jini in a >> war >>>> and >>>>>>>> running it in a webserver: >>>>>>>> https://github.com/paawak/jini-in-a-war >>>>>>>>=20 >>>>>>>> Also, I keep blogging about Jini with whatever little >>> understanding I >>>>>>>> have: >>>>>>>> http://palashray.com/java/jini/ >>>>>>>>=20 >>>>>>>> In the coming days, I look forward to contributing to the river >>>>> project. >>>>>>>>=20 >>>>>>>> Thanks, >>>>>>>> Palash. >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>> On 6/2/15, Greg Trasuk wrote: >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>> Thanks, Jukka. And by the way, I=E2=80=99m happy to see you=E2=80= =99re still >>>> watching >>>>>>>>> River! >>>>>>>>>=20 >>>>>>>>> Cheers, >>>>>>>>>=20 >>>>>>>>> Greg Trasuk. >>>>>>>>>=20 >>>>>>>>> On Jun 2, 2015, at 11:14 AM, Jukka Zitting < >>>> jukka.zitting@gmail.com> >>>>>>>>>> wrote: >>>>>>>>>>=20 >>>>>>>>>> Hi, >>>>>>>>>>=20 >>>>>>>>>> 2015-06-02 1:17 GMT-04:00 Greg Trasuk >> : >>>>>>>>>>=20 >>>>>>>>>>> I notice that for some reason, the 2.1 branch shows up as >>> current, >>>>> so >>>>>>>>>>> you >>>>>>>>>>> need to switch >>>>>>>>>>> to the 2.2 branch explicitly to see the latest releases. I=E2=80= =99m >>> not >>>>> sure >>>>>>>>>>> how to change that. >>>>>>>>>>=20 >>>>>>>>>> You can file an INFRA issue to get the default branch and other >>>>> GitHub >>>>>>>>>> metadata changed. >>>>>>>>>>=20 >>>>>>>>>> Jukka >>=20 >>=20 >>=20 >> -- >> Simon Roberts >> (303) 249 3613 >>=20