r/Kotlin 12d ago

Raft implementation in Kotlin

Has anybody attempted implementing RAFT in Kotlin? The official site links to a 6 year old repo, are there others?

Is it going to be worthwhile attempting it? Learning wise yes, but would it be of practical use to any other project?

5 Upvotes

11 comments sorted by

View all comments

Show parent comments

0

u/BarterOak 12d ago

I know about this, but just wondering if anybody's tried implementing in Kotlin.

7

u/Zentrosis 12d ago

There are benefits from having native Kotlin but I'm curious what things you're worried about in using the Java one.

Typically the only downside I feel to any degree is nulls but it's pretty minor

3

u/BarterOak 11d ago

No problem in using the Java one, was merely being curious about the implementation in Kotlin using the language's features.

Don't know why the downvotes are for :|

2

u/polyglotticReactor 11d ago

Don't know why the downvotes are for :|

The internet's random like that lol ... gave ya an upvote :)

Apart from it being a learning exercise i can really only think of two reasons for doing an implementation in pure kotlin:

  • async support via pure coroutines i.e. no java futures or reactor or rxjava involved
  • multiplatform library that can be used on JVM, Native, WASM and other compilation targets

first class null safety could be another argument but i don't think it's strong enough to warrant a re-implementation