Let’s build a REST service
Kickoff for a five part blogpost series

This is the first blogpost of a small series about microservices. In my current side project, I am working on a tiny REST API, that acts as a weblink shortener. In this kickoff post I want to describe the basic idea behind the project and give a look-out on the topics I am going to cover.

The source code of the project is available on Github.

Table of contents

This series is planned to contain five parts. (I will hand in the corresponding links as we go along.)

The idea

Basically, a shortlink service is just a webserver, which stores brief tokens and associates weblinks with them. The webserver itself is of course accessible through a likewise brief domain. That way, long URLs are reachable via short and uniform ones. That’s it. Even though I am aware of the fact, that this is a pretty much useless idea, I always have dreamed of possessing my own shortlink service. Now, I’m going to make this dream come true.

I ordered the domain j4n.io, which luckily was still available. It is a suitable domain for several reasons:

In order to be useful for my blog, the goal is to store the IDs of my blogposts and have them redirected to the corresponding full URL, so that j4n.io/Toqw4 resolves to the URL of this very blogpost. In addition to that, the service must also offer administration access to its resources.

In summary, these are the technical requirements for the j4n.io service:

Once the service is ready for production, I will update the information block of my blogpost layout (which is positioned underneath the header image) and add a permalink entry, where the corresponding shortlink will be listed.

Read on

Go to Part 2: Basics of microservices, where I explain the term REST and share some practical tips.