I've been giving some thought to how custom UDF's are packaged and I wanted to know what people thought about the subject.
So right now I'm packaging them up into fat jars which is easy and convenient but the downsides are the functions don't generally have any cross dependencies and if someone wanted to use one they need to install all of them. Again not a big problem but it's an all or nothing thing. I can image having some functions that you don't want everyone to be able to run. It would be nice to have a security feature like for named graphs for functions which I guess you could do by implementing the function as a service. (I might look into that). It also makes it somewhat difficult to throw out a single quick function which is sometimes nice. What would be ideal would be to package a single function per jar but maintaining it quickly becomes a nightmare and you get a lot of duplicate code since you need to copy the dependencies for each jar/function.
Ok, we have something to manage dependencies. I could just stop using fat jars and use Maven aether to manage the dependencies and maybe a utility to install them stardog-plugin install ...
. but the stardog scripts would need to be updated to recursively add any jars in STARDOG_EXT instead of just using the wild card.
I've looked into using javascript for functions but unfortunately the Nashorn javascript engine has been deprecated and the suggested replacement is to use GraalVM and I don't know when or if that will ever be an option with Stardog.
I've been looking into some somewhat old work that was titled "Web of Functions" Web of Functions that I think is interesting. I don't like the security or performance implications of executing functions remotely but they're not any different than service queries. Maybe you could proxy to local implementation if they're available and remote ones if they're allowed.