AW: AW: [Verse-dev] Performance

Marcus Hoffmann Marcus.Hoffmann at igd.fraunhofer.de
Thu Jun 9 10:04:52 CEST 2005


Hi
 
> > if you are reworking the core code (especially the send mechanism),
> > could you think of doing it thread safe?
> 
> Well, its not that big of a change so they wouldent be related.
> 
> But while we are on the subject: Yes i see the use of threading. But
since
> I dont like to add lost of dependencys i would probably solve it in a
way
> that there isa .h file with mutex defines that you can use to wrap
your
> own mutexes in to verse. This makes it more portable. Not sure how to
do
> this in detail and not sure it would be use full:

As far as I understood the callback_update function is the "downstream"
connection to verse, that gives me all my updates that are arriving from
verse. Every send command is handled in a direct way and verse directly
interprets and sends this command out, isn't it?
If so I will run into problems anyway because I do the sending from
another thread then the listening meaning I run the callback update
parallel to the send mechanisms. This is done with or without multiple
thread for connections... I think this is why my server crashes
sometimes without any reproducible reason...
So wrapping verse into a thread safe lib would be the minimum to do...

Looking at a lib that encapsulates the verse commands: all callback
commands would have to be encapsulated, wouldn't they? I was thinking
about that... with the send commands this is not that hard - just wrap a
mutex around them, but I have no idea how to do this with the
callback_update function...

> 
> Because:
> 
> It may not give you that much. First of all verse does a lot of smart
> things under the hood. calling callback update works for all
connections
> not just the one that is active. And then again since the active
session
> is a state, it would be hard to have many things run in parallel. (you
> could not for instance have one tread per user).

If verse would keep more than one session active (I know this would need
more than one port) the problem would be none because I could link every
connection thread on the server to the according connection, but we had
this discussion before....

 
> If I where you i would atempt (in some way) to have multiple verse
libs
> runing at the same time. one for each user. there would be some port
> issiues i think. so im not suer it is that easy. I think the easiest
way
> to get scalability is to make a hirarcical sturcture of servers.

This is what I was thinking about...really... ;)
I'm not sure how much resources verse needs (e.g. processor time, memory
etc.). But I don't think this will be very handy... and it's not tested,
so maybe for some networking issues or whatever this will crash...

But maybe I'll try some approach on that...

M


PS: I will unsubscribe my old mail address from the mailing list. I've
subscribed with the new one and now I get all the mail twice...



More information about the Verse-dev mailing list