{"id":22207655,"url":"https://github.com/vitorsalgado/netsocks","last_synced_at":"2026-04-17T05:31:03.644Z","repository":{"id":72683036,"uuid":"111238028","full_name":"vitorsalgado/netsocks","owner":"vitorsalgado","description":null,"archived":false,"fork":false,"pushed_at":"2017-11-25T22:42:14.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T04:29:52.150Z","etag":null,"topics":["api-testing","code-challenge","docker","docker-compose","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitorsalgado.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},"funding":{"github":["vitorsalgado"]}},"created_at":"2017-11-18T20:46:06.000Z","updated_at":"2018-08-04T23:08:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0bea98d-c8d8-4fe4-b2d3-055a8d194bfd","html_url":"https://github.com/vitorsalgado/netsocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vitorsalgado/netsocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitorsalgado%2Fnetsocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitorsalgado%2Fnetsocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitorsalgado%2Fnetsocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitorsalgado%2Fnetsocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitorsalgado","download_url":"https://codeload.github.com/vitorsalgado/netsocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitorsalgado%2Fnetsocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31916687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api-testing","code-challenge","docker","docker-compose","java"],"created_at":"2024-12-02T19:13:58.726Z","updated_at":"2026-04-17T05:31:03.638Z","avatar_url":"https://github.com/vitorsalgado.png","language":"Java","funding_links":["https://github.com/sponsors/vitorsalgado"],"categories":[],"sub_categories":[],"readme":"# NetSocks\n[![Build Status](https://travis-ci.org/vitorsalgado/netsocks.svg?branch=master)](https://travis-ci.org/vitorsalgado/netsocks)  \n\nTechnical test for hiring process.  \nThese projects where developed using different languages and platforms. Except for the Campaign Update Receiver, which uses Node.js, all \nprojects uses Gradle as the build system.\n\n## Content\n- [Requirements](#requirements);  \n- [Tech](#tech);  \n- [Running](#running);  \n- [Projects](#projects);    \n\t- [Campaign ( Campanhas )](#campaign-api);  \n\t- [Associate Fan ( Sócio Torcedor )](#associate-fan-api);\n\t- [Stream](#stream);  \n\t- [Load Tests](#load-tests);  \n\t- [Unit Tests](#unit-tests);  \n\t- [E2E Tests](#e2e-tests).\n- [Dead Lock](DEAD_LOCK.md);\n- [Parallel Stream](PARALLEL_STREAM.md).\n\n## Requirements\n- Java 8;\n- Docker ( a version which already contains [multi stage](https://docs.docker.com/engine/userguide/eng-image/multistage-build/) available );\n- Docker Compose;\n- Make.\n\n## Tech\n- Java 8;\n- Scala ( load and e2e tests );\n- Swagger documentation;\n- Mongodb as the database solution;\n- Redis;\n- Spring Boot;\n- RxJava;\n- Hystrix;\n- Log4j for logging;\n- WireMock for API stubbing test;\n- Gatling for load tests;\n- Rest Assured for API e2e tests;\n- Node.js for simple Redis channel subscriber;\n- Gradle.\n\n## Running\nThere's a `makefile` on project root which contains all commands to start, test and clean all projects. It's the easiest way to do all tasks\nTo start all APIs with Mongodb and Redis instances, simple type on a console: \n```\nmake\n```\n\nTo clear all, run: `make down`\n\nRefer to **Projects** section below for more details about each project.\n\n\n## Projects\n\n### Campaign API\nThe campaigns API was develop with Java and uses a simple N-tier design as it does not contains complex business rules.  \nThere's no structure for *Teams*. Each campaign only contains a field, *favoriteTeamId*, which is a simple identifier.  \nEvery time a campaign already registered changes, the API publishes it to a **Redis** channel. **Hystrix** is used to control failures on channel publish;    \nTo run the API, navigate to repository root and type on a console:\n```\nmake campaign-api\nor\nmake campaign-api-docker\n```\n\n**Default location**: [http://localhost:8080](http://localhost:8080)  \n**Swagger**: [http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html) \n\n---\n\n\n\n### Associate Fan API\nThe stack is the same as the other api, but it is design in a reactive way with RxJava.  \nI wanted to test this implementation approach with RxJava in a Rest API.  \nTo run the API, navigate to repository root and type on a console:\n```\nmake fan-api\nor\nmake fan-api-docker\n```\n\n**Default location**: [http://localhost:8081](http://localhost:8081)  \n**Swagger**: [http://localhost:8081/swagger-ui.html](http://localhost:8081/swagger-ui.html) \n\n---\n\n\n\n### Stream \nTo run the stream test, go to repository root and type on a console:  \n```\nmake stream input=YOUR_INPUT_HERE\nor\nmake stream-docker input=YOUR_INPUT_HERE\n```\n\n---\n\n\n\n### Load Tests\nThe load tests uses [Gatling](https://gatling.io/) and are written in Scala.  \nThey attempt to simulate more than 100 users using the APIs.  \nTo run the tests, first you need to start all APIs:\n```\n# start apis first!\nmake\n\n# to run campaign load tests\nmake load-tests-campaign\n\n# to run support fan load tests\nmake load-tests-fan\n```\n\n---\n\n\n\n### Unit Tests\nTo run all unit tests of all projects with docker compose:\n```\nmake test\n```\n\n---\n\n\n\n### E2E Tests\n```\nmake e2es\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorsalgado%2Fnetsocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitorsalgado%2Fnetsocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitorsalgado%2Fnetsocks/lists"}