Feeds and Shit

March 13, 2009

Feeds and shit

Feeds could be a strong competitive edge for an ecommerce platform. So we should do them properly and automate the process. If we do this then we can standardise the administration functionality to

  • monitor feeds
  • deal with errors
  • deal with conflicts
  • summarize and report on changes

Feed

has one source has one supplier has many runs has one last run has one Adaptor

Adaptor

Consumes run.feed.source produces run.log, run.errors, run.output has many runs

Run

has one output has errors has datetime has one log has one adaptor has one feed has one last-run

Product

has many updates

Update

has one Product has one Feed

For each new feed we will have write and Adaptor. We can use ActiveMerchant for guidance as it has ‘Adaptors’ for each payment engine. Of course we can use OO and existing adaptors to make this job easier.

Example Adaptors

Excel Spreadsheet Adaptor

Adaptor checks if Acme’s spreadsheet has been changed since last time. Then it calls a ruby script that converts the spreadsheet into XML. Then it processes the XML.

Funky Web Service Adaptor

Adaptor connects to BeCool’s Product Update Service. It pulls from it all the changes since the last run into some funky YAML temporary file which it processes …

Duper 2 way Adaptor on Demand

2UptoDate.com connects to our Adaptors web service and says heh my products have changed. Adaptor connects back and gets changes in funky YAML etc.