Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

metrosystems-cpe/GopherLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Gopher Laboratory

Use Case

Build a service that acts as a HTTP Proxy for a redis instance - - > redis-service

Build a simple app that make use of the redis-service - - > url-shortener

redis-service @kitz99

A simple REST API built to establish communication between client & Redis instance over HTTP protocol

App has 4 endpoints:

  • POST /set-key
  • GET /get-key/
  • GET /ping
  • DELETE /delete-keys?keys=k1&keys=k2

Find here more details about using the API.

url-shortener @ionutvilie

root path (not in the scope):

  • register http file server with a static index.html page
  • html uses js + axios to communicate with the shortener path

shortener path:

  • requestor sends long URL to the service
  • url it is hashed with adler32 checksum algorithm
  • hash and url are sent to the storage service as key - value
  • short URL is sent to to requestor

redirect path

  • key is received by the redirect handler
  • storage service is contacted with the key in order to get the original URL
  • user is redirected to the original URL

extra:

  • metrics instrumentation with opencensus.io

Prerequisites:

  1. Go Lang
  2. Text editor: recommended vscode
  3. If you choose to use vscode, the recommendation is to install
    • AtomKeyMap
    • Bracket Pair Colorizer
    • Go
  4. A running instance of Redis server version 4.0 or Docker.

Please install this prerequisites on your machines before the workshop to be sure everything will work fine.

About

Goland workshop by SRE team

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published