Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

Rugby and large data

 [1/3] from: gpweb:free at: 1-Feb-2002 10:53

Hi all, I wonder how to do to transfert very large files between two rebol process using Rugby. Try for example the file server given with Rugby samples. It well works on small files but take a file of about 30 Mo: nothing happens, just memory increase for the rebol process. Any help appreciated, maybe I don't use Rugby with right refinements. Thank you, GreG.

 [2/3] from: m:koopmans2:chello:nl at: 1-Feb-2002 12:11

The problem is that Rugby tries to compress the *complete* message before sending it. Which takes a lot of memory/time. Another approach might be to read the file in parts, i.e. a function get-part: func [ f [file!] start-byte [integer!] end-byte [integer!]][...] See also the read/binary/skip/part function. If you are doing a file-sharing in a P2P network this has the added benefit that you can collect different parts of a file from different servers concurrently. The client can then reassemble these parts. This is what Morpheus etc. do. If you use /deferred to collect the file parts you can do something like: deferred-msgs: [] ; this is a block where you stored the /deferred ticket numbers when doing the requests fileparts: copy [] until [ repeat entry deferred-msgs [ if result-available? entry [ append fileparts entry append fileparts get-result entry remove find deffered-msgs entry ] ] empty? deffered-msgs ] ;Now disassemble the fileparts yourself HTH, Maarten

 [3/3] from: rotenca::telvia::it at: 2-Feb-2002 14:45

I have found that this breaks a Rugby server: 1) open the remote tcp rugby server port 2) insert port join "00000004" "halt" The problem is in: decompose-msg: func [ {Extracts a message that has been transmitted on the wire.} msg [any-string!] ] [ return do decompress do trim/all msg ] which 'do the trimmed and 8 skipped msg I did not tested it with http. --- Ciao Romano