quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.78k stars 2.68k forks source link

[Extension Proposal] automatically register an <application>.local domain when running in dev mode #43214

Closed fbricon closed 1 month ago

fbricon commented 1 month ago

Description

Inspired by https://www.localcan.com/, I've been playing with a PoC to automatically register an <application>.local domain when running in dev mode. It uses mDNS to generate .local domain names. This JBang-based PoC is available at https://gist.github.com/fbricon/cf25b6670659216447e17712d5acd7f6#file-qmdns-java-L60-L97

You can run it with JBang, as in

jbang https://gist.github.com/fbricon/cf25b6670659216447e17712d5acd7f6

(trust the url) then

curl http://awesome.local:8080/hello

I and other people think it might be worth making a quarkus-mdns extension out of it, usable when running in Dev mode.

Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).

Repository name

quarkus-mdns

Short description

Automatically register an <application>.local domain when running Quarkus dev mode

Repository Homepage URL

https://quarkiverse.github.io/quarkiverse-docs/quarkus-mdns/dev/

Repository Topics

Team Members

Additional context

No response

quarkus-bot[bot] commented 1 month ago

/cc @aloubyansky (extension-proposal), @gastaldi (extension-proposal), @gsmet (extension-proposal), @maxandersen (extension-proposal,jbang), @quarkusio/devtools (jbang)

melloware commented 1 month ago

As discussed on Zulip there was some concern about jmDNS being Apache 2.0 licensed. It has some LGPL sample code but not in the library itself. The history of the license and how it was transferred is here: https://github.com/jmdns/jmdns/blob/main/NOTICE.txt

Essentially the original authors gave permission to move it to Apache 2.0 instead of LGPL or dual licensed.

Java Multicast Domain Name Server (JmDNS)

This project was originally developed by Arthur van Hoff under the GNU Lesser General Public License as jRendevous. It was moved to Sourceforge by Rick Blair and renamed to JmDNS with the Arthur's kind permission. It has been re-released under the Apache License, Version 2.0. In 2014, it has been moved from Sourceforge to Github by Kai Kreuzer with the kind approval from Arthur and Rick.

melloware commented 1 month ago

The real issue with forking is the library uses javax.jmdns is in packaging. It has for 21 years but this will cause Quarkus classloading issues.

We asked the developer about changing the packaging: https://github.com/jmdns/jmdns/issues/289

Developer response:

If Oracle themself is not permitting us the continued use (with really only patching a decades old library) and reaches out to us directly, I am willing to create a new major release of JmDNS with a changed namespace, which is not backward compatible and breaks everyone's code. Until then, I reject this issue for the best interest of our users.