Status of LargeMessages work
clebert.suconic Oct 27, 2008 7:27 PMThis is the status of my current work on MessageChunk and LargeMessages.
It is committed on https://svn.jboss.org/repos/messaging/branches/Branch_Chunk_CRS2/ waiting revision before we add it to trunk. Branch_Chunk_CRS2 was just created today (r5188)
I - I have added a method getPacketSize on the Packet interface. The abstract class is still returning (at this point at least) the DefaultPacketSize, but MessageSend, Chunk and Receive are calculating the packetSize accordingly.
With that the InVM transport will also work for big messages, and we can avoid extra unecessary buffer creations.
* As soon as we merge it on trunk, we could have all the packets implementing this. But this is not a really high priority.
II - I have added a new interface called ServerLargeMessage which will be implemented by each storage-manager we have. We have JournalServerLargeMessageImpl and NullStorageManager. The StorageManager will be responsible for the instantiation of this class.
III - I have separated the reference counting of references and durable references on Messages (that fix on paging discussed on this thread: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=144128)
As soon as we remove the reference from the queue (ACKs) I decrement the refCount. I use that ref to delete large messages stored on files.
IV - Paging could page largeMessages also. (On that case I don't take the bodySize in consideration, as that will be stored outside of the memory).
V - The ChunkSize is configured on the ConnectionFactory, and the default is 100k
VI - I have created a new Packet caleld SessionSendChunkMessage, and it is being used both ways (client2server and server2client).
VII - When uploading files, I'm using an extension as ".tmp" until they completed. I have found a few edge cases on keeping track of those files after a restart, and I need to have some discussion about how to do it. It looks like I will need to inspect the files for files on journal and paging when we restart.