3 ms·
Late last year we had some major instability with our main microservices as they didn't properly scale and it wasn't pleasant. The backend codebase was Java. In
by jq-r 5y ago
Late last year we had some major instability with our main microservices as they didn't properly scale and it wasn't pleasant. The backend codebase was Java. In any case 2 months before that we got a dev with good Kotlin experience (he wrote a book on it) and he offered to rewrite those services in Kotlin as that instability was occurring. It took him about 5 days for each (sometimes less). And in a few weeks we had services which were rock solid. Amazing really how sometimes a person who knows his stuff can make a difference.
- codethief 5y agoHow does Kotlin "scale" differently than Java? I mean I'm anything but a Java fan but both languages run on the JVM, so unless your colleague also changed the architecture of those services I don't see how a switch from Java to Kotlin would help at all.
- scns 5y agoKotlin makes it easy to avoid the "billion dollar mistake" i.e. using null.
- vips7L 5y agoThat has nothing to do with scale. Quite honestly though, I don’t see null as that big of a deal. I haven’t struggled with it since I began programming 10 years ago.
- scns 5y agoA big study by Microsoft (IIRC) said that ~70% of bugs came from NPEs.
- vips7L 5y agoThat is interesting. I'm not against compiler enforced null checking, but it's not the killer feature that would convince me to switch to Kotlin from Java.
- lolinder 5y agoYour mileage may vary, but for me it's crucial—I can't use a language in production that doesn't have null safety. I want the compiler to force me to consider edge cases, and in many languages the biggest edge case of all is "that value you thought was there isn't actually there".
- jurmous 5y agoMy guess he implemented those using Kotlin Coroutines to build much more scalable and more thread safe implementations. Concepts it offers like Structured concurrency are really powerful.
- jq-r 5y agoTrue, Coroutines were very heavily used. It was kind of magical how services which nobody wanted to touch with a 10 ft pole due to their complexity for almost years got rewritten in mere days or weeks at most. Those big microservices were broken down to even smaller microservices.
- fulafel 5y agoSounds in this case attracted a better programmer.