500 kB ThinWARs on AWS--airhacks.fm Podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #80 airhacks.fm episode with Bastian Sperrhacke (@deratzmann) about:
500 kB ThinWAR microservices at AWS, the RAM costs and fast deployments
is available for download.

Back to Shared Deployments--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #79 airhacks.fm episode with Romain Manni-Bucau (@rmannibucau) about:
matte paintings, BigData, standard APIs and business logic, Java EE, MicroProfile, mixing OSGi, Java EE and MicroProfile, hot-reloading JVM services over restarting containers with microservices
is available for download.

"Meta-Circularity is Near", GraalVM, Truffle--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #78 airhacks.fm episode with Thomas Wuerthinger (@thomaswue) about:
writing JVM in Java, meta-circular optimizations, Maxine, inner workings of GraalVM, Truffle and JavaScript on GraalVM
is available for download.

Also checkout the first part "The Competitive Programmer".

Non-200 HTTP JAX-RS responses, Quarkus, Helidon, Pippo, Spincast, Microframeworks, Hibernate--72nd airhacks.tv

The 72nd airhacks.tv episode is covering:

Non-200 HTTP JAX-RS responses, quarkus and helidon, pippo, spincast and microframeworks, lazy initialization, developing multiple Quarkus applications, Liferay and SSO

Any questions left? Ask now: https://gist.github.com/AdamBien/6fd5e96c8f22da6a9df86dcd28ad4b27 and get the answers at the next airhacks.tv.

HTML Body for Non-200 JAX-RS Responses on Payara Server

Payara generates for all client errors (400–499) and server errors (500–599) a default HTML body for "bodyless" responses like:


@Path("ping")
public class PingResource {    

    @GET
    @Path("bodyless")
    @Produces(MediaType.APPLICATION_JSON)
    public Response bodyless() {
        return Response.
                status(412).
                 build();
    }    
}

The following command:

curl -i localhost:8080/jaxrs-non200-with-json/resources/ping/bodyless

...generates a reponse with a default HTML body including the error message in a human-readable format:


HTTP/1.1 412 Precondition Failed
Server: Payara Server  5.194 #badassfish
(...)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
(...)

An "erroneous" HTTP response with body:


@GET
@Produces(MediaType.APPLICATION_JSON)
public Response ping() {
    JsonObject result = Json.createObjectBuilder().
            add("hey", "joe").
            build();
    return Response.status(412).
            entity(result).
            build();
}    

...requested with curl -i localhost:8080/jaxrs-non200-with-json/resources/ping

Arrives as expected:


HTTP/1.1 412 Precondition Failed
Server: Payara Server  5.194 #badassfish
(...)

{"hey":"joe"}    

The behaviour described in this post was discussed during the 72nd airhacks.tv episode.

Quarkus vs. WildFly--Requests per Second

A MicroProfile application (https://github.com/AdamBien/quarkus_vs_war) was used to compare the requests / second behaviour of Quarkus to WildFly:

Both, WildFly and Quarkus were used with out-of-the-box configuration. The test was started two times and the second (better) result was:

WildFly


Running 10s test @ http://localhost:8080/q/resources/hello
10 threads and 100 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
Latency     5.96ms   12.27ms 184.41ms   91.79%
Req/Sec     6.49k     2.10k   23.34k    73.23%
646210 requests in 10.10s, 112.78MB read
Requests/sec:  63997.47
Transfer/sec:     11.17MB

Quarkus JVM


Running 10s test @ http://localhost:8080/resources/hello
10 threads and 100 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
Latency     6.30ms   18.71ms 265.39ms   93.18%
Req/Sec     7.93k     2.88k   27.08k    77.00%
788462 requests in 10.09s, 91.73MB read
Requests/sec:  78147.92
Transfer/sec:      9.09MB

Interestingly both runs of the native GraalVM version produced nearly identical results:

Quarkus Native


Running 10s test @ http://localhost:8080/resources/hello
10 threads and 100 connections
Thread Stats   Avg      Stdev     Max   +/- Stdev
Latency     2.85ms    3.81ms 128.14ms   90.41%
Req/Sec     4.84k   563.06     6.33k    64.90%
481609 requests in 10.01s, 56.03MB read
Requests/sec:  48105.39
Transfer/sec:      5.60MB
Native executable q-1.0-SNAPSHOT-runner size: 28MB.

WRK was used for load generation and the reports above.

Quarkus, Helidon, Non-200 with Body JAX-RS, Microframeworks, News--or 72nd airhacks.tv

Topics (https://gist.github.com/AdamBien/40fa453cb15b2e897024294a7fc3623a) for the 72nd airhacks.tv episode (first Monday of the month, 8pm CET):

  1. "Airhacks" News
  2. Non-200 JAX-RS responses with JSON body
  3. quarkus and helidon
  4. Pippo, Spincast - microframeworks [blog comment]
  5. Gatelink - early announcement
Any questions left? Ask now: https://gist.github.com/AdamBien/40fa453cb15b2e897024294a7fc3623a and get the answers at the next airhacks.tv.

The Competitive Programmer--airhacks.fm podcast

Subscribe to airhacks.fm podcast via: spotify| iTunes| RSS

The #77 airhacks.fm episode with Thomas Wuerthinger (@thomaswue) about:
the motivation of skipping classes, fascination with compilers and programming competitions
is available for download.

Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License