Skip to content
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

Image version with Java support #111

Open
mmacai opened this issue Mar 6, 2018 · 4 comments
Open

Image version with Java support #111

mmacai opened this issue Mar 6, 2018 · 4 comments

Comments

@mmacai
Copy link

mmacai commented Mar 6, 2018

Hi, we are working on an Elixir application that uses jinterface to be able to communicate with Java application. The use case for that is AWS Kinesis that has client library only in Java and thus there is no other choice. This is the Java part: https://github.com/Accenture/reactive-interaction-gateway/tree/master/kinesis-client.

Is there any chance to create official docker image also with Java (jinterface) support? (and perhaps the same for Elixir image)

We would like to avoid checked in jinterface and use it natively from Erlang.

@c0b
Copy link
Collaborator

c0b commented Mar 7, 2018

for the messaging services, I've used both Kafka and Google PubSub, both have client side library in many programming language bindings, however the AWS Kinesis officially only have Java, Nodejs, .Net, Python and Ruby client, and I looked into its Python and Nodejs client, checking if possibly for someone be able easily create a pure Erlang or pure Elixir client library, but it doesn't look like so
because both the Nodejs and Python library are thin wrapper interface to the Amazon Kinesis Client Library (KCL) MultiLangDaemon which is in Java, means you would have to deploy with a JVM

https://docs.aws.amazon.com/streams/latest/dev/kinesis-record-processor-implementation-app-nodejs.html
https://docs.aws.amazon.com/streams/latest/dev/kinesis-record-processor-implementation-app-py.html

usually I would like to avoid JVM because that would bloat the image, wonder have you tried build a customized image on top of this one, could install a JVM from the example Dockerfile from openjdk image? or download and install a SunJRE in a similar approach; (or I would find some time try this approach)
https://github.com/docker-library/openjdk/blob/master/9-jre/Dockerfile

https://cwiki.apache.org/confluence/display/KAFKA/Clients

@mmacai
Copy link
Author

mmacai commented Mar 8, 2018

We are fine with Kafka and other stuff, this is just about AWS Kinesis. We know about daemon, we just didn't like that approach and tried jinterface to use directly Java app without daemon. We are also fine with deployment.

Only thing is that Erlang/Elixir docker images don't have jinterface thus we included one in git repo and copied to final docker image. However, this works, it's not the nicest approach as well.

Regarding custom Erlang/Elixir images, that's something we would like to avoid, because we would have to do that with every OTP or Elixir release.

Therefore I'm just curious if there is any chance to have official Erlang/Elixir image compiled with Java (maybe with some tag e.g. java).

@getong
Copy link
Collaborator

getong commented Mar 22, 2018

If done, the image size will be much bigger.

@kaxios
Copy link

kaxios commented May 19, 2018

If you have your Dockerfile extending to add the code you need, you can easily extend it on Dockerhub. Dockerhub automatically builds for you if you Dockerfile gets updated on a public github, it also reports on change on your dependency that breaks the image build. Usually, images like this one are expected to be very lean, as if the image grows can trigger complain form the users. Packing java into images is tricky due to different sources of JVMs and others variations of settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants