[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-developer
Subject:    [jacorb-developer] notifications out-of-order
From:       jg liu <liujg79 () yahoo ! com ! cn>
Date:       2006-04-18 5:14:35
Message-ID: 20060418051423.78962.qmail () web15101 ! mail ! cnb ! yahoo ! com
[Download RAW message or body]

Hello,

  Recently, I find notifications may be out-of-order
under high load conditions,suppose two notifactions A
and B,and A sent earlier than B(sent by the same
provider), the consumer may receive B first.
  Notification related parameters in jacorb.properties
are as follows:
 
########################################################
#                                                     
#
#   Notification Service configuration, please see    
#
#   the JacORB ProgrammingGuide for a explanation     
#
#                                                     
#
########################################################

jacorb.notification.filter.thread_pool_size = 1
jacorb.notification.proxyconsumer.thread_pool_size = 1
jacorb.notification.proxysupplier.thread_pool_size = 1
jacorb.notification.supplier.poll_intervall = 1000
jacorb.notification.max_batch_size = 1
jacorb.notification.max_events_per_consumer = 100
jacorb.notification.order_policy = FifoOrder
jacorb.notification.discard_policy = FifoOrder
jacorb.notification.consumer.backout_interval = 5000
jacorb.notification.consumer.error_threshold = 3
# valid values: ThreadPool, ThreadPerProxy
jacorb.notification.proxysupplier.threadpolicy =
ThreadPerProxy
jacorb.notification.default_filter_factory = builtin
# jacorb.notification.supplier.max_number = 10
# jacorb.notification.start_time_supported = 10
jacorb.notification.stop_time_supported = on
jacorb.notification.proxy.destroy_causes_disconnect =
on
# Notification Service log levels:
org.jacorb.notification.log.verbosity = 3


 I implements a provider which sends about 300
nofitications per second. Before sending each
notificaiton, it fill a timestamp into the variable
header of the event like this:
  long currentTime = System.currentTimeMillis() ;
Any anyCurrentTime = orb.create_any() ;
anyCurrentTime.insert_string(String.valueOf(currentTime))
;
event.header.variable_header[0] = new
Property("SEND_TIME", anyCurrentTime) ;
pushConsumer.push_structured_event(event) ;

I also implements a comsumer to check the order:
  public void push_structured_event(StructuredEvent
structuredEvent)
        throws
        Disconnected
    {
       
        long thisTime=Long.parseLong(
structuredEvent.header.variable_header[0].value.extract_string());
        long interval=thisTime-latestSendTime;
        if(interval<0)
        {
            log.info("disorder£¬interval="+interval);
        }
        latestSendTime=thisTime;
    }

  latestSendTime is time of last
notification,interval<0 indicates last notification is
sent earlier then the current notification.


when I run the provider and consumer, some
notifications are out-of-order:

2006-04-18 13:08:52,498
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,545
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,545
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,623
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:52,623
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:52,670
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,670
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,732
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:52,732
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:52,810
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:52,810
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16
2006-04-18 13:08:53,060
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:53,060
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-15
2006-04-18 13:08:53,295
demo.notification.office.PushConsumerClient INFO  
disorder£¬interval=-16


		
___________________________________________________________

ÎÞÏÞÈÝÁ¿ÑÅ»¢Ïà²á£¬Ô­Í¼µÈ´óÏ ÔØ£¬³¬¿ìËٶȣ¬¸Ï¿ìÇÀ×¢£¡ 
http://cn.photos.yahoo.com


	

	
		
___________________________________________________________ 
ÑÅ»¢1GÃâ·ÑÓÊÏä°Ù·Ö°Ù·ÀÀ¬»øÐÅ 
http://cn.mail.yahoo.com/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic