https://kotlinlang.org logo
#announcements
Title
# announcements
a

AnnoymousGiraf

06/02/2019, 11:44 PM
Not sure where to pop this question, either Kotlin or Kotlin Native, does someone have experience with GO integration in Kotlin?
g

gildor

06/03/2019, 12:32 AM
What kind integration? It depends on platform and what you mean by "integration"
a

AnnoymousGiraf

06/03/2019, 1:21 AM
Docker Go library plays well with Docker, while the java on is just a lean api calls. i was thinking of utilizing the GO library somehow. not sure about the experience though.
g

gildor

06/03/2019, 2:16 AM
for this use case I would just use Java Client, it doesn’t worth to get all problems and boilerplate of interop just to use library on Go. Do you have some real limitations that cannot be used without Docker Go library?
Also, how Docker Go library works? Because all docker client (even official ones) just work with docker socket, so it completely language agnostic, just a socket binary protocol
a

AnnoymousGiraf

06/03/2019, 4:02 AM
i know, but the java client is limited for some reason. i guess some grpc or something that is not expose to the JVM ¯\_(ツ)_/¯
g

gildor

06/03/2019, 5:53 AM
some grpc or something that is not expose to the JVM
This not really make sense for me, if it is grpc and socket, than nothing to do with JVM, it’s just a protocol
Maybe if you don’t have some particular API it’s just not yet supported by particular library and make sense report an issue
b

BMG

06/03/2019, 6:17 AM
I’ve used Gomobile + Kotlin in my Android projects to reuse GO code from backend stack. (Before Kotlin native came into picture)
But I strongly recommend against using GoMobile as it is not very actively being supported. Also, it added huge size to the final apk. The only reason I had to use GoMobile was to share business logic across stacks. But Kotlin/Native is now the much better choice for that.
g

gildor

06/03/2019, 8:41 AM
GoMobile is essentially JNI
and the same if you just want to consume some existing native library, just use JNI, but you need really good reason to use JNI
2 Views