TinyURL is a project to provide the functionality of encoding long URLs to short URLs and decoding short URLs to long URLs. Although It only have a backend part based on Vert.x framework right now, I plan to add more functionalities, including displaying the usage data of specific short URLs.
- The backend part consists of several microservices. Currently it has two microservices: a config microservice and a URL handler microservice. The URL handler microservice needs to retrieve its configuration from config microservice before it starts to work.
- The URL handler microservice has an ID generator adapted from Twitter's Snowflake algorithm, so that each instance of URL handler microservice can generate distributed unique IDs.
- An ID generated by the URL handler microservice was used to encode with Base 58 algorithm into a short URL.
- The URL handler microservice is horizontal scalable, and it can be deployed on several machines to improve its throughput.
- Implement a usage microservice to record the usage of each short URLs.
- Implement a frontend to display the usage of each short URLs.