<p>If your students are old enough to own phones and send text messages, then perhaps you could use group-texting as an example?  One person in the group sends a message to the others; the message goes off to the company's server, which broadcasts the message to the people in the group?  Depending on their age, that might be an example to which they could relate and that would engage them...</p>

<p>I guess it depends on how deeply you want to go.  You could delve into the details of <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)" rel="nofollow noreferrer">broadcasting</a> vs <a href="https://en.wikipedia.org/wiki/Multicast" rel="nofollow noreferrer">multicasting</a>, in which the sender of the message (the server in your example) sets the correct bits in each packet and the underlying network takes care of ensuring that the right packets get to the right clients.  </p>

<p>If there is no network-level support for broadcasting or multicasting, a "broadcast" among N clients can still be done fairly efficiently in a distributed manner, without involving a server. For example, suppose N is 8, the clients are numbered 0-7, and 0 (which could be your server) wants to broadcast a message.  Then...</p>

<ul>
<li>At time 1: 0 sends the message to 4 </li>
<li>At time 2: 0 sends the message to 2 and 4 sends it to 6 </li>
<li>At time 3: 0 sends the message to 1, 2 sends it to 3, 4 sends it to 5, and 6 sends it to 7</li>
</ul>

<p>This approach can "broadcast" a message among N clients in <em>O(lg(n))</em> steps, so long as the network allows different clients to send simultaneously.  What's happening there is quite different from your cups-and-string demo...</p>

CC BY-SA 3.0
2017-06-29T14:29:17.207Z
@ItamarG3: I edited my answer to try to better answer your question -- see if that helps any...
Joel Adams
CC BY-SA 3.0
2017-06-26T15:24:26.307Z
2017-06-29T14:32:16.163Z
2017-06-29T14:32:16.163Z
Joel Adams
<p>I am trying to think of a way to demonstrate how a multi-client server works, from the aspect of the broadcast messages sent from the server in response to a message from one of the clients.</p>

<p>I thought of making a small demonstration with cups and strings, having 4 to 5 <a href="https://en.wikipedia.org/wiki/Tin_can_telephone" rel="nofollow noreferrer">cups on strings</a> which are all connected to a main hub, rather than to each other. The hub is simply a closed box with holes where the other end of each line goes to, and a cup sized hole at the top. </p>

<p>When students speak into the cup, all the students hear what was said, because it was a broadcast from the main hub. </p>

<p>While this example sounds cool, I am not sure if it covers all<sup>1</sup> sides of a multi-client server. What differences between a multi-client and the cup-string-hub example should I point out? (e.g. one of the differences I found is protocols, which the example doesn't exactly convey). I am talking about back-end differences, and not front-end ones.</p>

<hr>

<p><sup>1</sup>There are many things to cover, but I'm referring to the basics, as this is a first lesson in the subject of multi-client servers. They have tackled single client servers, so it's not an intro lesson.</p>

CC BY-SA 3.0
2017-06-27T15:46:13.210Z
Do you mean a single server handling different requests from multiple clients concurrently or a single server broadcasting the same response to multiple clients?
pddring
CC BY-SA 3.0
2017-06-27T15:52:01.947Z
@pddring a bit of both. A server responding to separate clients, but broadcasting the response to all clients.
ItamarG3
<secondary-education><teaching-analogy><server-client>
Multi-client to server connection demonstration
# Multi-client to server connection demonstration

(Asked by: username_0 on 2017-06-26)

I am trying to think of a way to demonstrate how a multi-client server works, from the aspect of the broadcast messages sent from the server in response to a message from one of the clients.

I thought of making a small demonstration with cups and strings, having 4 to 5 [cups on strings](https://en.wikipedia.org/wiki/Tin_can_telephone) which are all connected to a main hub, rather than to each other. The hub is simply a closed box with holes where the other end of each line goes to, and a cup sized hole at the top.

When students speak into the cup, all the students hear what was said, because it was a broadcast from the main hub.

While this example sounds cool, I am not sure if it covers all1 sides of a multi-client server. What differences between a multi-client and the cup-string-hub example should I point out? (e.g. one of the differences I found is protocols, which the example doesn't exactly convey). I am talking about back-end differences, and not front-end ones.

---

1There are many things to cover, but I'm referring to the basics, as this is a first lesson in the subject of multi-client servers. They have tackled single client servers, so it's not an intro lesson.

**Tags:** secondary-education, teaching-analogy, server-client

> **Comments:**
> **username_1**: Do you mean a single server handling different requests from multiple clients concurrently or a single server broadcasting the same response to multiple clients?  
> **username_0**: @username_1 a bit of both. A server responding to separate clients, but broadcasting the response to all clients.  

---

## 1 answers

### Answer by username_2 on 2017-06-26. Score: 2

If your students are old enough to own phones and send text messages, then perhaps you could use group-texting as an example? One person in the group sends a message to the others; the message goes off to the company's server, which broadcasts the message to the people in the group? Depending on their age, that might be an example to which they could relate and that would engage them...

I guess it depends on how deeply you want to go. You could delve into the details of [broadcasting](https://en.wikipedia.org/wiki/Broadcasting_(networking)) vs [multicasting](https://en.wikipedia.org/wiki/Multicast), in which the sender of the message (the server in your example) sets the correct bits in each packet and the underlying network takes care of ensuring that the right packets get to the right clients.

If there is no network-level support for broadcasting or multicasting, a "broadcast" among N clients can still be done fairly efficiently in a distributed manner, without involving a server. For example, suppose N is 8, the clients are numbered 0-7, and 0 (which could be your server) wants to broadcast a message. Then...

* At time 1: 0 sends the message to 4
* At time 2: 0 sends the message to 2 and 4 sends it to 6
* At time 3: 0 sends the message to 1, 2 sends it to 3, 4 sends it to 5, and 6 sends it to 7

This approach can "broadcast" a message among N clients in *O(lg(n))* steps, so long as the network allows different clients to send simultaneously. What's happening there is quite different from your cups-and-string demo...

> **Comments:**
> **username_2**: @username_0: I edited my answer to try to better answer your question -- see if that helps any...  

---

