[Opensim-dev] Restructuring IClientAPI - thoughts wanted

Rob Smart rob.s.smart at gmail.com
Sun Sep 14 10:18:38 UTC 2008


I'd also love to see this, at the moment anyone wanting to write a custom
OpenSim client only has two options, modify the GPL (eugh) Second Life
client or make something from scratch using libsl (OpenMetaverse).

It would be fantastic to offer alternate client APIs and get rid of the "One
world, One client" paradigm that plagues Virtual worlds today.

Rob Smart (Yossarian Seattle)


On Sun, Sep 14, 2008 at 4:12 AM, Dahlia Trimble <dahliatrimble at gmail.com>wrote:

> I'd love to see a simple IClientAPI that totally abstracted all of the
> client implementation dependancies and made it easy to use alternate viewers
> besides the Linden one. What I really want is something simple I can plug in
> and get R/W access to Scene and notification of Scene updates.
>
>
> On Sat, Sep 13, 2008 at 8:03 PM, Frisby, Adam <adam at deepthink.com.au>wrote:
>
>> My thoughts for that was along the lines of:
>>
>> [SERVER] Client connecting at WW.XX.YY.ZZ, supports <InstantMessaging,
>> Chat, Primitives>.
>>
>> Adam
>>
>> > -----Original Message-----
>> > From: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-
>> > bounces at lists.berlios.de] On Behalf Of Melanie
>> > Sent: Saturday, 13 September 2008 8:10 PM
>> > To: opensim-dev at lists.berlios.de
>> > Subject: Re: [Opensim-dev] Restructuring IClientAPI - thoughts wanted
>> >
>> > Is there even a need to enumerate?
>> >
>> > Basically, each class is either an event consumer or a message
>> > sender. IN either case, they would know the interface they're
>> > looking for. So, enumeration seems unnecessary.
>> > If we do need to do it, it would be infrequent, so the performance
>> > hit of reflection seems very much acceptable.
>> >
>> > if (client is IInstantMessageService)
>> >         ((IInstantMessageService)client).OnInstantMessage +=
>> > OnInstantMessage;
>> >
>> > Looks like a winner!
>> >
>> > +1
>> >
>> > Melanie
>> >
>> > Frisby, Adam wrote:
>> > > Slight correction suggestion, IClientAPI actually is redundant in
>> > that situation - there's no reason why we need to keep HasInterface as
>> > long as we can do "Client is <type/interface>". GetInterfaces() could
>> > be replaced with a quick search via reflection (GetTypes)
>> > >
>> > > Adam
>> > >
>> > > From: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-
>> > bounces at lists.berlios.de] On Behalf Of Frisby, Adam
>> > > Sent: Saturday, 13 September 2008 7:41 PM
>> > > To: opensim-dev at lists.berlios.de
>> > > Subject: [Opensim-dev] Restructuring IClientAPI - thoughts wanted
>> > >
>> > > I'm in the process of adding support for some alternate clients to
>> > OpenSim, and one of the things I'm noticing is that there is one one
>> > chunk of OpenSim in particular that is highly "LL-Specific" in how it
>> > treats things - it's also comparatively a very small chunk of OpenSim
>> > that might actually be fixable quite easily.
>> > >
>> > > That is to say, IClientAPI - I'm thinking of replacing IClientAPI
>> > with a very small interface:
>> > >
>> > > bool                       IClientAPI.HasInterface<T>();
>> > > type[]                   IClientAPI.GetInterfaces();
>> > >
>> > > Then replacing the current web of .Xyz with smaller more discrete
>> > interfaces such as:
>> > >
>> > >
>> > > IClientInstantMessage {
>> > >
>> > > SendMessage(...);
>> > >
>> > > event OnNewMessage;
>> > >
>> > > }
>> > >
>> > > We can do checks on them in our modules, where once we did:
>> > >
>> > > OnNewClient(IClientAPI client) {
>> > >      client.OnNewMessage += messageHandler;
>> > > }
>> > >
>> > > We replace with
>> > >
>> > >
>> > > OnNewClient(IClientAPI client) {
>> > >
>> > >      If(client.HasInterface<IClientInstantMessage>()) {
>> > >
>> > >           ((IClientInstantMessage)client).OnNewMessage +=
>> > messageHandler;
>> > >
>> > > }
>> > >
>> > > }
>> > >
>> > > The resulting code is then more friendly for third party clients, and
>> > clients don't need to support the full set of functionality to register
>> > as valid Clients inside of OpenSim.
>> > >
>> > > What's everyone's thoughts here?
>> > >
>> > > Good idea / bad / anyone got any better?
>> > >
>> > > Adam
>> > >
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > ---
>> > >
>> > > _______________________________________________
>> > > Opensim-dev mailing list
>> > > Opensim-dev at lists.berlios.de
>> > > https://lists.berlios.de/mailman/listinfo/opensim-dev
>> > _______________________________________________
>> > Opensim-dev mailing list
>> > Opensim-dev at lists.berlios.de
>> > https://lists.berlios.de/mailman/listinfo/opensim-dev
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
>
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080914/60834519/attachment-0001.html>


More information about the Opensim-dev mailing list