New libp2p implementation in Kotlin

Hi All,

Just subscribed to this discussion form and this is my very first message here :wink:

I just wanted to reach out to you all that I started a new libp2p implementation in Kotlin, please have a look at:

I also created a multiformats implementation, also in Kotlin:

I started the kotlin-libp2p project mainly for educational/research purposes. I love to code on networking stacks and protocols and I think libp2p is an awesome technology. I can not wait to implement all the different protocols (Kademlia, Identify, mDNS, Yamux, etc.) and see if its working with the other stacks (Go, Js, Rust, …). Please be advised that it is in heavy development, as such I do not guarantee any stability, usability, issues and such (Although I do test a lot). And I’m doing this in my spare time, so please do not expect feature XYZ anytime soon.

I also think Kotlin is a very nice language and coroutines are awesome. For people that don’t know: Kotlin is a language developed by JetBrains and is the preferred language for Android development (but I personally use Kotlin for backend work). The Kotlin compiler compiles Kotlin into JVM bytecode (the same bytecode as Java) so Kotlin can run on any compliant JVM and is fully interoperable with Java.

kotlin-libp2p is based on the go-libp2p implementation (some ideas/features are taken from there).

Please do not hesitate to reach out to me if you have any questions.

3 Likes

Cool to see another implementation @Erwin!

Want to present it at the next community call next week Tuesday?

Also you might find the interop tests useful for your implementation https://github.com/libp2p/test-plans/tree/master/multidim-interop.

//CC @Nashatyrev and @ianopolous given your work on GitHub - libp2p/jvm-libp2p: a libp2p implementation for the JVM, written in Kotlin 🔥 [WIP].

Thanks for your reply @mxinden !

I haven’t participated in any libp2p community call yet, so not sure of the format, but I love to participate. Sure, I’m happy to introduce myself and the kotlin-libp2p implementation. Where can I get an invite?

I will run the interop tests anytime soon, I’m really curious about the results… I’ll keep you all informed of any results.

@Nashatyrev and @ ianopolous : I was not aware of your implementation, looks nice! I’m always happy to share/collaborate.

Thanks!

Thanks, but as an Android developer I prefer to use go-libp2p in conjunction with gomobile.
I don’t understand why other implementations are needed.

The main reason for me is educational, and for research purposes. Initially when I started this project, I was “playing” around with Java (since I was using that at work) and with some protocols. However, I discovered that Kotlin is a nice language and I was not familiar with Kotlin at all. So, in the process I learned Kotlin and implemented some different protocols and parts of the libp2p stack. At a certain moment in time my hands are itching to implement the next part, and the next. And from one thing comes the other. I love to see Kademlia working, I love to see Quic working, etc. etc.

Also, the other things is, its open source. Meaning, everybody can use parts that is beneficial for them. Maybe not the whole project, but some ideas, algorithms, etc.

go-libp2p is a great and mature implementation (at least much more mature than my implementation is). I am not suggesting at all that you move from go-libp2p and use kotlin-lip2p.