One or two Controllers

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

One or two Controllers

Radim Kolar
I am writing recursive DNS server.

It has 2 parts doing network-related work.
  one part reading requests from clients on port 53

  second part is dealing with remote servers (sending requests to them and
    waiting for replies)

i will nead 2 different protocol chains. one for parties queries and second
for parsing replies. Need i create 2 controller objects? (i think yes)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: One or two Controllers

Jeanfrancois Arcand-2
Hi,

Radim Kolar SF.NET wrote:

> I am writing recursive DNS server.
>
> It has 2 parts doing network-related work.
>   one part reading requests from clients on port 53
>
>   second part is dealing with remote servers (sending requests to them and
>     waiting for replies)
>
> i will nead 2 different protocol chains. one for parties queries and second
> for parsing replies. Need i create 2 controller objects? (i think yes)

Yes in that case two Controller will be needed. An alternative is to
find a way inside your ProtocolFilter to determine the state of the
transation: parsing or reading. But it might makes the code difficult to
read so I would say two Controller is your solution. But you can always
share the same Thread Pool (Pipeline) between the two Controller to
avoid havng too many threads.

Hope that help.

-- Jeanfrancois


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]