Skip to content

Instantly share code, notes, and snippets.

View vietj's full-sized avatar
🤖
Coding the Future

Julien Viet vietj

🤖
Coding the Future
View GitHub Profile
@vietj
vietj / index.html
Last active November 7, 2022 14:26
TFB 2022-11-01 Fortunes
<!DOCTYPE html>
<html lang="en">
<head>
<title>Perflab results</title>
<style>
body {
font-family: monospace;
font-size: 12pt;
@vietj
vietj / index.html
Last active November 7, 2022 14:27
TFB 2022-11-01 Db
<!DOCTYPE html>
<html lang="en">
<head>
<title>Perflab results</title>
<style>
body {
font-family: monospace;
font-size: 12pt;
@vietj
vietj / index.html
Last active November 7, 2022 14:27
TFB 2022-11-01 Plaintext
<!DOCTYPE html>
<html lang="en">
<head>
<title>Perflab results</title>
<style>
body {
font-family: monospace;
font-size: 12pt;
Last login: Wed Oct 27 10:22:48 on ttys006
c% julien@Juliens-MacBook-Pro ~ % cd java
julien@Juliens-MacBook-Pro java % cd vertx-cassandra-client
julien@Juliens-MacBook-Pro vertx-cassandra-client % mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< io.vertx:vertx-cassandra-client >-------------------
[INFO] Building vertx-cassandra-client 4.2.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
at io.smallrye.mutiny.groups.UniOnFailure.lambda$call$3(UniOnFailure.java:122)
at io.smallrye.mutiny.operators.UniOnFailureTransform$1.onFailure(UniOnFailureTransform.java:43)
at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$1.lambda$onFailure$2(ContextPropagationUniInterceptor.java:36)
at io.smallrye.context.impl.wrappers.SlowContextualExecutor.execute(SlowContextualExecutor.java:19)
at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$1.onFailure(ContextPropagationUniInterceptor.java:36)
at io.smallrye.mutiny.operators.UniSerializedSubscriber.onFailure(UniSerializedSubscriber.java:101)
at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$1.lambda$onFailure$2(ContextPropagationUniInterceptor.java:36)
at io.smallrye.context.impl.wrappers.SlowContextualExecutor.execute(SlowContextualExecutor.java:19)
at io.smallrye.mutiny.context.ContextPropagationUniInterceptor$1.onFailure(ContextPropagationUniInterceptor.java:36)
at io.smallrye.mutiny.context.ContextPropagationUniI
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ quarkus-integration-test-hibernate-reactive-postgresql ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.quarkus.it.hibernate.reactive.postgresql.HibernateReactiveTest
2021-02-08 11:47:26,033 WARN [io.qua.dep.QuarkusAugmentor] (main) Using Java versions older than 11 to build Quarkus applications is deprecated and will be disallowed in a future release!
2021-02-08 11:47:29,020 INFO [org.hib.rea.pro.imp.ReactiveIntegrator] (main) HRX000001: Hibernate Reactive Preview
Hibernate:
drop table if exists Cow cascade
client.request(HttpMethod.GET, server.actualPort(), "localhost", "/")
.onComplete(testContext.succeeding(req -> {
req.onComplete(testContext.succeeding(httpClientResponse -> {
testContext.verify(() -> {
assertThat(httpClientResponse.statusCode())
.isEqualTo(200);
});
checkpoint.flag();
}));
try {
public class FrancescoTest {
private static final HttpClient client = null;
public static void main(String[] args) {
MessageFactory factory = new MessageFactory(builder -> {
builder.writeBinary(new CloudEvent() {
});
});
private Single<List<String>> inTransaction(Exception e) throws Exception {
return client.rxGetConnection().flatMap(conn -> {
return rxInsertExtraFolks(conn)
.andThen(uniqueNames(conn))
.<List<String>>collect(ArrayList::new, List::add)
.compose(upstream -> e == null ? upstream : upstream.flatMap(names -> Single.error(e)))
.compose(SQLClientHelper.txSingleTransformer(conn))
.flatMap(names -> rxAssertAutoCommit(conn).andThen(Single.just(names)))

Reactive PostgreSQL Client

The Reactive PostgreSQL Client is a client for PostgreSQL with a straightforward API focusing on scalability and low overhead.

The client is reactive and non blocking, allowing to handle many database connections with a single thread.

  • Event driven

  • Lightweight