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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -