Design bike rental. Design malware detection system in tweets. Design radiation detection
Sigiloso
1. Bike Rental System Goal: Let users rent, return, and locate bikes via mobile/web app. Core Components: User Service – sign up, login, user profile Bike Service – track availability, condition, and location Rental Service – start/end rentals, billing, time tracking Payment Service – handle charges, refunds Notification Service – rental reminders, alerts Data Model: User(id, name, contact) Bike(id, location, status) Rental(id, user_id, bike_id, start_time, end_time, cost) Payment(id, rental_id, amount, status) Key Design Notes: Use GPS or IoT to track bike location Use QR code/NFC to unlock bikes Cache popular stations’ inventory Optimize for real-time availability and load balancing bikes Malware Detection in Tweets Goal: Detect tweets that may link to or promote malware. Core Components: Tweet Ingestor – pulls tweets in real-time (via Twitter API) URL Extractor & Expander – parses and expands short links Feature Extractor – e.g., URL patterns, tweet text, hashtags ML Classifier – detects malware using trained model Threat Intelligence DB – known bad domains/IPs Alert/Reporting System – logs or flags suspicious tweets Data Model: Tweet(id, user_id, text, url, timestamp) Threat(url, type, confidence, last_seen) Key Design Notes: Use stream processing (Kafka + Spark/Flink) Use pre-trained NLP models or custom malware classifiers Maintain URL reputation DB Incorporate real-time feedback loop to retrain model Radiation Detection System Goal: Detect and report elevated radiation levels from sensors. Core Components: Sensor Network – distributed devices measure radiation (Geiger counters) Ingestion Layer – collects and batches sensor data Analytics Engine – detects anomalies, aggregates trends Alerting Service – triggers alarms based on thresholds Monitoring Dashboard – real-time radiation maps Data Model: Sensor(id, location, calibration_info) Reading(sensor_id, timestamp, radiation_level) Alert(id, location, severity, time) Key Design Notes: Use edge computing for local threshold checks Time-series database (e.g., InfluxDB, Prometheus) Visualize with heatmaps Add failover and offline buffering for disconnected sensors