[Gambas-user] New feature with Task component

Benoît Minisini gambas at ...1...
Sun Jul 20 15:45:22 CEST 2014


Le 20/07/2014 15:21, Olivier Cruilles a écrit :
> Hello Benoit,
>
> I'm building an application that is a UDP Server to receive and
> decompilate network flow.
>
> To not lose UDP sequence, the main process of this application need
> to be the most fast possible. So in this case, when a READ event of
> the USPServer raise, I just catch it as string directly from the
> stream and I store it in a string[] variable.
>
> All this part is very fast and work fine.
>
> Next, every 400ms, with a timer, I check if there is something in the
> string[] variable and a I extract a part of strings to send it to a
> TASK to decompilate all these flows in background. All the TASK work
> fine but to store the result of the decompilation of all these flows
> by the TASK, I have no another choice to use the PRINT command inside
> the TASK, by serialization/deserialisation, with the parent process.
> So all that is good but with this methode I take between 7 to 12
> microseconds to deserialise the informations from the TASK in the
> READ event in the parent process. In my case this is time I loose for
> the READ event of the UDPServer and I loose Network sequence.
>
> I try to execute from the TASK a function in isolate Class in the
> application but not data are stored in any variables. I read again
> the documentation and all that is normal for a TASK. All the
> modifications made by the TASK process are not visible by the parent
> process.
>
> My question is, could you add possibility to store data in common
> variables from any TASK (in my case an array of Classes) just to
> bypass the serialization/deserialization normal process between TASK
> and his parent ?
>
> To have an idea, I receive more than 700 millions of Flows each day
> so this some microseconds are very important in the end.
>
> Thank in advance
>
>
>
> Cordialement,
>
> Olivier Cruilles EMail: olivier.cruilles at ...614...
>

I don't want to share things (Gambas objects) between a task and its 
parent process, indirectly because the interpreter is not thread-safe, 
and I don't want it to support threading.

How do you serialize/unserialize the data coming from the task? Are you 
sure you cannot optimize it?

-- 
Benoît Minisini




More information about the User mailing list