vert-x3 / vertx-awesome Goto Github PK
View Code? Open in Web Editor NEWA curated list of awesome Vert.x resources, libraries, and other nice things.
Home Page: https://github.com/vert-x3/vertx-awesome
License: Apache License 2.0
A curated list of awesome Vert.x resources, libraries, and other nice things.
Home Page: https://github.com/vert-x3/vertx-awesome
License: Apache License 2.0
Related to Development Tools section, you can add Vert.x Maven Plugin. It provides great hot reload experience (actually, more of a hot redeploy/restart) on java code and resource changes.
It is much beyond my abilities to make a proper Pull Request to this repository :-(
I suggest you to add directly after [Resilience4j], its modern zero-dependency alternative "Failsafe" with a Vert.x integration example:
* [Failsafe](https://failsafe.dev/) - Failsafe is a lightweight, *zero-dependency* library for handling failures in Java 8+. Concise API. Integration with libraries that use their own schedulers for async executions, such as Akka or Vert.x. [Vert.x example](https://github.com/failsafe-lib/failsafe/blob/master/examples/src/main/java/dev/failsafe/examples/VertxExample.java)
OR as commit
I'm currently trying to improve this list to make it comply to the requirements from the awesome project. There is an open pull request containing some instructions:
sindresorhus/awesome#700
I will work on the points, but there is one that I cannot do myself. The repo doesn't have a description.
Can someone who has the right permissions please set a description? Something like the following would be appropriate:
A curated list of Vert.x resources and projects
Or maybe
A curated list of awesome Vert.x resources, libraries, and other nice things.
You may also set the repo's URL to
https://github.com/vert-x3/vertx-awesome
Thanks!
Michel
https://smallrye.io/docs/smallrye-fault-tolerance/6.2.6/reference/asynchronous.html#async-types
https://smallrye.io/docs/smallrye-fault-tolerance/6.2.6/integration/event-loop.html
SmallRye Fault Tolerance supports Vert.x out of box.
Greetings Everyone!
Use Case: We did the following SSL configuration as per the docs, however we need to disable this SSL check for a couple of routes (/healthcheck & /ping- make them non-secure) and have the SSL check only for 1 route (/seller). How do we accomplish this?
HTTP Server Options:
HttpServerOptions secureOptions = new HttpServerOptions();
secureOptions.setSsl(true)
.setPfxKeyCertOptions(new PfxOptions().setPath(sslKeystorePath)
.setPassword(sslKeystorePassword))
.setPfxTrustOptions(new PfxOptions().setPath(sslKeystorePath)
.setPassword(sslKeystorePassword))
.setClientAuth(ClientAuth.REQUIRED)
.addEnabledSecureTransportProtocol(APIConstants.TLS_VERSION_2);
Registering Healthcheck routers:
private void registerHealthChecks(Router router) {
HealthCheckHandler healthCheckHandler =
HealthCheckHandler
.createWithHealthChecks(HealthChecks.create(vertx));
healthCheckHandler
.register("STATUS", 2000, future -> future.complete(Status.OK()));
HealthCheckHandler pingHandler = HealthCheckHandler.create(vertx);
pingHandler.register("DB_STATUS", future -> {
final JDBCClient client = JDBCClient.createShared(vertx, new JsonObject()
.put("url", config().getValue("jdbc.url"))
.put("driver_class", config().getValue("jdbc.driver_class"))
.put("max_pool_size", config().getValue("jdbc.max_pool_size"))
.put("user", config().getValue("jdbc.user"))
.put("password", config().getValue("jdbc.password")));
client.getConnection(conn -> {
if (conn.failed()) {
LOGGER.error(conn.cause().getMessage());
future.complete(Status.KO());
} else if (conn.succeeded()) {
LOGGER.info("DB Connection successful!!!");
future.complete(Status.OK());
}
}).close();
});
// Healthcheck endpoint handler
router.get(APIConstants.SA_HEALCHECK_ENDPOINT).handler(healthCheckHandler);
LOGGER.info("Endpoint added to router " + APIConstants.SA_HEALCHECK_ENDPOINT);
// Ping endpoint handler for database health check
router.get(APIConstants.SA_PING_ENDPOINT).handler(pingHandler);
LOGGER.info("Endpoint added to router " + APIConstants.SA_PING_ENDPOINT);
}
Start Method Implementation:
@Override
public void start(Future<Void> startFuture) throws Exception {
Json.mapper.registerModule(new JavaTimeModule());
FileSystem vertxFileSystem = vertx.fileSystem();
// Read properties into config object and use it for further server configuration.
this.configRetriever.configStream().handler(config -> {
// read port from properties file.
this.serverPort = config.getInteger("api.endpoint.port");
// Reading swagger.json and and register router here
vertxFileSystem.readFile("swagger.json", readFile -> {
HttpServer server = null;
if (readFile.succeeded()) {
// Get Swagger file and create routes with api endpoints defined in the swagger.json
Swagger swagger = new SwaggerParser().parse(readFile.result().toString(Charset.forName("utf-8")));
Router swaggerRouter = SwaggerRouter.swaggerRouter(router, swagger, vertx.eventBus(), new OperationIdServiceIdResolver());
// Register /healthcheck and /ping endpoints here
registerHealthChecks(swaggerRouter);
// Configure SSL certifications for https://
HttpServerOptions secureOptions = getSSLConfig(config);
// Initialize HttpServer with above SSL config
server = vertx.createHttpServer(secureOptions);
// deploy theSellerAPIVerticle
deployVerticles(startFuture, config);
// Start the server with all above the routes
if(server != null) {
server.requestHandler(swaggerRouter)
.listen(serverPort, h -> {
if (h.succeeded()) {
startFuture.complete();
} else {
startFuture.fail(h.cause());
}
});
} else {
LOGGER.warn("Server is not initialized properly!!");
}
} else {
startFuture.fail(readFile.cause());
}
});
});
}
etc...
Hello!
I would like to know if it makes sense to publish a boilerplate for Vert.x in Kotlin here and if yes then under which section ๐ค The reason why I have done it is when I have been starting with Vert.x in Kotlin I was not able to find anything related to it (except of vertx-examples) and decided to write a small boilerplate by my own. So it might me helpful for beginners ๐ plus: I already use it successfully in two of my projects
Thanks. All the best ๐
Related to Messaging section, there is The White Rabbit client for RabbitMQ written on Kotlin with coroutines usage. It's an alternative for default vertx-rabbitmq-client
.
An example of integration with Vert.x can be found in the-white-rabbit-vertx-example
folder.
Is there helpers on how to use vertx with a functional programming style for (stateless) servers?
It is strange not to see Mutiny with Mutiny Vert.x bindings on the list.
https://smallrye.io/smallrye-mutiny-vertx-bindings/
https://smallrye.io/smallrye-mutiny/
It is almost part of the official Vert.x stack ;-)
E.g. reactive streams, vertx-rx etc
I would have expected an ORM to make this list - an ORM for Postgres or whatever relational DB.
Perhaps vertx has an in-house ORM so there is no "userland" one?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.