by Matt » March 15, 2005, 10:44 am
While the circular array was just an example of an implementation, I do realize that it might not be very scalable and would have the tendency to drop searches. On the other hand, I think in either case the tables will end up being pretty large no matter what. Without dropping searches, there would be no way to maximize the size of the table, but in practice it might never come up that the tables are so large that it would cause any problems.
In any case, I have to note that it will be annoying to keep track of every peer who has responded with a negative so that we can know when to delete a search from the table. Granted, just because its annoying doesn't mean we shouldn't do it or its a bad way, but if there is an equal alternative that isn't annoying, we should be doing that instead. As I tried to mention earlier, implementing the negative responses table would require keeping track of who the search was sent to, who replied with a negative, and who was no longer even there. That information could enlarge the size of the table in memory by quite a chunk. Of course, running out of memory may never be a problem in practice, but its worth consideration.
I guess the bottom line is: how easy is it to code, how well does it support the network, and how well does it run on the users machine. The non-negative response would be the easier to code, I think, but both are quite doable. The negative response would be the best for the network, to be certain, though modifications/new ideas for a non-negative approach could help that idea out a little bit. Its hard to be certain about how good either approach would be for the user's machine, but the non-negative approach would be better off if we could cap the size of the search query table.
If we do decide to use the negative responses, it would probably be best if every peer replies with a negative response, whether or not they have search results. They can just send their search results along as they get them, and then when they know there aren't anymore coming (all its peers have returned negatives), then it can send a negative to close its end of the search. Makes sense to me.
I had another thought, but I've lost it now. Maybe it will come back to me.
While the circular array was just an example of an implementation, I do realize that it might not be very scalable and would have the tendency to drop searches. On the other hand, I think in either case the tables will end up being pretty large no matter what. Without dropping searches, there would be no way to maximize the size of the table, but in practice it might never come up that the tables are so large that it would cause any problems.
In any case, I have to note that it will be annoying to keep track of every peer who has responded with a negative so that we can know when to delete a search from the table. Granted, just because its annoying doesn't mean we shouldn't do it or its a bad way, but if there is an equal alternative that isn't annoying, we should be doing that instead. As I tried to mention earlier, implementing the negative responses table would require keeping track of who the search was sent to, who replied with a negative, and who was no longer even there. That information could enlarge the size of the table in memory by quite a chunk. Of course, running out of memory may never be a problem in practice, but its worth consideration.
I guess the bottom line is: how easy is it to code, how well does it support the network, and how well does it run on the users machine. The non-negative response would be the easier to code, I think, but both are quite doable. The negative response would be the best for the network, to be certain, though modifications/new ideas for a non-negative approach could help that idea out a little bit. Its hard to be certain about how good either approach would be for the user's machine, but the non-negative approach would be better off if we could cap the size of the search query table.
If we do decide to use the negative responses, it would probably be best if every peer replies with a negative response, whether or not they have search results. They can just send their search results along as they get them, and then when they know there aren't anymore coming (all its peers have returned negatives), then it can send a negative to close its end of the search. Makes sense to me.
I had another thought, but I've lost it now. Maybe it will come back to me.