Return-Path: Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: (qmail 99547 invoked from network); 15 Sep 2010 17:18:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Sep 2010 17:18:12 -0000 Received: (qmail 55760 invoked by uid 500); 15 Sep 2010 17:18:11 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 55717 invoked by uid 500); 15 Sep 2010 17:18:11 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 55705 invoked by uid 99); 15 Sep 2010 17:18:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 17:18:11 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [216.82.254.227] (HELO mail202.messagelabs.com) (216.82.254.227) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 15 Sep 2010 17:18:03 +0000 X-VirusChecked: Checked X-Env-Sender: amol.deshpande@gazillion.com X-Msg-Ref: server-2.tower-202.messagelabs.com!1284571004!55270926!1 X-StarScan-Version: 6.2.4; banners=-,-,- X-Originating-IP: [216.38.137.133] Received: (qmail 32282 invoked from network); 15 Sep 2010 17:16:44 -0000 Received: from unknown (HELO hq-ex02.hq-california.com) (216.38.137.133) by server-2.tower-202.messagelabs.com with SMTP; 15 Sep 2010 17:16:44 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable x-cr-hashedpuzzle: AHr+ AQQV A8/a Bimp CAm2 CXDq DF5g DgE+ E6m1 FdLM GQFb Ghou HTcO IPRp IUFr JJWM;1;ZABlAHYAQABjAGEAcwBzAGEAbgBkAHIAYQAuAGEAcABhAGMAaABlAC4AbwByAGcA;Sosha1_v1;7;{B3C846DB-0DCD-4AF3-A6EA-D7BBC73F29CF};YQBtAG8AbAAuAGQAZQBzAGgAcABhAG4AZABlAEAAZwBhAHoAaQBsAGwAaQBvAG4ALgBjAG8AbQA=;Wed, 15 Sep 2010 17:16:40 GMT;YQBuAG8AdABoAGUAcgAgAHIAZQBmAGEAYwB0AG8AcgBpAG4AZwAgAHAAcgBvAHAAbwBzAGEAbAA= x-cr-puzzleid: {B3C846DB-0DCD-4AF3-A6EA-D7BBC73F29CF} Content-class: urn:content-classes:message Subject: another refactoring proposal Date: Wed, 15 Sep 2010 10:16:40 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: another refactoring proposal Thread-Index: ActU+cM9SU/UvbUOSPiObe6pog6bhA== From: "Amol Deshpande" To: Hi, Would there be any objections to the following code refactoring ? 1. Create a CassandraServerExceptionFactory class that returns various exceptions that can be thrown by StorageProxy instead of thrift exceptions. 2. Create a CassandraServerConsistencyLevel enum that is used instead of thrift/avro definitions by the StorageProxy, with appropriate translation methods between the enums (and perhaps a startup check function that makes sure they are identical in value). 3. Create an AbstractCassandraServer superclass that exposes methods like readColumnFamily in a transport-independent manner. 1 & 2 will make 3 possible and it lot easier to plug in other client-facing protocols. Thanks, -amol