Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A6E9D434D for ; Sat, 25 Jun 2011 05:31:36 +0000 (UTC) Received: (qmail 39582 invoked by uid 500); 25 Jun 2011 05:31:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 39010 invoked by uid 500); 25 Jun 2011 05:31:26 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 39001 invoked by uid 99); 25 Jun 2011 05:31:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 05:31:19 +0000 X-ASF-Spam-Status: No, hits=4.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HK_RANDOM_ENVFROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of teddyyyy123@gmail.com designates 209.85.218.44 as permitted sender) Received: from [209.85.218.44] (HELO mail-yi0-f44.google.com) (209.85.218.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 05:31:12 +0000 Received: by yie30 with SMTP id 30so1987015yie.31 for ; Fri, 24 Jun 2011 22:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=N0aQIEtCnAbuUgMBbnTJVTQzXD9C0xmpzAwqtg65QTM=; b=Xc8mg1B0R/Fc10gFI6N+QDgivtWdER94oK5u0t221TtPHmjQciv4xeWm3CyK5b+lzf KtDTDmyNZ5F6/SVLccu9WRZOE08X6+9pkDDD7jWKzX8rzxib5JbJZFsXbUibjsaFnnCu ewr4gPSLyzs9sPeSGBxJKT7dvXycJ2lXgC0Fs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=CkONXUixxCEGt+0FUE8EXU+dIOoTTYNZb3xeVj3N1kXdaq2LbKLbeU+sOMtXRH3Zfb 2wmM///OvzRmf6lt0egaNdE3GrYmXQXeFV4uK0WB6NCRN9lcPG0zaZ8S8snRL2JCyH+5 3rMHuI6xyebqXdPCrqqJlyEPrB/deG4h3o68s= MIME-Version: 1.0 Received: by 10.236.66.17 with SMTP id g17mr6442117yhd.106.1308979851166; Fri, 24 Jun 2011 22:30:51 -0700 (PDT) Received: by 10.236.69.130 with HTTP; Fri, 24 Jun 2011 22:30:51 -0700 (PDT) In-Reply-To: References: Date: Fri, 24 Jun 2011 22:30:51 -0700 Message-ID: Subject: Re: network/message simulation framework? From: Yang To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=00248c70fce90c052b04a6829f34 X-Virus-Checked: Checked by ClamAV on apache.org --00248c70fce90c052b04a6829f34 Content-Type: text/plain; charset=ISO-8859-1 never mind, I see it does work for stopping messages. but still can't simulate multiple IPs on one box. On Fri, Jun 24, 2011 at 8:47 PM, Yang wrote: > Thanks Jonathan. > > this provides a way to essentially get a copy of the outgoing messages, > the messages onto the real connections still go through, but I would need a > way > to shut off the real connections too. > > shutting off the connections could probably done by mocking the > TCPconnection class, > but an even more difficult thing is that the ThriftSocket etc will need to > open a java.net.Socket, which > hooks onto the real IP address and port, in a simulation environment, we'd > need to > mock out the java.net.Socket too, that sounds more difficult. > > yang > > > On Fri, Jun 24, 2011 at 8:23 PM, Jonathan Ellis wrote: > >> The MessageSink code is designed for this. Look in >> MessagingService.sendOneWay. >> >> On Fri, Jun 24, 2011 at 9:58 PM, Yang wrote: >> > I'd like to verify the behavior of Cassandra under some edge case >> message >> > loss scenarios. >> > it's rather difficult to reproduce such things, cuz you have to setup >> > multiple servers, and on each box essentially control >> > the message "gates" to any other nodes in the network. the realistic way >> > that I can think of is to close off all traffic and only manually >> > allow certain messages to pass through. (in the case of Cassandra, we >> need >> > to let through all gossip messages, and manually control >> > replication messages ) >> > are there some existing simulation frameworks around? junit + various >> mock >> > frameworks look like a good fit, but >> > in reality is not enough to simulate complex network code, for example, >> it's >> > basically impossible to setup a simulated >> > N-node cluster on only one test box. >> > >> > Thanks >> > Yang >> >> >> >> -- >> Jonathan Ellis >> Project Chair, Apache Cassandra >> co-founder of DataStax, the source for professional Cassandra support >> http://www.datastax.com >> > > --00248c70fce90c052b04a6829f34 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable never mind, I see it does work for stopping messages. but still can't s= imulate multiple IPs on one box.

On Fri, = Jun 24, 2011 at 8:47 PM, Yang <teddyyyy123@gmail.com> wrote:
Thanks Jonathan.

this pr= ovides a way to essentially get a copy of the outgoing messages,
the messages onto the real connections still go through, but I would need a= way=A0
to shut off the real connections too.

shutting off the connections could probably done by moc= king the TCPconnection class,
but an even more difficult thing is= that the ThriftSocket etc will need to open a java.net.Socket, which
hooks onto the real IP address and port, in =A0a simulation environmen= t, we'd need to=A0
mock out the java.net.Socket too, that sou= nds more difficult.

yang


On Fri, Jun 24, 2011 at 8:23 PM, Jonathan Ellis <jbellis@gmail.com>= wrote:
The MessageSink code is designed for this. =A0Look in MessagingService.send= OneWay.

On Fri, Jun 24, 2011 at 9:58 PM, Yang <teddyyyy123@gmail.com> wrote:
> I'd like to verify the behavior of Cassandra under some edge case = message
> loss scenarios.
> it's rather difficult to reproduce such things, cuz you have to se= tup
> multiple servers, and on each box essentially control
> the message "gates" to any other nodes in the network. the r= ealistic way
> that I can think of is to close off all traffic and only manually
> allow certain messages to pass through. (in the case of Cassandra, we = need
> to let through all gossip messages, and manually control
> replication messages )
> are there some existing simulation frameworks around? =A0junit + vario= us mock
> frameworks look like a good fit, but
> in reality is not enough to simulate complex network code, for example= , it's
> basically impossible to setup a simulated
> N-node cluster on only one test box.
>
> Thanks
> Yang



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.c= om


--00248c70fce90c052b04a6829f34--