DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 966,155 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Uday Yadav
Uday Yadav

Posted on

URL Shortener : Microservice Maven

Overview of My Submission

A URL shortening service with objective to:

  • To provide a alias for long URLs
  • Record the visits on the URL for info about its use

Submission Category: Microservice Mavens

Video Explainer of My Project

Language Used

  • Java : Spring Boot
  • Golang : Fiber
  • Javascript : React.js

Link to Code

URL Shortener : Microservice Maven

A URL shortening service with objective to:

  • To provide a alias for long URLs
  • Record the visits on the URL for info about its use

Typical Architecture

12

Simplified Redis Stack Architecture

18

Overview video (Optional)

Here's a short video that explains the project and how it uses Redis:

Embed your YouTube video

How it works

How the data is stored:

For every URL info, there are 3 things store

  • JSON containing all info
  • Key Value pair [short url]->[long url]
  • Redis Timeseries in name format links:{short_url}

How the data is accessed:

  • When you hit the Go Service, it fetches the Long URL using the short one from key value store and sends a message to redsub with current timestamp, and redirect the user to Long URL
  • Java subscribes to the channel : pubsub:dev117uday and when it receives the message, it stores into the Redis Timeseries
  • When user can save new URL…

Additional Resources / Info

Typical Architecture

Typical

Redis Stack Architecture

Redis

  • TimeSeries visualization using redis stack

Image description

Collaborators

Just me ...


Top comments (0)

🌱 DEV runs on 100% open source code that we started called Forem.

You can contribute to the codebase or host your own.