Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add engine for receiving hooks from the adapters #13

Open
dballona opened this issue Sep 21, 2016 · 0 comments
Open

Add engine for receiving hooks from the adapters #13

dballona opened this issue Sep 21, 2016 · 0 comments
Assignees

Comments

@dballona
Copy link
Owner

dballona commented Sep 21, 2016

Do you not find most of the work associated with twilio etc are setting up state machines and database layers for the sms/call states? In my experience the "send" portion of the work is very small compared to the data tracking and for twilio for instance setting up hooks to either get the delivery status or polling to do so.

I think it for sure deserves probably an engine to be mounted at routes, and persisting it out (even for interceptions for invalid numbers, as you suggested). that’s actually a huge feature, and VERY nice to have.

probably, something like

# on routes.rb
mount ActionMessage::Statistics => '/sms'

This engine would define two routes, one for hooks for the adapters to post messages into (such as Twilio). and the other one for statistics (more on that the statistics part on another github issue);

we’d probably have a module to include on the tracker model under the app for Mongoid, and a generator for SQL databases (generates both migration and model);

and on the hook action, we’d record every single interaction out the adapters send for us under that model. Would be basically plug and play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant