Skip to content

m18n/azs_local_server_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚗 Fuel Station Server Project

Status Seriousness

🎓 Educational Project Disclaimer

This is NOT a production-ready application! This project was created in 2023 as a learning exercise to explore web server development in Rust. While it simulates a fuel station management system, it's primarily meant for educational purposes.

📜 Evolution of the Project

This project has had quite a journey across programming languages and architectural approaches:

  1. The C Beginning (Static HTML Viewer): Initially, this was developed as a pure C application that loaded HTML files to display them like a browser. The backend logic was all in C without an actual web server component. The original plan was to use proprietary DLLs from the company I was developing this for, but we eventually abandoned this approach due to its limitations.

  2. The C++ with Crow Framework (Web Server): As the project evolved, we realized a proper web server architecture would be more flexible. The second iteration was built using C++ with the Crow framework - a modern C++ web framework inspired by Flask. This allowed us to implement a more traditional client-server model with proper HTTP handling.

  3. The Rust Rewrite (Current Version): This repository represents the final evolution - a complete rewrite in Rust. This was my first Rust project, and I used it as an opportunity to explore the language's capabilities, especially in terms of safety, concurrency, and modern web server implementation.

Each transition represented not just a change in technology but a growing understanding of what the project needed to be.

💡 The Concept

I imagined a system where:

  • Each gas station would have its own web server
  • Cashiers and operators would connect through client applications
  • Data would flow seamlessly between all parties
  • (Spoiler: It was more challenging than I initially thought!)

🏢 Real-World Application Attempt

Interestingly, this project wasn't just a theoretical exercise. It was actually developed with the intention of implementing it at real fuel stations! We began early-stage deployment planning and even conducted some preliminary testing at a local station.

However, due to a combination of changing business requirements, technical challenges, and time constraints, the project was never fully completed or deployed in a production environment. Consider it a "frozen in time" snapshot of a real-world project that didn't quite make it to the finish line.

The code still contains some of the specific business logic and integration points that were designed for the actual implementation, making it an interesting hybrid of learning project and real-world application.

🧪 What I Was Trying to Build

The idea was to create a server that would:

  • Handle multiple client connections
  • Process fuel station operations
  • Store transaction data
  • Look impressive on my resume 😉

🔨 Tech Stack

The current version is built with Rust because:

  1. I wanted to learn Rust
  2. Everyone kept saying Rust is cool
  3. I enjoy challenging myself with new languages
  4. After working with C and C++/Crow, I was intrigued by Rust's promise of memory safety without garbage collection

🚧 Current State

This project is in a perpetual state of "almost working." Features are partially implemented, bugs are considered "undocumented features," and the code structure reflects my learning journey more than best practices.

🚀 Running (or attempting to run) the Project

# Clone at your own risk
git clone https://github.com/yourusername/fuel-station-experiment.git

# Build and pray
cargo build

# Run and see what happens
cargo run

📝 Lessons Learned

  • Rust's borrow checker is both a blessing and a nightmare
  • Web servers are more complex than they seem
  • Project scoping is an art I'm still mastering
  • Never promise a working demo before it's actually working
  • The gap between prototype and production is wider than it appears
  • Sometimes a complete rewrite in a new language is actually the right choice
  • The journey through multiple programming paradigms provides valuable perspective
  • Web frameworks can simplify development but add complexity to the architecture

🤣 Known "Features" (aka Bugs)

  • Sometimes it works, sometimes it doesn't - that's part of the charm!
  • May occasionally consume more CPU than your gaming sessions
  • Documentation exists primarily in my head
  • Some architectural decisions still reflect its C/C++ origins

This project represents both my learning journey across multiple programming languages and a real-world application attempt that didn't quite reach completion. It especially documents my first steps with Rust coming from a C/C++ background. If you're looking for a production-ready fuel station management system, I recommend looking elsewhere. If you're interested in seeing the evolution of a project that straddled the line between educational experiment and practical application, with all its messy parts, you're in the right place!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published