LazyGuard
Which Architecture to Choose?
@reacher I see, that's waht I am saying. Here the main aim is to desynchronize POST requests and procesing needed for each request. The desynchronization can be perfectly done using an in-process tool, no need for kafka whatsoever. The lead dev is not convinced :/
52 replies
Which Architecture to Choose?
@reacher This API is designed to handle requests for authorizing parking access, making the process straightforward for the client. Here’s how it works now:
1. The client sends a POST request to request parking access.
2. Upon receiving this request, we save it in the database with a status of "pending authorization" and immediately respond with a 200 OK as long as all required data is provided.
3. A background service regularly scans for requests marked as "pending authorization." For each of these, it sends a POST request to an internal system responsible for validating and authorizing parking access.
4.1. If the internal system call succeeds: The request status is updated from "pending authorization" to "authorized."
4.2. If the internal system call fails, a retry counter (stored in the db document) is incremented. The background service will retry the process later.
5. If the retry counter reaches a predefined limit, the system stops retrying, and the request remains unresolved.
(we don't care about having places ot not, it's only a matter of authorization, we don't care about notifying clients, it's someelse problem)
52 replies