{"id":25909581,"url":"https://github.com/uzbekdev1/sammediatalent","last_synced_at":"2026-02-18T05:34:23.771Z","repository":{"id":76752998,"uuid":"77134053","full_name":"uzbekdev1/SamMediaTalent","owner":"uzbekdev1","description":"Sam Media Talent Test","archived":false,"fork":false,"pushed_at":"2016-12-22T10:06:16.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T22:47:14.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uzbekdev1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-12-22T10:05:48.000Z","updated_at":"2016-12-22T10:05:48.000Z","dependencies_parsed_at":"2023-03-02T03:01:08.259Z","dependency_job_id":null,"html_url":"https://github.com/uzbekdev1/SamMediaTalent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uzbekdev1/SamMediaTalent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbekdev1%2FSamMediaTalent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbekdev1%2FSamMediaTalent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbekdev1%2FSamMediaTalent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbekdev1%2FSamMediaTalent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uzbekdev1","download_url":"https://codeload.github.com/uzbekdev1/SamMediaTalent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uzbekdev1%2FSamMediaTalent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29569856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T04:18:28.490Z","status":"ssl_error","status_checked_at":"2026-02-18T04:13:49.018Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-03T08:17:53.419Z","updated_at":"2026-02-18T05:34:18.756Z","avatar_url":"https://github.com/uzbekdev1.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"#  Our Talent Test\n\n## Instructions\n\nWe expect you to be familiar with [git][1], [Vagrant][2] and [VirtualBox][3].\n\nThe question and initial code is provided to you on this git repository.  \nThe provisioning facility of vagrant will give you a box with the necessary software to get you started.  \nYour solution should be committed back into this repository like you would do in a normal project.  \nYou can commit and push as many times as you want.\n\nPlease make sure you update the provisioner in case your solution requires extra packages, database\nschema changes, code/dependencies initialization or service startup.\n\nYour response will be pre-evaluated by an automated system by doing:\n\n* `git clone \u003cthis repository url\u003e`\n* `vagrant up --provision`\n* run checks against index.php, stats.php and database.\n\nEnsure those steps work as you would expect before asking for your answer to be evaluated.\n\nOne of the things we definitely do want to see are unit tests, so please do not forget those.\n\n## Intro and background info\n\nAmong others, our company provides a variety of services to which a Client can subscribe by\nsimply sending a subscription request via SMS to a so-called shortcode. For example,\nthe Client sends an SMS with subscription request 'ON LEARNING' to shortcode 32788 to\nsubscribe to our mobile learning services.\n\nThe industry term for such SMS'es is MO, which stands for Mobile Originated. Daily we receive\nand process millions of MO's which are sent to us by the telecom gateway through our MO API.\n\nAll of this is done in by the code that is provided to you in this talent test.\n\nAn example of a call through our MO API could look like this:\n\nhttp://localhost/index.php?msisdn=60123456789\u0026operatorid=3\u0026shortcodeid=8\u0026text=ON+GAMES\n\n## Goal 1\n\nYour first goal is to transform this smelly code into production grade, quality code that follows\nmodern software development practices. We can't emphasize enough the importance of this!\n\nYou will also notice that this code doesn't perform well. The `registermo` is inherently slow and you may\nassume there is absolutely nothing you can do to improve the `registermo` command.\n\nCan you improve the design in such a way that it can handle several thousands of requests per second?\n\n## Goal 2\n\nThere is also a stats.php file that is called periodically by our monitoring system to provide it with\nrelevant performance statistics of our MO API.\n\nThe problem we are facing is that it has become very slow, something which seriously impacts our monitoring system.\n\nYour second goal is to solve this problem and make sure that stats.php takes less than one second to run.\n\n## How to check performance\n\nA simple way of checking the performance of the MO API is to use Apache's ab tool, like this:\n\n`ab -n 1000 -c 10 \"http://localhost/index.php?msisdn=60123456789\u0026operatorid=3\u0026shortcodeid=8\u0026text=ON+GAMES\"`\n\n## Bonus 1\n\nIn order to better integrate with our monitoring tools, we need a way to know how many MO's have been received but\nnot yet processed.\n\nCan you provide a *command line tool* that, when executed, prints out a single integer: the number of MO's received but\nnot yet processed?\n\n## Bonus 2\n\nOccasionally we get a wave of problematic MO's that fail to be processed.\n\nTo ease administration, can you provide a command line tool to clear (remove) all those MO's that have been received\nbut not yet processed so that we don't waste time and system resources trying to process them?\n\n# FAQ\n\n* What's this binary `registermo` doing?\n\nDon't worry about this. This is a *placeholder* for external process and API calls we have no control over.\n\nTo rephrase what was stated in Goal 1, you are not allowed to change this binary in any way. Do not\nspend your time on it.\n\n  [1]: http://git-scm.com/\n  [2]: https://www.vagrantup.com/\n  [3]: https://www.virtualbox.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzbekdev1%2Fsammediatalent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuzbekdev1%2Fsammediatalent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuzbekdev1%2Fsammediatalent/lists"}