You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The instructions for your stage. Markdown supported. Shown on the course page.
39
+
- slug: "vi6"
40
+
name: "Bind to a port"
41
+
difficulty: easy
57
42
description_md: |-
58
-
In this stage, we'll do XYZ
43
+
In this stage, you'll implement a TCP server that listens on port 9092.
59
44
60
-
**Example:** ABC
45
+
[TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) is the underlying protocol used by protocols like HTTP, SSH and others
46
+
you're probably familiar with. Kafka clients & brokers use TCP to communicate with each other.
61
47
62
-
Your program will be executed like this:
48
+
Don't worry if you're unfamiliar with the TCP protocol, or what Kafka clients & brokers are. You'll learn more about this in the
49
+
next stages.
50
+
51
+
### Tests
52
+
53
+
The tester will execute your program like this:
54
+
55
+
```bash
56
+
$ ./your_program.sh
57
+
```
58
+
59
+
It'll then try to connect to your TCP server on port 9092. If the connection succeeds, you'll pass this stage.
60
+
61
+
### Notes
62
+
63
+
- 9092 is the default port that Kafka uses.
64
+
- If you already have a Kafka server running on your machine and listening on port 9092, you'll see a "port already in use" error when running your code. Try stopping the existing Kafka server and running your code again.
65
+
66
+
marketing_md: |-
67
+
In this stage, you'll start a TCP server on port 9092, which is the
68
+
default port that Redis uses.
69
+
70
+
- slug: "nv3"
71
+
name: "Respond with a Correlation ID"
72
+
difficulty: easy
73
+
description_md: |-
74
+
In this stage, you'll start implementing the Kafka wire protocol.
In general each response in the Kafka wire protocol starts with a INT32 containing the length of the entire message, followed by the ResponseHeader and then the ResponseBody.
93
+
94
+
### Tests
95
+
96
+
The tester will execute your program like this:
63
97
64
98
```bash
65
-
$ echo "apple" | ./your_executable.sh -E "a"
99
+
$ ./your_program.sh
66
100
```
67
101
68
-
You program must ABCD.
102
+
It'll then try to connect to your server. It will then send a `APIVersions` request. You don't need to implement the logic to parse this request yet, you need to just send the header with a hardcoded correlation ID.
103
+
104
+
In this stage, you don't need to add the actual message length, just send a INT32 with any value. And hardcode the CorrelationId to `7`.
69
105
70
-
# A description of this stage that is used on the course overview page and other marketing material. Markdown supported.
71
106
marketing_md: |-
72
-
In this stage, we'll do XYZ.
107
+
In this stage, you'll start implementing the ResponseHeader.
0 commit comments