Skip to content

An exercise for getting up to speed with sidekiq and sending http requests

Notifications You must be signed in to change notification settings

sjreich/sidekiq-and-http-exercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Requests and Sidekiq

CoverMyMeds uses a microservices architecture, in which many small parts of our system communicate with one another via HTTP requests. Typically, we use Sidekiq to make those requests asynchronously and to handle retrying requests if something goes wrong.

This exercise introduces the relevant concepts.

Setup

The setup for this exercise is a bit complicated. Sorry.

  1. Bring in this repo, and its dependencies.
$ git clone <copy the address from github>
$ cd sidekiq-and-http-exercise
$ bundle install
  1. You'll need a Redis server running locally. In a new terminal window, run:
  $ brew install redis
  $ redis-server
  1. Start the web server you'll be interacting with. In a new terminal window, run:
  $ ruby server/server.rb
  1. Start the sidekiq background process(es). In a new terminal window, run:
  $ bundle exec sidekiq -r ./client/sidekiq_workers.rb

The Exercises

The main file to work on is 'client/main.rb'. Read it, edit it, execute it.

  $ ruby client/main.rb

You'll also need to edit 'client/sidekiq_workers.rb'. For your changes there to take effect, you will need to kill off the existing sidekiq process(es) with ctrl-C, and then restart them using the command above.

When you're done, kill off everything with ctrl-C.

About

An exercise for getting up to speed with sidekiq and sending http requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages