-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add possibility to select scylla
or cql
dependencies in JanusGraph Server
#3580
Comments
Could shading help set two different classpaths for the two java-driver libraries at build time? |
This was @farodin91 's question as well. Shading would help having 2 conflicting libraries together, but I don't understand how will janusgraph-scylla work with Shading because it extends janusgraph-cql module. |
We probably have to shade both and build a combat layer. |
I agree. Shading solves the class name conflict (PR #3740 shows a strict way to do it), but just shading the What we could do, on top of shading, is "duplicate" the code of I believe there are multiple ways to achieve this, for instance:
I think these (rather complex?) options could work. However, I'm not exactly sure which side-effects relocating |
Thank you for investigating it @cdegroc ! Shading solution: makes it possible to include Two directories with CQL and Scylla conflicting libraries for the JanusGraph Server: Ability to easily define a newer version of one or another library than those provided by JanusGraph (+). Ability to update So, looks like all solutions have their cons and pros, but I would say that pros in Shading solutions are more valuable than those in Libs copy / paste solution. I would like to see shading solution to be implemented (probably |
Related to JanusGraph#3580 Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
Related to JanusGraph#3580 Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
After #4050 is merged, next steps we can do in our
It shouldn't be hard to make a script which is doing everything above. However, it looks like when I run |
Related to #3580 Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
ScyllaDB and DataStax Java Drivers cannot be together in JanusGraph Server because they have the same classpath. Thus, the only possibility to include Scylla drivers into JanusGraph Server right now is by manually replacing DataStax Java Drivers with Scylla Java Drivers.
It will be much more convenient is we add possibility to switch between
cql
andscylla
drivers in JanusGraph Server using either environment variables or some configurations.I don't know which approach is better but I would imagine something like below.
We ship all incompatible dependencies between
janusgraph-cql
andjanusgraph-scylla
in separate folderslibsScylla
andlibsCQL
.We add an additional option to
janusgraph-server.sh
to include dependencies fromlibsScylla
if there is an environment variable exists like the following:JANUSGRAPH_SCYLLA_DRIVER_ENABLED=true
. Otherwise we include dependencies fromlibsCQL
by default.To make the feature described above we will most likely need to change
janusgraph-dist
flow of building JanusGraph distributions by changing the flow to something like below:libs
folder as usual usingjanusgraph-cql
dependencylibs
folder but now excludingjanusgraph-cql
dependency and includingjanusgraph-scylla
dependency.libs
folders. If the a jar from one folderlibs
has an identical jar from another folderlibs
(samegroupId
, sameartifactId
, sameversion
) then this jar goes into generallibs
folder. Otherwise this lib goes tolibsCQL
orlibsScylla
respectively.libs
folder and all different jars inlibsCQL
andlibsScylla
folder we continue with our usual build process (i.e. zipping the resulting archive).If we change the process to be like above then it should be easy for any user to switch between
CQL
andScylla
driver implementations for JanusGraph Server quite easy by providing an environment variable. As Docker supports passing environment variables as well it should be easy to switch drivers in JanusGraph Docker distributions as well.The initial problem to this issue was described by @FlorianHockmann here.
This issue is a continuation of ScyllaDB Driver integration PR: #3578
The text was updated successfully, but these errors were encountered: