Skip to content

Instantly share code, notes, and snippets.

View oli-h's full-sized avatar
😎

Oli oli-h

😎
View GitHub Profile
public class JsonSchemaValidatorPerformanceCompare {
private static final Logger log = LoggerFactory.getLogger(JsonSchemaValidatorPerformanceCompare.class);
public static void main(String[] args) throws Exception {
BasicConfigurator.configure();
String hookSchema = ResourcesUtils.loadResource("gateleen_hooking_schema_hook", true);
final JsonSchema schemaFGE = JsonSchemaFactory.byDefault().getJsonSchema(JsonLoader.fromString(hookSchema));
JsonObject schemaObject = new JsonObject(hookSchema);
Nook.listen('xyz',function(id, obj) {
// ...
});
//--------------------------------------------------------------------------------------------------------------
function updateXyz(id, obj) {
// ...
}
Nook.listen('xyz', updateXyz);
//--------------------------------------------------------------------------------------------------------------
function updateXyz(id, obj) {
@oli-h
oli-h / ReproduceSlowVertxLocalConsumer.java
Last active September 6, 2018 11:33
Reproducer for Vert.x EventBus in Clustered-Mode: localConsumer
package ch.oli;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.eventbus.EventBus;
import io.vertx.core.spi.cluster.ClusterManager;
import io.vertx.ext.cluster.infinispan.InfinispanClusterManager;
public class ReproduceSlowVertxLocalConsumer {
package ch.post.it.paisa.houston.process.main;
import io.vertx.core.Vertx;
import io.vertx.redis.RedisClient;
import io.vertx.redis.RedisOptions;
public class OliVerticle {
public static void main(String[] args) throws Exception {
Vertx vertx = Vertx.vertx();
package ch.oli.vertx;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpClientRequest;
import io.vertx.core.http.HttpServer;
public class ReproducerTcpClose {
import io.vertx.core.Vertx;
import io.vertx.core.http.*;
import io.vertx.core.streams.Pump;
public class ReproducePausedStreamInPool {
public static void main(String[] args) throws Exception {
final Vertx vertx = Vertx.vertx();
startBackendServer(vertx); // listen on Port 7020