This repository contains the implementation of a socket-based middleware for communication between clients and servers in distributed applications. The project focuses on abstracting socket handling from the client through a stub controlled by the middleware. The chosen case study is a service that retrieves the current round of a football championship, demonstrating the middleware's applicability in a real-world scenario.
- Golang (Go): Chosen for its suitability for distributed systems and the team's familiarity with the language.
- Api-Football: External API used to fetch football match data.
The sequence diagram likely shows how these components interact with each other to fulfill a request for current round data in a football championship.
- stub-middleware: Abstracts socket implementation and provides a controlled interface for clients.
- client-football: Requests current round data from the stub.
- service-football: Communicates with ApiFootball to retrieve match data.
- service-discovery: Stores service names, IPs, and ports.
- Ensure you have Golang version 1.22.2 or later installed.
- Clone the repository:
git clone https://github.com/franklaercio/middleware-football.git
cd middleware-football
- Start the services:
cd service-football && go run main.go
cd service-discovery && go run main.go
- Run the client:
cd client-football && go run main.go
- Simplified Client Development: Clients interact with a straightforward interface instead of complex socket programming.
- Scalability: Easier to add new services and clients without modifying existing code.
- Flexibility: Middleware can handle various communication protocols and data formats.
- Frank Laércio
- GitHub: franklaercio
- LinkedIn: Frank Laércio
- Ohanna Dezidério
- GitHub: ohannadeziderio
- LinkedIn: Ohanna Dezidério
Implementing a socket-based middleware offers significant advantages for building scalable and maintainable distributed applications. This project demonstrates its effectiveness through a practical case study, showcasing the benefits of abstraction and centralized communication management.