3. reactive | rÄËaktiv |
adjective
showing a response to a stimulus: pupils are reactive to light.
âą acting in response to a situation rather than creating or controlling it: a
proactive rather than a reactive approach.
âą having a tendency to react chemically: nitrogen dioxide is a highly reactive
gas.
âą Physiology showing an immune response to a speciïŹc antigen.
...
https://www.oxfordlearnersdictionaries.com/definition/english/reactive
4. reactive | rÄËaktiv |
adjective
showing a response to a stimulus: pupils are reactive to light.
âą acting in response to a situation rather than creating or controlling it: a
proactive rather than a reactive approach.
âą having a tendency to react chemically: nitrogen dioxide is a highly reactive
gas.
âą Physiology showing an immune response to a speciïŹc antigen.
...
âą Software application reacting to stimuli such as user inputs, messages,
and failures
10. âA distributed system is one in which
the failure of a computer you didn't
even know existed can render your
own computer unusable.â
Leslie Lamport
21. Containers are about sharing and deployment density
Container Host
Threads
costs memory
cost lots of memory
cost CPU cycles
+ quotas = BOOM
The hidden truth of containers
22. Asynchronous & Non-Blocking execution model
Ideal
world
Task A Task B Task C
Real
world
Blocking I/O
Asynchronous
execution
34. Coffee Shop Barista Coffee Shop Barista
HTTP
Dashboard
REACTIVE COFFEE SHOP
https://github.com/cescoïŹer/quarkus-coïŹeeshop-demo
Orders, Queue
* Also applies to AMQP and other messaging protocols but we want to be âcoolâ
*
35. Bridge imperative -> reactive
DROP HTTP, SEND MESSAGES
@Inject @Channel("orders")
Emitter<Order> orders;
@Inject @Channel("queue")
Emitter<Beverage> states;
@POST @Path("/messaging")
public Order messaging(Order order) {
order.setOrderId(getId());
states.send(Beverage.queued(order));
orders.send(order);
return order;
}
Send to the
channel âordersâ
36. @Incoming("orders")
@Outgoing("queue")
public Uni<Beverage> process(Order order) {
return Uni.createFrom(() -> {
Beverage coffee = prepare(order);
return coffee;
});
}
Process data
asynchronously*
* Many other options available to produce, process or consume data
Read from âordersâ
Write to âqueueâ
PROCESSING MESSAGES