On Tue, Jul 12, 2011 at 4:06 AM, Jason Smith <[email protected]> wrote: > tl;dr summary: It is practical using external processes to check in > and keep things sane. This is very future-proof, but with a slightly > longer time-to-market. > > On Tue, Jul 12, 2011 at 6:18 AM, Andrew Stuart (SuperCoders) > <[email protected]> wrote: >> I'd like to build a rather substantial application, it would be nice to >> build it as a pure 2 tier CouchApp. > > Many have tried. > > It is completely impractical to build a pure 2-tier Couch app. > However, two tiers, plus external helpers ("2.1 tier") is very > practical. > > We've got some difficult days ahead. But it doesn't really matter with > me now. Because I've been to the mountaintop. I don't mind. Like > anybody, I would like to build a full-featured Couch app; scalability > has its place. But I'm not concerned about that now. I just want to do > God's will. And He's allowed me to go up to the mountain. And I've > looked over. And I've seen the Promised Land. I may not get there with > you. But I want you to know tonight, that we, as a people, will get to > the Promised Land. So I'm happy, tonight. I'm not worried about > anything. I'm not fearing any <span>. > > What I prefer is this: Your programmers develop on and deploy to the > Couch. Your users also interact directly with the Couch. However, > *external agents* also access the couch and perform administrative > tasks as needed. > > The benefits of two-tier apps are obvious; I will list a few: > > * Simpler > * Reduced sysadmin workload > * Excellent future-proofing: multi-datacenter, offline operation, run > from an iPhone, etc. > > Unfortunately, real-world apps are more than a pretty web page. To name a few: > > * Send emails or other messages (e.g. push notifications) > * Help users recover their password > * Interface with related services: boot EC2 instances, update a DNS > entry, generate an certificate > * Notice that somebody is spamming and do the needful > * Ops stuff: run backups, rotate logs, monitor services. Maybe that's > an external responsibility; but IMO nowadays that is an application's > self-hygeine > * Catch unexpected errors, reassure the user, alert the staff > > There is no alternative. You need a third component--admin stuff--to > build a comprehensive service.
ANother path would be providing a way to code these features inside couch by providing needed API and the way to script it. Exactly like it was possible in good old hypercard time. - benoƮt
