Return-Path: Delivered-To: apmail-incubator-river-dev-archive@minotaur.apache.org Received: (qmail 4412 invoked from network); 16 Jul 2009 18:47:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jul 2009 18:47:27 -0000 Received: (qmail 93353 invoked by uid 500); 16 Jul 2009 18:48:32 -0000 Delivered-To: apmail-incubator-river-dev-archive@incubator.apache.org Received: (qmail 93291 invoked by uid 500); 16 Jul 2009 18:48:32 -0000 Mailing-List: contact river-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: river-dev@incubator.apache.org Delivered-To: mailing list river-dev@incubator.apache.org Received: (qmail 93278 invoked by uid 99); 16 Jul 2009 18:48:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 18:48:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.230.240.46] (HELO eastrmmtao104.cox.net) (68.230.240.46) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 18:48:21 +0000 Received: from eastrmimpo01.cox.net ([68.1.16.119]) by eastrmmtao104.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20090716184800.MNFS5576.eastrmmtao104.cox.net@eastrmimpo01.cox.net> for ; Thu, 16 Jul 2009 14:48:00 -0400 Received: from [127.0.0.1] ([70.184.37.175]) by eastrmimpo01.cox.net with bizsmtp id Ginz1c00H3mk5mm02inzuR; Thu, 16 Jul 2009 14:48:00 -0400 X-VR-Score: -100.00 X-Authority-Analysis: v=1.0 c=1 a=YGwwFSkpllAA:10 a=SXoUW2a2AAAA:8 a=cexIBkohAAAA:8 a=0LiwH3idAAAA:8 a=COfzQ7OkAAAA:8 a=cUkJqsZVBm0ous2JtNYA:9 a=_9QlpZdA1IhzbdjYQs4A:7 a=f-uGOIMefyQKXwPe_58ZpkG8g1EA:4 a=Iw3voKnnhAhAFGCS:21 a=oPof_Skye7WvgYa8:21 X-CM-Score: 0.00 Message-ID: <4A5F75DE.7010403@cox.net> Date: Thu, 16 Jul 2009 13:47:58 -0500 From: Gregg Wonderly User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: river-dev@incubator.apache.org Subject: Re: OSGi RFC 119 Distributed OSGi - (Was [RE: OSGi and Jini]) References: <0CC21688-E720-40BB-8237-D47B4DEE4F48@wonderly.org> <4A4921FA.3030408@wonderly.org> <510143ac0907030226i22b4d6e9tf70857d357f115f4@mail.gmail.com> <964EAC824495234A86F3C47DA8BD8AAD1776B4@sucden-exch.sucden.co.uk> <4A5D62C2.7040506@zeus.net.au> <93890df00907142331h24885effp59803db4c71c14d9@mail.gmail.com> <4A5DEF93.6010607@simulexinc.com> In-Reply-To: <4A5DEF93.6010607@simulexinc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am not concerned about any performance issues regarding Groovy based configuration either. It may be that you spend 30ms loading config values instead of 3ms for example. Not a big issue for me. Gregg Wonderly James Grahn wrote: > Do recall that we're discussing Groovy as a replacement to the > reduced-java DSL that Jini uses as configuration. So I don't really > see where efficiency concerns enter into this (very limited use, one > time cost). > > (That said, Groovy is likely as fast or faster than whatever interpreter > we run now.) > > jamesG > > Elijah Menifee wrote: >> Some of the nice features of groovy is because it is a dynamic language, >> that can be compiled down to the JVM by the parser when it it >> reread/reloaded/redefined. According to my understanding however that >> capability comes at a price: The dynamic code that it generates relies >> on a >> lot of reflection to do some of its magic, so the code is not >> optimized the >> way the standard javac does with static class/method lookup at compile >> time, >> thus it runs slower. JDK 7 is slated to include JSR >> 292 >> which is supposed to add new JVM Bytecode Ops specifically for >> dynamically >> invoking and redefining class/method structures, which extend beyond just >> groovy to being able to efficently target lots of different dynamic >> languages to the JVM efficently, you can read more about this at Dynamic >> Language >> Support >> >> . >> >> NOTE, I am not saying we should not use Groovy, I am just pointing out >> the >> potential inefficiency until JDK 7 is available. >> >> In fact one of the things I am looking at is using these type of features >> (Groovy or another dynamic scripting language that can be run in java >> such >> as Ruby) in the prototype to replace our server. Note that our current >> server is written in PERL, and in some ways using a dynamic scripting >> language with simplified DBI style of untyped SQL access would greatly >> simplify the porting of much of our buisness logic. >> >> The problems we have had with the PERL include low-level bugs in the >> Net::SSLeay code when a Socket is disconnect during packet writes. >> Because >> of this low-level library bug processes sometimes hang around, >> consuming cpu >> and memory trying to write and renegotiate the link instead of >> propogating >> this disconnect error condition up. In fact one of the tasks on my plate >> during business hours is to determine a way to fix this, and submit the >> patch to CPAN. Another problem (which we believe was fixed sometine ago, >> but have not rewritten our server to take advantage of) is that at one >> time >> the PERL thread model was broken when run on SMP (bug on early Perl 5 and >> 2.2 linux kernels...) machines, so our server was changed to use process >> forks, which is not nearly as scalable as the threaded server we >> started out >> with. >> >> We have had no problems with the SSL layer on our client side in java,and >> the java SSL implementation is much more heavily utilized and >> maintained in >> this world of JavaEE servers, so the entire reason for prototyping the >> new >> server on java using some the more recent technology is to move to a much >> more scalable infrastructure as we add clients, using a common code >> base on >> both the server and client, and limiting the number of concurrent >> transactions on the DB via worker threads in a que to optimize server >> load, >> and support asynchronous messaging back to the client for push style >> updates >> on data changes from other clients, which can not be cleanly/easily done >> with our PERL forked server. >> >> SO my two cents worth is we use Groovy knowing that it will eventually >> become much more efficent on the JVM. >> >> On Wed, Jul 15, 2009 at 12:01 AM, Peter Firmstone >> wrote: >> >>> Gee, that looks easy Dennis, >>> >>> We could also support using java source too in JDK 1.6 or later as the >>> compiler API is included, but groovy looks so much like java (less >>> semicolon) it's not funny! >>> >>> I can't see any reason why we can't use Groovy? Users can choose with >>> their feet. >>> >>> What was the objection? >>> >>> +1 Peter. >>> >>> >>> >>> >>> Dennis Reedy wrote: >>> >>>> On Jul 13, 2009, at 753AM, Tom Hobbs wrote: >>>> >>>>> >>>>> Someone on the Jini-Users (or similar, I can't quite remember) a while >>>>> ago was talking about using Groovy classes to describe service >>>>> configuration. Something like this sounds pretty neat, but anything >>>>> that needs to be recompiled for changes can take affect is likely >>>>> to be >>>>> unworkable for obvious reasons. >>>>> >>>> I brought up the Groovy config support. Rio has switched over from the >>>> Jini configuration file approach to now use Groovy classes. No >>>> compilation >>>> is required, the Groovy classes are parsed when loaded by the >>>> GroovyConfiguration utility. A simple example of a Groovy >>>> configuration for >>>> Reggie follows: >>>> >>>> @Component('com.sun.jini.reggie') >>>> class ReggieConfig { >>>> >>>> String[] getInitialMemberGroups() { >>>> def groups = [System.getProperty(Constants.GROUPS_PROPERTY_NAME, >>>> 'rio')] >>>> return (String[])groups >>>> } >>>> >>>> String getUnicastDiscoveryHost() { >>>> return java.net.InetAddress.getLocalHost().getHostAddress() >>>> } >>>> >>>> } >>>> >>>> >>>> >>>> >>>> >>>> >> >