|
|
|
|
|
by 3np
291 days ago
|
|
I think it's a very important and interesting problem you're tackling and you probably need to iterate a bit further on several points of the architecture and protocol. As to your main question re the proxy: Why is there a proxy in the first place? The client could just make the same requests the proxy would directly to the multiple parties, obviating the for it, no? |
|
Without the proxy the client would request a specific instance of the API (university 1, university 2, NGO 1, NGO 2), which then would be responsible for forwarding the data to the other. What if he changes the code and forward a false data:
user A votes for candidate X (HTTP POST request received by API deployed at university 1). API deployed at university A is compromised (by the university itself or not) and the information persisted in the DB is "user A votes for candidate Y". This information is then forwarded to other API.
If a proxy like NGINX is responsible for request forwarding the problem is solved (assuming that all parties trust nginx and its "mirror" module). https://nginx.org/en/docs/http/ngx_http_mirror_module.html