ソースを参照

OfficeFloor 3.4.0 (#4220)

* Plain text test implemented

* Providing a test class per Tech Empower test

* Providing abstract class for generic testing

* Adding JSON serialise test

* Initial work on Single Database Query test

* Single Database Query test written.

* Multiple Database Queries Test

* Added Fortunes test

* All tests 1-6 written

* Json Serialisation requires JsonResponseWriter to specify the
Content-Type header.

* Single Query passing tests

* Multiple database queries passing

* Initial work on Fortunes test

* Fortunes test passing

* Passing unit tests

* Providing connection pooling and not logging.

* Providing threading configuration for database interaction

* Fixing issues with Database Update Test

* Tests are passing

* Setup of OfficeFloor to run in TechEmpire environment.

* Including production data source file

* Tests passing

* Tests now running in Vagrant VM

* Cleaning up start now that working.

* Should not have empty directory

* Plain text test implemented

* Providing a test class per Tech Empower test

* Providing abstract class for generic testing

* Adding JSON serialise test

* Initial work on Single Database Query test

* Single Database Query test written.

* Multiple Database Queries Test

* Added Fortunes test

* All tests 1-6 written

* Json Serialisation requires JsonResponseWriter to specify the
Content-Type header.

* Single Query passing tests

* Multiple database queries passing

* Initial work on Fortunes test

* Fortunes test passing

* Passing unit tests

* Providing connection pooling and not logging.

* Providing threading configuration for database interaction

* Fixing issues with Database Update Test

* Tests are passing

* Setup of OfficeFloor to run in TechEmpire environment.

* Including production data source file

* Tests passing

* Tests now running in Vagrant VM

* Cleaning up start now that working.

* Should not have empty directory

* Passing latest rebase of FrameworkBenchmarks.

* Migrating to version 3.0.0

* Run own comparison with just top level frameworks

* Fix file name spelling

* Providing readme placeholder for OfficeFloor

* Fixing for TTY not available in Jenkins

* Removing OfficeFloor to run setup script

* Initial setup

* Initial project setup

* OfficeFloor implementation passing tests

* Building OfficeFloor

* Fixing path

* Raw OfficeFloor

* Specifying SourceForge repository for sourcing

* Passing build - new SQL fix

* Able to be called for verify for officefloor-raw

* Adding Server / Date headers

* Configuring Postgresql

* Threading access to multiple queries on database

* Running all tests

* Fixing tests to pass verification

* re-useable tests for different implementations

* Pooling Connections

* Adding micro tests

* Providing micro, netty and rapidoid implementations

* Providing throttle active request count value

* Fixing spelling causing failed run

* Initial work to attempt to cache for local runs

* Fixing to start postgres for micro

* Improving Updates and Fortunes performance

* Reducing possible contention in database for updates

* Providing raw with DB functionality

* Including additional raw tests

* Including database for raw

* Fixing logic

* Ready for submission

* Ready for submission

* Cleaning up based on Tech Empower feedback:

 - Removing tests
 - Removing source_files
 - Also bumping up to use Java 10

* Removing test resources

* Fixing netty / rapidoid builds

Simplified build process to only build the project.  However, netty and
rapidoid depend on the benchmark default project for the implementation
(and just change the HTTP server).  Therefore, installing benchmark
first to allow the dependency to be resolved.

* Fixing for not finding parent pom

* Reverting back to Java 8

Issue with running with Java 10.  Will run in Java 8 for time being and
work on resolving this issue when more time.

* Increasing time for checking server up

Travis seems to run many builds at the same time, and concerned that may
be starving for thread to check causing timeout...  and subsequently
causing false positives.

* Working with Java 10

* Allowing to run on different port

CI server running on 8080 (so unable to start in unit tests)

* Updating to 3.1.0

Also, avoiding memory resizing issues reducing performance.

* Register Afterburner

* Configuring for entity manager to use connection

* thread-per-request example

* Run in quiet mode so can see errors in travis logs

This should avoid filling build logs with download progress

* Using batch to show build

* Fix connection string

* quiet build

* Reducing connection pool sizes for improved performance

* Raw able to use async from pgsql2

* officefloor-raw passing fortunes test

* Raw using ADBA for PostgreSql

* Fixing to handle bounds check

* Providing error handling to not hold up query

* Providing Thread Affinity for Raw

* Specifying the team sizes

* Providing Thread Affinity server for comparison

* Upgrading driver version for PostgreSQL

Also, tidying up Java params for optimising

* Fixing docker build of thread affinity

* Updating to OfficeFloor 3.2.0

* Tidy up of team sizes

* Removing throttle

* Fixing for OfficeFloor 3.3.0

[ci fw-only officefloor]

* [ci fw-only Java/officefloor]

* 10000 to 10001 for nextInt() exclusive upper bound

[cd fw-only Java/officefloor]

* Fixing dead lock in database

[ci fw-only Java/officefloor]

* Fixing for OfficeFloor cancel management

[ci fw-only Java/officefloor]

* Ordering updates for hibernate

[ci fw-only Java/officefloor]

* OfficeFloor 3.4.0

[ci fw-only Java/officefloor]

* Tidy up naming to identify benchmark

* Updating naming

[ci fw-only Java/officefloor]

* Fixing incorrect dependency

[ci fw-only Java/officefloor]

* Fixing version management

[ci fw-only Java/officefloor]

* Just downloading files

* Creating Spring example

* Bump maven-shade-plugin

Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.1.1 to 3.2.1.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.1.1...maven-shade-plugin-3.2.1)

Signed-off-by: dependabot[bot] <[email protected]>

* Spring data running

* Removing Thread Affinity for raw test

[ci fw-only Java/officefloor]

* Providing download now button

[ci fw-only Java/officefloor]

* Removing unnecessary query

[ci fw-only Java/officefloor]

* Remove licensing

* Removing licensing

[ci fw-only Java/officefloor]

* Removing licensing

[ci fw-only Java/officefloor]

* Updating readme with descriptions of the tests

[ci fw-only Java/officefloor]

* Fix typos

[ci fw-only Java/officefloor]

* Specifying dialect

[ci fw-only Java/officefloor]

* Correcting introduction

[ci fw-only Java/officefloor]

* Removing unnecessary named query

[ci fw-only Java/officefloor]
Daniel 6 年 前
コミット
14eac2d833
50 ファイル変更424 行追加222 行削除
  1. 58 17
      frameworks/Java/officefloor/README.md
  2. 24 1
      frameworks/Java/officefloor/benchmark_config.json
  3. 2 2
      frameworks/Java/officefloor/officefloor-micro.dockerfile
  4. 2 2
      frameworks/Java/officefloor/officefloor-netty.dockerfile
  5. 2 2
      frameworks/Java/officefloor/officefloor-rapidoid.dockerfile
  6. 2 2
      frameworks/Java/officefloor/officefloor-raw.dockerfile
  7. 10 0
      frameworks/Java/officefloor/officefloor-spring_data.dockerfile
  8. 3 3
      frameworks/Java/officefloor/officefloor-thread_affinity.dockerfile
  9. 2 2
      frameworks/Java/officefloor/officefloor-tpr.dockerfile
  10. 0 1
      frameworks/Java/officefloor/src/.gitignore
  11. 14 106
      frameworks/Java/officefloor/src/pom.xml
  12. 0 40
      frameworks/Java/officefloor/src/woof_benchmark/pom.xml
  13. 3 1
      frameworks/Java/officefloor/src/woof_benchmark/src/main/resources/entitymanager.properties
  14. 3 14
      frameworks/Java/officefloor/src/woof_benchmark_micro/pom.xml
  15. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/Fortune.java
  16. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/Logic.java
  17. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/World.java
  18. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.objects
  19. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.teams
  20. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.woof
  21. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/datasource.properties
  22. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/plaintext.html
  23. 1 1
      frameworks/Java/officefloor/src/woof_benchmark_netty/pom.xml
  24. 1 1
      frameworks/Java/officefloor/src/woof_benchmark_rapidoid/pom.xml
  25. 1 5
      frameworks/Java/officefloor/src/woof_benchmark_raw/pom.xml
  26. 4 6
      frameworks/Java/officefloor/src/woof_benchmark_raw/src/main/java/net/officefloor/benchmark/RawOfficeFloorMain.java
  27. 55 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/pom.xml
  28. 24 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/Fortune.java
  29. 19 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/FortunesLogic.java
  30. 8 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/FortunueRepository.java
  31. 76 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/Logic.java
  32. 14 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/SpringSetup.java
  33. 16 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/World.java
  34. 8 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/WorldRepository.java
  35. 7 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.objects
  36. 9 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.properties
  37. 8 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.teams
  38. 42 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.woof
  39. 1 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/fortunes.html
  40. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/plaintext.html
  41. 3 3
      frameworks/Java/officefloor/src/woof_benchmark_thread_affinity/pom.xml
  42. 1 13
      frameworks/Java/officefloor/src/woof_benchmark_tpr/pom.xml
  43. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/Fortune.java
  44. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/Logic.java
  45. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/World.java
  46. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.objects
  47. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.teams
  48. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.woof
  49. 0 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/datasource.properties
  50. 1 0
      frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/plaintext.html

+ 58 - 17
frameworks/Java/officefloor/README.md

@@ -1,40 +1,81 @@
+[![Download OfficeFloor](https://a.fsdn.com/con/app/sf-download-button)](https://sourceforge.net/projects/officefloor/files/latest/download)
+
 # OfficeFloor Benchmarking Test
 
-OfficeFloor is graphically configured through its true inversion of control.
+OfficeFloor provides true inversion of control.
 
 > Inversion of Control = Dependency Injection + Continuation Injection + Thread Injection
 
 More information can be found at [http://officefloor.net](http://officefloor.net)
 
-Further to this, graphical configuration is used.  The configuration is the following:
+
+# OfficeFloor Background
+
+OfficeFloor completes inversion of control by adding two new paradigms:
+
+* **Continuation Injection**: to inject functions to orchestrate application behaviour
+* **Thread Injection**: to inject/select thread (pools) to execute particular functions
+* *Dependency (State) Injection*: to inject objects for state into functions (currently only paradigm implemented by "inversion of control" frameworks)
+ 
+In doing this, OfficeFloor is capable of running different threading models (e.g. both asynchronous single threaded and synchronous multi-threaded).  In actual fact, OfficeFloor opens up mixing the threading models within the application and even introduces ability for taking advantage of thread affinity to CPUs.
+
+This follows OfficeFloor modeling people in an office environment.  As per the paper [OfficeFloor: using office patterns to improve software design](http://doi.acm.org/10.1145/2739011.2739013) ( [free download here](http://www.officefloor.net/about.html) ), OfficeFloor follows:
+
+* Office being an application that makes decisions on information
+* Tasks within the Office as functions/methods (weaved together with *Continuation Injection*)
+* Office employees/workers as threads that undertake the functions/methods (assigned via *Thread Injection*)
+* Forms being the objects (manage state via *Dependency Injection*)
+
+This allows OfficeFloor to better align to how business processes actually work:
+
+* Workers synchronously working through tasks/functions of the processes
+* Workers working asynchronously with each other
+
+In other words, people think/behave synchronously but organise asynchronously.  Hence, both thread models are in play in modelling business processes.  Furthermore, OfficeFloor makes development of asynchronous applications easier.  This is achieved by allowing the developer to avoid asynchronous coding by having synchronous functions co-ordinated asynchronously (just like workers above).
+
+Further to this, graphical configuration is used.  The configuration for the *officefloor* benchmark test is the following:
 
 ![Graphical Configuration](configuration.png "OfficeFloor graphical configuration")
 
-The source code is:
 
-* [JSON, PLAINTEXT, DB, QUERY, UPDATE](src/woof_benchmark/src/main/java/net/officefloor/benchmark/Logic.java)
-* [FORTUNES](src/woof_benchmark/src/main/java/net/officefloor/benchmark/FortunesLogic.java)
+# OfficeFloor Benchmark Tests
+
+OfficeFloor can use different HTTP server components:
+
+* **officefloor-netty** : incorporating Netty to service requests passing to OfficeFloor inversion of control.  Benchmark test with mature HTTP solution.
+* **officefloor-rapidoid** : similar to Netty but using Rapidoid.  Benchmark test with highly optimised HTTP solution.
+* **officefloor-raw** : default HTTP server component provided by OfficeFloor.  This allows comparing OfficeFloor's default HTTP implementation with other solutions focused on HTTP optimisation.  It is also able to process requests concurrently on the same connection for improved responsiveness.
+
+Having these comparisons allows developers to see the trade-offs in using different HTTP components to handle HTTP request servicing.
+
+Note: OfficeFloor's web plugins are called WoOF (Web on OfficeFloor).
+
+As mentioned, OfficeFloor uses different threading models.  It does not inherit the threading model imposed by the HTTP component.  Hence, there are various threading models tested to see trade-offs:
+
+* **officefloor-tpr** : typical synchronous multi-threaded model with connections retrieved from connection pool
+* **officefloor-micro** : synchronous multi-threaded model with connections bound to threads (avoids connection pool bottleneck)
+* **officefloor-thread_affinity** : similar to micro, except thread pools are localised onto a particular CPU.  Hence all processing for a request is done on the same CPU (allowing much better instruction cache hits).  This effectively allows running without any synchronising of threads for potentially increased throughput.
 
-### JSON
+Note: the OfficeFloor team are working with [PostgreSql ADBA](https://github.com/pgjdbc/pgadba) for asynchronous database interaction via asynchronous threading model.
 
-http://localhost:8080/json
+While much focus is on HTTP handling, performance also is impacted by database interaction.  The above tests use raw SQL queries to provide optimised through put.  However, in "real world" applications ORMs are typically used:
 
-### PLAINTEXT
+* **officefloor** : WoOF implementation using EntityManager
+* **officefloor-spring_data** : WoOF implementation taking advantage of Spring Data repositories.  This also demonstrates integrating Spring as a library of objects for dependency injection via OfficeFloor into functions/methods.
 
-http://localhost:8080/plaintext
+**officefloor-spring_data** (with possibly **officefloor-netty** incorporated) is likely representative of application development, as provides the mature easier abstractions for the developer to work with (and less code to managed).  However, the above tests show the trade-off costs in performance for the easier development.
 
-### DB
 
-http://localhost:8080/db
+# OfficeFloor real benefit
 
-### QUERY
+OfficeFloor is targeted at cloud and SOA/micro-service environments.   In these environments, applications do not operate in isolation with a single database.  Applications need to interact with multiple other services that result in:
 
-http://localhost:8080/query?queries=
+* *synchronous threading models* : starving new requests of a thread if all threads in the pool tie up on a slow downstream system
+* *aynchronous single threaded* : hard to write and hard to get right (so OfficeFloor allows synchronous code co-ordinated asynchronously for faster development and faster performance)
 
-### UPDATE
+Furthermore, OfficeFloor handles this by using separate thread pools per downstream systems.  This way if a down stream system goes slow, only threads of that thread pool tie up.  Requests using other downstream resources continue to be serviced by the separated thread pools.
 
-http://localhost:8080/update?queries=
+This leads to a more robust and responsive experience for the user.
 
-### FORTUNES
+Unfortunately, benchmark test coverage is yet to highlight this advantage of OfficeFloor.  However, if OfficeFloor can not perform as a typical web application, this robustness and responsiveness is mute against the sheer performance capabilities of frameworks managed by cloud elastic scale solutions.
 
-http://localhost:8080/fortunes

+ 24 - 1
frameworks/Java/officefloor/benchmark_config.json

@@ -105,7 +105,7 @@
 				"webserver": "WoOF",
 				"os": "Linux",
 				"database_os": "Linux",
-				"display_name": "OfficeFloor-micro",
+				"display_name": "OfficeFloor-thread_affinity",
 				"notes": "",
 				"versus": "OfficeFloor-raw"
 			},
@@ -154,6 +154,29 @@
 				"display_name": "OfficeFloor-rapidoid",
 				"notes": "",
 				"versus": "rapidoid"
+			},
+			"spring_data": {
+				"json_url": "/json",
+				"plaintext_url": "/plaintext",
+				"db_url": "/db",
+				"query_url": "/queries?queries=",
+				"fortune_url": "/fortunes",
+				"update_url": "/update?queries=",
+				"port": 8080,
+				"approach": "Realistic",
+				"classification": "Fullstack",
+				"database": "Postgres",
+				"framework": "OfficeFloor",
+				"language": "Java",
+				"flavor": "None",
+				"orm": "Full",
+				"platform": "OfficeFloor",
+				"webserver": "WoOF",
+				"os": "Linux",
+				"database_os": "Linux",
+				"display_name": "OfficeFloor-spring_data",
+				"notes": "",
+				"versus": "officefloor"
 			}
 		}
 	]

+ 2 - 2
frameworks/Java/officefloor/officefloor-micro.dockerfile

@@ -1,10 +1,10 @@
 FROM maven:3.5.4-jdk-10 as maven
 WORKDIR /officefloor
 COPY src src
-WORKDIR /officefloor/src/woof_micro
+WORKDIR /officefloor/src/woof_benchmark_micro
 RUN mvn -q clean package
 
 FROM openjdk:10
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_micro/target/woof_micro-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_micro/target/woof_benchmark_micro-1.0.0.jar server.jar
 CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 2 - 2
frameworks/Java/officefloor/officefloor-netty.dockerfile

@@ -5,10 +5,10 @@ WORKDIR /officefloor/src
 RUN mvn -q -N clean install
 WORKDIR /officefloor/src/woof_benchmark
 RUN mvn -q clean install
-WORKDIR /officefloor/src/woof_netty
+WORKDIR /officefloor/src/woof_benchmark_netty
 RUN mvn -q clean package
 
 FROM openjdk:10
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_netty/target/woof_netty-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_netty/target/woof_benchmark_netty-1.0.0.jar server.jar
 CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 2 - 2
frameworks/Java/officefloor/officefloor-rapidoid.dockerfile

@@ -5,10 +5,10 @@ WORKDIR /officefloor/src
 RUN mvn -q -N clean install
 WORKDIR /officefloor/src/woof_benchmark
 RUN mvn -q clean install
-WORKDIR /officefloor/src/woof_rapidoid
+WORKDIR /officefloor/src/woof_benchmark_rapidoid
 RUN mvn -q clean package
 
 FROM openjdk:10
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_rapidoid/target/woof_rapidoid-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_rapidoid/target/woof_benchmark_rapidoid-1.0.0.jar server.jar
 CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 2 - 2
frameworks/Java/officefloor/officefloor-raw.dockerfile

@@ -1,11 +1,11 @@
 FROM maven:3.5.4-jdk-10 as maven
 WORKDIR /officefloor
 COPY src src
-WORKDIR /officefloor/src/woof_raw
+WORKDIR /officefloor/src/woof_benchmark_raw
 RUN mvn -q clean package
 
 FROM openjdk:10
 RUN apt-get update && apt-get install -y libjna-java
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_raw/target/woof_raw-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_raw/target/woof_benchmark_raw-1.0.0.jar server.jar
 CMD ["java", "-Xms2g", "-Xmx2g", "-server", "-XX:+UseNUMA", "-jar", "server.jar"]

+ 10 - 0
frameworks/Java/officefloor/officefloor-spring_data.dockerfile

@@ -0,0 +1,10 @@
+FROM maven:3.5.4-jdk-10 as maven
+WORKDIR /officefloor
+COPY src src
+WORKDIR /officefloor/src/woof_benchmark_spring
+RUN mvn -q clean package
+
+FROM openjdk:10
+WORKDIR /officefloor
+COPY --from=maven /officefloor/src/woof_benchmark_spring/target/woof_benchmark_spring-1.0.0-exec.jar server.jar
+CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 3 - 3
frameworks/Java/officefloor/officefloor-thread_affinity.dockerfile

@@ -3,13 +3,13 @@ WORKDIR /officefloor
 COPY src src
 WORKDIR /officefloor/src
 RUN mvn -q -N clean install
-WORKDIR /officefloor/src/woof_micro
+WORKDIR /officefloor/src/woof_benchmark_micro
 RUN mvn -q clean install
-WORKDIR /officefloor/src/woof_thread_affinity
+WORKDIR /officefloor/src/woof_benchmark_thread_affinity
 RUN mvn -q clean package
 
 FROM openjdk:10
 RUN apt-get update && apt-get install -y libjna-java
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_thread_affinity/target/woof_thread_affinity-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_thread_affinity/target/woof_benchmark_thread_affinity-1.0.0.jar server.jar
 CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 2 - 2
frameworks/Java/officefloor/officefloor-tpr.dockerfile

@@ -1,10 +1,10 @@
 FROM maven:3.5.4-jdk-10 as maven
 WORKDIR /officefloor
 COPY src src
-WORKDIR /officefloor/src/woof_tpr
+WORKDIR /officefloor/src/woof_benchmark_tpr
 RUN mvn -q clean package
 
 FROM openjdk:10
 WORKDIR /officefloor
-COPY --from=maven /officefloor/src/woof_tpr/target/woof_tpr-1.0.0.jar server.jar
+COPY --from=maven /officefloor/src/woof_benchmark_tpr/target/woof_benchmark_tpr-1.0.0.jar server.jar
 CMD ["java", "-server", "-Xms2g", "-Xmx2g", "-XX:+UseNUMA", "-Dhttp.port=8080", "-Dhttp.server.name=OF", "-Dhttp.date.header=true", "-jar", "server.jar"]

+ 0 - 1
frameworks/Java/officefloor/src/.gitignore

@@ -1 +0,0 @@
-/nexus.available

+ 14 - 106
frameworks/Java/officefloor/src/pom.xml

@@ -9,7 +9,7 @@
 	<packaging>pom</packaging>
 	<name>OfficeFloor Benchmarks</name>
 	<properties>
-		<officefloor.version>3.3.0</officefloor.version>
+		<officefloor.version>3.4.0</officefloor.version>
 		<maven.compiler.source>10</maven.compiler.source>
 		<maven.compiler.target>10</maven.compiler.target>
 		<jackson.version>2.9.7</jackson.version>
@@ -18,12 +18,13 @@
 	</properties>
 	<modules>
 		<module>woof_benchmark</module>
-		<module>woof_tpr</module>
-		<module>woof_micro</module>
-		<module>woof_thread_affinity</module>
-		<module>woof_raw</module>
-		<module>woof_netty</module>
-		<module>woof_rapidoid</module>
+		<module>woof_benchmark_tpr</module>
+		<module>woof_benchmark_micro</module>
+		<module>woof_benchmark_thread_affinity</module>
+		<module>woof_benchmark_raw</module>
+		<module>woof_benchmark_netty</module>
+		<module>woof_benchmark_rapidoid</module>
+		<module>woof_benchmark_spring</module>
 	</modules>
 	<repositories>
 		<repository>
@@ -35,104 +36,11 @@
 	<dependencyManagement>
 		<dependencies>
 			<dependency>
-				<groupId>net.officefloor.web</groupId>
-				<artifactId>woof</artifactId>
+				<groupId>net.officefloor</groupId>
+				<artifactId>bom</artifactId>
 				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.server</groupId>
-				<artifactId>officeserver_netty</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.server</groupId>
-				<artifactId>officeserver_rapidoid</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.web</groupId>
-				<artifactId>officeweb_executive</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.web</groupId>
-				<artifactId>officejson_jackson</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.core</groupId>
-				<artifactId>jackson-databind</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.module</groupId>
-				<artifactId>jackson-module-afterburner</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.persistence</groupId>
-				<artifactId>officejpa</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.persistence</groupId>
-				<artifactId>officejdbc</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.persistence</groupId>
-				<artifactId>officejdbc_postgresql</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>net.officefloor.persistence</groupId>
-				<artifactId>officejpa_hibernate</artifactId>
-				<version>${officefloor.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.hibernate</groupId>
-				<artifactId>hibernate-core</artifactId>
-				<version>5.3.1.Final</version>
-			</dependency>
-			<dependency>
-				<groupId>javax.xml.bind</groupId>
-				<artifactId>jaxb-api</artifactId>
-				<version>${jaxb.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.sun.xml.bind</groupId>
-				<artifactId>jaxb-core</artifactId>
-				<version>${jaxb.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.sun.xml.bind</groupId>
-				<artifactId>jaxb-impl</artifactId>
-				<version>${jaxb.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>javax.activation</groupId>
-				<artifactId>javax.activation-api</artifactId>
-				<version>1.2.0</version>
-			</dependency>
-			<dependency>
-				<groupId>javax.transaction</groupId>
-				<artifactId>javax.transaction-api</artifactId>
-				<version>1.3</version>
-			</dependency>
-			<dependency>
-				<groupId>org.postgresql</groupId>
-				<artifactId>postgresql</artifactId>
-				<version>42.2.5</version>
-			</dependency>
-			<dependency>
-				<groupId>com.zaxxer</groupId>
-				<artifactId>HikariCP</artifactId>
-				<version>3.2.0</version>
-			</dependency>
-			<dependency>
-				<groupId>org.projectlombok</groupId>
-				<artifactId>lombok</artifactId>
-				<version>1.18.0</version>
+				<type>pom</type>
+				<scope>import</scope>
 			</dependency>
 			<dependency>
 				<groupId>net.officefloor.benchmarks</groupId>
@@ -141,7 +49,7 @@
 			</dependency>
 			<dependency>
 				<groupId>net.officefloor.benchmarks</groupId>
-				<artifactId>woof_micro</artifactId>
+				<artifactId>woof_benchmark_micro</artifactId>
 				<version>${project.version}</version>
 			</dependency>
 		</dependencies>
@@ -160,7 +68,7 @@
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-shade-plugin</artifactId>
-					<version>3.1.1</version>
+					<version>3.2.1</version>
 				</plugin>
 			</plugins>
 		</pluginManagement>

+ 0 - 40
frameworks/Java/officefloor/src/woof_benchmark/pom.xml

@@ -18,54 +18,14 @@
 			<groupId>net.officefloor.web</groupId>
 			<artifactId>officejson_jackson</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.module</groupId>
-			<artifactId>jackson-module-afterburner</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>net.officefloor.persistence</groupId>
-			<artifactId>officejpa</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>net.officefloor.persistence</groupId>
 			<artifactId>officejpa_hibernate</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.xml.bind</groupId>
-			<artifactId>jaxb-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.xml.bind</groupId>
-			<artifactId>jaxb-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.sun.xml.bind</groupId>
-			<artifactId>jaxb-impl</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.activation</groupId>
-			<artifactId>javax.activation-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.transaction</groupId>
-			<artifactId>javax.transaction-api</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>net.officefloor.persistence</groupId>
 			<artifactId>officejdbc_postgresql</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.postgresql</groupId>
-			<artifactId>postgresql</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>

+ 3 - 1
frameworks/Java/officefloor/src/woof_benchmark/src/main/resources/entitymanager.properties

@@ -1,2 +1,4 @@
 persistence.unit.name=benchmarks
-persistence.dependency=connection
+persistence.dependency=connection
+hibernate.order_updates=true
+hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect

+ 3 - 14
frameworks/Java/officefloor/src/woof_micro/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_micro/pom.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
@@ -7,7 +8,7 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_micro</artifactId>
+	<artifactId>woof_benchmark_micro</artifactId>
 	<dependencies>
 		<dependency>
 			<groupId>net.officefloor.web</groupId>
@@ -17,22 +18,10 @@
 			<groupId>net.officefloor.web</groupId>
 			<artifactId>officejson_jackson</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.module</groupId>
-			<artifactId>jackson-module-afterburner</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>net.officefloor.persistence</groupId>
 			<artifactId>officejdbc_postgresql</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.postgresql</groupId>
-			<artifactId>postgresql</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>

+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/java/net/officefloor/benchmark/Fortune.java → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/Fortune.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/java/net/officefloor/benchmark/Logic.java → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/Logic.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/java/net/officefloor/benchmark/World.java → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/java/net/officefloor/benchmark/World.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/resources/application.objects → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.objects


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/resources/application.teams → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.teams


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/resources/application.woof → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/application.woof


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/resources/datasource.properties → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/datasource.properties


+ 0 - 0
frameworks/Java/officefloor/src/woof_micro/src/main/resources/plaintext.html → frameworks/Java/officefloor/src/woof_benchmark_micro/src/main/resources/plaintext.html


+ 1 - 1
frameworks/Java/officefloor/src/woof_netty/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_netty/pom.xml

@@ -7,7 +7,7 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_netty</artifactId>
+	<artifactId>woof_benchmark_netty</artifactId>
 	<dependencies>
 		<dependency>
 			<groupId>net.officefloor.benchmarks</groupId>

+ 1 - 1
frameworks/Java/officefloor/src/woof_rapidoid/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_rapidoid/pom.xml

@@ -7,7 +7,7 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_rapidoid</artifactId>
+	<artifactId>woof_benchmark_rapidoid</artifactId>
 	<dependencies>
 		<dependency>
 			<groupId>net.officefloor.benchmarks</groupId>

+ 1 - 5
frameworks/Java/officefloor/src/woof_raw/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_raw/pom.xml

@@ -8,7 +8,7 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_raw</artifactId>
+	<artifactId>woof_benchmark_raw</artifactId>
 	<dependencies>
 		<dependency>
 			<groupId>net.officefloor.web</groupId>
@@ -22,10 +22,6 @@
 			<groupId>com.fasterxml.jackson.module</groupId>
 			<artifactId>jackson-module-afterburner</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>net.officefloor.web</groupId>
-			<artifactId>officeweb_executive</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>

+ 4 - 6
frameworks/Java/officefloor/src/woof_raw/src/main/java/net/officefloor/benchmark/RawOfficeFloorMain.java → frameworks/Java/officefloor/src/woof_benchmark_raw/src/main/java/net/officefloor/benchmark/RawOfficeFloorMain.java

@@ -30,12 +30,10 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
 
 import lombok.Data;
-import net.officefloor.frame.api.executive.Executive;
 import net.officefloor.frame.api.manage.OfficeFloor;
 import net.officefloor.frame.api.manage.ProcessManager;
 import net.officefloor.frame.api.managedobject.ProcessAwareContext;
 import net.officefloor.frame.api.managedobject.ProcessSafeOperation;
-import net.officefloor.frame.util.ExecutiveSourceStandAlone;
 import net.officefloor.server.SocketManager;
 import net.officefloor.server.http.AbstractHttpServicerFactory;
 import net.officefloor.server.http.HttpHeaderName;
@@ -52,7 +50,6 @@ import net.officefloor.server.http.impl.ProcessAwareServerHttpConnectionManagedO
 import net.officefloor.server.http.parse.HttpRequestParser.HttpRequestParserMetaData;
 import net.officefloor.server.stream.StreamBufferPool;
 import net.officefloor.server.stream.impl.ThreadLocalStreamBufferPool;
-import net.officefloor.web.executive.WebThreadAffinityExecutiveSource;
 
 /**
  * <p>
@@ -84,9 +81,10 @@ public class RawOfficeFloorMain {
 		HttpServerLocation serverLocation = new HttpServerLocationImpl("localhost", port, -1);
 
 		// Create the execution strategy
-		ExecutiveSourceStandAlone standalone = new ExecutiveSourceStandAlone();
-		Executive executive = standalone.loadExecutive(WebThreadAffinityExecutiveSource.class);
-		ThreadFactory[] executionStrategy = executive.getExcutionStrategies()[0].getThreadFactories();
+		ThreadFactory[] executionStrategy = new ThreadFactory[Runtime.getRuntime().availableProcessors()];
+		for (int i = 0; i < executionStrategy.length; i++) {
+			executionStrategy[i] = (runnable) -> new Thread(runnable);
+		}
 
 		// Create the socket manager
 		socketManager = HttpServerSocketManagedObjectSource.createSocketManager(executionStrategy);

+ 55 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/pom.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>net.officefloor.benchmarks</groupId>
+		<artifactId>benchmarks</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>woof_benchmark_spring</artifactId>
+	<packaging>jar</packaging>
+	<dependencies>
+		<dependency>
+			<groupId>net.officefloor.web</groupId>
+			<artifactId>woof</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>net.officefloor.web</groupId>
+			<artifactId>officejson_jackson</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>net.officefloor.spring</groupId>
+			<artifactId>officespring_data</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>net.officefloor.persistence</groupId>
+			<artifactId>officejdbc_postgresql</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<configuration>
+					<mainClass>net.officefloor.OfficeFloorMain</mainClass>
+					<classifier>exec</classifier>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>repackage</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 24 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/Fortune.java

@@ -0,0 +1,24 @@
+package net.officefloor.benchmark;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Entity
+public class Fortune {
+
+	@Id
+	private int id;
+
+	private String message;
+	
+	public String getMessage() {
+		return this.message;
+	}
+}

+ 19 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/FortunesLogic.java

@@ -0,0 +1,19 @@
+package net.officefloor.benchmark;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Fortunes logic.
+ */
+public class FortunesLogic {
+
+	public Fortune[] getFortunes(FortunueRepository repository) {
+		List<Fortune> fortunes = new ArrayList<>();
+		repository.findAll().forEach((fortune) -> fortunes.add(fortune));
+		fortunes.add(new Fortune(0, "Additional fortune added at request time."));
+		fortunes.sort((a, b) -> a.getMessage().compareTo(b.getMessage()));
+		return fortunes.toArray(new Fortune[fortunes.size()]);
+	}
+
+}

+ 8 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/FortunueRepository.java

@@ -0,0 +1,8 @@
+package net.officefloor.benchmark;
+
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface FortunueRepository extends CrudRepository<Fortune, Integer> {
+}

+ 76 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/Logic.java

@@ -0,0 +1,76 @@
+package net.officefloor.benchmark;
+
+import java.util.Arrays;
+import java.util.concurrent.ThreadLocalRandom;
+
+import lombok.Data;
+import net.officefloor.web.HttpQueryParameter;
+import net.officefloor.web.ObjectResponse;
+
+/**
+ * Logic.
+ */
+public class Logic {
+
+	// =========== JSON ===================
+
+	@Data
+	public static class Message {
+		private final String message;
+	}
+
+	public void json(ObjectResponse<Message> response) {
+		response.send(new Message("Hello, World!"));
+	}
+
+	// ============ DB ====================
+
+	public void db(WorldRepository repository, ObjectResponse<World> response) {
+		response.send(repository.findById(ThreadLocalRandom.current().nextInt(1, 10001)).get());
+	}
+
+	// ========== QUERIES ==================
+
+	public void queries(@HttpQueryParameter("queries") String queries, WorldRepository repository,
+			ObjectResponse<World[]> response) {
+		ThreadLocalRandom random = ThreadLocalRandom.current();
+		int count = getQueryCount(queries);
+		World[] worlds = new World[count];
+		for (int i = 0; i < worlds.length; i++) {
+			worlds[i] = repository.findById(random.nextInt(1, 10001)).get();
+		}
+		response.send(worlds);
+	}
+
+	// =========== UPDATES ===================
+
+	public void update(@HttpQueryParameter("queries") String queries, WorldRepository repository,
+			ObjectResponse<World[]> response) {
+		ThreadLocalRandom random = ThreadLocalRandom.current();
+		int count = getQueryCount(queries);
+		int[] ids = new int[count];
+		for (int i = 0; i < ids.length; i++) {
+			ids[i] = random.nextInt(1, 10001);
+		}
+		Arrays.sort(ids);
+		World[] worlds = new World[count];
+		for (int i = 0; i < worlds.length; i++) {
+			worlds[i] = repository.findById(ids[i]).get();
+			worlds[i].setRandomNumber(random.nextInt(1, 10001));
+			repository.save(worlds[i]);
+		}
+		response.send(worlds);
+	}
+
+	// =========== helper ===================
+
+	private static int getQueryCount(String queries) {
+		try {
+			int count = Integer.parseInt(queries);
+			return (count < 1) ? 1 : (count > 500) ? 500 : count;
+		} catch (NumberFormatException ex) {
+			return 1;
+		}
+	}
+
+}

+ 14 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/SpringSetup.java

@@ -0,0 +1,14 @@
+package net.officefloor.benchmark;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+
+/**
+ * Setup for Spring Boot.
+ * 
+ * @author Daniel Sagenschneider
+ */
+@SpringBootApplication
+@EnableJpaRepositories
+public class SpringSetup {
+}

+ 16 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/World.java

@@ -0,0 +1,16 @@
+package net.officefloor.benchmark;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import lombok.Data;
+
+@Data
+@Entity
+public class World {
+
+	@Id
+	private int id;
+
+	private int randomNumber;
+}

+ 8 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/java/net/officefloor/benchmark/WorldRepository.java

@@ -0,0 +1,8 @@
+package net.officefloor.benchmark;
+
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface WorldRepository extends CrudRepository<World, Integer> {
+}

+ 7 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.objects

@@ -0,0 +1,7 @@
+<objects>
+
+	<supplier source="SPRING">
+		<property name="configuration.class" value="net.officefloor.benchmark.SpringSetup" />
+	</supplier>
+
+</objects>

+ 9 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.properties

@@ -0,0 +1,9 @@
+spring.datasource.url=jdbc:postgresql://tfb-database:5432/hello_world
+spring.datasource.username=benchmarkdbuser
+spring.datasource.password=benchmarkdbpass
+
+spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
+spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+
+# avoid clob create issue
+spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true

+ 8 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.teams

@@ -0,0 +1,8 @@
+<teams>
+
+	<team size="200" source="net.officefloor.frame.impl.spi.team.ExecutorCachedTeamSource">	
+		<auto-wire type="net.officefloor.benchmark.WorldRepository" />
+		<auto-wire type="net.officefloor.benchmark.FortuneRepository" />
+	</team>
+
+</teams>

+ 42 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/application.woof

@@ -0,0 +1,42 @@
+<woof>
+  <http-continuations>
+    <http-continuation path="/db" secure="false" x="84" y="112">
+      <section name="Logic" input="db"/>
+    </http-continuation>
+    <http-continuation path="/json" secure="false" x="77" y="149">
+      <section name="Logic" input="json"/>
+    </http-continuation>
+    <http-continuation path="/queries" secure="false" x="61" y="185">
+      <section name="Logic" input="queries"/>
+    </http-continuation>
+    <http-continuation path="/update" secure="false" x="52" y="223">
+      <section name="Logic" input="update"/>
+    </http-continuation>
+  </http-continuations>
+  <http-inputs>
+  </http-inputs>
+  <templates>
+    <template path="/fortunes" location="fortunes.html" class="net.officefloor.benchmark.FortunesLogic" content-type="text/html;charset=utf-8" charset="" secure="false" redirect-values-function="" link-separator-character="" x="308" y="25">
+    </template>
+    <template path="/plaintext" location="plaintext.html" class="" content-type="text/plain" charset="" secure="false" redirect-values-function="" link-separator-character="" x="140" y="28">
+    </template>
+  </templates>
+  <sections>
+    <section name="Logic" source="net.officefloor.plugin.section.clazz.ClassSectionSource" location="net.officefloor.benchmark.Logic" x="258" y="122">
+      <input name="db" parameter-type=""/>
+      <input name="json" parameter-type=""/>
+      <input name="queries" parameter-type=""/>
+      <input name="update" parameter-type=""/>
+    </section>
+  </sections>
+  <securities>
+  </securities>
+  <governances>
+  </governances>
+  <resources>
+  </resources>
+  <exceptions>
+  </exceptions>
+  <starting>
+  </starting>
+</woof>

+ 1 - 0
frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/fortunes.html

@@ -0,0 +1 @@
+<!DOCTYPE html><html><head><title>Fortunes</title></head><body><table><tr><th>id</th><th>message</th></tr><!-- {fortunes} --><tr><td>${id}</td><td>${message}</td></tr><!-- {end} --></table></body></html>

+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/resources/plaintext.html → frameworks/Java/officefloor/src/woof_benchmark_spring/src/main/resources/plaintext.html


+ 3 - 3
frameworks/Java/officefloor/src/woof_thread_affinity/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_thread_affinity/pom.xml

@@ -8,11 +8,11 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_thread_affinity</artifactId>
+	<artifactId>woof_benchmark_thread_affinity</artifactId>
 	<dependencies>
 		<dependency>
 			<groupId>net.officefloor.benchmarks</groupId>
-			<artifactId>woof_micro</artifactId>
+			<artifactId>woof_benchmark_micro</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>net.officefloor.web</groupId>
@@ -43,4 +43,4 @@
 			</plugin>
 		</plugins>
 	</build>
-</project>
+</project>

+ 1 - 13
frameworks/Java/officefloor/src/woof_tpr/pom.xml → frameworks/Java/officefloor/src/woof_benchmark_tpr/pom.xml

@@ -8,7 +8,7 @@
 		<artifactId>benchmarks</artifactId>
 		<version>1.0.0</version>
 	</parent>
-	<artifactId>woof_tpr</artifactId>
+	<artifactId>woof_benchmark_tpr</artifactId>
 	<description>Thread per request model used by many frameworks</description>
 	<dependencies>
 		<dependency>
@@ -19,22 +19,10 @@
 			<groupId>net.officefloor.web</groupId>
 			<artifactId>officejson_jackson</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.module</groupId>
-			<artifactId>jackson-module-afterburner</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>net.officefloor.persistence</groupId>
 			<artifactId>officejdbc_postgresql</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.postgresql</groupId>
-			<artifactId>postgresql</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>com.zaxxer</groupId>
 			<artifactId>HikariCP</artifactId>

+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/java/net/officefloor/benchmark/Fortune.java → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/Fortune.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/java/net/officefloor/benchmark/Logic.java → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/Logic.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/java/net/officefloor/benchmark/World.java → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/java/net/officefloor/benchmark/World.java


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/resources/application.objects → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.objects


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/resources/application.teams → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.teams


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/resources/application.woof → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/application.woof


+ 0 - 0
frameworks/Java/officefloor/src/woof_tpr/src/main/resources/datasource.properties → frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/datasource.properties


+ 1 - 0
frameworks/Java/officefloor/src/woof_benchmark_tpr/src/main/resources/plaintext.html

@@ -0,0 +1 @@
+Hello, World!