I tweeted a bit about a need for a “hashtable” on the Web. My needs are so constrained that it was hard to give me good answers. (Unless you were all just trying not to give me good answers. (No, that’s not possible. You’re nice people. Must be my fault.)) So here’s a bit more about what I’m up to.
I’m trying to build a little script in Linden Scripting Language, LSL, the scripting language for Second Life. LSL brings new meaning to the word “rudimentary”. There is a very limited built-in library of calls, mostly aimed at making things in Second Life move or talk or such. As for web connections, you can send and receive short emails, and you can make an http request. This request has a URL, a few parameters, and a body. Parameters include HTTP_METHOD (GET, POST, PUT, DELETE), HTTP_MIME_TYPE (text/* and apparently application/x-www-form-urlencoded), HTTP_BODY_MAXLENGTH (not supported, locked at 2048), and HTTP_VERIFY_CERT.
The x-www… MIME type will let you URL encode a body with var=value&var2=value2 kinds of strings.
I want to use an existing on-line service, such as Amazon S3 or one of the hosted CouchDB or MongoDB services. Free usage at low volumes is a plus. Low cost usage at low volumes is a must. Access using this rudimentary capability is, of course, a sine qua non.
I’m just messing around, so do not have the time or inclination to build something on my own site to host it and respond to a language of my own invention. Something out of the box is what I’m looking for.
It should go without saying that a scripting language this limited also has limited storage. What I’d like to do is to store a moderate number (around a thousand) strings, by key. The key will be some unique string, the value another string. Keys around 20 or 30 characters, values around 200 or 300.
The script needs to be able to get a value string from the Web system, using the key, to put one back giving the key and value, and to delete a key. Simple hashtable kind of function.
The LSL language has an http_response “event” that will receive any response headers and the response body. My guess is that the content type of the body must be a string. I know for sure that LSL will not receive XML, JSON, Atom, RSS, or PLS content types.
Once the string is back, one can do reasonable parsing of it. Imagine what you could do with simple string functions: pretty much anything if you have the time.
So I’m looking for something on the Web, free or cheap, working with simple get, put, delete by key, storing a fairly small number of fairly short string objects, that can be accessed via a very simple text-focused URL request, returning a text-like response.
But I'm Very Dumb ...
It does look to me as if S3 or MongoDB or CouchDB can probably do what I want. But since I have zero tools available in LSL, and little time to play on my PC to try to figure out what the URLs have to look like for get, put, and delete, I’m looking for a system whose docs show what the requests and responses actually look like, or for some examples that do the same.
Very lazy, I know. This is a tiny little hobby, and I can’t be investing hours and hours in it.
Got advice or ideas? Comments are open. Thanks!