[
https://jira.jboss.org/jira/browse/JGRP-837?page=com.atlassian.jira.plugi...
]
Richard Achmatowicz commented on JGRP-837:
------------------------------------------
I've made a start on this and implemented dropped messages, failed processes, network
parttions and slow processes.
Here are the public methods I have added to the Simulator:
//
// fault-injection methods
//
/*
* Simulate a crash failed process: no messages sent or received forever
*/
public void simulateCrashFailure() {
}
/*
* Simulate a slow process.
* Received messages are delayed by delay factor.
*/
public void simulateSlowProcess(long delay) {
}
/*
* Simulate a network partition
* No messages are transferred between distinct partitions
* Specify the partition we belong to.
*/
public void simulatePartition(Address[] partition) {
}
/*
* Simulate dropped messages by registering a callback which determines
* if a message is to be dropped.
*/
public void registerDropMessage(DropMessage d) {
}
/**
* Interface for a class which determines if a message should be
* dropped or not. Describes messages to be dropped.
*/
public interface DropMessage {
public boolean drop(Message msg) ;
}
Most of the methods added are fairly straightforward in their use.
In the case of dropping, reordering and duplicating messages, one first has to specify the
messages to be dropped, reordered and duplicated. (e.g. drop all messages from peer A
which have a NAKACK header with XMIT_RSP field)
instead of trying to create separate specifications of messages by parameters src, dest,
headers, etc and then check to see if a message matches the specification, I decided to
allow the user to register a drop message callback - before a message is to be put onto
the send queue, all registered drop message callbacks are called. They get access to the
message and can programmatically inspect the message and return true if the message is to
be dropped or false otherwise. The DropMessage interface describes what a drop message
callback needs to provide.
Add faulire simulation capabiliries to Simulator
-------------------------------------------------
Key: JGRP-837
URL:
https://jira.jboss.org/jira/browse/JGRP-837
Project: JGroups
Issue Type: Feature Request
Reporter: Richard Achmatowicz
Assignee: Richard Achmatowicz
Priority: Minor
The Simulator can be used to test protocol layers in isolation. Multiple Simulator
instances can be configured so that they model a multicast group.
In its present state, messages are transported from one Simulator instance to another by
the send_thread, which moves messages from send_queue to recv_queue in a reliable fashion.
Futhermore, all Simulators perform at the same speed. I'd like to use the Simulator
to additionally simulate failures, in order to check the robustness of the protocols. In
particular, i'd like to model:
* dropped, reordered, corrupted messages
* failed processors ('crash' failure)
* network partitions
* slow processes
This JIRA issue will track progress on this and allow for discussion.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira