Skip to content

Instantly share code, notes, and snippets.

Tatyana TanyaGaleyev

Block or report user

Report or block TanyaGaleyev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@TanyaGaleyev
TanyaGaleyev / example-cache.xml
Created Jun 26, 2018
Ignite instance config
View example-cache.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
View WebFluxControllerTest.java
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
import org.springframework.test.web.reactive.server.EntityExchangeResult;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.DispatcherHandler;
import org.springframework.web.reactive.config.DelegatingWebFluxConfiguration;
@TanyaGaleyev
TanyaGaleyev / NoBodyResponseTest.java
Last active May 18, 2017
Vertx HttpServer and no-message-body responses
View NoBodyResponseTest.java
package org.ivan.vertx.nobody;
import io.vertx.core.Vertx;
import org.junit.Assert;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
@TanyaGaleyev
TanyaGaleyev / HundredCpu.java
Last active Jul 8, 2016
Disruptor 100% CPU consumption when using SleepingWaitStrategy on 32 bit Linux
View HundredCpu.java
package org.ivan.experiments.disruptor;
import com.lmax.disruptor.*;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;
@TanyaGaleyev
TanyaGaleyev / FullCpu.java
Created Jul 5, 2016
Simple application utilizing reactor to demonstrate 100% CPU load on 32 bit Linux
View FullCpu.java
package org.ivan.experiments.reactor;
import reactor.core.publisher.WorkQueueProcessor;
import reactor.core.subscriber.SubmissionEmitter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.time.Duration;
@TanyaGaleyev
TanyaGaleyev / HangingElement.java
Last active Jun 14, 2016
Demonstrates that element hangs in time buffered WorkQueueProcessor if it is submitted at the same time when other elements are consumed. Completion with exception means problem reproduction. Java 8 and Reactor 2.5.0.M4 are used. Async Log4j2 with SLF4J is used for logging. Logging can be comment out to simplify setup.
View HangingElement.java
package org.ivan.experiments.reactor;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.WorkQueueProcessor;
import reactor.core.scheduler.Schedulers;
import reactor.core.scheduler.TimedScheduler;
import reactor.core.subscriber.SubmissionEmitter;
@TanyaGaleyev
TanyaGaleyev / AbstractChildHolder.java
Created Apr 9, 2015
Static initializer deadlock proof of concept
View AbstractChildHolder.java
package com.fsecure.pavlukhin.concurrentclinit;
abstract public class AbstractChildHolder {
public static class Child1 extends AbstractChildHolder {
static {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
@TanyaGaleyev
TanyaGaleyev / InetFailureTest.java
Created Nov 2, 2014
Cloudbees tcp syslog test
View InetFailureTest.java
package org.ivan.cloudbees;
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.TcpSyslogMessageSender;
import org.junit.Test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
View ServerEntryPoint.java
package org.ivan.rmi;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.rmi.AlreadyBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
You can’t perform that action at this time.