Hi,
Fedechicco wrote:
Ok, I imagine that the "load injection" is to be done using a simple
protocol, like an echo or something, only to test the network capabilities
of the whole thing, am I right?
Well, not only. We don't really want to test the network capabilities,
as it won't reflect the real usage of MINA. As MINA is a framework
allowing codec to be plugged-in, the most interesting part of the load
test would be to test the plugged codec.
To test MINA capabilities, we will just use an empty codec.
So basically, the injectors should be able to use any kind of protocol.
For instance, let say you want to load-test LDAP protocol, you will want
to use a client which will inject LDAP PDU to the server. The generic
client will be a simple transport system, the data being injected are
generated by something which is external to the injector (like a
plugin). The code would be something like :
int inject( dataProducer )
{
// Get the data to be injected
bytes = dataProducer.getData()
t0 = current time
send( bytes )
t1 = current time
return t1 - t0
}
assuming you are interested in the time taken to send the data. As you
can see, the dataProducer is not known by the injector. It's up to the
tester to write this producer, accordingly to what he wants to test.
Does it make sense ?
The important part of the work is to synchronize the different injectors
in order to get a realistic load charge (ie, if you have 2 injectors on
2 different machines which are not running in the same time, then you
won't test the load)
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org