c# - WCF service data caching technique -
currently wcf service provides method in api performs health check of specific device in same local network. simplified version of method:
public status devicehealthcheck() {      return device.isalive() ? status::alive : status.not_responding; }   the problem device.isalive() establishes network connection device , when lot of clients call devicehealthcheck() network traffic turns out huge bottleneck.
i create 1 thread work time in background , call device.isalive() every few second , update variable working cache. @ stage devicehealthcheck() might this:
public status devicehealthcheck() {      return cachedhealthstatus; }   i don't know how create such background thread in wcf service. or maybe there solution problem?
 
 
Comments
Post a Comment