{"id":16912638,"url":"https://github.com/boyter/canvaqueuetest","last_synced_at":"2025-07-25T23:15:05.785Z","repository":{"id":143401173,"uuid":"75914186","full_name":"boyter/CanvaQueueTest","owner":"boyter","description":"Canva Queue Test","archived":false,"fork":false,"pushed_at":"2016-12-08T07:31:03.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T17:26:53.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boyter.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-12-08T07:30:08.000Z","updated_at":"2018-09-11T11:25:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ae92655-621c-4206-bc16-10a6aeaae05a","html_url":"https://github.com/boyter/CanvaQueueTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boyter%2FCanvaQueueTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boyter%2FCanvaQueueTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boyter%2FCanvaQueueTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boyter%2FCanvaQueueTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boyter","download_url":"https://codeload.github.com/boyter/CanvaQueueTest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244675885,"owners_count":20491826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-13T19:10:45.072Z","updated_at":"2025-03-20T18:55:10.788Z","avatar_url":"https://github.com/boyter.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Message Queues\n--------------\nYour task is to design and implement a message queue.\n\n\nBackground\n----------\nMessage queues are a ubiquitous mechanism for achieving horizontal scalability.\nHowever, many production message services (e.g., Amazon's SQS) do not come with\nan offline implementation suitable for local development and testing.  The\ncontext of this task is to resolve this deficiency by designing a simple\nmessage-queue API that supports three implementations:\n\n - an in-memory queue, suitable for same-JVM producers and consumers;\n\n - a file-based queue, suitable for same-host producers and consumers, but\n   potentially different JVMs; and\n\n - an adapter for a production queue service, such as SQS.\n\nThe intended usage is that application components be written to use queues via\na common interface, and injected with an instance suitable for the environment\nin which that component is running (development, testing, integration-testing,\nstaging, production, etc).\n\nFor further background reading on the idea of providing local implementations of\nproduction systems, please read:\n\nhttps://engineering.canva.com/2015/03/25/hermeticity/\n\n\nBehavior\n--------\nIf message queues are an unfamiliar concept, see SQS docs for a description of\nhow they are intended to behave.  In particular, note the following properties:\n\n - multiplicity\n   A queue supports many producers and many consumers.\n\n - delivery\n   A queue strives to deliver each message exactly once to exactly one consumer,\n   but guarantees at-least once delivery (it can re-deliver a message to a\n   consumer, or deliver a message to multiple consumers, in rare cases).\n\n - order\n   A queue strives to deliver messages in FIFO order, but makes no guarantee\n   about delivery order.\n\n - reliability\n   When a consumer receives a message, it is not removed from the queue.\n   Instead, it is temporarily suppressed (becomes \"invisible\").  If the consumer\n   that received the message does not subsequently delete it within within a\n   timeout period (the \"visibility timeout\"), the message automatically becomes\n   visible at the head of the queue again, ready to be delivered to another\n   consumer.\n\n\nScope\n-----\nYou have 4 tasks to complete:\n\n1. write a QueueService interface to cater for just the essential actions:\n   - push     pushes a single message onto a specified queue\n   - pull     receives a single message from a specified queue\n   - delete   deletes a received message\n\n2. implement an in-memory version of QueueService; The in-memory version should\n   be thread-safe.\n\n3. (optional, time permitting) implement a file-based version of the interface,\n   which uses file system to co-ordinate between producers and consumers in\n   different JVMs (i.e. thread-safe in a single VM, but also inter-process safe\n   when used concurrently in multiple VMs); and\n\n4. (optional, time permitting) implement an sqs-based version of the interface.\n\nIf you find yourself running low on time, we'd appreciate at least a description\nof how you would implement the outstanding tasks (in comment form, in the\nrelevant source files).\n\nYou should:\n - allow ~4 hours for this task;\n - don't be afraid of a simple solution if you can find one;\n - include unit tests (in particular, you should test the behavior of the\n   visibility timeout);\n - based on the intended usage of the implementations, you should use your\n   judgement to make trade-offs between competing factors, such as performance\n   vs simplicity;\n - include comments where relevant (pretend you are submitting this as a pull\n   request); and\n - not require any additional libraries (Guava, Junit, and Mockito have been\n   provided, but you may switch to use Apache Commons if you prefer).\n\n\nBuilding and Running\n--------------------\nYou should be able to import this project into any conventional IDE as a Maven\nproject. As a fallback, you can use Maven to build and run tests from the\ncommand-line with:\n  mvn package\n\n\nSubmission Checklist\n--------------------\nYour submission should:\n - compile as submitted (please only JDK 7 or JDK 8)\n - have passing unit tests\n - be zipped/archived with a top level directory that identifies you by name\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboyter%2Fcanvaqueuetest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboyter%2Fcanvaqueuetest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboyter%2Fcanvaqueuetest/lists"}