Packages: twocloud and api

6 views
Skip to first unread message

Paddy Foran

unread,
Nov 29, 2012, 1:47:59 AM11/29/12
to 2clou...@googlegroups.com
I'm still trying to decide where to draw the line between these two packages. I think I've finally struck on the two golden rules:

1. Anything that impacts the database or integrates into a third party service that will be referenced later (e.g., creating a customer account for our subscriptions with Stripe, putting a message on IronMQ to queue up a verification email for a user, etc.) goes in twocloud.
2. Anything that deals with HTTP requests directly or handles communicating amongst the architecture in a non-durable way (e.g., notifying peter of events so that clients can be notified via web socket or Google Cloud Messaging) belongs in api.

So far this has served me well. The underlying thinking is that it should be possible to create a command line client that just uses the twocloud package and provides a command line interface for the service. In such a case, because of the distributed nature of peter, it wouldn't be appropriate to send messages through peter. You still want the Stripe customer ID stored in the user subscription, though, and you still want email verification emails to get sent out.

This seems like the sanest line in the sand to draw.
Reply all
Reply to author
Forward
0 new messages