World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Graham 19-Jan-2010 [1666x3] | I started with daytime, moved to smtp, and then ftp, fax and now imap. I am using pretty much the same template with changes appropriate to the protocol. |
I think docbase ... is the place | |
Daytime is too trivial to learn much from ... maybe FTP instead?? | |
Carl 19-Jan-2010 [1669x2] | Ok. My question above is whether there's a standard "core" that can be used across many protocols... a bit like net-utils or default protocol on R2. |
I'll go with SMTP for now. Looks simple enough. | |
Graham 19-Jan-2010 [1671x3] | The only standard stuff I use is ... 1. net-log 2. some parse rules and bitsets 3. some authentication stuff like cram-md5 I also stack the commands sent to the port and pop them off as the port is async ... |
I do this in ftp, fax and imap .. but I should go back and do this for smtp as well | |
I was thinking of using net-log as a way to hook into the low level activity of the protocol so that I can patch it as needed when interacting with a GUI ... eg, for progress meters | |
Carl 19-Jan-2010 [1674] | Ok, good... then I'll start with IMAP... since it's more recent. |
Graham 19-Jan-2010 [1675x2] | One thing that is not clear to me is that if you write to the port eg. write imap-port [ dialect stuff ] and then wait imap-port it can return immediately ... and you don't get anything unless you put in a timeout eg. wait [ imap-port timeout ] |
Ok, let me upload the latest version .... | |
Carl 19-Jan-2010 [1677] | Isn't that dependent on what you return from awake? |
Graham 19-Jan-2010 [1678x3] | in wrote there is a 'read port .... but i don't get anyting back without the timeout |
uploaded 0.0.3 can login, select a mailbox, get length? and pick | |
It's at the bottom of the page as a file attachment | |
Carl 19-Jan-2010 [1681] | BTW, nice use of Deki wiki. |
Graham 19-Jan-2010 [1682x2] | It looks pretty but is slower than docbase :) |
and there's no REBOL formatting .. so I use ruby or whatever ... | |
Carl 19-Jan-2010 [1684] | Runs really fast here. Where's the server? |
Graham 19-Jan-2010 [1685x4] | I think EC2 |
It was a free hosting offer I picked up a couple of years ago ... | |
That is Mindtouch were offering free wikis to people limited to 200Mb I think | |
Of course what I really like about it is that there is a REST based API that I can use with REBOL. | |
Pekr 19-Jan-2010 [1689] | Carl - guys found out, that we have just one shared buffer - why? You have to read everything out during read phase, or you can get corrupted data .... |
Graham 19-Jan-2010 [1690] | pekr, what protocols are full duplex? |
Pekr 19-Jan-2010 [1691] | none ... but wasn't it you, after all, who just wondered, why the in-out buffer is shared? |
Graham 19-Jan-2010 [1692x2] | No .. I just pointed it out. |
And wondering if that imposes a lot of GC ... | |
Carl 19-Jan-2010 [1694x4] | It's one of those things that's in the "balance". |
It turns out, I think you can allocate separate buffers, but you must know how to do it... and I've not tried it yet, so have not mentioned it either. | |
But, I did give full duplex consideration during implementation. I think more modern IM systems benefit from it. | |
Also, it turns out that one must be careful when estimating GC overhead. Sometimes it is more efficient, becuase otherwise you must add extra code to manage memory usage... that is constantly being run. You know what I mean? | |
Graham 19-Jan-2010 [1698] | It wouldn't be a big change to the schemes if that gets implemented right ? |
Carl 19-Jan-2010 [1699x2] | Right. No change to schemes. |
lunch time, bbl | |
Graham 19-Jan-2010 [1701] | I think in my ftp scheme I access port/data directly so I can stream to the file system .. so it would require a tiny change if there were two sep buffers |
Andreas 19-Jan-2010 [1702] | Graham, instead of write imap-port [ dialect stuff ] wait [ imap-port timeout ] could you try: write imap-port [ dialect stuff ] read imap-port wait imap-port I think that should work. |
Carl 19-Jan-2010 [1703x2] | Graham, before looking at your new schemes, I decided to review some of DocBase. But... I must say that I have a difficult time finding things there... I'm not sure if the user who was reorganizing it got a chance to finish the updates. |
On http://www.rebol.net/wiki/Table_Of_Contents-- I've added some links to ports and schemes. Did I miss any? | |
Graham 19-Jan-2010 [1705x3] | Hard to say ... |
If I find anymore I'll update the wiki Andreas, going to try that now. | |
You did have an example somewhere of doing a large file transfer between client/server | |
Andreas 19-Jan-2010 [1708x3] | http://www.rebol.net/wiki/TCP_Port_Examples |
http://www.rebol.net/wiki/Ports:_Synchronous_and_Asynchronous_Operations may also make sense to be linked up | |
Ports:_Synchronous_and_Asynchronous_Operations -- that is | |
Carl 19-Jan-2010 [1711] | A: do you have a wiki account? |
Andreas 19-Jan-2010 [1712x2] | Not yet |
OK, created an account. I'll simple add those links myself, then | |
Carl 19-Jan-2010 [1714] | I tossed a few up just now. Go ahead and add or edit as needed. |
Graham 19-Jan-2010 [1715] | looks like we side tracked into a docbase update ... |
older newer | first last |