<commit_before># catalog
Homework task to build a product catalog service using PHP, memcached and mysql

# requirements

Build a simple system that allows to list and edit products. Product is described as {id, name, description, price, picture url}. 

* there should be pages to list, create, edit and delete product
* products can be arranged by price or id
* support for up to 1M products
* 1k requests per seconds for product listing
* \>500 ms for listing page to open

Stack: 
* PHP (no OOP)
* mysql database
* memcached

# plan

- [x] Build a memory only catalog on top of Slim framework (use it as baseline) 
- [ ] Make it deployeable to Heroku (free tier)
- [ ] *Optional* use Travis as CI service
- [ ] Measure baseline performance
- [ ] Add MySQL support
- [ ] Add a caching layer (memcached)
- [ ] Add auth for mutable operations
- [ ] *Optional* use proxy for SSL termination and loadbalancing<commit_msg>Update readme instructions<commit_after># catalog
Homework task to build a product catalog service using PHP, memcached and mysql

# how to run:

Application is deployed at: obscure-cove-92268.herokuapp.com

You can also use `composer start` to spin up the stack (considering you have docker up and running)


# requirements

Build a simple system that allows to list and edit products. Product is described as {id, name, description, price, picture url}.

* there should be pages to list, create, edit and delete product
* products can be arranged by price or id
* support for up to 1M products
* 1k requests per seconds for product listing
* \>500 ms for listing page to open

Stack:
* PHP (no OOP)
* mysql database
* memcached

# plan

- [x] Build a memory only catalog on top of Slim framework (use it as baseline)
- [x] Make it deployeable to Heroku (free tier)
- [ ] *Optional* use Travis as CI service
- [x] Measure baseline performance
- [x] Add MySQL support
- [x] Add a caching layer (memcached)
- [ ] *Optional* use proxy for SSL termination and loadbalancing
{'fraction_non_alphanumeric': 0.06837606837606838, 'fraction_numerical': 0.007541478129713424, 'mean_word_length': 4.025252525252525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5718669', 'n_tokens_mistral': 569, 'n_tokens_neox': 539, 'n_words': 298}