Thread

Linux SDK report (Bots)

Linux SDK report // Bots

1  |  

neophile

Dec 2, 2005, 4:53pm
Hi, I work actually on the portage of my bots with wxwidgets under linux
(thks to andras for the SDK) I think it's usefully to tell you a curious bug
with my mandrake 2006.

My ChatGlobal bot use an aw_citizen_attribute_by_name command for query the
universe about a citizen after an AW_EVENT_CHAT (it's the only command I
found to get the citizen number, the session number is not enought)
On windows, the command is very fast and not slowing the database for get
user data. But under linux , the same commande take more than one second.

In a first time I had think about the Andras suggest about using a timer
(because the mandrake slowing the SDK).
But when I removed the "aw_citizen_attribute_by_name" command and just only
identify an user by is name, the ChatGlobal time delay seem to be better
than the windows version.
{info : I don't use callbacks, because the engine need to have info
immediatly for displaying the relay chat, and windows version works
perfectly}

strike rapier

Dec 2, 2005, 7:07pm
This was how I started when I was first making bots; but it turns out that
its more problems than its worth - consider in 5 users enter, all with
different privilege numbers, IP's etc - your bot will freeze for a good
second or 2 while each of them is resolved - also; while this is being done
you are building up more events in the queue. Its a bad circle.

What do you mean only command to get the citizen number? isnt
aw_int(AW_AVATAR_CITIZEN) in the context of EVENT_AVATAR_ADD sufficent
and/or working?

[View Quote]

andras

Dec 2, 2005, 7:48pm
[View Quote] > Hi, I work actually on the portage of my bots with wxwidgets under linux
> (thks to andras for the SDK) I think it's usefully to tell you a curious bug
> with my mandrake 2006.
>
> My ChatGlobal bot use an aw_citizen_attribute_by_name command for query the
> universe about a citizen after an AW_EVENT_CHAT (it's the only command I
> found to get the citizen number, the session number is not enought)
> On windows, the command is very fast and not slowing the database for get
> user data. But under linux , the same commande take more than one second.
>
> In a first time I had think about the Andras suggest about using a timer
> (because the mandrake slowing the SDK).
> But when I removed the "aw_citizen_attribute_by_name" command and just only
> identify an user by is name, the ChatGlobal time delay seem to be better
> than the windows version.
> {info : I don't use callbacks, because the engine need to have info
> immediatly for displaying the relay chat, and windows version works
> perfectly}
>
>
>
>
>

The SDK has to interrogate the uniserver for the aw_citizen_attributes command and you get only the citizen number, nothing else:
(Note that all attributes are returned only if this instance is owned by the universe root account (citizen #1). Otherwise, only AW_CITIZEN_NUMBER and AW_CITIZEN_URL are returned.)
That info you can already have by the AVATAR_ENTER event (if you use it).
The timer suggestion I made is speeding up everything (at least on Mandrake or Debian for me) without having any actual body of the timer.
AFAIK the timer interrupt will release the control of the current thread, so the TCP stack can work much faster.

--
Andras
"It's MY computer" (tm Steve Gibson)

neophile

Dec 3, 2005, 6:16am
For timing my thread , I use a wx Heartbeat for calling aw_wait(0) and it
have the same effect of your timer example I suppose.

I don't use the AVATAR_ENTER because I could have another users on a
different world, and I have only their name returned throught the Tchat
network.

I think ,that I'll go to insert the citizen number in my DB when happen
avatar_enter event like you said.

I was just interested by the time difference between linux and windows about
aw_citizen_attributes command.

"Andras" <andras at andras.net> a écrit dans le message de news:
4390c146$1 at server1.Activeworlds.com...

> The SDK has to interrogate the uniserver for the aw_citizen_attributes
> command and you get only the citizen number, nothing else:
> (Note that all attributes are returned only if this instance is owned by
> the universe root account (citizen #1). Otherwise, only AW_CITIZEN_NUMBER
> and AW_CITIZEN_URL are returned.)
> That info you can already have by the AVATAR_ENTER event (if you use it).
> The timer suggestion I made is speeding up everything (at least on
> Mandrake or Debian for me) without having any actual body of the timer.
> AFAIK the timer interrupt will release the control of the current thread,
> so the TCP stack can work much faster.
>
> --
> Andras
> "It's MY computer" (tm Steve Gibson)

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn