Test request container with built symfony app
2.1K
API, that provides ability to save request info to it and get list of received requests using filters.
Run this app with docker is simply amazing!
Tested with docker version >=17.06.0
Make sure that 8080 port is free before start:
Select you projects directory and enjoy this single line install for docker (Mac, linux):
git clone [email protected]:drefixs/test-request-keeper.git && cd test-request-keeper/server && docker stack deploy -c docker-compose.prod.yml request-keeper && sleep 10 && open http://localhost:8080/
First pls set up all requirements then run the next command
composer install --prefer-dist
#if app configured user doesn't have permission to crete database
bin/console doctrine:database:create
# create tables and schema
bin/console doctrine:schema:create
The app contain raw integration of the ReactPHP, it also has ready to run docker images with ReactPHP. It provide high speed 14-20 milliseconds per request.
# run ReactPHP synfony integrated server
bin/react_server
# now you can test speed of this solution with curl (first request can be slow if cache not warmed)
curl -d "some data to post." -H "Content-Type: text/plain" -X POST "http://localhost:8000/request/store/my_test_request"
10-20 milliseconds for storing single request

0.8 seconds for storing 100 requests ! (in demo more time spent for prepare lorem ipsum for requests)

# you can test it by yourself with the next command
# $brew install lorem
# command tested in macOS, in Linux pls use usleep and set up lorem
COUNT=100; mkdir -f /tmp/test-lorem-list; rm /tmp/test-lorem-list/* ; for NUM in `seq ${COUNT}`; do lorem --words ${WORDS:-100} --randomize > /tmp/test-lorem-list/${NUM} & done ;wait ;\
time { for FILE in /tmp/test-lorem-list/* ; do curl -d ${FILE} -H "Content-Type: text/plain" -X POST "http://localhost:8080/request/store/${FILE}" & sleep 0.002 ; done ; wait ; }
Also this solution provide full-text high performance search that equal (LIKE '%sub' OR LIKE 'sub%') .
It gets possible by using reversed generated stored row that appeared with mysql version 5.7.10
Content type
Image
Digest
Size
97.4 MB
Last updated
almost 9 years ago
docker pull drefixs/test-request-keeper