differential-datalog icon indicating copy to clipboard operation
differential-datalog copied to clipboard

Start publishing managed jar for Java API

Open roymanish opened this issue 3 years ago • 11 comments

We should think of publishing Java API as a managed jar for better integration with maven or gradle based projects.

roymanish avatar Dec 04 '20 19:12 roymanish

Where should we publish the jar? We actually have a 1-line script in the sql directory which installs the ddlogapi.jar in the standard maven loca repository; it is called ./install-ddlog-jar.sh. After running this script you can use the jar from maven and gradle.

mihaibudiu avatar Dec 04 '20 19:12 mihaibudiu

For Vmware we can pick any standard maven repository used internally and publish it there. Actually i have already publish it for Mimar project in one of the repository. For that has some Mimar specific changes. Problem with script is that i have to run it on each and every machine/Pod/Container where i want to use it. Not an ideal solution.

roymanish avatar Dec 04 '20 19:12 roymanish

This is an open-source project, we cannot have here code that is specific to internal company repositories.

mihaibudiu avatar Dec 04 '20 20:12 mihaibudiu

I don't see what we can do about this. DDlog consumers should implement this functionality.

mihaibudiu avatar Dec 04 '20 22:12 mihaibudiu

@roymanish The DDLog Java API is used in conjunction with a custom ddlog program (that has to be loaded dynamically by your program). That already requires some out-of-band mechanisms to work. That said, it might make things easier if we could make the Java API jar available on Maven Central.

lalithsuresh avatar Dec 08 '20 02:12 lalithsuresh

@mbudiu-vmw That is exactly what we are doing right now. Trying to maintain parallel managed version of this Java API in maven. But the challenge with that approach is that i have to manually sync myself with any updates happening in JavaAPI from ddlog repo.

roymanish avatar Dec 08 '20 13:12 roymanish

What is the process you use to deploy a new version of ddlog? I believe that installing the jar in a repository should be part of that process.

mihaibudiu avatar Dec 08 '20 18:12 mihaibudiu

Not directly. I have to make sure that some changes that i done which are specific to my project are not lost. Hence i cherrypick the new changes into our copy of java api(Which is a git repo) and then publish a new version of jar.

roymanish avatar Dec 08 '20 18:12 roymanish

@roymanish , you really should not need to make project-specific changes to the API. This is a separate issue we need to work out. If this is about escaping in JSON strings, there is a clean way do this that does not require API changes.

ryzhyk avatar Dec 08 '20 18:12 ryzhyk

There is one more change related to user provided path to generate runtime lib. But i think these changes can be handled by API itself. I can raise a change request for that. Let me know. Even after that i will have to manage the publishing of jar to maven repository every time there is a new ddlog release. But for now we can work with that.

roymanish avatar Dec 08 '20 19:12 roymanish

There is one more change related to user provided path to generate runtime lib. But i think these changes can be handled by API itself. I can raise a change request for that. Let me know.

Sure, thanks.

ryzhyk avatar Dec 08 '20 19:12 ryzhyk