So why are not all endpoints non-blocking.. Or are...
# spring
r
So why are not all endpoints non-blocking.. Or are they? I am thinking of co-routines and that one needs to use WebFlux/Netty in order to achieve this. In Python, async is build into the language interpreter, not spawning any new threads. I am talking about aiohttp in this case. In "Normal Java" one would go about and spawn threads a few years ago. but today, in kotlin and spring, why arent all endpoints non-blocking by default,? Or are we heading there - are we just interim these two paradigms.
a
They are, if you roll webflux - if you want suspended functions however, you need to be aware of some issues. You can see examples of from mine and Jarle's talk from this years kotlinconf. We run fully reactive stacks based on suspended functions and webflux in the storyteller service presented there.
r
Watched some of the keynotes, very good indeed. Normally used to RTFM but you guys and others were very pedagogic. Thanks. Might add that I got introduced to gRPC. Which is interesting since I was very eager about protobuf when it was new.
a
Glad to hear it 🙂
r
Yeah. I am dreaming of a great IoT+micro-service architecture that would replace our monolith. Using a custom protocol now I feel the need to reduce our tech debts both in terms of the monolith and the costs when dealing with the choice of protocol.
a
Have experience coping with large monoliths myself. It's a tedious process, but pays dividends when you come out the other side.
Did a talk called "Monolithic Endeavours - 4 Tenets of Monolithic Battle" a few years back where I talked about how we approached the issue. That was mainly about coping with it, in the context of a greenfield project consuming it tho.
r
Cool. Might check it out. (Yes, very tedious and complicated to explain the ROI to one's CEO)
a
Indeed 😄
r
Hmm... du är ju norsk 😉
Läste din sida på kotlinconf.com nu
a
Korrekt 🙂
r
Intressant med statligt projekt
a
Absolutt. Det har gjerne en skala man ikke finner så mange andre steder.
r
Precis