Collaborative initial connection

Sometimes someone tickles a bug, and you find you cannot connect to the Collaborative at all. I that happens, send mail to croquetcollaborative at charter dot net and we’ll reset it.

But even when things are working, it can often take as much as three or four minutes to connect. Here’s why.

One issue is that the Collaborative is deliberately left running for days or weeks at a time, but this version of Croquet does not have distributed garbage collection yet.(*) When you first join a simulation in progress, your machine needs to get a snapshot of the memory associated with that simulation. This snapshot includes a table of all the objects that anyone has interacted with. For the Collaborative code, we have created a simple “stop the world” garbage collector, which rebuilds that table based on what is reachable from the few “root” object “globals” known for that world. It gets rid of everything else. But this simple collector will not work if anyone is interacting with the simulation, so we only run it on “startup”. (I suppose we could lock the system up and run it after the last visitor leaves, but we haven’t done so yet. Anyone want to code it?) So as it is then, the world gets bigger and bigger the more it is running, and it can thus take quite a while to make a snapshot of it and get that snapshot to you when you join. For the initial “common” world, this is typically 10 MB or more, while it’s freshly booted version is less than 2MB. (See the bug report)

Another issue is that the snapshot still has a lot of stuff in it that doesn’t really need to be there. We’ve done a lot of work in the Collaborative code to move media outside of the simulation. We call that being “off the island.” But meshes are still on-island, and the full-resolution textures created by the free-hand sketch tool are still on-island. I think this is another factor of four to 10.

Another thing that aggravates this is that we dump every visitor into the same spot. We do this deliberately for now in order to increase the chance that you’ll see someone, and to increase the chance that user-created content will be somewhere nearby. But that creates a lot of user-content in the island that really shouldn’t be there “in practice”, and it creates transient garbage there that ought to go away. I’d like to address this by having a private (non-replicated) home space in which you maintain your own portals to wherever you want. You would startup quickly in your home space. You would then deliberately open one of your own portals to the place of your choosing. If it isn’t available, or just slower than your patience allows, you would join some other world instead. If everyone chooses the same “commons” world anyway, this would actually end up taking longer (starting your home world plus connecting to the commons world as a second step), but at least you’d have more immediate and satisfying initial feedback. And assuming people don’t all pick the same place, then the other issues, above, would be mitigated. (We still need to address them, of course.)


(*) The first version of this blog misleadingly said that there was no garbage collection (full stop). This was confusing, and Andreas pointed out, below, how to qualify that. The text now reflects that change.

About Stearns

Howard Stearns works at High Fidelity, Inc., creating the metaverse. Mr. Stearns has a quarter century experience in systems engineering, applications consulting, and management of advanced software technologies. He was the technical lead of University of Wisconsin's Croquet project, an ambitious project convened by computing pioneer Alan Kay to transform collaboration through 3D graphics and real-time, persistent shared spaces. The CAD integration products Mr. Stearns created for expert system pioneer ICAD set the market standard through IPO and acquisition by Oracle. The embedded systems he wrote helped transform the industrial diamond market. In the early 2000s, Mr. Stearns was named Technology Strategist for Curl, the only startup founded by WWW pioneer Tim Berners-Lee. An expert on programming languages and operating systems, Mr. Stearns created the Eclipse commercial Common Lisp programming implementation. Mr. Stearns has two degrees from M.I.T., and has directed family businesses in early childhood education and publishing.

3 Comments

  1. Squeak seems to have garbage collection that can run without interfering with the code. The use flag seems to be acceptable at first glance, yet when one considers the operation of the worlds, How would one establish the “garbage status” of a particular artifact? Should objects placed in a world have a “lifetime” that can be set/reset by a bit of code in the system, possibly run by a cron job? Then objects that are unused over some period of time would “timeout” and be removed and the space returned to the VM or the world for reuse. Where should such content go? In otherwords should the basic object be redefined to include something like a last accessed date, and/or an interactivity count? How would a reconnect be resynced with the current state of the world?

    I don’t know all the answers, but I would guess that if Squeak includes garbage collection, then the basic mechanisms are in place, but they may need to be extended with a logical or of the two conditions for Croquet objects lifetimes to work with the inherent garbage flagging.

  2. “Croquet does not have garbage collection” is incorrect. It should be “Croquet does not have DISTRIBUTED garbage collection” yet.

  3. Quite right. There’s also older stuff about GC at http://wetmachine.com/i

Comments are closed