World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Andreas 11-Jan-2010 [1054x2] | currently we have to do wait foo/..../subport, as far as i can tell |
then, as far as i currently understand it, read foo should work | |
Graham 11-Jan-2010 [1056] | that's what my read does, it does a wait on the tcp port |
Andreas 11-Jan-2010 [1057x5] | you'll have to "block" somewhere |
the transfer won't happen in zero time | |
to indicate when it's fine to block: WAIT | |
but well, i don't think we can get that to work, at the moment | |
i'll have to experiment a bit more | |
Graham 11-Jan-2010 [1062] | so I can't return immediately from my read ... and let it download ? |
Andreas 11-Jan-2010 [1063x3] | somewhere you'll need something that blocks, yes |
if you want to download while in the console, that could be a console background worker thread | |
if you want to download within a GUI app, that could be the GUI's main event loop | |
Graham 11-Jan-2010 [1066] | well, generally inside a gui .. so that's okay I guess. |
Andreas 11-Jan-2010 [1067x2] | something that blocks: an event loop |
i.e. something that checks all ports registered via read for incoming events, and dispatches events accordingly | |
Graham 11-Jan-2010 [1069] | so we add a gui event to the thing .. and we work inside of that |
Andreas 11-Jan-2010 [1070x5] | fine for gui's, yes |
shouldn't be bound to guis | |
R3 actually needs an event loop to work anyway | |
it's there on win32, not there on linux (yet) | |
btw, here's the source link to the pop3 seq diagram: http://bit.ly/4q0ADG | |
Graham 11-Jan-2010 [1075] | One good thing .. on r2 I doubt I could download a 500Mb file using ftp .. but I'm nearly there now and the windows task manager is only showing 12Mb of ram usage with 0-1 % cpu |
Andreas 11-Jan-2010 [1076] | very nice |
Graham 11-Jan-2010 [1077] | We need some standard network error handlers too .. like if the password is wrong etc. |
Andreas 11-Jan-2010 [1078x2] | the other, more traditional approach, would be something around copy/part |
(for your data streaming question) | |
Graham 11-Jan-2010 [1080] | except the r2 ftp scheme doesn't support that ... AFAIK |
Andreas 11-Jan-2010 [1081x4] | ftp: open ftp://... write/append %... copy/part ftp 10240 |
don't care about R2 :) | |
(I don't) | |
wrap a `while [not tail? ftp] [....]` around this | |
Graham 11-Jan-2010 [1085] | My issue with the schemes is that the interface to them was always too restricted ... |
Andreas 11-Jan-2010 [1086] | yeah. don't know if that's even possible in R3 at the moment |
Graham 11-Jan-2010 [1087] | so we had to hack the schemes to add eg. 'TOP in r2 prot-pop |
Andreas 11-Jan-2010 [1088] | i think a COPY actor will be there, but i guess tail? won't |
Graham 11-Jan-2010 [1089] | so instead of directly interacting with the scheme, we need an intermediate level ... |
Andreas 11-Jan-2010 [1090x3] | tough issues |
what would you like the error handler to do in case the password is wrong? | |
just raise some standardised error!? | |
Graham 11-Jan-2010 [1093x3] | yeah ... |
I just use Gabriele's http-error ... | |
but these things should be defined in a common network kit | |
Andreas 11-Jan-2010 [1096x5] | most definitely, yes |
a module | |
net-tools | |
or even netkit :) | |
if R3 modules wouldn't suck so hard :) | |
Graham 11-Jan-2010 [1101] | 640mb iso image downloaded successfuly! |
Andreas 11-Jan-2010 [1102x2] | nice |
md5sums match :) ? | |
older newer | first last |