Hi ,
I working on a Image transfer application between a client and server over
Mina.
Image files are around 3000 kbs in length. Im transfering over a compression
filter followed by
a Objectserialization protocol handler.
Transfering 1 image file to my localhost would take around 2 seconds. I was
wondering if there is
any way to increase this benchmark? I know this is a silly question on
bandwitdh and latency but any suggestions would be apreciated. Heres a snipet
of the code.
public void messageReceived(..,..){
// Serialized object
CommandMsg commandMsg = (CommandMsg) obj;
//get a fresh new bytebuffer from the producer (exchanger object)
fullBB = exchanger.exchange(fullBB);
//close session if the byte buffer is empty
if(fullBB== null){
session.close();
return;
}
//set bytes to the object setter method
commandMsg.setImageByte(fullBB);
//encrypt the bytes over AES and encrypt the key over RSA
commandMsg = cipherFacade.cipher(commandMsg);
//write it out..
session.write(commandMsg);
}