Upload large file - my results and questions

Robert Kuszinger <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CAJS2e5jovhXFfBrPbQiF5ukMvCq4C8V0XOWjs53LA+B26kKN=w@mail.gmail.com>
Hello!

I need to work out a big file uploader. Files could be around ~300Mb.

*Toolchain:*

   - OS: Linux kuszidell 4.3.3-2-ARCH #1 SMP PREEMPT Wed Dec 23 20:09:18
   CET 2015 x86_64 GNU/Linux running Pharo
   - Pharo4.0, Latest update: #40626
   - Loaded config: KomHttpServer (HernanMoralesDurand.25)
   - Loaded config: Seaside3 (topa:278)
   - Seaside Adaptor: WAComancheAdaptor on 8080

*Results:*

   - When working locally, even 153 MB file is uploaded in seconds.
   - Pharo grows in memory with each upload (haven't seen any degradation
   yet). This is also a situation when uloading locally (localhost:8080)
   - Received file (ByteArray) is held in memory when receiving (checked
   with halt/inspect).

However, when running on the *final configuration*:

   - IIS7.5 on Windows Server 2008R2 as reverse proxy with ARR and Rewrite
   IIS "plugins"
   - VPN connection from IIS box to the Linux box with Pharo, see above

The following effects realized:

   - Upload process goes well, no error. However, sometimes the resulting
   file wouldn't appear in the target directory (??). No error in Pharo as
   well. Disappears (hmm?).

*Questions:*

   - are there* any timeout settings* in Seaside and/or in Comanche?
   Especially on transfers, etc. Session timeout could be short, if any... The
   main difference between the local and final config/setup is the
   network/transfer speed (VPN is very slow).
   - Is there an *option for streaming directly the uploaded file* into a
   target file?



*Uploading "software" is as easy as this:*

*renderContentOn:* html
html form multipart;
           with: [
     html fileUpload callback: [ :value | self receiveFile: value ].
     html submitButton: 'Upload' ].

*receiveFile:* aFile
    | stream |
stream := (FileDirectory default directoryNamed: '/home/kuszi/tmp')
assureExistence;
          forceNewFileNamed: aFile fileName.
[ stream binary; nextPutAll: aFile rawContents ] ensure: [ stream close ]




Thanks and best regards
Robert

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.