r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 Schemes] Implementors guide

Graham
24-Jan-2010
[1822]
So, I suspect it's easier to maintain using SOAP
BrianH
24-Jan-2010
[1823]
I don't use their services (yet) so I wouldn't know.
Graham
24-Jan-2010
[1824x3]
Well I was reading their API again over the weekend on the plane 
:)
The main issue is that SOAP has to be over https ... so have to use 
stunnel ... that is if i can get stunnel working under windows 7
And if someone wants REST ... they can do it later on.
Pekr
24-Jan-2010
[1827]
I would like to ask about the inner workings of port actors. How 
is it done? Let's say you define 'read actor for port. Does it mean, 
that call to "read tcp://x.x.x.x" will then pass call to port 'read 
actor?
Graham
24-Jan-2010
[1828]
read scheme:// 
means that you call the scheme's actor 'read
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
[1871]
system/contexts/user is the main context for user scripts. Like yours, 
for example.