Thank you to pointing this discussion, but as I said, no example
on client side ?
Now about the MD5, I agree with you on compute MD5 locally globally
on the file and comparing at the end.

However, if I send by packet as Trustin suggested, I come back to my previous
idea which was to compute MD5 on each packet, since it will bring some
extra functionnalities that could be interesting on large files.
For instance it allows to resend only the "corrupted" packet, restart a
transmission from a synchronisation point (like some FTP servers do), ...

As it takes some complexity to implement, I was looking at the new functionality
of Mina to see if I can use a simpler way...

I need to think about a clean way, perhaps something modular that can be reused
easily...

Frederic

Selon Eero Nevalainen <[EMAIL PROTECTED]>:

> This discussion brought to mind an earlier one about sending large files
>
http://www.nabble.com/Question-for-transfering-large-file-tf4222408s16868.html#a12011448
>
> What about the option of calculating the MD5 locally and then sending
> the file and the checksum after that?
>
> -Eero Nevalainen
>
> [EMAIL PROTECTED] wrote:
> > Hi Trustin,
> > (sorry for so much mails ;-)
> > Bloking IO could be problematic so I will probably work on the second
> > option (in fact my initial thoughts).
> > My initial work was based on serialization but I fell like it could
> > be no as efficient as needed, so I need to rethink about it and write
> > a protocol from scratch which will include a MD5 check on each packet
> > (security and check of file transport is the key of this project).
> > Thank a lot
> > Frederic
> >
> >
> > Selon Trustin Lee <[EMAIL PROTECTED]>:
> >
> >> On Nov 22, 2007 3:51 AM, Frédéric Brégier <[EMAIL PROTECTED]> wrote:
> >>> Hi all,
> >>> I feel that the question I post inside my long previous mail should
> >>> be on a separate one, so here it is again. Sorry for the double post !
> >>>
> >>> Just a question perhaps stupid :
> >>> I have the idea to perhaps use StreamWriteFilter or StreamIoHandler to
> >> transfer some files
> >>> but with a protocol exchange before and after the file transfer (to
> verify
> >> the access, the rules,
> >>> to make some pre or post operations, probably making an MD5 check of the
> >> transfered file...).
> >>> I have look at the mailing list but I didn't find a good example of what
> >> could be the best
> >>> but also I didn't understand how to "get" the file on the other side.
> >>> That is to say : I saw some code to send file (using StreamWF) but no on
> >> receiving this file?
> >>> I'm surely missing something, obviously...
> >> For now.. you can:
> >>
> >> 1) Use StreamIoHandler, which is not recommended because it makes MINA
> >> work like a blocking I/O server.  However, it's fine as long as you
> >> limit the usage of the StreamIoHandler.
> >> 2) Create a chunk message so your decoder generate multiple chunks
> >> with begin and end mark.
> >>
> >> Please let me know if you have any better idea to deal with big files. :)
> >>
> >> Trustin
> >> --
> >> what we call human nature is actually human habit
> >> --
> >> http://gleamynode.net/
> >> --
> >> PGP Key ID: 0x0255ECA6
> >>
> >
> >
>
>


Reply via email to