World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
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. | |
Graham 27-Jan-2010 [1879] | just protect user then ... |
BrianH 27-Jan-2010 [1880] | Then you would break a lot of code. If you protect/hide 'user and then don't use the full path to access it, just direct word access, then subsequent user scripts that use 'user will use a new variable called 'user that isn't the same as yours. |
Graham 27-Jan-2010 [1881] | So, if I set aside a couple of variables inside the module for these keys, how do I set them up automatically? |
BrianH 27-Jan-2010 [1882] | In the module init code, or on first access, whatever. |
Graham 27-Jan-2010 [1883] | So, are users supposed to initalize their email, passwords, proxies etc somewhere or each time they run a script? |
BrianH 27-Jan-2010 [1884] | system/contexts/user is not initialized except by code. And "user" in this case doesn't refer to a person, but to a task. |
Graham 27-Jan-2010 [1885] | Brilliant .. so where do we store such stuff? |
BrianH 27-Jan-2010 [1886] | If you want to save prefs and then load them, cool. |
Graham 27-Jan-2010 [1887] | So, every email script has their own prefs? |
BrianH 27-Jan-2010 [1888x2] | We are still planning to add some common code to put preferences in %user.r, instead of the code that goes there in R2. |
The trick is that %user.r would only contain preferences, not code. Putting code in a user-writeable script is not very secure. | |
Graham 27-Jan-2010 [1890] | so where do we put our aliases ... |
BrianH 27-Jan-2010 [1891] | %rebol.r |
Graham 27-Jan-2010 [1892] | Ok, so is there an exemplar module that does things as you describe? |
BrianH 27-Jan-2010 [1893x2] | Which doesn't get loaded from the user directory. If you want your %rebol.r to load user scripts, go for it. |
I am not aware of any R3 scripts that do emailing. The details of the preferences infrastructure hasn't even been discussed yet, except for undoing the old behavior of %rebol.r and %user.r and replacing them with something secure. In general, "our aliases" are put in a module that you import if you want to. | |
Graham 27-Jan-2010 [1895] | Anyway it's easy enough to fix once these things are standardized |
older newer | first last |