World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Pekr 24-Jan-2010 [1829] | OK, but how does the native as 'read knows, what to do, if it is passed a port type? It is done somewhere in low level? In other words - which functions can be overriden that way? |
Graham 24-Jan-2010 [1830x9] | 'read checks to see if it is a port!, and then looks up the scheme |
I read this somewhere .... | |
Alas my index is worse than that for the r3 docs | |
I don't know what the possible actors are, but I think they're the ones related to series. | |
Maybe the way to find out is to create a dummy scheme and implement as many dummy actors you can think of and then test them.... | |
One of the issues with AWS is all the XML .. but I think we don't need a fancy XML parser .. .as it's pretty basic stuff. | |
Managed my first request to the Amazon SDB using the http scheme and SOAP | |
They say HTTPS is obligatory, but i used http and it was still accepted. | |
payload: create-sdb-message "ListDomains" listDomains 10 result: to-string write http://sdb.amazonaws.comcompose [ POST [ Content-Type: {text/xml; charset="utf-8"} SOAPaction: "ListDomains"] (payload) ] | |
Steeve 25-Jan-2010 [1839x2] | Possible actors are the functions accepting a port! as an input. |
(obviously...) | |
Graham 25-Jan-2010 [1841] | good point! |
Pekr 25-Jan-2010 [1842] | ah, thanks Steeve, that makes sense. It is nice that we can overload those functions .... |
Graham 25-Jan-2010 [1843x2] | A couple of prototype functions for Amazon SDB http://rebol.wik.is/Rebol3/AWS |
Successfully created a couple of domains, and then listed them. | |
Gregg 25-Jan-2010 [1845] | Nice Graham. |
Graham 25-Jan-2010 [1846x4] | SOAP looks much easier to implement compared with the tricky stuff you have to do with REST. |
I haven't looked at the other services for a while now, and don't think I ever looked at the SOAP api for S3, and SQS .. but I suspect it's very similar, and just point the URL to a different service | |
What would be nice would be a small tight library for dealing with basic XML | |
Not suggesting that anyone write an XSD parser! | |
Gregg 25-Jan-2010 [1850] | Start with simple, well-formed XML, and go from there. |
Graham 25-Jan-2010 [1851] | I was wondering about TFTP but see that it is based on UDP .. oh well... |
Andreas 25-Jan-2010 [1852] | TFTP is funny, I have a R2 TFTP server impl lying around, somewhere |
Graham 25-Jan-2010 [1853] | There's also a get in the library http://www.rebol.org/view-script.r?script=tftp-get.r |
Andreas 25-Jan-2010 [1854] | as well as a BOOTP server. also UDP, though |
Graham 25-Jan-2010 [1855] | so the bootp is for a rebol os ? |
Andreas 25-Jan-2010 [1856x2] | heh |
bootp+tftp is sufficient to netboot some machines | |
Graham 26-Jan-2010 [1858] | http://msdn.microsoft.com/en-us/magazine/cc188797.aspx DIME extension for SOAP ... dunno, doesn't seem as simple as they make out |
Pekr 26-Jan-2010 [1859] | any revision to current schemes by Carl? Was supposed to be done ... "overnight", no? |
Graham 26-Jan-2010 [1860] | I haven't heard anything back |
Graham 27-Jan-2010 [1861x5] | I see that Sun has their cloud service though it is in beta testing. They have a huge datacentre ... something like 3 football fields long ... dunno what sort of football though |
They are using Webdav and also RESTful APIs similar to those from Amazon S3 | |
Can't find any pricing information though .. | |
I managed to get SQS working using SOAP ( I create the message with r3 and then send it using r2 as it needs to be over https ). But keep getting server errors when trying to work with S3 | |
Got it working with S3 .. there's a bug in the Amazon Soap service for S3 which I uncovered ! | |
Gregg 27-Jan-2010 [1866] | I assume you reported it to them. :-) |
Graham 27-Jan-2010 [1867x2] | Yes, filled in their feedback form. |
Updated the AWS stuff so that you can now create messages for S3, SQS, and SDB. http://rebol.wik.is/Rebol3/AWS | |
BrianH 27-Jan-2010 [1869] | You should make it a module so the local vars get stored somewhere other than system/contexts/user/user. The word 'user is commonly used in scripts, and any one of those would break your code. |
Graham 27-Jan-2010 [1870] | eh?? |
BrianH 27-Jan-2010 [1871x2] | system/contexts/user is the main context for user scripts. Like yours, for example. |
So if a user script did user: "Graham" to a top-level variable in their script, your AWS script would break. | |
Graham 27-Jan-2010 [1873] | I'm using the full path .. how can it break? |
BrianH 27-Jan-2010 [1874] | It is better to make your script a module, and use local vars to store that kind of thing. |
Graham 27-Jan-2010 [1875x2] | If i make it a module I have to export everything anyway |
oh ... dear | |
BrianH 27-Jan-2010 [1877x2] | Not everything. |
Every user script (including the one you linked above) is bound to system/contexts/user by default. Modules aren't. | |
older newer | first last |