Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created March 18, 2009 02:05
Show Gist options
  • Save aviflombaum/80889 to your computer and use it in GitHub Desktop.
Save aviflombaum/80889 to your computer and use it in GitHub Desktop.
# What Does Harvest Do?
# Connects to a DataSource
# Downloads a Set of Data
# Normalizes Format
# Stores it in Sharded Harvest DB -> Silos
# Possibly removes data?
# What Does Processor Do?
# Connects to a Silo
# According to a Process, Denormalizes the Data
# Connects to a Field
# Plants the Data in (Writes the to the DB)
# What Does Farm Do?
# Allows for easy reporting of huge sets of data (Silos) by pre-Processing or Processing
# shards on-demand.
class Harvest
def initialize(params = {})
end
def connect(field)
end
def reap(params = {})
end
def thresh(params = {})
end
def store(silo)
end
end
class Field
def initialize(params = {})
end
end
class Field::GoogleAnalytics < Field
end
class Silo
def initialize(params = {})
end
end
analytics_harvest_params = {}
analytics_params = {}
analytics_data_params = {}
analytics_threshing_params = {}
analytics_silo_params = {}
analytics_harvest = Harvest.new(analytics_harvest_params)
analytics_harvest.connect(Field::GoogleAnalytics.new(analytics_params))
analytics_harvest.reap(analytics_data_params)
analytics_harvest.thresh(analytics_threshing_params)
analytics_harvest.store(Silo.new(analytics_silo_params))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment