Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/birajcoder/url-hashing
https://github.com/birajcoder/url-hashing
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/birajcoder/url-hashing
- Owner: BirajCoder
- License: mit
- Created: 2023-09-12T17:54:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-13T10:25:44.000Z (about 1 year ago)
- Last Synced: 2023-09-13T14:13:17.634Z (about 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Architecture Choice and Reasoning
The provided code is a Flask-based web application designed to hash URLs and track their usage statistics using Amazon DynamoDB as a backend database. Here is an overview of the architecture choice and the reasoning behind it:
**Flask:** Flask is a lightweight and flexible web framework for Python, making it an excellent choice for building web applications. It provides the necessary tools and extensions for developing RESTful APIs and web services. The use of Flask allows for rapid development and easy integration with other libraries and services.
**Amazon DynamoDB:** DynamoDB is a fully managed NoSQL database service provided by AWS. It is highly scalable, reliable, and can handle high-throughput workloads. In this architecture, DynamoDB serves as the backend database for storing hashed URLs, original URLs, and click counts. The decision to use DynamoDB is based on its ability to handle the expected load, as well as its seamless integration with other AWS services.
**Boto3:** Boto3 is the official AWS SDK for Python. It is used in the code to interact with DynamoDB and manage AWS resources. Boto3 simplifies the process of connecting to AWS services and performing operations on them.
**Flask-Limiter:** Flask-Limiter is used to implement rate limiting on certain routes of the application. This helps protect the application from abuse and ensures fair usage of resources. It allows you to set rate limits on a per-minute and per-day basis.