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 <teddyyyy...@gmail.com> 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 <jbel...@gmail.com> wrote:
>
>> The MessageSink code is designed for this.  Look in
>> MessagingService.sendOneWay.
>>
>> On Fri, Jun 24, 2011 at 9:58 PM, Yang <teddyyyy...@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 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
>>
>
>

Reply via email to