[sldev] Plugin API Architecture for Second Life
secret.argent at gmail.com
Wed Feb 14 06:21:56 PST 2007
> Patch first, discuss later is the open source way. It works, and it
> cuts through a lot of debating that doesn't get anything accomplished.
There's no single "the open source way". And "patch first, discuss
later" is just as common in proprietary software. And it's produced
some notable disasters on both sides.
There are tools available to generate compatible calls between
embedded languages and compiled languages that provide a much higher
level view than this. At the very least it should be possible for the
hooks for a given function to take the same parameters as that
function, and to call that function explicitly.
Unfortunately, C++ is in a horrid swamp between classical structured
languages that have a well defined low level calling mechanism, and
modern dynamic object-oriented languages that let you call any method
of any object that implements the required method at runtime.
So I'm not sure a totally general plugin API that's completely
function-agnostic is even meaningful in this code base.
I think the first thing that needs to be done is to look for the
places in SL where a plugin architecture makes sense. Where do you
most need to be able to hook in to it? What kind of architecture
works best for it? That's where I'm coming from with my socket concept.
Here's where I most see hooks being needed:
* chat... my socket idea
* controls... plug-ins for joysticks and the like
* editing actions... eg, "autosave this script I'm working on", or
"smart-snap these prims"
* other user interface events and llGUI
* texture loading
* texture rendering... eg, "composite this application window on
* client-sim communications
* in-client databases... examining or even inserting items into the
object, avatar, and prim lists
Looking for places where these come together and there's a big
benefit for low cost is the best way to start.
And the proposed architecture looks more like coming up with a new
kind of paint when you haven't decided whether you're building a bike
shed or a swimming pool yet.
More information about the SLDev