Skip to content

Commit 19d6618

Browse files
committed
feat: add first 2 stage descriptions
1 parent 8de17d9 commit 19d6618

File tree

1 file changed

+60
-25
lines changed

1 file changed

+60
-25
lines changed

course-definition.yml

Lines changed: 60 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,72 @@ marketing:
3636
Didn't even know that was possible!
3737
3838
stages:
39-
- slug: "init" # A identifier for this stage, needs to be unique within a course.
40-
41-
# The name of the stage. This is shown in the course catalog, and on other course pages.
42-
name: "The first stage"
43-
44-
# The difficulty of this stage.
45-
#
46-
# Recommended guidelines, based on how long the stage will take an experienced developer to complete:
47-
#
48-
# - Very Easy (< 5 minutes)
49-
# - Easy (5-10 minutes)
50-
# - Medium (30m-1h)
51-
# - Hard (> 1h)
52-
#
53-
# Allowed values: "very_easy", "easy", "medium", "hard"
54-
difficulty: very_easy
55-
56-
# The instructions for your stage. Markdown supported. Shown on the course page.
39+
- slug: "vi6"
40+
name: "Bind to a port"
41+
difficulty: easy
5742
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.
5944
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.
6147
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.
75+
The response structure is as follows:
76+
77+
ResponseHeader: V0
78+
79+
ResponseHeader:
80+
CorrelationId: INT32
81+
82+
The response is structured as follows:
83+
84+
```
85+
+---------------+--------------------+------------------+
86+
| MessageLength | ResponseHeader | ResponseBody |
87+
+---------------+--------------------+------------------+
88+
| INT32 | RESPONSE_HEADER_V0 | RESPONSE_BODY_V3 |
89+
+---------------+--------------------+------------------+
90+
```
91+
92+
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:
6397
6498
```bash
65-
$ echo "apple" | ./your_executable.sh -E "a"
99+
$ ./your_program.sh
66100
```
67101
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`.
69105
70-
# A description of this stage that is used on the course overview page and other marketing material. Markdown supported.
71106
marketing_md: |-
72-
In this stage, we'll do XYZ.
107+
In this stage, you'll start implementing the ResponseHeader.

0 commit comments

Comments
 (0)