Open bsenel opened 3 years ago
Why don't the four bundles require 4 puzzle solves? I'm confused. Doesn't a bundle contain one request from each cache?
On Fri, Mar 5, 2021 at 5:44 PM Berat Senel notifications@github.com wrote:
Assigned #16 https://github.com/cachecashproject/go-cachecash/issues/16 to @JustinCappos https://github.com/JustinCappos.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cachecashproject/go-cachecash/issues/16#event-4412602865, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGROD5JHHVXLLJRNWQTEWDTCCRYLANCNFSM4YU4UZSA .
I would expect the same thing, but there are three requests separately in the current implementation. When the first requests are made from the caches and data chunks are received, the client solves the puzzle. And then it starts the second request group. Consequently, there are three puzzle-solving for a bundle as default.
When you say three requests, you mean a total of 12 blocks retrieved from 4 caches (3 each), right?
On Fri, Mar 5, 2021 at 6:51 PM Berat Senel notifications@github.com wrote:
I would expect the same thing, but there are three requests separately in the current implementation. Consequently, there are three puzzle-solving for a bundle as default.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cachecashproject/go-cachecash/issues/16#issuecomment-791341775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGROD3CT3HBPY5EJE2IDSTTCCZR3ANCNFSM4YU4UZSA .
I am yet to check if requests are made from the same caches. Assuming the requests are made from the same caches, yes, I mean a total of 12 blocks retrieved from 4 caches, 3 data chunks for each.
Puzzle-solving at the client doesn't add significant delay on TTFB as it is likely around 60-70 ms on average. However, in the current implementation, retrieving a file at around 5 MB in size contains four bundles. Each bundle typically holds twelve data chunks. And there are three handling operations for each bundle. Each handling operation includes getting four data chunks, solving the puzzle jumping game, and decrypting the data. So the first three bundles have nine puzzle-solving, and the last bundle has two because it contains seven data chunks instead of twelve. As a result, there are eleven puzzle-solving operations, including data decryption.
From this point on, I give the figures from a measurement in which caches run in Wisconsin. The average retrieval time of a file at around 5 MB in size is approximately 1.8 seconds. Eleven puzzle-solving, including data decryption, costs 660-770 ms on average at a retrieval time of 1800 milliseconds. I think this is an enormous delay. My suggestion is to lower this effect, changing the required data chunk count to access the solution in order to solve the puzzle.
For instance, if we had one handling bundle operation per bundle that contains twelve data chunks, the client could commence puzzle-solving after retrieving the first four chunks. In this way, there would be four puzzle-solving despite eleven so that it would cost 240-280 milliseconds. It is possible to play with these numbers to reach an optimum state.