Skip to content
Gwyneth Llewelyn edited this page Nov 24, 2021 · 1 revision

History

Back in 2007, Pleiades, a Canadian company, developed what was the first open-source version of RESTbot. Its purpose was simple: not everybody wants to do major development in C# (especially on non-Windows platforms) and there was a need to integrate existing tools (such as webservers) with Second Life® bots. The only substantial library that existed back then was known as libSL, later renamed to libomv and currently known as libOpenMetaverse (apparently abandoned in 2018), and it was written in C#, mostly due to an historical error — the incorrect assumption by the core volunteers that Linden Lab had developed their grid server code in C# (they didn't; Linden Lab is not insane), so it would 'make sense' to do the same. The ultimate goal of libOpenMetaverse was to create the ability to run one's own grid (which actually happened with a separate project, OpenSimulator) and have one own's viewer. In essence, the purpose of this project was to reverse-engineer Linden Lab's communication protocol between a SL Viewer and the grid, and vice-versa. One of the very first implementations using libOpenMetaverse was running a bot — precisely emulating the login procedure so that the SL grid thought that it got a connection from a real, flesh-and-blood human sitting behind the keyboard.

This allowed to design simple bot software that could achieve what was otherwise impossible, either via the SL Viewer or via LSL (Linden Scripting Language). One useful tool was to have a way to automatically send messages to a large group of people or invite them to groups — a crucial method of communication to keep in touch with one's customers and let them know about novelties and promotions.

First-generation tools were crude and could only be ran from one's own computer. This worked well, until the computer, for some reason or another, had to be shutdown, moved to a different location, or lost Internet access. A niche market emerged for a solution: Bot-as-a-Service (BaaS), or, in other words, let users log in to a website, launch their bot from there, and do all the required management tools via a web-based dashboard, all of that running on remote servers in a 24h/7 data centre.

The major problem with this approach was that it was not necessary easy — or cheap! — to set up such a system. Besides the deep knowledge of working with the very complex libOpenMetaverse library, it also required the full implementation of a ASP.NET solution on the backend, and these had a heavy price tag, requiring licenses from Microsoft, often reflected by data centres in their hosting costs. It also required programmers fluent in ASP.NET and familiar with its intricate development setup.

By contrast, off-the-shelf, open-source solutions existed in the Linux world, with cheap hosting, and no additional fees for running, say, a website using WordPress which would could a handful of eCommerce-related plugins to let customers interact with the service, create their bots and configure them, and process payments. There would be still a development cost, but it's comparatively easy to hire eager WordPress/PHP developers; maintenance of Linux systems is also easy (and cheap) to get — mostly because a well-managed Linux server will run for years with just a few security upgrades now and then, most of which do not even require a server reboot. And then we started to see cloud-based services, virtual private servers, and a plethora of tools that became cheaper over time, easy to get, easy to deploy, and scaled rather well.

However, there was no straightforward way to 'link' them with the libOpenMetaverse codebase in C#.

Pleidas therefore pushed the original effort to wrap libOpenMetaverse around a simple API which could be accessed through a RESTful interface. Because most early bots were designed to accomplish very simple tasks (those that were impossible to do with LSL or through the SL viewer), these were not time-sensitive, and easily 'translated' to a stateless service running on the Web. Thus, all you needed on the server hosting whatever software you needed was a bit of 'glue code' to make some REST calls. These are trivial to do on JavaScript, PHP, or, well, practically any existing programming language used for web development.

As time passed, RESTbot acquired a modular structure, with third-party plugins that unlocked further features — basically exposing the innards of a specific section of the complex libOpenMetaverse library, and adding a thin REST API wrapper on top of it. It's not too hard to do that in C#, so the codebase was enriched by a handful of contributions that way.

In other words: RESTbot is a very simple, minimalistic web server, which exposes a RESTful interface to web developers, allowing them to launch and control bots in Second Life (or even in OpenSimulator), by using trivial API calls. All the intricacies of libOpenMetaverse are hidden behind the API.

This solution could also theoretically scale well. Thanks to the Mono project (nowadays sponsored by Microsoft themselves), it's possible to run a .NET application on any software or hardware for which Mono has been successfully compiled (the more popular choices being macOS and Linux, of course). Thus, it was reasonably easy to launch isolated containers running Linux, Mono, and RESTbot, each running a different bot; by launching several such instances (say, on a cloud provider), each independently controlling one 'bot, this solution would scale well — and, at the same time, web application providers could perfectly ignore the complexities of C# and the libOpenMetaverse calls, just by using web-based, platform- and language-agnostic REST API calls. RESTbot therefore provided a 'black box' from the perspective of developing a BaaS provider; the same interface could even be used not only on the Second Life grid, but on any OpenSimulator grid, even those that do not allow running OpenSimulator's native bot framework (known as 'NPC').

This was the state-of-the-art around 2010; the last-known Pleiades Internet presence, its WordPress-hosted corporate site, has not been updated since then. The full code for RESTbot, which was open-sourced under the (Perl) 'Artistic License', remained hosted (but abandoned) on Google Code — which itself ceased operations in 2016.

Because I had a personal need to use RESTbot for my own purposes, I capitalised on the work which had been done so far, forked the repository, and tried to keep it up-to-date with the latest libOpenMetaverse versions. This, however, started taking too much of my time (I'm already stretched thin across way too many projects...), and I abandoned the code in turn. My last act was to transfer the repository from Google Code to GitHub in 2016, at the request of Google themselves, when they shut down their services — I was sort of the last contact on the list who still had a passing interest in the (now legacy) code.

By that time, the future of libOpenMetaverse was unclear. There was allegedly a foundation behind the project; its status is, today, a bit fuzzy. Indeed, a couple of years later, libOpenMetaverse was, in turn, abandoned as well; it had just received a handful of updates in 2017, and even less in 2018. After all, its major 'consumer' was probably the OpenSimulator project; but this had diverged from the original libOpenMetaverse (still known as libSL at that early time) and just had some conceptual affinity with it (since both frameworks are written in C# and drew from the same inspiration — the reverse-engineered grid communications protocol — it's not surprising that the code would have similarities). Around 2010 it was still possible to use the two projects in parallel, and, thanks to permissive open-source licensing, adapt code from one to the other; but the purpose of libOpenMetaverse to enable a future SL-compatible viewer without any LL code became pointless, when Linden Lab released the code for their Second Life viewers as open-source as well — thus allowing developers to dig in directly into the LL code, understand the protocol, and work on extending and expanding those viewers with new functionality. This was time-consuming, but very rewarding, and thus, as a consequence, keeping libOpenMetaverse up-to-date was not so prioritary.

A year after the last commit on libOpenMetaverse, in October 2019, @cinderblocks forked the project, rebranded it as LibreMetaverse, and dragged and kicked it into the 2020s. It is being very heavily continuously developed; maybe the contributors, during the pandemic, were especially encouraged to spend their extra free time in hacking and slashing at the code.

Many things have changed in the world of computer programming, but one of the least-acknowledged paradigm shifts was the 180-degree-turn in Microsoft's corporate stance. With the popular media focused on the gossip produced by Facebook, Google, Twitter, Apple or Amazon, Microsoft sort of dropped under the radar. After all, they're still 'the Windows and Office company', right? And sure, they're also a trillion-dollar-company (like the others, except for Twitter, that is). 85% of all desktop and laptop computers still run some variant of Windows; and the Office suit is still the market leader in terms of personal productivity suites (also by a far margin). But since Microsoft is perceived to have 'lost' the smartphone battle, the media didn't find them so interesting as before.

The fact is that Microsoft rose against the Evil Corporation, which was IBM in the 1980s, but, in the 2020s, they passed the title to the likes of Facebook, Google and Amazon (and sometimes Apple, too), who are siphoning all our personal data in order to deprive us of what remains of our privacy. Microsoft also does that, of course, but they're not on the limelight any more. Instead, they switched paradigms and reinvented themselves.

This isn't the first time Microsoft did that, of course. When they launched DOS they made history — by leaving behind the empty shell of a tiny company doing basically a few (rather good!) compilers. Fast-forward to 1995, when the Final Battle Against the Internet was lost — Microsoft gave up trying to push for their own private, proprietary global network, and surrended to the Internet, reinventing themselves as 'the Internet company'. This was far more dramatic at the time and came as a complete shock to the world — Microsoft had always tried to curb the success of the Internet and was violently aggressive against it. It was very hard to even get Windows to 'play nice' with the Internet protocols in the early 1990s; all we had was a handful of code implementing the IP protocol suite that was shamelessly borrowed from FreeBSD (fact: all major operating systems — and that includes Windows! — are still using the FreeBSD code to this very day), and, of course, Netscape. By 1995, however, Internet Explorer was launched with the new version of Windows (95), which incorporated the FreeBSD TCP/IP code by default as part of the network stack, thus setting the theatre of operations for what became known as the Browser Wars. Things such as ASP (and later .NET), Microsoft's own web server (back then known as IIS), Active Directory, and even their new file sharing protocol (which in the non-Windows world is known as Samba — the name given by its creators before the software was 'assimilated' by Microsoft) — all of that became the brand new, Internet-centric vision that drove Microsoft into the 21st century.

IBM, by the way, did also reinvent themselves in the early 2000s. They acquired a certain degree of humilty after it became obvious that the lucrative market of Unix-based workstations was fading, as more and more high-powered PCs could simply run Linux and do what the IBM workstations did — at a fraction of the cost. IBM still struggled to regain the upper hand with their alliance with Apple and Motorola to launch the PowerPC platform, to defeat Intel and Microsoft on the 'Wintel' framework. But this alliance broke apart when Apple started demanding more and more CPU production from Motorola, which couldn't supply the huge amount of CPUs that Apple required (IBM, having their own chip factories, wasn't affected by the shortage of supply from Motorola); also, Apple was spending more and more time fixing bugs on the PowerPC architecture — which, in turn, required Motorola to stop a line of production with buggy CPUs, scrap them, and start from scratch... until Apple released a new batch of fixes, and so on.

IBM, by that time, started actively promoting Linux. They also started releasing a lot of open-source code — to the surprise of many. They became actively involved not only in the Linux kernel development, but they also 'reinvented' their image of the formerly evil, gray company which only thinks about profits and not about what their community of disgruntled users really wanted. But the truth is that the workstation market seemed to disappear overnight, as cheap Intel-based PCs became more and more powerful (with a little help of a new startup, Nvidia, which, since 1999, started to develop high-end graphics cards which could show performance not unlike the state-of-the-art workstations of the time). IBM is many things, but they aren't stupid; they were losing the war against Wintel; so, the solution was simply to embrace Linux and get it on their (Intel) machines, grabbing some market share on the server side, while at the same time legendary companies like Silicon Graphics were forced to shut down, and Sun Microsystems was acquired by Oracle basically to be scrapped down (may Larry Ellison be da**ed for all eternity!)

[to be continued]