Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0BEE9C0B6 for ; Tue, 3 Jul 2012 06:33:03 +0000 (UTC) Received: (qmail 70160 invoked by uid 500); 3 Jul 2012 06:33:02 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 69981 invoked by uid 500); 3 Jul 2012 06:33:02 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 69972 invoked by uid 99); 3 Jul 2012 06:33:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 06:33:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Alex.Huang@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 06:32:56 +0000 X-IronPort-AV: E=Sophos;i="4.77,514,1336363200"; d="scan'208";a="200850229" Received: from sjcpmailmx02.citrite.net ([10.216.14.75]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 03 Jul 2012 02:32:34 -0400 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.73]) by SJCPMAILMX02.citrite.net ([10.216.14.75]) with mapi; Mon, 2 Jul 2012 23:32:34 -0700 From: Alex Huang To: "cloudstack-dev@incubator.apache.org" Date: Mon, 2 Jul 2012 23:31:26 -0700 Subject: RE: Hibernate Thread-Topic: Hibernate Thread-Index: Ac1WHfce3mx45jrFR+OVqs/tmDGp7wAH03DAAKjUVQAAAIg/sA== Message-ID: References: <96B93665-BBD7-41C3-A1B0-A05ED1E57311@gnsa.us> <97F4356AEA71904482CD192135C038F9010C3A33BC3A@BANPMAILBOX01.citrite.net> <61AE1E2837A06D4A8E98B796183842D401292ED803B1@SJCPMAILBOX01.citrite.net> <97F4356AEA71904482CD192135C038F9010C3A4BCD7B@BANPMAILBOX01.citrite.net> <97F4356AEA71904482CD192135C038F9010C3A4BCDB3@BANPMAILBOX01.citrite.net> <97F4356AEA71904482CD192135C038F9010C3A4BD1CE@BANPMAILBOX01.citrite.net> In-Reply-To: <97F4356AEA71904482CD192135C038F9010C3A4BD1CE@BANPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Rajesh, You should use the existing CloudStack DAO framework. If cloudstack will m= ove to another ORM framework, it will have to be done in such a fashion tha= t everything above the DAO layer doesn't have to change and the majority of= the current DAO code do not have to change as well. Which would mean your= code should migrate over along with the rest of the changes. --Alex > -----Original Message----- > From: Rajesh Battala [mailto:rajesh.battala@citrix.com] > Sent: Monday, July 02, 2012 10:59 PM > To: cloudstack-dev@incubator.apache.org > Subject: RE: Hibernate >=20 >=20 >=20 > > -----Original Message----- > > From: Kelven Yang [mailto:kelven.yang@citrix.com] > > Sent: Saturday, June 30, 2012 3:31 AM > > To: cloudstack-dev@incubator.apache.org > > Subject: RE: Hibernate > > > > > > > > > -----Original Message----- > > > From: David Nalley [mailto:david@gnsa.us] > > > Sent: Friday, June 29, 2012 10:37 AM > > > To: cloudstack-dev@incubator.apache.org > > > Subject: Re: Hibernate > > > > > > On Fri, Jun 29, 2012 at 12:13 PM, Rajesh Battala > > > wrote: > > > > > > > > > > > >> -----Original Message----- > > > >> From: David Nalley [mailto:david@gnsa.us] > > > >> Sent: Friday, June 29, 2012 8:40 PM > > > >> To: cloudstack-dev@incubator.apache.org > > > >> Subject: Re: Hibernate > > > >> > > > >> On Fri, Jun 29, 2012 at 9:27 AM, Rajesh Battala > > > >> > > > >> wrote: > > > >> > > > > >> > Shall I proceed to replace Hibernate Framework with Spring JDBC. > > > >> > > > > >> > > > >> This is not a design decision to take lightly, or rush - as we've > > > >> talked about replacing the custom ORM that CloudStack uses as > > > >> well > > > >> - we'd want to make a decision on something that we are > > > >> comfortable with > > > in that role as well. > > > >> > > > > [Rajesh Battala] > > > > So we are planning to implement some ORM framework for CloudStack > > also? > > > > If so, then we need to evaluate the available ORM frameworks for > > > > java > > > which are based on Apache License? > > > > > > > > > > > > > I don't want to speak for Alex, but I have heard him mention such a > > > change number of times, and have seen it in his slides as well. > > > > > > But the larger sense is that if we are going to change something in > > > AWSAPI for communicating to the database, it should be something > > > that we are comfortable with adopting in the long term for the rest > > > of CloudStack, otherwise we'll end up with two different ways for > > > connecting to the database, which is fail. > > > > For Rajesh's concern in the short term (to get rid of Hibernate), we > > basically have following options, > > 1) Make the project depend on utils.jar in CloudStack and use existing > > CloudStack persistent layer. > > 2) Continue to make CloudBridge project independent > > a) use direct JDBC > > b) use Spring JDBC > > c) use ORM framework on Spring (i.e. OpenJPA etc) > > > > I vote on 2-b for a short term resolution. For a couple of reasons, > > > > The major reason is for adopting Spring, EC2/S3 API in the future may > > both need to support SOAP based web service API and REST API, Spring > > comes with support of both, in addition, it provides dependency > > injection, AOP and pluggable ORM framework, distributed transaction > management, etc. > > > > CloudBridge project has a very simple data model (it has only one > > table for EC2), original ORM (hibernate) usage is just for convenience > > (as Alex pointed that it tried to avoid direct SQL manipulation), on > > the other hand, giving the DAO abstraction, a limited amount of JDBC > > should not matter too much either. With Spring and already existing > > DAO abstraction, we can leave bigger ORM decision for the future. > > > > In the long term, ORM choice to us seems to be secondary > > consideration, giving the fact that our current custom ORM > > implementation serves its purpose well enough in CloudStack. But I do > > see the needs of more flexible dependency injection or transaction > > management framework in order to incorporate better integration with > > external transactional systems like message queue servers. I also see > > the needs of standardizing AOP patterns used in current CloudStack > > code base, Spring provides some good answers for that. So there is a > > possibility that it will be good for CloudStack to adopt it like many > > other Java communities do, so that we can focus on our own business > > logic and leave these external concerns to people who are doing it for = a > living. > > > > Kelven > > > > > > > > > > --David > [Rajesh Battala] >=20 > Please let me know conclusion of the thread. > I didn't see any reply to Kelven suggestions. >=20 > Thanks > Rajesh Battala