Software Mill Ox feature tests using uJson, HikariCP, ScalikeJdbc, JoddMail, Postgresql and Scala 3.
- brew install postgresql@14
- sbt clean compile
- sbt clean test
- sbt run
Multiple main classes detected. Select one to run:
[1] objektwerks.EmailApp
[2] objektwerks.ParApp
[3] objektwerks.StoreApp
[4] objektwerks.SupervisedApp
Enter number:
See Performance class for details.
- sbt jmh:run
OpenJDK Runtime Environment Zulu22.30+13-CA (build 22.0.1+8), Scala 3.5.0-RC1, Ox 0.2.1, Apple M1
- addTodo - 124.026 / 33.005 **
- updateTodo - 60.618 / 30.721 **
- listTodos - 735,343.828 / 25.852 **
Total time: 616 s (10:16), 10 warmups, 10 iterations, average time in microseconds, completed 2024.6.16
** H2 in-memory database average time, not using Ox IO. See ScalikeJdbc
Postgresql analysis for query ( select id, task from todo; ):
:> psql todo
psql (14.12 (Homebrew))
todo=# explain (analyze,buffers,verbose) select id, task from todo;
QUERY PLAN
----------------------------------------------------------------------------------------------------------
Seq Scan on public.todo (cost=0.00..12.60 rows=260 width=282) (actual time=0.006..0.007 rows=1 loops=1)
Output: id, task
Buffers: shared hit=1
Planning:
Buffers: shared hit=58
Planning Time: 0.464 ms
Execution Time: 0.022 ms
(7 rows)
- config:
- on osx intel: /usr/local/var/postgres/postgresql.config : listen_addresses = ‘localhost’, port = 5432
- on osx m1: /opt/homebrew/var/postgres/postgresql.config : listen_addresses = ‘localhost’, port = 5432
- run:
- brew services start postgresql@14
- logs:
- on osx intel: /usr/local/var/log/postgres.log
- on m1: /opt/homebrew/var/log/postgres.log
Example database url: postgresql://localhost:5432/todo?user=yourcomputername&password=yourpassword"
- psql postgres
- CREATE DATABASE house OWNER [your computer name];
- GRANT ALL PRIVILEGES ON DATABASE todo TO [your computer name];
- \l
- \q
- psql todo
- \i ddl.sql
- \q
Alternatively run: psql -d todo -f ddl.sql
- psql todo
- \i ddl.sql
- \q
- psql postgres
- drop database todo;
- \q
export EMAIL_HOST="your.email.host.com"
export EMAIL_ADDRESS="your.email@com"
export EMAIL_PASSWORD="your.email.password"
export TODO_POSTGRESQL_DRIVER="org.postgresql.ds.PGSimpleDataSource"
export TODO_POSTGRESQL_URL="jdbc:postgresql://localhost:5432/todo"
export TODO_POSTGRESQL_USER="your.computer.name"
export TODO_POSTGRESQL_PASSWORD="your.password"
- Software Mill Ox Docs
- Software Mill Ox Github
- Direct Style Streaming
- Handling Errors in Direct Style
- Limits of Loom's Performance
- Software Mill Ox
- Software Mill Go Channels in Scala
- Software Mill More On Go Channels in Scala
- Software Mill Ox: Supervision, Kafka and Java 21
- Ox-Jdbc Gist
- Java 21 Virtual Threads
- Java 21 Concurrency Guide
- Virtual Threads: JEPS 425
- Virtual Threads: JEPS 444
- Scoped Values: JEPS 429
- Scoped Values: JEPS 446
- Structured Concurrency: JEPS 428
- Structured Concurrency: JEPS 462
- Loom Blocking
- Virtual Threads Design
- Ultimate Guide to Virtual Threads
- Unwrapping IO
- Software Mill Safe Direct-Style Scala
- Software Mill Release 0.1.0 Thread
- Software Mill Direct Style Scala Stack Experiment
- Software Mill IO Effect Tracking
- Software Mill Ox & Tapir