3/27/2023 0 Comments Installbuilder adding wait timeIn few words, BlockHound checks for blocking calls in places where there shouldn't be. If and when this happens (but remember, this should never happen!□), an error will be thrown. threads implementing Reactor's NonBlocking marker interface, like those started by Schedulers.parallel()). IO) if they are performed from threads marked as "non-blocking operations only" (ie. Enter BlockHound:īlockHound will transparently instrument the JVM classes and intercept blocking calls (e.g. In that case, it dramatically diminishes the benefits of the Reactive approach. If one call in the chain is blocking, it "freezes" the whole chain until the work has finished. When the target producer emits, it sends a message to its subscriber, which sends a message to its subscriber, and so on, up to the first subscriber in the chain. Each intermediate step, called a processor, acts as a subscriber for the next step and a producer for the previous one. In general, there are multiple steps between them. Different frameworks/libraries will differ in their approach: for example, in Project Reactor, an API call is not a blocking request-response call but a subscription to a message(s) that the publisher will deliver in the future.Ī standard call chain rarely involves only a publisher and a subscriber. Reactive Programming is based on asynchronous message passing. This post tries to explain what I discovered. After the surprise had passed, but too late, I remembered it involved a Java agent. After the talk, one of the questions I received was, "How does BlockHound work?" I admit that at the time, I couldn't remember. One such presentation was at Javaday Istanbul. I've presented this talk several times in the previous week, both in its Java version and its Kotlin one. One of the steps involves installing BlockHound: it allows to check whether a blocking call occurs in a thread it shouldn't happen and throws an exception at runtime when it happens. The talk is based on a demo migrating from Spring WebMVC to Spring WebFlux in a step-by-step approach. One of the talks in my current portfolio is Migrating from Imperative to Reactive. Nicolas is a developer advocate with 15+ years experience consulting for many different customers, in a wide range of contexts (such as telecoms, banking, insurances, large retail and public sector).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |