Re: [Stripes-users] Stripes-users Digest, Vol 107, Issue 4

2015-06-23 Thread VANKEISBELCK Remi
The excerpt from the doc is when you *cannot* use ranges.

The best practise for resuming downloads is range. There ain't no
alternative AFAIK in the HTTP protocol.

From the spec :
https://tools.ietf.org/html/rfc7233#section-1



Hypertext Transfer Protocol (HTTP) clients often encounter
   interrupted data transfers as a result of canceled requests or
   dropped connections.  When a client has stored a partial
   representation, it is desirable to request the remainder of that
   representation in a subsequent request rather than transfer the
   entire representation



And from the Stripes docs :


Reasons for enabling byte range serving:
...

   - Supporting resuming download managers



I'm pretty much sure that's what you want...

Cheers

Rémi

2015-06-23 1:17 GMT+02:00 Heather and Jon Turgeon 
tashiba40_evergr...@hotmail.com:

 Hi Remi, I did consider rangeSupport but I read this in the docs as a
 reason why not to use range support.

 The input to this StreamingResolution
 http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/StreamingResolution.html
 was created on-demand, and retrieving in byte ranges would redo this
 process for every byte range. 

 All my content is generated on demand, but my users often see failed
 downloads. I personally have only seen this when the internet connection is
 dropped (we are all on sailboats so our connections are either wifi or 3G).
 I guess my question is does anyone know the best practice for retrying
 dynamic content downloads? I am guessing it is something in my Javascript
 (I am using jquery and ajax to do the download) where I make sure the
 download was complete, if not try again for x numbers of times before
 giving up?

  From: stripes-users-requ...@lists.sourceforge.net
  Subject: Stripes-users Digest, Vol 107, Issue 4
  To: stripes-users@lists.sourceforge.net
  Date: Mon, 22 Jun 2015 12:00:53 +
 
  Send Stripes-users mailing list submissions to
  stripes-users@lists.sourceforge.net
 
  To subscribe or unsubscribe via the World Wide Web, visit
  https://lists.sourceforge.net/lists/listinfo/stripes-users
  or, via email, send a message with subject or body 'help' to
  stripes-users-requ...@lists.sourceforge.net
 
  You can reach the person managing the list at
  stripes-users-ow...@lists.sourceforge.net
 
  When replying, please edit your Subject line so it is more specific
  than Re: Contents of Stripes-users digest...
 
 
  Today's Topics:
 
  1. Re: File downloads, not really sure how to phrase question
  (Nestor Hernandez)
  2. Re: File downloads, not really sure how to phrase question
  (VANKEISBELCK Remi)
  3. Re: File downloads, not really sure how to phrase question
  (Nestor Hernandez)
 
 
  --
 
  Message: 1
  Date: Sun, 21 Jun 2015 11:39:56 -0500
  From: Nestor Hernandez ilu...@gmail.com
  Subject: Re: [Stripes-users] File downloads, not really sure how to
  phrase question
  To: Stripes Users List stripes-users@lists.sourceforge.net
  Message-ID:
  CAMsyVLKAgNracwgYpqoENRZDy88SNPp8akeVC1c9=5wwgh+...@mail.gmail.com
  Content-Type: text/plain; charset=utf-8
 
  Hi Jon, I think your requirement has more to do with the way you manage
  your files than with Stripes.
 
  My advise that you split the file in multiple parts and then give option
 to
  the user to download those parts
  A quick google for 'split file java' send me to
 
 http://www.eecis.udel.edu/~trnka/CISC370-05J/code/FileSplitter/FileSplitter.java
 .
  Maybe you can adapt that code.
  El jun. 21, 2015 3:42 AM, Heather and Jon Turgeon 
  tashiba40_evergr...@hotmail.com escribi?:
 
  Hi all, my app builds files to download upon a user's request. Using
  StreamingResolution seems to work well most of the time. One problem I
 seem
  to be having is my site sort of supports users with internet connections
  that are frequently less than great (it is a site used by sailors
 cruising
  in remote areas of the world). I think what I need to implement is some
  sort of multi-part with checksum for these downloads in order to get
 these
  files to my users. Could someone point me in the right direction as to
 how
  to go about this using Stripes? I am guessing something on the client end
  will also need to be written?
 
  Jon
 
 
 --
 
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
  -- next part --
  An HTML attachment was scrubbed...
 
  --
 
  Message: 2
  Date: Mon, 22 Jun 2015 12:55:17 +0200
  From: VANKEISBELCK Remi r...@rvkb.com
  Subject: Re: [Stripes-users] File downloads, not really sure how to
  phrase question
  To: Stripes Users List stripes-users@lists.sourceforge.net
  Message-ID:
  

Re: [Stripes-users] Stripes-users Digest, Vol 107, Issue 4

2015-06-23 Thread Nestor Hernandez
Remember that the ActionBean must stream the file using range support
El jun. 22, 2015 7:30 PM, Nestor Hernandez ilu...@gmail.com escribió:

 Jon,I think the solution for content in demand is that you create a
 temporary file with that content. Then show to the user a link pointing to
 an ActionBean that will stream the previously generated file.

 Cheers
 El jun. 22, 2015 6:18 PM, Heather and Jon Turgeon 
 tashiba40_evergr...@hotmail.com escribió:

 Hi Remi, I did consider rangeSupport but I read this in the docs as a
 reason why not to use range support.

 The input to this StreamingResolution
 http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/StreamingResolution.html
 was created on-demand, and retrieving in byte ranges would redo this
 process for every byte range. 

 All my content is generated on demand, but my users often see failed
 downloads. I personally have only seen this when the internet connection is
 dropped (we are all on sailboats so our connections are either wifi or 3G).
 I guess my question is does anyone know the best practice for retrying
 dynamic content downloads? I am guessing it is something in my Javascript
 (I am using jquery and ajax to do the download) where I make sure the
 download was complete, if not try again for x numbers of times before
 giving up?

  From: stripes-users-requ...@lists.sourceforge.net
  Subject: Stripes-users Digest, Vol 107, Issue 4
  To: stripes-users@lists.sourceforge.net
  Date: Mon, 22 Jun 2015 12:00:53 +
 
  Send Stripes-users mailing list submissions to
  stripes-users@lists.sourceforge.net
 
  To subscribe or unsubscribe via the World Wide Web, visit
  https://lists.sourceforge.net/lists/listinfo/stripes-users
  or, via email, send a message with subject or body 'help' to
  stripes-users-requ...@lists.sourceforge.net
 
  You can reach the person managing the list at
  stripes-users-ow...@lists.sourceforge.net
 
  When replying, please edit your Subject line so it is more specific
  than Re: Contents of Stripes-users digest...
 
 
  Today's Topics:
 
  1. Re: File downloads, not really sure how to phrase question
  (Nestor Hernandez)
  2. Re: File downloads, not really sure how to phrase question
  (VANKEISBELCK Remi)
  3. Re: File downloads, not really sure how to phrase question
  (Nestor Hernandez)
 
 
  --
 
  Message: 1
  Date: Sun, 21 Jun 2015 11:39:56 -0500
  From: Nestor Hernandez ilu...@gmail.com
  Subject: Re: [Stripes-users] File downloads, not really sure how to
  phrase question
  To: Stripes Users List stripes-users@lists.sourceforge.net
  Message-ID:
  CAMsyVLKAgNracwgYpqoENRZDy88SNPp8akeVC1c9=5wwgh+...@mail.gmail.com
  Content-Type: text/plain; charset=utf-8
 
  Hi Jon, I think your requirement has more to do with the way you manage
  your files than with Stripes.
 
  My advise that you split the file in multiple parts and then give
 option to
  the user to download those parts
  A quick google for 'split file java' send me to
 
 http://www.eecis.udel.edu/~trnka/CISC370-05J/code/FileSplitter/FileSplitter.java
 .
  Maybe you can adapt that code.
  El jun. 21, 2015 3:42 AM, Heather and Jon Turgeon 
  tashiba40_evergr...@hotmail.com escribi?:
 
  Hi all, my app builds files to download upon a user's request. Using
  StreamingResolution seems to work well most of the time. One problem I
 seem
  to be having is my site sort of supports users with internet connections
  that are frequently less than great (it is a site used by sailors
 cruising
  in remote areas of the world). I think what I need to implement is some
  sort of multi-part with checksum for these downloads in order to get
 these
  files to my users. Could someone point me in the right direction as to
 how
  to go about this using Stripes? I am guessing something on the client
 end
  will also need to be written?
 
  Jon
 
 
 --
 
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
  -- next part --
  An HTML attachment was scrubbed...
 
  --
 
  Message: 2
  Date: Mon, 22 Jun 2015 12:55:17 +0200
  From: VANKEISBELCK Remi r...@rvkb.com
  Subject: Re: [Stripes-users] File downloads, not really sure how to
  phrase question
  To: Stripes Users List stripes-users@lists.sourceforge.net
  Message-ID:
  CAG-EEs1CwFapEPoqtjz6=k2tfj4n26xb_fa5rmvqdigccs1...@mail.gmail.com
  Content-Type: text/plain; charset=utf-8
 
  Hi
 
  Have you considered using range support ?
 
  http://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7233.html
 
  It allows a client to specify a range of the resource to be fetched, so
  that the resource can be downloaded in chunks.
 
  Stripes does provide support for Ranges :