Giter VIP home page Giter VIP logo

101-concurrency's Introduction

101 concurrency

Detecting concurrency issues with JCStress

Java CI

SonarCloud

Elevator Pitch

Java is a very popular programming language with a consistent set of multithreading and multiprocessing features, which solve all kinds of modern enterprise problems and enable memory sharing across threads as part of the Java concurrency model.

Developers use popular frameworks like Spring, Quarkus, Micronaut, Akka or Spark every day. In some scenarios, it is necessary to use concurrency, although in reality the learning curve is not easy and sometimes software gets deployed to cloud environments with some hidden concurrency bugs.

The talk will review the root causes of concurrency issues, and give an introduction into the Java tool JCStress by explaining how to create tests for Java classes with shared states.

When

How to run locally

Running the example locally:

sdk env
./gradlew clean build jcstress
./gradlew clean jcstress --tests "Calculator4Test"
./gradlew clean build
./gradlew clean bootRun
http://localhost:8080/swagger-ui/index.html
http://localhost:8080/v3/api-docs
https://editor.swagger.io/

Running Visualvm, Jmeter & Taurus to add load:

sdk install visualvm
visualvm --jdkhome  $JAVA_HOME

java -Xms256m -Xmx256m -XX:+UseParallelGC -jar build/libs/101-concurrency-0.1.0-SNAPSHOT.jar
sdk install jmeter
jmeter -t jmeterConf.jmx
jmeter -t jmeterConf.jmx -n
jmeter -t jmeterConf2.jmx

brew install python
python3 --version
pip3 install bzt
bzt taurusConf.yaml

Running JCStress examples:

./gradlew clean jcstress --tests "API_01_Simple"
./gradlew clean jcstress --tests "API_02_Arbiters"
./gradlew clean jcstress --tests "API_04_Nesting"
./gradlew clean jcstress --tests "API_05_SharedMetadata"
./gradlew clean jcstress --tests "API_06_Descriptions"

Documentation

sdk env
jwebserver -p 8000 -d  $PWD/docs

References

101-concurrency's People

Contributors

jabrena avatar nicoongit avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nicoongit

101-concurrency's Issues

Search about volatile, synchronized, java.util.concurrent.locks.*, notifyAll(), yield()

Opportunities

Opportunities

./gradlew clean build -Pmodule=spring-core
./gradlew clean -Dtest.single=ConcurrentLruCacheTests test  -Pmodule=spring-core
./gradlew clean jcstress -Pmodule=spring-core
./gradlew clean jcstress --tests "ConcurrentLruCacheJCStressTests" -Pmodule=spring-core

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.