In 2023, the Eclipse Vert.x team proposes subjects for Google Summer of Code through the Eclipse organization.
In addition to the GSoC proposal document, we ask candidates to implement a simple Vert.x application. This will help us make sure candidates have a basic understanding of asynchronous programming and the Vert.x toolkit.
This repository contains a skeleton for a "Quotes Of The Day" Vert.x application. The Maven POM file is set up for you so fork the repository and start coding.
The application involves a few Vert.x modules: Vert.x Web, Vert.x JUnit5, Pg Client.
In a terminal, run:
docker run \
-e POSTGRES_USER=quotes \
-e POSTGRES_PASSWORD='super$ecret' \
-e POSTGRES_DB=quotes \
-v "$(pwd)/src/main/resources/import.sql":/docker-entrypoint-initdb.d/import.sql \
-p 5432:5432 \
-ti \
postgres:15.2
In a terminal, run:
./mvnw vertx:run
This will start the application on port 8080
. Application is redeployed when source code changes.
In QuoteOfTheDayVerticle
class, setup a Vert.x Web Router
.
When the HTTP server is ready, make sure that requests to /quotes
will return all the quotes from the database in the JSON format.
The QuoteOfTheDayVerticleTest
unit test will verify this behavior.
Modify your Vert.x Web Router
so that a POST
request to /quotes
allows to insert a new quote in the database.
Quotes must have a text and an author.
If the author is not provided by the user, the application should add the default "Unknown" value.
If the text is not provided, the application should reject the request with 400
status.
Add tests to QuoteOfTheDayVerticleTest
to verify your code.
Please share your implementation by providing a pull request to this repository.
Do not try to play smart by copying other candidates pull requests.
In order to ease the review:
-
rebase your pull request on
master
regularly -
organize your
git
history to show one commit per task
The Vert.x docs have all the information you need to implement the assessment application.
If you are not sure how to proceed with one or more of the tasks, get in touch with the possible mentors (email links on the Eclipse wiki page for GSoC or you can file an issue in this project).