[ 
http://issues.apache.org/jira/browse/DIRMINA-51?page=comments#action_12358576 ] 

Matteo Merli commented on DIRMINA-51:
-------------------------------------

I reworked on the filter to resolve the issue with the stream being splitted in 
multiple packets. I'm dealing with the two different cases of TCP and UDP.

TCP is working fine. I've added a 4 bytes int containing the overall stream 
length at the beginning. Then the object is de-serialized when the 
entire-stream is received. The partial buffer is saved as an attribute session.

UDP is more difficult. I've implemented a packet fragmentation method that 
splits the stream and send every packet with attached sequence number.
The receiver will get the UDP packets in no particular order and can 
reconstruct the stream using the sequence number.
Problems arise because I can't save the received packets as a session 
attribute. Every time messageReceived() is called on the filter, the session 
object is different. 

I thinked to use a message Id attached to every packet, and store them 
temporarely into a static Map instead of session. But then a new problem comes 
up: using session, all the saved data is cleared when a timeout event is fired. 
Using a static map, lost packets will remain there forever..

Any thoughs?
Is Udp support important or can it be droppen? I believe it's important, at 
least for a completeness point of view..




> Object serialization filter
> ---------------------------
>
>          Key: DIRMINA-51
>          URL: http://issues.apache.org/jira/browse/DIRMINA-51
>      Project: Directory MINA
>         Type: New Feature
>     Reporter: Trustin Lee
>     Assignee: Trustin Lee
>      Fix For: 0.9.1
>  Attachments: SerializationFilter.java, TestSerialization.zip
>
> Users with no time to implement PDUs will be able to get a lot of benefit 
> from this filter to test their protocol logic implementation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to