Re: Re[4]: [Haskell-cafe] Optimizing a high-traffic network architecture

2005-12-17 Thread Joel Reymont


On Dec 16, 2005, at 1:41 PM, Bulat Ziganshin wrote:

JR I do not have several fixed waiting periods, they are  
determined by

JR the user.

by the user of library? by the poker player? what you exactly mean?


By the user of the library. Timers are used imprecisely, to send a  
timeout event if the server did not respond in X seconds or to send  
something after Y seconds.


Joel

--
http://wagerlabs.com/





___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[4]: [Haskell-cafe] Optimizing a high-traffic network architecture

2005-12-16 Thread Bulat Ziganshin
Hello Joel,

Friday, December 16, 2005, 3:22:46 AM, you wrote:

 TZ You don't have to check every few seconds. You can determine
 TZ exactly how much you have to sleep - just check the timeout/ 
 event with
 TZ the lowest ClockTime.

JR The scenario above does account for the situation that you are  
JR describing.

to be exact - Tomasz's variant don't work proper in this situation,
but your code (which is not use this technique) is ok

 i repeat my thought - if you have one or several fixed waiting periods
 (say, 1 sec, 3 sec and 1 minute), then you don't need even to sort
 requests - just use one waking thread for each waiting period and
 requests will be arrive already sorted. in this way, you can really
 sleep as Tomasz suggests

JR I do not have several fixed waiting periods, they are determined by  
JR the user.

by the user of library? by the poker player? what you exactly mean?





-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe