You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by LB <co...@googlemail.com.INVALID> on 2023/01/03 11:40:42 UTC
Re: Fuseki Modules
Hi all and late happy new year!
Nice work with the modules Andy.
Now, a probably a silly question and maybe I missed something already
mentioned in some other mail ...
I tried to add a Fuseki Module, but for the Fuseki with UI Standalone
setup. It looks like my module does only work for setups based on Fuseki
Main, is this correct? When using Fuseki Standalone, I can see from logs
that FusekiModule::start is called, and according to code this happens
once the classpath has been scanned in the Subsystem lifecycle. But all
the code like registering a servlet per dataset in the
FusekiModule::prepare method isn't called at all. According to Javadoc
it needs a "build" step which I can see when following the call stack of
Fuseki server builder.
Long story short, am I doing something wrong, if not, are there any
options how to make a Fuseki module being used in Fuseki Standalone (UI)
? There seem to be no Fuseki server but DataAccessPoints only?
Cheers,
Lorenz
On 13.10.21 16:18, Andy Seaborne wrote:
>
>
> On 07/10/2021 16:29, Andy Seaborne wrote:
>> Some background on this.
>>
>> An example use case:
>>
>> A Kafka-Fuseki connector which take data, patches or SPARQL updates
>> from a Kafka topic (that is, anything that can POSTed to a dataset).
>> Kafka messages have a header so there is a content-type header and
>> the message is sent into Fuseki dispatch.
>
> WIP:
> https://github.com/Telicent-io/jena-fuseki-kafka
>
> Andy
Re: Fuseki Modules
Posted by Andy Seaborne <an...@apache.org>.
On 03/01/2023 13:43, Andy Seaborne wrote:
>
>
> On 03/01/2023 11:40, LB wrote:
>> Hi all and late happy new year!
>>
>> Nice work with the modules Andy.
>>
>> Now, a probably a silly question and maybe I missed something already
>> mentioned in some other mail ...
>
> Documentation:
>
> "Modules are invoked during the process of building a Fuseki Main server."
>
>> I tried to add a Fuseki Module, but for the Fuseki with UI Standalone
>> setup. It looks like my module does only work for setups based on
>> Fuseki Main, is this correct? When using Fuseki Standalone, I can see
>> from logs that FusekiModule::start is called,
>
> How? Because FusekiModule is in jena-fuseki-main.
>
> (Your fuseki module may have too much Fuseki in it - you have to exclude
> all of Fuseki from a module jar if it is shaded.)
Having to produce a jar file without the Fuseki in it, despite compiling
code for Fuseki interfaces, is a bit of a burden when using FusekiMain
in Java code.
FusekiModule conflates configuration during the build lifecycle and
loading code using ServiceLoader.
The orignal idea was for drop-in extensions but the configuration during
the build lifecycle is useful in it's own right.
https://github.com/apache/jena/pull/1898
proposes some changes:
* FusekiModule becomes just the interface to server building.
* A new FusekiAutoModule combines FusekiModule with SubsystemLifecycle
(the loading support)
* FusekiModule class - an immutable collection of FusekiModule (and
FusekiAutoModule)
* FusekiServer.Builder can be given a FusekiModule object.
If none is given, then one based on all the FusekiAutoModule is
created. Also, for the system wide FusekiAutoModule, a fresh
object is created for each server build so the object can
hold per-build state.
The downside is that the ServiceLoader file in /META/services/
org.apache.jena.fuseki.main.sys.FusekiModule
changes name to
org.apache.jena.fuseki.main.sys.FusekiAutoModule
FusekiModule is still labelled "experimental".
The suggestion is getting the naming right long-term is more important
than complete compatibility.
If anyone is using Fuseki module, please add your experiences so we can
confidently remove the "experimental" tag.
Andy
Re: Fuseki Modules
Posted by Andy Seaborne <an...@apache.org>.
On 03/01/2023 11:40, LB wrote:
> Hi all and late happy new year!
>
> Nice work with the modules Andy.
>
> Now, a probably a silly question and maybe I missed something already
> mentioned in some other mail ...
Documentation:
"Modules are invoked during the process of building a Fuseki Main server."
> I tried to add a Fuseki Module, but for the Fuseki with UI Standalone
> setup. It looks like my module does only work for setups based on Fuseki
> Main, is this correct? When using Fuseki Standalone, I can see from logs
> that FusekiModule::start is called,
How? Because FusekiModule is in jena-fuseki-main.
(Your fuseki module may have too much Fuseki in it - you have to exclude
all of Fuseki from a module jar if it is shaded.)
> and according to code this happens
> once the classpath has been scanned in the Subsystem lifecycle. But all
> the code like registering a servlet per dataset in the
> FusekiModule::prepare method isn't called at all. According to Javadoc
> it needs a "build" step which I can see when following the call stack of
> Fuseki server builder.
>
> Long story short, am I doing something wrong, if not, are there any
> options how to make a Fuseki module being used in Fuseki Standalone (UI)
> ?
Fuseki Webapp (the standalone jar is Jetty + the portable webapp) will
not support Fuseki Modules.
Filters and servlets are configured by web.xml in a webapp. There isn't
a webapp-API portable way to make it dynamic.
The standalone jar will be changed, sometime, to be Fuseki Main +
modules for (1) UI (2) administration functions (3) Shiro. (which works
on my machine ATM).
The webapp packaging will be left for the WAR file only.
Note: the WAR file will not (today) work in Tomcat 10, only Tomcat 9
(unless the Tomcat converter tool is used). This is the JavaEE to
JakartaEE switch over. javax.servlet -> jaklarta.servlet
> There seem to be no Fuseki server but DataAccessPoints only?
Correct. The server is webapp container.
Andy
>
>
> Cheers,
>
> Lorenz
>
> On 13.10.21 16:18, Andy Seaborne wrote:
>>
>>
>> On 07/10/2021 16:29, Andy Seaborne wrote:
>>> Some background on this.
>>>
>>> An example use case:
>>>
>>> A Kafka-Fuseki connector which take data, patches or SPARQL updates
>>> from a Kafka topic (that is, anything that can POSTed to a dataset).
>>> Kafka messages have a header so there is a content-type header and
>>> the message is sent into Fuseki dispatch.
>>
>> WIP:
>> https://github.com/Telicent-io/jena-fuseki-kafka
>>
>> Andy