Project

fnf

0.0
No commit activity in last 3 years
No release in over 3 years
Fire and Forget replaces the need to write resque tasks or delayed jobs to fire off web requests (usually notification webhooks or a anti-spam service, like defensio or akismet). A single worker reads and executes web requests from a blocking named pipe, while clients queue up them up in a non blocking manner. It uses typhoeus internally to execute the web requests for maximum speed.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Fire and Forget (FNF)

Intro

Fire and Forget replaces the need to write resque tasks or delayed jobs to fire off web requests (usually notification webhooks or a anti-spam service, like defensio or akismet). A single worker reads and executes web requests from a named pipe, while clients write to that pipe. It uses typhoeus internally to execute the web requests for maximum speed.

1 minute demo (requires node be installed)

Clone the project

git clone git@github.com:capotej/fnf.git

Install dependencies

bundle install

Run the worker

ruby bin/fnf

Run ba, a nodejs webserver that outputs how many req/s its getting

node ba.js

Run fnf_test.rb which queues 2k web requests which node then receives

ruby fnf_test.rb

Installation & Usage

Add to gemfile, vendor the gem, gem install, etc

gem 'fnf' or gem install fnf

Start the server on the same machine as the client

fnf

Then in the client, you can do

require 'fnf'
Fnf::Client.queue({:post => "http://api.akismet.com/process", :params => { :thing => "2123" })

Set and Forget It