ptrd / flupke

Java HTTP3 Client and HTTP3 Server plugin for Kwik
GNU General Public License v3.0
15 stars 4 forks source link

Android client refactoring #3

Open mikedawson opened 1 year ago

mikedawson commented 1 year ago

Hi,

It's great to have this library as a pure Java implementation of Http3. One of the most interesting parts for me is the ability to use it for peer-to-peer networking on Android (there are many clients for Android, no servers).

The current Android build is based on copying source and doing a find/replace. I think it would be better to use an interface/factory pattern here. I am working on this and can provide it as a pull request once I have it running. Then we can have three artifacts : flupke-common (where most of the logic lives), flupke-jre (linked to the Java 11 httpclient), and flupke-android (using the existing 'lite' Android http client implementation.

Work in progress here: https://bitbucket.org/ustadmobile/flupke/src/master/

Thanks!

ptrd commented 1 year ago

Hi Mike,

Thanks for your interest in Flupke.

I think it is an interesting idea to split up Flupke in multiple artifacts, so Android dev's don't have to do the copy/find/replace thing. However, what I really like about the current interface of Flupke, is that anyone using HttpClient now, can very easy switch to Flupke by only using a different builder. Others seem to like this too, see for example https://github.com/ptrd/flupke/issues/4: "Dropping in Flupke into this was not really a big deal and seamed super smooth at first. (The generated code works really well with http 1.1 and http2)".