Skip to content
A web application and test setup to compare HTTP Polling and Websockets.
Branch: master
Clone or download
Phill Phill
Latest commit c777c19 Jul 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker Remove JMX - using docker stats instead. Jun 18, 2018
performancetests Make test only run once again Jul 27, 2018
src Remove unused kotlin code Jun 26, 2018
.gitignore Added performancetests directory with pom to download external depend… Apr 28, 2018
Dockerfile Remove JMX - using docker stats instead. Jun 18, 2018
LICENSE Initial commit Apr 4, 2018
README.md add link to blog Jun 26, 2018
buildDockerImage.sh
pom.xml Tidied some comments on jetty version Jun 6, 2018
runInDocker.sh Change port to 8080 Jul 5, 2018

README.md

PollingVsSockets

A web application and test setup to compare HTTP Polling and Websockets. For more details see my blog post.


Build and run

  1. Run mvn clean install to build application
  2. Start application with java -jar target/polling-vs-sockets-1.0-SNAPSHOT.jar
  3. To create a job via http run: curl -X POST http://localhost:8080/job
  4. To retrieve a job via http run curl http://localhost:8080/job/${jobID}

Build and run in Docker

  1. Run mvn clean install; ./buildDockerImage.sh
  2. Run ./runInDocker.sh

Run Performance tests

  1. Install Jmeter
  2. Install Maciej Zaleski's JMeter-WebSocketSampler. You can also retrieve the plugin's dependencies by running cd performancetests; mvn dependency:copy-dependencies which should download them into: polling-vs-sockets/performancetests/target/dependency
  3. Enable docker API via guide here
  4. Run container in docker ./runInDocker.sh
  5. From perfomance tests dir cd performancetests
  6. ./runPollingPerfTest.sh OR ./runWebSocketsPerfTest.sh
  7. View the report and other metrics for your test run in the report dir, e.g. polling-vs-sockets/performancetests/target/report/polling/2018-06-22T22:13:41+01:00/html/index.html
You can’t perform that action at this time.