4

This is one of the questions that I came across while preparing for a programming interview.

Design a system for Greek philosophers to exchange messages using stone tablets carried by dumb slaves.

Well, the guys who had this question have suggested to use analogy of a TCP/IP protocol to describe the communication and some suggested packet data communication to explain the design.

Here is what I think of it going by the clues:

  1. The Greek philosophers would act as 'machines' that are trying to communicate.
  2. The dumb slaves would be the message carrier which is the 'network' in our analogy.
  3. Stone tablets would be messages carried like the 'data packets'.
  4. May be the slaves would reach philosophers by asking for the route from some random guys that will lead them to the philosopher's place just like the packets arrive at a destination using routers in the network.
  5. And the message could be split in to multiple tablets and so, a message could be eventually carried by more than one slave who might take different paths and arrive in any order. There shall be a way to arrange the message in the correct order on their arrival at the receiver's end. (sequence number in the tablets?)
  6. The system should also be able to handle missing tablets and in which case should the sender philosopher try and send the entire message again after a timeout?

EDIT:
I would like to ask the following questions:

  1. Am I thinking on the correct lines?
  2. Are there any important things that I am missing in the things that I have listed above?
  3. This question to design a system looks vague to me. How would someone depict such a system in an interview ? Using diagrams to show interactions between entities?
  4. Am I handling the missing tablets issue correctly (Mentioned as point 6. above)?

closed as too broad by JeffO, user40980, Bart van Ingen Schenau, GlenH7, Robert Harvey Dec 8 '13 at 20:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. – gnat Dec 6 '13 at 12:53
  • 3
    Hi gant, pls see my new edit section – iceBreak Dec 6 '13 at 13:06
  • 1
    It seems to me the protocol can differ according to how dumb these slave should be. I don't understand the reason to use TCP/IP analogy description. If you just describe the entire process as an analogy of TCP/IP. You are not designing anything are you? I'm curious though for some insight, interesting question. – Timmetje Dec 6 '13 at 13:36
  • @timmied Well, the analogy of TCP/IP for this problem was a suggestion which made sense to me. However, I think the real issue would be to explain how well we can achieve a real solution using stone tablets and dumb slaves. And solutions may vary based on the solution's efficiency and complexity. – iceBreak Dec 6 '13 at 14:46
0

I think that the "stone tablet" restriction quite contradicts what you are trying to solve with your #5. It seems the interviewers do not want the payload data to be split up.

Also, from what you describe, there seems to be no concept of "time" in that network (ancient Greece, dumb slaves), so your #6 somewhat misses the point, IMHO. The key question may be: "how does a sender-philosopher conclude that his message has arrived at the receiver-philosophers place?" This leads to a (philosophical) discussion about acknowledge::retry/reack::reretry etc. Keep in mind that the slaves may be so dumb that they themselves can't report successful delivery...

  • I think dumb in this case may mean "unable to speak" (as in deaf and dumb) and not have anything to do with their level of intelligence? Of course that still means that in this scenario you cannot rely on the slaves to report something in another way than carrying a (written) message or some other token back to the sender. – Marjan Venema Dec 6 '13 at 13:58
  • By the way: you really think that in ancient Greece there was no concept of time? Come off it please. Time as a concept is far more ancient than even ancient Greece. – Marjan Venema Dec 6 '13 at 14:00
  • Point #5 covers the case in which the message that the philosopher wants to send is bigger than the stone tablet. In which case, he has to split the message across multiple tablets. The slaves could also have some limitation on how many tablets they can carry. If this limit did not exist then the entire message would be carried by one messager albeit in multiple tablets. I guess, the time is very important to tell if the slave has delivered the message or not. May be the slave gets lost or gets killed in which case timeout is the only way in which sender would assume that the message is lost. – iceBreak Dec 6 '13 at 14:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.