Send Webmentions more intelligently
To reduce the impact on external users0, I need to replace the method in which I send webmentions from all the time to only sending them if we've not successfully sent them to a site before.
This change requires the addition of Spring Data to start to add a persistence layer (via SQLite, for ease) so we can make sure we don't re-send Webmentions to servers who have already received them.
Additionally, we need to replace Mention.Tech as a Webmention client, as
it doesn't tell us whether the target
has received the webmention.
This is now done via Telegraph, which has a great API for ensuring these
requests are received.
This new approach requires a WebmentionService
which then calls on to
the WebmentionClient
, as the Service can then handle the persistence
of data and determining whether to send the Webmention (for instance, we
previously had i.e. SpammingWebmentionService
instead of a
CarefulWebmentionService
).
Our WebmentionClient
can now just manage sending a single webmention
between source
and target
, rather than before where it had a much
greater responsibility.
We make sure that our WebmentionClient
s are asynchronous by contract,
so we can be maximising our ability to multithread our application and
get as much throughput as we can.
Additionally, add the ability to test logs via https://www.jvt.me/posts/2019/09/22/testing-slf4j-logs/
Note that we want to de-duplicate the webmentions that are being sent,
so use a Set
which ensures the URLs to send Webmentions to are not
repeated in a run.
Closes #63 (closed).