Duel Threads - Concurrency techniques duel it out for the championship (and bragging rights)

Overview

Duel Threads

Concurrency techniques duel it out for the championship (and bragging rights)


Phases:

  1. Argue over rules, challenges and the grand prize
  2. Settle rules and challenges, decide beer is a great grand prize
  3. Code solutions to agreed upon challenges
  4. Crown Java as victorious, because we already know how this plays out
  5. Profit?

Rules:

  1. Final submissions will be executed on cloud vm's hosted by Vultr
  2. Linux or Windows may be used (extra brownie points awarded for portable, OS agnostic code)
  3. Testing will be conducted on both the least and most spec'ed AMD EPYC High Performance Cloud Compute nodes
    1. 1 vCPU, 1GB RAM (laughs in Linux)
    2. 12 vCPU, 24GB RAM
  4. The OS must not be "tuned" to enhance threading performance, ie. it must be "out of the box"
    1. Initial configuration scripts to setup the runtime environment are permitted once approved by all challengers
  5. The language runtime must not be "tuned" to enhance threading performance, ie. it must be "out of the box"
    1. Preview/Experimental builds are permitted, but custom non-standard builds are forbidden.
      1. Example, "Joes increadible runtime built with a hot tub of secret sauce" is not permitted
    2. No user enhancements or configuration changes are permitted.
  6. A profiling/diagnostic utility may be used during runtime to collect challenge statistics
    1. These tools often reduce performance - is there another way?
  7. A startup script must be used to invoke program code for each challenge
    1. Any shell script type that is relevant may be used
    2. Startup scripts must not alter/boost program performance
    3. Startup scripts are allowed to start/stop/cleanup programsi
    4. Startup scripts are not part of the challenge themselves, but will aid in scripting a mostly automated challenge
  8. A runtime "warmup" is permitted but must not be included in the challenge portion of your code
  9. No external libraries are permitted, only language built-in features
  10. X days/weeks will be permitted to complete the challenge?

Challenges

Produce one solution for each of the following threading schemes:

  1. Pure/bare self-managed language threads

  2. Pure/bare pool-managed language threads

  3. Async threads

  4. Lightweight threads

    1. Using a shallow call stack, spawn and execute 10,000,000 threads
      1. Each thread must calculate the product of two random integer values
      2. Each thread must print to the console it's thread number and calculated value
      3. Each thread must execute in the order created, and be held until program termination
      4. When a fatal error occurs, the last printed thread number is counted as the max concurrent thread count
      5. Best overall statistics (concurrent thread count, memory usage, cpu usage, runtime, etc) wins this challenge
    2. Using a deep(ish) call stack (see below), spawn and execute 10,000,000 threads
      1. Deep is defined as 100 recursive calls
      2. A base random integer value must be produced
      3. Each recursive call must multiply or divide (alternating) a random integer value and return this value
      4. The returned value is then multiplied or divided (alternating) at each level as the recursion unwraps
      5. Overflow is permitted - cast the final value as an integer at recursion return
      6. Each thread must print to the console it's thread number and calculated value
      7. Each thread must execute in the order created, and be held until program termination
      8. When a fatal error occurs, the last printed thread number is counted as the max concurrent thread count
      9. Best overall statistics (concurrent thread count, memory usage, cpu usage, runtime, etc) wins this challenge
    3. Serve a provided html template to as many concurrent web socket requests as possible
      1. The html template will be provided in advance, but will remain simple
      2. The template will contain two basic variables which must be replaced by your program before serving every request
      3. The template variables will be the thread number and UNIX Epoch timestamp in milliseconds
      4. The socket and all handling code must be user written
      5. Only GET requests will be submitted and required to be handled
      6. Template, content and final html must be rendered entirely on the server
      7. No URL parameters, etc. will be expected
      8. Endpoint path must be: /async-socket-test
      9. Threads may be released at will
      10. Maximum concurrent successfully handled web requests will be counted
      11. An external webserver load stress tester will be used (TBD) to conduct this test

Ready for the duel?

You might also like...

Find out what the sign is from a specific day and month

Find out what the sign is from a specific day and month

WhatMySign Find out what the sign is from a specific day and month Preview How to use To run it is simple, first download the file of the program by c

Feb 3, 2022

Live video out from your DJI FPV Goggles via USB.

Live video out from your DJI FPV Goggles via USB.

DigiView is an Android app that allows you to get a live preview from your DJI FPV Goggles (V1 & V2). Working with Android 7+ and devices supporting U

Dec 19, 2022

Cardsystem - Digital card sign-in/sign-out system for the Indiana Academy

cardsystem Digital card sign-in/sign-out system for the Indiana Academy Requirements: Create system for inputing destination, companion, and estimated

Feb 23, 2022

An example spring boot app to try out with a Parca Agent deployment.

An example spring boot app to try out with a Parca Agent deployment.

Spring boot example This repo is an example for how a Java application can be profiled with Parca Agent. First deploy Parca and Parca Agent as usual,

Mar 9, 2022

Brain/out is a multiplayer shooter with a nostalgic post-soviet feel

Brain / Out Source code for Brain / Out, the game. How To Build From Source First, clone this repo. Use Gradle Wrapper: ./gradlew command on mac/lin

Jan 7, 2023

The open source CyborgFlow project is an out-of-the-box (OOTB) solution to perform load test on your online system.

The open source CyborgFlow project is an out-of-the-box (OOTB) solution to perform load test on your online system.

CyborgFlow CyborgFlow provides an out-of-the-box (OOTB) solution to perform load test on your online system, powered by Apache APISIX, Apache SkyWalki

Nov 30, 2022

The state-of-the-art Dashboard of Apache RoccketMQ provides excellent monitoring capability. Various graphs and statistics of events, performance and system information of clients and application is evidently made available to the user.

RocketMQ Dashboard How To Install With Docker get docker image mvn clean package -Dmaven.test.skip=true docker:build or docker pull apacherocketmq/ro

Dec 30, 2022

A suite of software tools and services created to support activity planning and sequencing needs of missions with modeling, simulation, scheduling and validation capabilities

Aerie A suite of software tools and services created to support activity planning and sequencing needs of missions with modeling, simulation, scheduli

Jan 3, 2023

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.

Flowable (V6) Maven Central: Docker Images: License: Homepage: https://www.flowable.org/ flowable / flowəb(ə)l / a compact and highly efficient workfl

Jan 7, 2023
Owner
Jason Sipula
Jason Sipula
Vert.x virtual threads incubator

Vert.x Virtual Threads Incubator Incubator for virtual threads based prototypes. Prerequisites Vert.x 4.3.2 Java 19 using preview feature OpenJDK 19 E

Eclipse Vert.x 89 Dec 27, 2022
Operating Systems - Concepts of computer operating systems including concurrency, memory management, file systems, multitasking, performance analysis, and security. Offered spring only.

Nachos for Java README Welcome to Nachos for Java. We believe that working in Java rather than C++ will greatly simplify the development process by p

Sabir Kirpal 1 Nov 28, 2021
A Toolkit for Modeling and Simulation of Resource Management Techniques in Internet of Things, Edge and Fog Computing Environments

The iFogSimToolkit (with its new release iFogSim2) for Modeling and Simulation of Resource Management Techniques in Internet of Things, Edge and Fog Computing Environments. In the new release Mobili Management, Microservice Management, and Dynamic Clustering mechanisms are added as new features.

The Cloud Computing and Distributed Systems (CLOUDS) Laboratory 69 Dec 17, 2022
Source codes of book Java Concurrency In Practice, rebuild by maven.

Introduction Source codes of book: Java Concurrency In Practice(2011, Brain Goetz etc. jcip for short.), rebuild from https://jcip.net/ with maven. Mo

Sam Sune 2 Jun 9, 2022
PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage, complex querying scenarios.

中文文档 What is PolarDB-X ? PolarDB-X is a cloud native distributed SQL Database designed for high concurrency, massive storage and complex querying scen

null 1.2k Dec 31, 2022
Programming Services and Processes - 04 Secure Programming Techniques

Programación de Servicios y Procesos - 04 Técnicas de Programación Segura Tema 04. Técnicas de Programación segura. Curso 2021/2022. Contenidos Introd

José Luis González Sánchez 5 Dec 27, 2022
A proof-of-concept Android application to detect and defeat some of the Cellebrite UFED forensic toolkit extraction techniques.

LockUp An Android-based Cellebrite UFED self-defense application LockUp is an Android application that will monitor the device for signs for attempts

levlesec 300 Dec 4, 2022
Program that allows employees to clock in and clock out of work. Employees who are managers can add, edit and delete employees and shifts from the database.

Clock-In-Clock-Out-System Created by: Kennedy Janto, Taylor Vandenberg, Duc Nguyen, Alex Gomez, Janista Gitbumrungsin This is a semester long project

null 6 Nov 5, 2022
A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use

lock-spring-boot-starter A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use 一款基于 Redis 和 Zookeeper

Pear Stack 9 Oct 15, 2022
NeverScapeAlone! Instantly match with other players and take the hassle out of finding partners for bosses, minigames, skills, pking, and more!

NeverScapeAlone An Old School RuneScape Matchmaking Plugin on RuneLite! Tired of having to scour friend's chats, discords, and forums to find friends

null 14 Sep 2, 2022