Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Amazon S3 in pure Tcl

8 views
Skip to first unread message

Darren New

unread,
Oct 5, 2006, 8:39:34 PM10/5/06
to
I'm in the process of doing this right now, for anyone who cares. I have
the basic library interfacing to the REST API. That is, given a verb and
a resource and the content and appropriate headers, it does the
authorization header, calculates MD5s, etc. It works either
synchronously or via the event loop, depending on how you ask it to
return the results. (I messed the design up a bit, allowing you to pass
in a channel for data when I actually need a file name, since
content-length is required, but that's pretty easy to fix.)

After that, I'll need an XML parser and such to actually figure out what
the results are, and build the high-level interface for things like
listing buckets and such, then the Tk interface for browsing. But this
went much smoother than I thought it would.

Just ... nobody start it fresh without me. ;-) I'm going to have to let
it go fallow for a few weeks.

--
Darren New / San Diego, CA, USA (PST)
Just because you find out you are
telepathic, don't let it go to your head.

Gerald W. Lester

unread,
Oct 6, 2006, 12:35:03 PM10/6/06
to
Darren New wrote:
> I'm in the process of doing this right now, for anyone who cares. I have
> the basic library interfacing to the REST API. That is, given a verb and
> a resource and the content and appropriate headers, it does the
> authorization header, calculates MD5s, etc. It works either
> synchronously or via the event loop, depending on how you ask it to
> return the results. (I messed the design up a bit, allowing you to pass
> in a channel for data when I actually need a file name, since
> content-length is required, but that's pretty easy to fix.)
>
> After that, I'll need an XML parser ...

Check out TclDOM and tDOM.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

Darren New

unread,
Oct 6, 2006, 3:23:33 PM10/6/06
to
Gerald W. Lester wrote:
> Check out TclDOM and tDOM.

I had already found them. Nothing in tcllib already? I'm surprised.
(I'm trying to make it rely on as little from other sources as possible.)

Michael Schlenker

unread,
Oct 6, 2006, 4:50:42 PM10/6/06
to
Darren New schrieb:

> Gerald W. Lester wrote:
>> Check out TclDOM and tDOM.
>
> I had already found them. Nothing in tcllib already? I'm surprised.
> (I'm trying to make it rely on as little from other sources as possible.)
>
No, there isn't an XML parser in Tcllib currently..., one could add
TclXMLs pure Tcl parser, and the TclDOM one, but those are very slow. I
usually just use tDOM for most things, the lib is rather small usually
easy to build, included in AS Tcl and has a good api.

But if you want to write a pure Tcl version of the tDOM API (lots of
work, because it includes things like XML, DOM, XPATH) you could do it
and i think it would be happily included in Tcllib.

Michael

Darren New

unread,
Oct 6, 2006, 5:00:18 PM10/6/06
to
Michael Schlenker wrote:
> usually just use tDOM for most things, the lib is rather small usually
> easy to build, included in AS Tcl and has a good api.

"Included in AS Tcl" seems like sufficiently easy to obtain. I think I
need to get a new version of AS Tcl, then, since this doesn't seem to be
in my installation. 8.5a1 still here. Anyway, I'll track it down when
I get back from being away.

Something with xpath so I could easily suck out the parts I need would
be nice.

(I think I wound up with the pure-tcl md5 and sha1 as well, which aren't
known for their blazing speed either. ;-)

Michael Schlenker

unread,
Oct 6, 2006, 6:18:40 PM10/6/06
to
Darren New schrieb:

> Michael Schlenker wrote:
>> usually just use tDOM for most things, the lib is rather small usually
>> easy to build, included in AS Tcl and has a good api.
>
> "Included in AS Tcl" seems like sufficiently easy to obtain. I think I
> need to get a new version of AS Tcl, then, since this doesn't seem to be
> in my installation. 8.5a1 still here. Anyway, I'll track it down when
> I get back from being away.
>
> Something with xpath so I could easily suck out the parts I need would
> be nice.
tDOM has really nice xpath support and a really clever way to create XML
from a script via appendFromScript and createNodeCmd.

>
> (I think I wound up with the pure-tcl md5 and sha1 as well, which aren't
> known for their blazing speed either. ;-)
>
Those use fast C-coded versions if you have either Trf installed or have
the critcl based C implementations installed/created.

Michael

0 new messages