All Projects → ziyasal → reducio

ziyasal / reducio

Licence: Unlicense license
❱ 🐇 URL shortener service is written in Scala using Akka-Http and Redis ❰

Programming Languages

scala
5932 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to reducio

Swagger Akka Http Sample
Sample demonstrating use of swagger-akka-http
Stars: ✭ 79 (+14.49%)
Mutual labels:  akka-http
Remora
Kafka consumer lag-checking application for monitoring, written in Scala and Akka HTTP; a wrap around the Kafka consumer group command. Integrations with Cloudwatch and Datadog. Authentication recently added
Stars: ✭ 183 (+165.22%)
Mutual labels:  akka-http
Perfect-URL-Shortener
An Example URL Shortener System for Perfect
Stars: ✭ 37 (-46.38%)
Mutual labels:  url-shortener
Squbs
Akka Streams & Akka HTTP for Large-Scale Production Deployments
Stars: ✭ 1,365 (+1878.26%)
Mutual labels:  akka-http
Typed Schema
Typelevel http service definition DSL
Stars: ✭ 145 (+110.14%)
Mutual labels:  akka-http
Akka Management
Akka Management is a suite of tools for operating Akka Clusters.
Stars: ✭ 218 (+215.94%)
Mutual labels:  akka-http
Sttp
The Scala HTTP client you always wanted!
Stars: ✭ 1,078 (+1462.32%)
Mutual labels:  akka-http
akka-react-cloudant
A Soccer Dashboard created by scraping EPL website using Akka backend and ReactJS frontend and IBM Cloudant for object storage. IBM Cloud Foundry is used to host both frontend and backend app.
Stars: ✭ 21 (-69.57%)
Mutual labels:  akka-http
Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (+156.52%)
Mutual labels:  akka-http
cfworker-url-shortener
部署在 Cloudflare Workers 的短网址服务
Stars: ✭ 52 (-24.64%)
Mutual labels:  url-shortener
Akka Http Quickstart Scala.g8
Stars: ✭ 103 (+49.28%)
Mutual labels:  akka-http
Kebs
Scala library to eliminate boilerplate
Stars: ✭ 113 (+63.77%)
Mutual labels:  akka-http
Akka Http Cors
Akka Http directives implementing the CORS specifications defined by W3C
Stars: ✭ 234 (+239.13%)
Mutual labels:  akka-http
Scala Ddd Example
🎯 λ Hexagonal Architecture + DDD + CQRS applied in Scala using Akka HTTP
Stars: ✭ 86 (+24.64%)
Mutual labels:  akka-http
Breviare
Small URL shortener made with the MERN Stack
Stars: ✭ 16 (-76.81%)
Mutual labels:  url-shortener
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+1585.51%)
Mutual labels:  akka-http
Kafka Streams Scala
Thin Scala wrapper around Kafka Streams Java API
Stars: ✭ 192 (+178.26%)
Mutual labels:  akka-http
laravel-bitly
Laravel package for generating bitly url
Stars: ✭ 72 (+4.35%)
Mutual labels:  url-shortener
distributed-cache-on-k8s-poc
[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes
Stars: ✭ 15 (-78.26%)
Mutual labels:  akka-http
keeplinkin
🔗 A Flask and Redis based fast, feature rich and free URL shortener site.
Stars: ✭ 21 (-69.57%)
Mutual labels:  url-shortener

❱ reduc.io ❰

URL shortener service http://reduc.io/wuXaq

Build Status Coverage Status

Tech stack

Alternative solutions

We could use following short code gen also:

substr(base62(md5(url)), 6) = 62 ^ 6 //unique short urls

Commands

Run

Run docker-compose, it will start api, redis and will expose api port to host.

docker-compose up

Sample usage

# Shorten
curl -i http://localhost:9001 -F "url=https://www.amazon.com/Star-Wars-Battlefront-II-Digital/dp/B072JZZ4XD"

# Call shortened url
for ((i=1;i<=100;i++)); do curl -i "http://localhost:9001/SEwuXHhBQw"; done

# Get Stats
curl -i "http://localhost:9001/stats/?url=https://www.amazon.com/Star-Wars-Battlefront-II-Digital/dp/B072JZZ4XD"

# returns: {"callCount":100}

Create executable

sbt packageBin

Test

sbt test

Gatling Simulation

Simulation users count can be set in application.conf in test resources.

# terminal 1
sbt run

# Run simulation in terminal 2
sbt gatling:test gatling:latestReport

Coverage with Report

sbt clean coverage test coverageReport

Improvements

  • Seperate read and write API's
  • Move statistics to different data store and API
  • Add DB support by having write master/replicas and have read replicas
  • Move hit counts to MapReduce job and generate them from the Web Server logs
  • Implement Authentication using JWT authentication protocol with OAuth2 authentication framework
  • API Documentation using swagger or similar
  • Add Host denyList
  • Add Retry policies for Redis calls using Retry or similar one
  • Add Throttling using akka-http-contrib
  • Add Metrics support using akka-http-metrics

z i λ a s a l.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].