From 9c078c5dc93de8ff2599affb295174a94253361f Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:26:33 +0800 Subject: [PATCH 1/2] refactor: Update multiple PING commands stage in course definition --- course-definition.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/course-definition.yml b/course-definition.yml index 8fb7219..3517ca3 100644 --- a/course-definition.yml +++ b/course-definition.yml @@ -227,13 +227,13 @@ stages: $ ./your_program.sh ``` - It'll then send two PING commands using the same connection: + It'll then send multiple (N) PING commands using the same connection. For example, it might send: ```bash $ echo -e "PING\nPING" | redis-cli ``` - The tester will expect to receive two `+PONG\r\n` responses. + The tester will expect to receive N (two in this case) `+PONG\r\n` responses. {{#lang_is_javascript}} In most languages, you'd need to run a loop that reads input from a connection and sends a @@ -251,7 +251,7 @@ stages: - Just like the previous stage, you can hardcode `+PONG\r\n` as the response for this stage. We'll get to parsing client input in later stages. - - The two PING commands will be sent using the same connection. We'll get to handling multiple connections in later stages. + - The multiple PING commands will be sent using the same connection. We'll get to handling multiple connections in later stages. marketing_md: |- In this stage, you'll respond to multiple [PING](https://redis.io/commands/ping) commands sent by the same client. From 56aea66a3d425ff5a7fe8b97c6016bd2077dd840 Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:36:15 +0800 Subject: [PATCH 2/2] Improved based on feedback --- course-definition.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/course-definition.yml b/course-definition.yml index 3517ca3..c167de1 100644 --- a/course-definition.yml +++ b/course-definition.yml @@ -227,13 +227,13 @@ stages: $ ./your_program.sh ``` - It'll then send multiple (N) PING commands using the same connection. For example, it might send: + It'll then send multiple PING commands using the same connection. For example, it might send: ```bash $ echo -e "PING\nPING" | redis-cli ``` - The tester will expect to receive N (two in this case) `+PONG\r\n` responses. + The tester will expect to receive multiple `+PONG\r\n` responses (one for each command sent). {{#lang_is_javascript}} In most languages, you'd need to run a loop that reads input from a connection and sends a @@ -251,7 +251,7 @@ stages: - Just like the previous stage, you can hardcode `+PONG\r\n` as the response for this stage. We'll get to parsing client input in later stages. - - The multiple PING commands will be sent using the same connection. We'll get to handling multiple connections in later stages. + - The PING commands will be sent using the same connection. We'll get to handling multiple connections in later stages. marketing_md: |- In this stage, you'll respond to multiple [PING](https://redis.io/commands/ping) commands sent by the same client.