MohGovIL / rn-contact-tracing

React Native Library For Contact Tracing Over BLE (Bluetooth Low Energy) To Fight COVID-19 Pandemic
MIT License
59 stars 16 forks source link

Unable to develop a feasible server for the solution #109

Open ghost opened 3 years ago

ghost commented 3 years ago

Apologies for raising this as an issue, I am actively seeking assistance with designing server architecture for this.

What I have done so far:

What is the issue that I am facing?

My questions-

I appreciate any response and request to redirect this question to the proper channel where questions can be asked.

eyalr0 commented 3 years ago

Hi,

First of all, it should be possible to use a CDN or other solution to allow users to download the "positive data" in a way that shouldn't cost a lot of money to the server.

If it is still an issue, there is a trade-off between the size of the data and the privacy of the infected person. Instead of sending epoch keys, you can send only day keys, and that will decrease the size of the data by a factor of 24. This is not supported in the current version of the app, but might be possible to do. You can read the details of the protocol design and see the reference code at https://github.com/eyalr0/HashomerCryptoRef for more details.

ghost commented 3 years ago

@eyalr0, thanks for reaching out so promptly, and for the reference that you provided. I will surely go through it.

Below is my stress scenario on which I was estimating my cost: Assuming there are 5Million users that are fetching the 50K users' positive reported data, where each record is approx 30Kb, total data going out per user is approx 1.5Gb.

Now if I server 1.5Gb to every user, I have huge egress charges as well as an app that incurs heavy data usage. (if not crashes.) And that too we are talking about 1 API call.

My question is:

Attaching the device data sent to the server for 14 day for reference.

ghost commented 3 years ago

@eyalr0, I read the reference document. I see that section 2.3 Operational Constraints, Point 4 clearly addresses the issue. I think even with the day keys, the cost is still high for my scenario (I am using Cloudfront as my CDN). If the update package is the same all the users for the entire day. We might as well cache it.

If I understand it correctly:

Assuming that client makes 1 API request per day to fetch the positive data and the request is made at the end of the day.

Questions:

I really appreciate your acknowledgment of the issue and taking out time to assist with it.