This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/redis-developer/movify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t redis21_backend backend/ | |
docker build -t redis21_frontend frontend/ | |
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
nginx: | |
image: nginx:1.17 | |
volumes: | |
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf | |
ports: | |
- 8000:80 | |
depends_on: | |
- backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: wordpress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Redis is basically an open source, in-memory, data structure store that can be used as a cache, primary database and message broker. It is a multi-model database that supports search, graph, real-time streaming, analytics and many other use cases beyond that of a simple data store. With over 52,000+ GitHub stars, 20,000+ forks and over 500+ contributors, Redis is quite popular among the developers. Redis gives developers building applications the tools and information they need in a very efficient manner. Redis today can be deployed on-premises, across clouds, hybrid environments as well as over the Edge devices flawlessly. | |
# Ensure that Docker is installed | |
docker -v | |
# Create a dedicated Docker network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% docker-compose ps | |
NAME COMMAND SERVICE STATUS PORTS | |
compose-adapter-1 "/adapter/redis-ts-a…" adapter running | |
compose-grafana-1 "/run.sh" grafana running 0.0.0.0:3000->3000/tcp | |
compose-prometheus-1 "/bin/prometheus - c…" prometheus running 0.0.0.0:9090->9090/tcp | |
compose-redis-1 "docker-entrypoint.s…" redis running 0.0.0.0:6379->6379/tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
prometheus: | |
image: "prom/prometheus:v2.8.0" | |
command: [" - config.file=/prometheus.yml"] | |
volumes: | |
- ./prometheus.yaml:/prometheus.yml | |
ports: | |
- 9090:9090 | |
adapter: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 lines | |
Cloning "https://github.com/redis-developer/basic-redis-rate-limiting-demo-go-lang" ... | |
Commit: 0fae74a58a4a90c0c375f5b9125ca141933ef8ee (Added) | |
Author: ajeetraina <ajeetraina@gmail.com> | |
Date: Wed Aug 25 07:47:10 2021 +0530 | |
time="2021-12-07T10:29:49Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled" | |
I1207 10:29:49.472081 1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on]. | |
Caching blobs under "/var/cache/blobs". | |
Pulling image golang ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to create a powerful drone system using Redis to protect crop insurers from false claims | |
Innovating at Enterprise Pace | |
How to Build a Squad Health Check Application with Redis | |
Guest Post: How Redis Is Enabling the Future of Real-Time AI | |
How to build a Real-Time Geo-distributed Multiplayer Top-down arcade shooting game using Redis | |
Create a Real-time Vehicle Tracking System with Redis | |
Introducing Redis Launchpad | |
The “Impedance Mismatch Test”: Is Your Data Platform Simple or a Complex Mess? | |
RedisMart: A Fully-Featured Retail Application With Redis | |
Indexing, Querying, and Full-Text Search of JSON Documents with Redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hit(self, game_id, user_id, enemy_user_id): | |
""" | |
Determines if the projectile has hit a user [user_id] | |
Extrapolates projectile position based on when projectile has spawned, and the time now. | |
Publishes a hit even if target is hit. | |
""" | |
projectiles = self.games_states[game_id]["projectiles"] | |
player = self.games_states[game_id]["players"][enemy_user_id] | |
for projectile in projectiles: |