0.0
No commit activity in last 3 years
No release in over 3 years
Works on behalf of a haystack server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0
 Project Readme

Haystack Worker

Works on behalf of a haystack server.

Concept

A haystack worker's sole responsibility is to calculate surpluses of characters that satisfy self-enumerating pangrams. It does this as quickly as possible and therefore makes use of a C-extension for a ~200x speed increase over Ruby.

It receives 'jobs' from a haystack server which come in the form:

{ 'id' => 123, 'from' => [1, 3, 8, etc], 'to' => [10, 4, 14, etc] }

The 'from' and 'to' arrays represent the search space that this worker has been assigned to explore. The ID is used by the haystack worker to keep track of jobs.

It posts data back to the haystack at /job/:id in the form:

[[1,3,8,etc],[6,4,14,etc]]

It returns an empty array if the given search space doesn't contain any potential self-enumerating pangrams.

Usage

gem install haystack_worker
haystack worker haystack.example.com

At present, I haven't built the haystack server. When I have, I'll update the gem to point to it by default.

Resources

For more information or to gain some context, please see my pangram and frequency related projects.