Building for Success and Failure with AtlantaPHP, October 2014
Slide 2
“Let’s Build a Blog!” Says Every Developer Ever
Slide 3
Slide 4
Slide 5
What is it? •
Discussion web service
•
Free as in beer
•
Integrates with everything
•
Quality content
•
OAuth and SSO
•
Embeddable widget
•
Web API
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
Fundamentals A crash course
Slide 11
Forum Thread
Post
Slide 12
Category Limitations •
Categories may only be created using the API.
•
Moderation may not be performed on posts by Category, only by Forum and Thread.
Slide 13
Disqus API threads/create threads/list posts/create posts/list posts/report Full documentation is available at http://disqus.com/api
Slide 14
Registering Your App https://disqus.com/api/applications /register/ 1. Specify Domains 2. Set Permissions Read Read and Write Read, Write, and Manage 3. Save Tokens Access Token API Key API Secret
Slide 15
Create a Forum https://disqus.com/admin/create/ 1. Name your site 2. Specify a unique domain Creating an application does not implicitly create a forum!
Slide 16
Posting to Disqus As a user Authenticate via OAuth As a guest 1. Enable “Allow guests to comment” (Settings > General) 2. Application domain must be set correctly 3. Use the magic API key: E8Uh5l5fHZ6gD8U3KycjAIAk46f68Zw7 C6eW8WSjZvCLXebZ7p0r1yrYDrLilk2F
Adding a Health Check burst cache 1
2 3 4 failover cache
Slide 30
Caching Health Status •
If health status expires, everything just fails over
•
Adjust the health status expiration to back off: •
FAIL 1: expiration=2 minutes
•
FAIL 2: expiration=4 minutes
•
FAIL 3: expiration=8 minutes
•
…etc