0

I want to write a cinch IRC bot that sends information to a rails application. The rails application will essentially function as a monitor for users, and theoretically the data displayed will continually refresh.

I have the basic IRC bot working on it's own and have written standalone rails applications before. I do not know what the best way to integrate them together is though? Using sidekiq could start the bot, but it does not give me a clean way to connect back into the website.

Nathan Tornquist
  • 6,468
  • 10
  • 47
  • 72

1 Answers1

1

I see three options:

  1. Build an api and let your script send requests to that api endpoint
  2. Use script/runner to call your methods in your app directly
  3. Let the script store data directly into the apps database

I think the api solution is the only reasonable option for security and maintainablity reasons.

spickermann
  • 100,941
  • 9
  • 101
  • 131
  • Think performance will be good enough if I'm using the api system? – Nathan Tornquist Feb 03 '15 at 00:50
  • The apis I have in use have average response times between 10-30ms. That depends a bit on what transformations or calculations you need to do before you can store the payload. How many requests to you expect per hour/minute/second? – spickermann Feb 03 '15 at 01:00
  • We are integrating with twitch, but doubt that our channels will be too popular. At most a hundred probably. Ideally the bot puts something in a queue that the rails app consumes. – Nathan Tornquist Feb 03 '15 at 01:02