This blog post is intended to be an illustration of my work for GSoC Final Evaluation.
Overview
Vert.x is a toolkit for the Java Virtual Machine enabling the implementation of reactive, highly concurrent, polyglot applications. The idea of the project is to implement a set of applications using the Vert.x toolkit to illustrate how different classes of applications can be done. This project aims to provide guidelines to Vert.x users to implement various applications.
The blueprint project contains three parts: Todo Backend, Vert.x Kue and Online Shopping Microservice. Both runnable code and very detailed documents and tutorials (both in English and Chinese) are provided.
Vert.x Blueprint - Todo Backend
The project repository: sczyh30/vertx-blueprint-todo-backend.
This blueprint is a todo-backend implementation using Vert.x and various persistence (e.g. Redis or MySQL). It is intended to be an introduction to basic Vert.x web RESTful service development. From this blueprint, developers could learn:
- What is Vert.x and its basic design
- What is and how to use
Verticle
- How to develop a REST API using Vert.x Web
- How to make use of asynchronous development model
- Future-based reactive asynchronous pattern
- How to use persistence such as Redis and MySQL with the help of Vert.x data access components
The tutorial documents:
Vert.x Blueprint - Vert.x Kue
The project repository: sczyh30/vertx-blueprint-job-queue.
This blueprint is a priority job queue developed with Vert.x and backed by Redis. It’s a Vert.x implementation version of Automattic/kue that can be used in production.
Feature document of Vert.x Kue is available here: Vert.x Kue Features.
This blueprint is intended to be an introduction to message-based application development using Vert.x. From this blueprint, developers could learn:
- How to make use of Vert.x Event Bus (distributed)
- How to develop message based application with Vert.x
- Event pattern of event bus (Pub/sub, point to point)
- How to design clustered Vert.x applications
- How to design and implement a job queue
- How to use Vert.x Service Proxy
- More complicated practice about Vert.x Redis
The tutorial documents:
- Vert.x Kue Core Tutorial - English Version
- Vert.x Kue Web Tutorial - English Version
- Vert.x Kue Core Tutorial - Chinese Version
- Vert.x Kue Web Tutorial - Chinese Version
Vert.x Blueprint - Online Shopping Microservice
The project repository: sczyh30/vertx-blueprint-microservice.
This blueprint is an online shopping microservice application developed with Vert.x. It is intended to be an illustration on how to develop microservice applications using Vert.x toolkit. From this blueprint, developers could learn:
- Microservice development with Vert.x
- Asynchronous development model
- Reactive and functional pattern
- Event sourcing pattern
- Asynchronous RPC on the clustered event bus
- Various type of services (e.g. HTTP endpoint, message source, event bus service)
- Vert.x Service Discovery
- Vert.x Circuit Breaker
- Microservice with polyglot persistence
- How to implement an API gateway
- Global authentication (OAuth 2 + Keycloak)
And many more things…
The tutorial documents:
- Vert.x Microservice Blueprint Tutorial - Development (English Version)
- Vert.x Microservice Blueprint Tutorial - API Gateway (English Version)
- Vert.x Microservice Blueprint Tutorial - Development (Chinese Version)
- Vert.x Microservice Blueprint Tutorial - API Gateway (Chinese Version)
Final Summary && Future
I really enjoy the work! During the work period I’ve learned a lot about Vert.x, various asynchronous development model, distributed systems, microservice architecture and many more things… This motivates me to investigate new technologies, and the infrastructure of Vert.x. This would be an unforgettable experience.
I’ll keep track of the blueprint project and planning to make some more improvements on the microservice blueprint to illustrate more usage about Vert.x and microservices (e.g. recommendation, Kafka, full-index search). And soon I’d like to contribute to Vert.x Microservice Toolbox to add more features and integration with other technologies. As Vert.x Scala is nearly technical preview, I’m also willing to contribute to Vert.x Scala version.
Thanks
I would like to give my sincere thanks to:
- My mentors, Paulo Lopes and Clement Escoffier. They provided me guidance and gave me a lot of help during the work :-)
- The Vert.x Community.
- The Google Summer of Code team, for this wonderful experience.