Tuesday, April 28, 2009

Help bring Twitter to Second Life

Second Life's resident community needs your help.

The problem is old, but it is reaching a critical point where it needs to be addressed, and the only way for that to happen is for people to say so. What is the problem? Why no generally available twitter tool in second life? It's simple, but a bit tangled to explain, because there is a lot of geek involved.

You are reading this blog in a browser. The browser does not get a picture of the website from the server, but a series of instructions on how to build the website: HTML. It then "renders" the page by grabbing the needed pictures, programs, and text. The language that it gets is HTML, and it is carried over the HTTP protocol. The protocol is how the information is transmitted, and HTML is what is in the message. However, there are many other languages that are used to communicate. One common one is XML (bleah, but necessary, more later), another is JSON. These are sent, however, in plain text. That's like the alphabet of this whole thing. Just like in the real world, very similar alphabets can carry many different languages. JSON and XML both are usually transmitted in plain text, just like HTML.

So protocol carries messages written in a language. The language is identified by what is called the mime type. The mime type is like saying a book is written in English, or French. It tells the receiving program how to interpret the text. However the data, the character set, is the same. There's no difference between the kind of data in an XML document, and the kind of data in an HTML document in terms of characters.

Get it? Got it? Good.

XML and JSON are used to transmit information of different kinds, including ways to talk to popular services like Twitter. Many services publish what is called an "API" or Application Programming Interface. That is a fancy way of saying the way to send commands in, and interpret the information that comes out. HTTP is the protocol, and plain text is way of storing the data, but the language is often XML or JSON.

LSL, that is Linden Scripting Language, is the language used to make objects do things. Particles, spinning, flying vehicles, HUDs, all run on scripts that are written in LSL. LSL has the ability to send requests to outside services by using the HTTP protocol. So a script can send a request and get back an answer.

Problem. Even though XML and JSON are in plain text, which the HTTP request knows how to interpret, LSL returns an error. That would be like returning an error just because a web page is in French or German. The characters are the same, but the content is different.

The present work around is to have a "man in the middle" or intermediary, that does the actual talking, and the LSL gadget talks to it.

That's where Marvin comes in. Almost two years ago he put up This JIRA to accept other MIME types in to Second Life. However, nothing has been done. I think I will guess why. This is a really useful function. But because of that, it will be used. Bandwidth is not free. The present system limits the kinds of interfaces that can be used. For example, if there were a free twitter gadget, people would start to twitter. That would use bandwidth, and LL would have to pay for that bandwidth (since it goes from server to second life and then to client.)

So I offer the following thought: Babbage Linden has said there will be "memory throttling" in the future for scripts. That is an avatar can only use so much memory in scripts, and a parcel can only use so much. What is needed to balance this function is something very simple: pay for the privilege. Right now there is a sort of rough justice: if you are willing to pay for the bandwidth to do something, then LL figures that that limits how much you will use. However, this is bad all the way round, since one way to pay for that bandwidth, is to steal the passwords that people use. Marvin, and others, who have used intermediaries are way way way too honest to do this, but not everyone is their high standard, and they code is sitting there...

So what is the solution? Put into LSL a simple test on certain kinds of resources: has the avatar or parcel paid for them. There could be a simple check box, say 30L a week (worth it for your twitter addiction?) for an avatar. There could be bandwidth limits per parcel (because that way people won't by a minimum parcel and chatter all day long on gadgets). Premium accounts would get use free (they are paying for the privilege already). Not premium accounts could be charged "a la carte." There could be high, but reasonable, limits to prevent botting on the minimum charge, and to encourage good gadget writing.

So first step would be to open this up. It won't kill LL at first for cost, and it will allow people to write the gadgets. LL collects data on what "reasonable" use looks like, and can price it accordingly.

But give us the ability to talk to the outside world. Even the truncated 2048 bites are enough for us to do something that is beneficial for Second Life, namely get the word out to our Web 2.0 networks of friends.

So log in and vote for Marv's JIRA to bring data into second life. This place was billed as the future of the web, it is time it started talking to the rest of the web.

1 comment: