Building a chat room using Django Channels

TL;DR : Code is on Github. In this post I explain how you can build a chat room using Django Channels. A standard Django application handles http requests using a request-response lifecycle. A request is sent from the user’s browser, Django calls the relevant view which then returns a response to the user. The request-response lifecycle has certain limitations though : it’s not great for realtime applications which usually require communicating with the backend server frequently. [Read More]

Online accounts need a clearly defined lifecycle

As part of a thought experiment, I was thinking about the implications of the internet becoming mainstream in a short time frame. One of the points that came up was the lifecycle of online accounts and their associated data. The lack of a clearly defined lifecycle means that users are at the mercy of each services’ policies. Some services retain data indefinitely, some services sell user data to third parties for ad targeting and most services don’t allow deleting accounts. This is one area where the big tech companies seem reasonable : most allow deleting user accounts and the associated data, but it’s unclear what data deletion really means. What happens to the user data stored in the database backups? What happens to the data shared with third parties? Are they instructed to delete data once the upstream user deletes his account?

[Read More]

Building a Disqus alternative Part 2 : The launch

I finally launched Hosted Comments!

After 3 weeks of development, I finally have the first version up and running. You can scroll to the bottom of this page and see it in action.

My initial plan was to blog about the process of building Hosted Comments, but I think I am going to skip the part 1, part 2 style in favour of standalone posts talking about specific challenges of building this software.

So what’s changed since the last post?

[Read More]

Building a Disqus alternative Part 1 : Research

Update : I launched Hosted Comments!

I’ll start with a little back story : I started this blog around 9 months ago and managed to build up traffic to a few hundred hits every day. It might not seem like much, but it was and still is a big deal to me. Readers used to leave comments with suggestions for improvements, questions or just to say that they enjoyed reading a particular post. Comments were powered by Disqus and all was well. One day I received an email notification from Disqus informing me that someone had left a comment on my blog. A pretty routine notification, so I opened the post and scrolled down to the comments section and noticed…six shady ads with images to accompany them. Without any warning, Disqus enabled ads on my site. Until then I never really bothered with what Disqus was doing in the background, but the ads incident made me curious. I inspected the requests that Disqus was making and it turns out that 100+ http requests, sending tracking data to 10+ external advertisers and 2MB of data transfer was required to display a comments section with 5 comments! That was my breaking point and so I promptly removed Disqus from my blog and deleted my account as well.

[Read More]

A model for a privacy oriented ad network that profiles content, not users

A few days ago I came across a talk by Maciej Ceglowski titled Notes from an Emergency. If you have not watched the talk, stop reading this and go watch it. In the talk, he makes a suggestion that the Government should regulate ads to target content instead of users. There was a discussion about the talk on Hacker News where Maciej said that he feels it’s a regulatory argument and not a business argument, in response to a comment that implied ads targeting content will be worse than ads that target users. [Read More]