Thank you Fredrik for the clarification on the rationale.

In fact, spawning a process for each request is not creating
performance bottleneck at all. I just want to understand the reason.

Logger creates a lot of overhead in the code. Now no matter if the log
level is big enough, YXA formats the message. I would like to see a
log level in configuration, and check the log level before formatting
the message. Ejabberd has nice way to do the log, it only reads the
log level from configuration when system is up, and generates a module
to handle the log. Whenever you need to log, it does not read from the
configuration anymore. Anytime, you change the log level, it dynamic
generates the logger module.

Thanks again,

kaiduan

On Thu, Nov 26, 2009 at 4:06 AM, Fredrik Thulin <f...@it.su.se> wrote:
> On Thu, 2009-11-26 at 09:09 +0100, Fredrik Thulin wrote:
> ...
>> >    Upon receiving Message 100-4, message 180-5, and message 200-7, YXA
>> > creates a process, and then just passes the message to client and
>> > server transaction.
>>
>> Does it? I don't have the time to actually look it up, but my
>> recollection is that a "message handler" process is created _after_ the
>> transaction layer has decided that it has no ongoing transaction to pass
>> the request (ACK or resend)/response to.
>>
>> >    Is it better to find if the message is part of client/server
>> > transaction first, if yes then just passes the message to the
>> > corresponding transaction without spawning a process?
>>
>> Perhaps. Not spawning a process means that some central process has to
>> do a lot more processing, which will be sequential - read: become a
>> bottleneck.
>
> Thinking more of it, I'm sure you are right. And I was too =). A process
> is spawned by the transport layer as soon as a message is received from
> the network, to parallelize parsing and handling.
>
> Without that, we would parse requests more or less sequential (per
> transport+listening process), which would really not get the most out of
> SMP machines.
>
> /Fredrik
>
>
>
_______________________________________________
Yxa-devel mailing list
Yxa-devel@lists.su.se
https://lists.su.se/mailman/listinfo/yxa-devel

Reply via email to