Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 20:54
Bernhard Hiller2-Mar-16 20:54 
GeneralRe: Observer Pattern with Remote Machines Pin
dan!sh 2-Mar-16 23:00
professional dan!sh 2-Mar-16 23:00 
AnswerRe: Observer Pattern with Remote Machines Pin
Pete O'Hanlon2-Mar-16 5:52
mvePete O'Hanlon2-Mar-16 5:52 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 20:58
Bernhard Hiller2-Mar-16 20:58 
GeneralRe: Observer Pattern with Remote Machines Pin
Pete O'Hanlon2-Mar-16 21:08
mvePete O'Hanlon2-Mar-16 21:08 
AnswerRe: Observer Pattern with Remote Machines Pin
BillWoodruff2-Mar-16 6:43
professionalBillWoodruff2-Mar-16 6:43 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller2-Mar-16 21:24
Bernhard Hiller2-Mar-16 21:24 
AnswerRe: Observer Pattern with Remote Machines Pin
BillWoodruff2-Mar-16 21:54
professionalBillWoodruff2-Mar-16 21:54 
Bernhard Hiller wrote:
We have to take care of a flock of sheep. A shepherding drone is hovering over the area and searching for wolves. After detection of a wolf, it will notify the dogs and tell them where the wolves are etc. In most case there is one drone and one dog, but sometimes there may be many. With some trees around, the connection between the drone and the network may get disrupted.

An alternative solution is the dogs querying the drone's LastWolfDetected property in short intervals. Or the drones sending the LastWolfDetected message to a server, and the dogs query the server.
Anyway, the dogs must be informed reliably.
If (may the sheep be so unlucky, and the wolves so lucky, and the dogs confused) I were the shepherd here, and had the resources, and the means, I would like:

1. the server: keeps a time-stamped log of all contacts with every drone, every dog; a integral part of these logs is a list of all periods of time when a connection check (perhaps every #n minutes) fails. Hopefully this check could be some kind of lightweight "ping."

when the drone signals the server that a wolf is spotted, the message goes into an "alert queue" ... if the server fails to respond immediately to acknowledge the alert message, the drone repeats sending the message frequently which is also packaged with a log of previous tries, or time-stamped with when the first message was sent.

so, the server, receiving the alert can know from the message if it had been sent previously, when it was sent, etc.

the server maintains a parallel logging facility for the active dogs.

2. the drones: if it is possible for them to contact the dogs directly, and the dogs can signal the server that they received an alert message from a drone, then, the dogs ... assuming they can respond to gps co-ordinates ... can go immediately to the area where the alert was raised, as well as signalling the server they are in action.

The idea here being redundancy, and if the server is down, the dogs can still be called into action by the drones. If the drones are down, perhaps the server could direct the dogs to enter "reconnoiter mode" ? Could the dogs also raise an alert ... consider the dogs could smell a wolf ?

Of course, this is all wool-gathering.
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”


modified 3-Mar-16 8:11am.

AnswerRe: Observer Pattern with Remote Machines Pin
Super Lloyd5-Mar-16 19:01
Super Lloyd5-Mar-16 19:01 
GeneralRe: Observer Pattern with Remote Machines Pin
Bernhard Hiller6-Mar-16 21:30
Bernhard Hiller6-Mar-16 21:30 
GeneralRe: Observer Pattern with Remote Machines Pin
Super Lloyd6-Mar-16 23:04
Super Lloyd6-Mar-16 23:04 
QuestionReflection for non public type in Unit Testing Pin
Member 91405151-Mar-16 18:23
Member 91405151-Mar-16 18:23 
AnswerRe: Reflection for non public type in Unit Testing Pin
Bernhard Hiller1-Mar-16 21:26
Bernhard Hiller1-Mar-16 21:26 
GeneralRe: Reflection for non public type in Unit Testing Pin
Member 91405152-Mar-16 19:18
Member 91405152-Mar-16 19:18 
GeneralRe: Reflection for non public type in Unit Testing Pin
Bernhard Hiller2-Mar-16 20:42
Bernhard Hiller2-Mar-16 20:42 
AnswerRe: Reflection for non public type in Unit Testing Pin
BillWoodruff2-Mar-16 2:53
professionalBillWoodruff2-Mar-16 2:53 
GeneralRe: Reflection for non public type in Unit Testing Pin
Member 91405152-Mar-16 19:37
Member 91405152-Mar-16 19:37 
QuestionInput format was not in correct format for int? Followed by "Invalid expression term try" Pin
Sam 91001-Mar-16 8:26
Sam 91001-Mar-16 8:26 
AnswerRe: Input format was not in correct format for int? Followed by "Invalid expression term try" Pin
Eddy Vluggen1-Mar-16 9:07
professionalEddy Vluggen1-Mar-16 9:07 
GeneralRe: Input format was not in correct format for int? Followed by "Invalid expression term try" Pin
Sam 91001-Mar-16 12:08
Sam 91001-Mar-16 12:08 
QuestionRe: Input format was not in correct format for int? Followed by "Invalid expression term try" Pin
Matt T Heffron1-Mar-16 13:35
professionalMatt T Heffron1-Mar-16 13:35 
AnswerRe: Input format was not in correct format for int? Followed by "Invalid expression term try" Pin
Sam 91003-Mar-16 4:28
Sam 91003-Mar-16 4:28 
QuestionWhy getting Error :Column name doesn't belong to table Pin
Veena Hosur29-Feb-16 23:32
Veena Hosur29-Feb-16 23:32 
QuestionRe: Why getting Error :Column name doesn't belong to table Pin
Richard MacCutchan1-Mar-16 0:00
mveRichard MacCutchan1-Mar-16 0:00 
AnswerRe: Why getting Error :Column name doesn't belong to table Pin
Veena Hosur1-Mar-16 0:08
Veena Hosur1-Mar-16 0:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.