Re: [freenet-dev] RequestClient removed from HighLevelSimpleClient functions?
On Sunday, November 16, 2014 10:41:26 AM xor wrote: > On Saturday, November 15, 2014 11:08:48 AM Matthew Toseland wrote: > > On 15/11/14 09:21, xor wrote: > > > Hey toad, > > > > > > as Steve has already tagged a pre-release for the build which will > > > deploy > > > purge-db4o, I am trying to fix WOT to compile against it. > > > > > > I am not sure what to replace this function from the pre-purge-db4o code > > > with: > > > https://github.com/freenet/fred/blob/build01466/src/freenet/client/HighL > > > e > > > velSimpleClient.java#L96 > > > > > > Naively, I could say "RequestClient is a 'foreign thing' as it does not > > > specify any information relevant to WOT, so I just use the function > > > which > > > has that parameter removed since only fred cared about it" and use this > > > one: > > > https://github.com/freenet/fred/blob/6596c3e238340ce19a34f9e32611862c8f2 > > > a > > > 4390/src/freenet/client/HighLevelSimpleClient.java#L96 > > > > Yes, this is correct. > > > > > But isn't the RequestClient very important for fred? I think it is used > > > to > > > ensure that traffic is round-robined between whole clients instead of on > > > the individual request level - which is critical to prevent that clients > > > which do very many requests such as WOT do not starve other stuff? > > > > The new Client[Get]Callback API has a method to return a RequestClient. > > I assume you mean the "public RequestClient getRequestClient();" in > ClientBaseCallback, which is the parent of ClientGetCallback? > > If I *get* which RequestClient fred used for WOTs requests, how does that > help to *set* freds internals properly to use the same request client for > everything which WOT does, instead of a fresh one for each WOT request? WOT > should be specifying which RequestClient to always use instead of merely > observing which one is used? How to do that? > > Thanks for your responsiveness in spite of being busy with university! Ahhh sorry I was being dumb. The ClientGetCallback is what WOT has to implement of course, so if it returns the desired RequestClient in its getRequestClient(), that function is used by *fred* to decide which RequestClient to use. -> Problem solved. Thanks again! signature.asc Description: This is a digitally signed message part. ___ Devl mailing list Devl@freenetproject.org https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
Re: [freenet-dev] RequestClient removed from HighLevelSimpleClient functions?
On Saturday, November 15, 2014 11:08:48 AM Matthew Toseland wrote: > On 15/11/14 09:21, xor wrote: > > Hey toad, > > > > as Steve has already tagged a pre-release for the build which will deploy > > purge-db4o, I am trying to fix WOT to compile against it. > > > > I am not sure what to replace this function from the pre-purge-db4o code > > with: > > https://github.com/freenet/fred/blob/build01466/src/freenet/client/HighLe > > velSimpleClient.java#L96 > > > > Naively, I could say "RequestClient is a 'foreign thing' as it does not > > specify any information relevant to WOT, so I just use the function which > > has that parameter removed since only fred cared about it" and use this > > one: > > https://github.com/freenet/fred/blob/6596c3e238340ce19a34f9e32611862c8f2a > > 4390/src/freenet/client/HighLevelSimpleClient.java#L96 > Yes, this is correct. > > > But isn't the RequestClient very important for fred? I think it is used to > > ensure that traffic is round-robined between whole clients instead of on > > the individual request level - which is critical to prevent that clients > > which do very many requests such as WOT do not starve other stuff? > > The new Client[Get]Callback API has a method to return a RequestClient. I assume you mean the "public RequestClient getRequestClient();" in ClientBaseCallback, which is the parent of ClientGetCallback? If I *get* which RequestClient fred used for WOTs requests, how does that help to *set* freds internals properly to use the same request client for everything which WOT does, instead of a fresh one for each WOT request? WOT should be specifying which RequestClient to always use instead of merely observing which one is used? How to do that? Thanks for your responsiveness in spite of being busy with university! > > > So how am I supposed to replace that function? > > WOT actually uses *all* of the other parameters in a non-default manner, > > i.e. to specify stuff, so the only other function which allows > > specification of a RequestClient IMHO is not an option > > (that being "public FetchResult fetch(FreenetURI uri, long maxSize, > > RequestClient context) throws FetchException;" - notice how it especially > > does not allow specification of a callback object, so its a blocking > > fetch I guess, and thus would require complete changing of the > > architecture of the existing code in WOT which is event-driven instead of > > a thread which calls blocking functions.) > > > > Greetings and thanks, > > > > xor signature.asc Description: This is a digitally signed message part. ___ Devl mailing list Devl@freenetproject.org https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
Re: [freenet-dev] RequestClient removed from HighLevelSimpleClient functions?
On 15/11/14 09:21, xor wrote: > Hey toad, > > as Steve has already tagged a pre-release for the build which will deploy > purge-db4o, I am trying to fix WOT to compile against it. > > I am not sure what to replace this function from the pre-purge-db4o code with: > https://github.com/freenet/fred/blob/build01466/src/freenet/client/HighLevelSimpleClient.java#L96 > > Naively, I could say "RequestClient is a 'foreign thing' as it does not > specify any information relevant to WOT, so I just use the function which has > that parameter removed since only fred cared about it" and use this one: > https://github.com/freenet/fred/blob/6596c3e238340ce19a34f9e32611862c8f2a4390/src/freenet/client/HighLevelSimpleClient.java#L96 Yes, this is correct. > But isn't the RequestClient very important for fred? I think it is used to > ensure that traffic is round-robined between whole clients instead of on the > individual request level - which is critical to prevent that clients which do > very many requests such as WOT do not starve other stuff? The new Client[Get]Callback API has a method to return a RequestClient. > So how am I supposed to replace that function? > WOT actually uses *all* of the other parameters in a non-default manner, i.e. > to specify stuff, so the only other function which allows specification of a > RequestClient IMHO is not an option > (that being "public FetchResult fetch(FreenetURI uri, long maxSize, > RequestClient context) throws FetchException;" - notice how it especially > does > not allow specification of a callback object, so its a blocking fetch I > guess, > and thus would require complete changing of the architecture of the existing > code in WOT which is event-driven instead of a thread which calls blocking > functions.) > > Greetings and thanks, > xor signature.asc Description: OpenPGP digital signature ___ Devl mailing list Devl@freenetproject.org https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl