Skip to content

Commit

Permalink
Merge pull request quarkusio#17752 from cescoffier/yet-another-image-…
Browse files Browse the repository at this point in the history
…resize

Center and resize pictures in the various guides
  • Loading branch information
cescoffier authored Jun 8, 2021
2 parents 4320b9b + e87f391 commit 1871e8e
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/amqp.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A second component reads from the `prices` queue and apply some magic conversion
The result is sent to an in-memory stream consumed by a JAX-RS resource.
The data is sent to a browser using server-sent events.

image::amqp-guide-architecture.png[alt=Architecture]
image::amqp-guide-architecture.png[alt=Architecture,align=center,width=80%]

== Solution

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/config-extending-support.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ link:https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/as
With a Custom `ConfigSource` it is possible to read additional configuration values and add them to the `Config`
instance in a defined ordinal. This allows overriding values from other sources or falling back to other values.

image::config-sources.png[]
image::config-sources.png[align=center,width=90%]

A custom `ConfigSource` requires an implementation of `org.eclipse.microprofile.config.spi.ConfigSource` or
`org.eclipse.microprofile.config.spi.ConfigSourceProvider`. Each implementation requires registration via
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/config-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ match is found. This means that any configuration property may override a value
higher ordinal config source. For example, a property configured using an environment property overrides the value
provided using the `application.properties` file.

image::config-sources.png[]
image::config-sources.png[align=center,align=center,width=90%]

[[system-properties]]
=== System properties
Expand Down
10 changes: 5 additions & 5 deletions docs/src/main/asciidoc/dev-ui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Quarkus now ships with a new experimental Dev UI, which is available in dev mode
quarkus with `mvn quarkus:dev`) at http://localhost:8080/q/dev[/q/dev] by default. It will show you something like
this:

image::dev-ui-overview.png[alt=Dev UI overview,role="center"]
image::dev-ui-overview.png[alt=Dev UI overview,role="center",width=90%]

It allows you to quickly visualize all the extensions currently loaded, see their status and go directly
to their documentation.
Expand All @@ -39,7 +39,7 @@ You have to add a file named `dev-templates/embedded.html` in your
link:building-my-first-extension#description-of-a-quarkus-extension[`deployment`]
extension module's resources:

image::dev-ui-embedded-file.png[alt=Dev UI embedded.html]
image::dev-ui-embedded-file.png[alt=Dev UI embedded.html,align=center]

The contents of this file will be included in your extension card, so for example we can place
two links with some styling and icons:
Expand Down Expand Up @@ -122,7 +122,7 @@ a known route configuration key when working with resource paths.

To add full pages for your Dev UI extension such as this one:

image::dev-ui-page.png[alt=Dev UI custom page]
image::dev-ui-page.png[alt=Dev UI custom page,align=center,width=90%]

You need to place them in your extension's
link:building-my-first-extension#description-of-a-quarkus-extension[`deployment`] module's
Expand Down Expand Up @@ -313,7 +313,7 @@ public class DevConsoleProcessor {

You can also add actions to your Dev UI templates:

image::dev-ui-interactive.png[alt=Dev UI interactive page]
image::dev-ui-interactive.png[alt=Dev UI interactive page,align=center,width=90%]

This can be done by adding another link:building-my-first-extension#deploying-the-greeting-feature[build step] to
declare the action in your extension's
Expand Down Expand Up @@ -398,5 +398,5 @@ public class CacheDevConsoleRecorder {
NOTE: Flash messages are handled by the `main` DEV template and will result in nice notifications for your
users:

image::dev-ui-message.png[alt=Dev UI message]
image::dev-ui-message.png[alt=Dev UI message,align=center,width=90%]

6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/getting-started-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Indeed, to handle multiple concurrent requests, you need multiple threads; and s
In addition, these threads are blocked as soon as your code interacts with remote services.
So, it leads to inefficient usage of the resources, as you may need more threads, and each thread, as they are mapped to OS threads, has a cost in terms of memory and CPU.

image::blocking-threads.png[alt=Imperative Execution Model and Worker Threads,width=80%]
image::blocking-threads.png[alt=Imperative Execution Model and Worker Threads, width=50%, align=center]

On the other side, the reactive model relies on non-blocking I/Os and a different execution model.
Non-blocking I/O provides an efficient way to deal with concurrent I/O.
Expand All @@ -65,7 +65,7 @@ With such a model, request processing is not delegated to a worker thread but us
It also improves the concurrency as it removes the constraint on the number of threads.
Finally, it also improves response time as it reduces the number of thread switches.

image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads,width=80%]
image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads, width=50%, align=center]


== From sequential to continuation style
Expand Down Expand Up @@ -110,7 +110,7 @@ First, go to https://code.quarkus.io[code.quarkus.io] and select the following e
2. Hibernate Reactive with Panache
3. Reactive PostgreSQL client

image::reactive-guide-code.png[alt=Extensions to select in https://code.quarkus.io]
image::reactive-guide-code.png[alt=Extensions to select in https://code.quarkus.io,width=90%,align=center]

The last extension is the reactive database driver for PostgreSQL.
Hibernate Reactive uses that driver to interact with the database without blocking the caller thread.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You can verify which JDK Maven uses by running `mvn --version`.
In this guide, we create a straightforward application serving a `hello` endpoint. To demonstrate
dependency injection, this endpoint uses a `greeting` bean.

image::getting-started-architecture.png[alt=Architecture]
image::getting-started-architecture.png[alt=Architecture, align=center]

This guide also covers the testing of the endpoint.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/kafka-streams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ the latest result for each weather station can alternatively be obtained via a s

The overall architecture looks like so:

image::kafka-streams-guide-architecture.png[alt=Architecture]
image::kafka-streams-guide-architecture.png[alt=Architecture, align=center, width=90%]

== Solution

Expand Down Expand Up @@ -808,7 +808,7 @@ The application can then either fetch the data directly from the other instance,

Launching multiple instances of the `aggregator` application will make look the overall architecture like so:

image::kafka-streams-guide-architecture-distributed.png[alt=Architecture with multiple aggregator nodes]
image::kafka-streams-guide-architecture-distributed.png[alt=Architecture with multiple aggregator nodes, align=center, width=90%]

The `InteractiveQueries` class must be adjusted slightly for this distributed architecture:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/kafka.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A second component reads from the `prices` Kafka topic and apply some magic conv
The result is sent to an in-memory stream consumed by a JAX-RS resource.
The data is sent to a browser using server-sent events.

image::kafka-guide-architecture.png[alt=Architecture]
image::kafka-guide-architecture.png[alt=Architecture, align=center]

== Solution

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/mutiny-primer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Remember, you must never block these threads, and the model would collapse if yo
So, you can't use blocking I/O.
Instead, you need to schedule the I/O operation and pass a continuation.

image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads,width=80%]
image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads,width=50%, align=center]

The Mutiny event-driven paradigm is tailored for this.
When the I/O operation completes successfully, the Uni that represents it emits an item event.
Expand Down
10 changes: 5 additions & 5 deletions docs/src/main/asciidoc/quarkus-reactive-architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The https://www.reactivemanifesto.org/[Reactive Manifesto] characterizes _Reacti
3. Resilient - they handle failures gracefully
4. Asynchronous message passing - the component of a reactive system interact using messages

image::reactive-systems.png[alt=Reactive Systems Pillars,width=80%]
image::reactive-systems.png[alt=Reactive Systems Pillars, width=50%, align=center]

In addition to this, the https://principles.reactive.foundation/[Reactive Principles white paper] lists a set of rules and patterns to help the construction of reactive systems.

Expand Down Expand Up @@ -69,7 +69,7 @@ As a result, Quarkus applications allow for higher concurrency, use less memory,
Under the hood, Quarkus has a reactive engine.
This engine, powered by Eclipse Vert.x and Netty, handles the non-blocking I/O interactions.

image::quarkus-reactive-core.png[Quarkus Reactive Core,width=80%]
image::quarkus-reactive-core.png[Quarkus Reactive Core,width=50%, align=center]

Quarkus extensions and the application code can use this engine to orchestrate I/O interactions, interact with databases, send and receive messages, and so on.

Expand All @@ -89,7 +89,7 @@ The size of this pool constrains the concurrency of the application.
In addition, each thread has a cost in terms of memory and CPU.
Large thread pools result in greedy applications.

image::blocking-threads.png[alt=Imperative Execution Model and Worker Threads,width=80%]
image::blocking-threads.png[alt=Imperative Execution Model and Worker Threads,width=50%, align=center]

As we have seen above, non-blocking I/O avoids that problem.
A few threads can handle many concurrent I/O.
Expand All @@ -98,7 +98,7 @@ Because there are only a few of them, you need to use them wisely.
When the request processing needs to call a remote service, you can't block the thread anymore.
You schedule the I/O and pass a continuation, i.e., the code to execute once the I/O completes.

image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads,width=80%]
image::reactive-thread.png[alt=Reactive Execution Model and I/O Threads,width=50%, align=center]

This model is much more efficient, but we need a way to write code to express these continuations.

Expand Down Expand Up @@ -139,7 +139,7 @@ It means that you can write traditional blocking applications on Quarkus.
But how do you avoid blocking the I/O threads?
Quarkus implements a https://en.wikipedia.org/wiki/Proactor_pattern[proactor pattern] that switches to worker thread when needed.

image::proactor-pattern.png[The proactor pattern in Quarkus,width=80%]
image::proactor-pattern.png[The proactor pattern in Quarkus,width=50%, align=center]

Thanks to hints in your code (such as the `@Blocking` and `@NonBlocking` annotations), Quarkus extensions can decide when the application logic is blocking or non-blocking.
If we go back to the HTTP endpoint example from above, the HTTP request is always received on an I/O thread.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/scripting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class quarkusapp {

In this guide, we create a straightforward application serving a `hello` endpoint with a single source file, no additional build files like `pom.xml` or `build.gradle` needed. To demonstrate dependency injection, this endpoint uses a `greeting` bean.

image::getting-started-architecture.png[alt=Architecture]
image::getting-started-architecture.png[alt=Architecture, align=center]

== Creating the initial file

Expand Down

0 comments on commit 1871e8e

Please sign in to comment.