Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Commento: Lightweight, open source, tracking-free alternative to Disqus (github.com/adtac)
233 points by adtac on April 26, 2017 | hide | past | favorite | 63 comments



You should have put up a demo site where users can try out the comment engine. Requiring the installation on a user's laptop/desktop is just too much friction, not to mention mobile users who don't have the luxury of running go scripts.


Whoa, this blew up! Here's a working demo that I just hacked together: https://adtac.github.io/commento/comment.html

Edit: sorry, I had to purge the comment list because of an update. From now on, your comment will only be alive for 30 minutes. It'll be deleted after that. This is, of course, only for the demo.


Nice, that demo loaded pretty fast even with a lot of comments :)


And I'm only using now.sh's free tier for the backend.


I was going to comment on the slightly laggy edit box. This might explain that?

I am on FireFox 53.0 on a decent Windows 10 laptop.


That is because there are over 7000 comments right now. Clearing it. Try again, it should be snappy.


How do I get notified when someone else replies my comment?


You can use 'dangrossman's hnreplies: http://www.hnreplies.com


Related discussion: Replacing Disqus with GitHub Comments | https://news.ycombinator.com/item?id=14170041

Recommended alternatives to Commento (Golang):

· https://posativ.org/isso/ (Python)

· https://github.com/jimpick/lambda-comments (Node.js, AWS)

Github-based alternatives:

· https://staticman.net for Github comments

· Github Issues for comments ( http://donw.io/post/github-comments/ )

> https://github.com/shurcooL/issuesapp

> http://ebarnouflant.com/posts/4-turn-your-github-issues-into...

· Github Wiki for blogging: https://github.com/stickfigure/blog/wiki/GitHub%27s-wiki-mak...

· remove comments and use Pull Requests and Issues for substantive discussion

Other options:

· Reddit, Facebook, Discourse for comments

· Privacy via Disqus comments on demand when pressing a button

· Google Wave via Sandstorm



Firebase is probably an interesting option as it would likely fit in the free tier, and JavaScript friendly, so easy on-page integration.

And you get Google, Twitter, GitHub, etc sign on for free.


The Solid framework, supported by Tim Berners-Lee, is looking for an app like this to be built to add to its list of Wishlist apps.

https://github.com/solid/solid-apps#general-wishlist


>supported by Tim Berners-Lee

An endorsement from Mr Berners-Lee means little, having caved on the DRM issue.


Half the value of Disqus is that it hosts the server API for you. Any viable alternative to disqus or other commenting engine needs to provide hosting too. Otherwise, it's not useful out of the box for static websites and blogs using shared hosting. The challenge is integrating comments without the ability to control the dynamic server backend.


The other half value of Disqus is to provide comments to static sites. Back in the days, most sites used dynamic content, and had comments as part of the CMS system they used. Today, lots of sites have no back-end database, and unfortunately, lots of such sites use Disqus simply for convenience. Convenience that hurt the sites, and their visitors (slow load time, unacceptable tracking & spying). Any alternative should be welcomed.

If the sites that use Disqus today were willing to pay for an alternative, I would personally offer hosting of such, with fast load times and no tracking. However, I don't believe such willingness exists, and people are getting conditioned to accept sluggish load times and tracking. Too bad. Self hosted Open Source solutions are the second best alternative - management gets the illusion that the thing is free, and you actually get fast load times and no tracking.


For context, the "load times" we're talking about in the context of Disqus, at least the ones given in the articles I've read, is about 3 seconds. What's more, the javascript is below the fold, so you've already read the site content before seeing the unloaded comment section anyways.

I find it very hard to get worked up about 200k and 3 seconds of nonblocking load.

The tracking is of more immediate concern, but you also have to make a choice as a site owner:

1. Host your own comments. Nobody does this anymore because nobody likes registering for every site out there. You can have anonymous commenting, but ++ abuse. Either way, spam concerns are completely on your shoulders, and you still have to moderate.

2. Shell out to Disqus or similar. People get to log in with the credentials they already have (and don't have to log in at all if they have cookies from using another Disqus site), moderation is still a thing, but spam is much less of a problem.

3. Not have comments at all. An increasingly popular option.


> 3 seconds of nonblocking load.

That's a lot. Because Disqus doesn't generally load when the page does.

You have the time the user is reading to load it, but generally Disqus doesn't load till it comes into view.


With so much going on about instant articles (or whatever FB calls them), and some institutions pausing, and thinking if its worth handing over their content (often for free) to these external entities - whose goals may/may not be in alignment, I make a prediction:

* In 5 years time, large organizations (e.g. NY Times) will look far more into self-hosted, often open sourced alternatives. Maybe now, they post to twitter, soon they'll refer users to their own mastodon instance. Now, orgs host comments on disqus, in the future self-hosted platforms like Commento will be used. In some ways, it will go back to the independent way in which things operated back in the late 90s/early 2000s; though hopefully better in other ways. That's my prediction.


I really hope you are right :)


For static sites, a service that takes comments and pushes them to the source repo for the site (or an extra comment-only repo for security and build-performance) could also be interesting.


On the one hand, it could be nice to have it all in a repository or two.

On the other hand, a repo history is normally immutable (with force pushes on rare occasions), and comment spam is way to common. Do you really a repo with all the usual link spam in its commit history? In case of public hosting it may trigger some spam filtering automation and block the repo/account. While perfectly possible, I'm not sure a DVCS repository is a well-matching concept for storage here.



I disabled comments on my blog a while ago. Private comments? Email me. Public comments? Write a blog post in response, I'll link to it at the bottom of my article. Improves the quality of the dialogue significantly.


Me too. If I write something that might gain lots of interest in my blog[1], I also post it on dev.to[2] and promote it there. That place has comments and a healthy community.

[1] http://pablojuan.com (https underway)

[2] https://dev.to


twitter is also another nice option.


Would prefer Mastodon/GNUSocial over that.


Mastodon really is good, it's fun to use and the fact that you can connect with people on other instances is great.


I'm bootstrapping an alternative to Disqus called Remarkbox (https://www.remarkbox.com)

Are you planning on also offering a paid hosted version?


I haven't really thought about that. I dunno, would people pay for this? What's a right monthly price for something like that? $3/month? $5/month?

Edit: I know that if I create a SaaS out of this, you'll have me as a direct competition. But can I know more about how you got yours running, what the range the net revenue is in (like, is it over $100/month? Over $1000?)?


I wouldn't say a flat-rate is exactly correct. Some sites receive tens of thousands of comments on a single article. Others, 5 or 10. The overhead on the service is more likely a better determinant, such as bandwidth and performance requirements for hosting. If SiteA uses 95% of your traffic and SiteB uses 5%, and your overall costs are 200 FakeUnits, you ought to be charging in respect to usage. Starting it at a price that wouldn't impact you negatively would be a good idea, and making it scalable would be even best. I'm moreover just throwing out ideas and thoughts though, I'm no VC or business expert myself, just someone who hosts servers for fun.

Disqus is also paid or supported by ads: https://disqus.com/pricing/


At this point I'm not making anything and I have poking at the idea on the side for 3 years. I'm currently collecting interest by allowing people to register for the beta.


I'd been thinking about doing something like this with AWS API Gateway, Lambda and DynamoDB. Chalice (https://github.com/awslabs/chalice) should make it relatively simple to make and deploy...



Exactly. Thanks!


This looks nice! I'd also perhaps add very crude deleting functionality; perhaps a way to delete comments via CLI by a unique identifier that is shown on the top right of every comment. Just so that spam posts can be dealt with, without needing a full-blown account system.


I used Disqus previously, but eventually dropped it because I didn't really have a need for comments and all they entailed. Having a comment system means having to ultimately setup a way to combat bots and spammers, and probably having to do some moderation (depending on the subject). Linking to whatever discussion happens on Hacker News and Reddit is usually good enough. I think that's what pingbacks were supposed to be for?


Nice, but how it deals with multiple concurrent writes? I see you are using transactions but, as far as I know, sqlite3 supports database-level locking, so one writing instance, unless using ATTACH and separating tables into multiple files, to enable a sort of table-level locking.

Are you considering to add support to other databases?


>but how it deals with multiple concurrent writes?

I'm afraid I'm not very familiar with how go-sqlite3 handles that. I just started learning golang a month ago, so it's all quite new to me.

Maybe someone else will have a better answer.

>Are you considering to add support to other databases?

At the moment, no. Comments aren't exactly big data ;)

Just curious - which databases would you like to see and why (what do they offer over sqlite)?


Single insert per transaction is slow with sqlite, but slow is sort of relative. It would be probably be 10 to 80 inserts per second or so, a little faster if you turn off synchronous writes in sqlite.

I would guess most use cases for this relatively simple comment software wouldn't be expecting that many comments anyway.

An agnostic data layer should probably go on your list, but I imagine other stuff would be higher on the list...like a captcha. Spam will likely be the top issue long before performance.


I'd say put in an ODBC driver. It gets you support for a lot of databases right out the gate, especially if you keep things to a relatively simple subset. That way, someone already running a postgresql or mysql database can plug things in and not need to track another place data is stored.


This looks really nice and clean.

I'd been using Juvia a lot over the year's, built by the people at Phusion. It's worked really well, but seems to be unmaintained now.

The killer feature needed in any project like this is spam filtering, which Juvia accomplished by just integrating with Akismet, which works mostly, but not completely.


Add in indieweb functionality to the codebase, such as microformats stuff, and I think this could really catch on. See https://indieweb.org/comments#How_to_markup


I have literally never heard of IndieWeb. Is this something important I should have heard of?


I've mentioned it a few times; I think it's pretty important because it has a bunch of ideas which are our last best hope to prevent the centralisation of the Internet.

Some of their proposals, taken together, could enable people to emulate what Facebook offers, from their own servers.

I'm not 100% onboard with all their ideas, and a few just seem wrong, but all in all I think that they're exciting and important.


I've been hearing murmurs about it for a while now, I think it's a great idea but thus far it's lacked sufficient business buy-in to gain traction.


Just read and it IMO doesn't seem to need business buy-in, just people who want to have their own domain, write stuff and post it.


Thanks, I'll look into it.


Please use a locally hosted js in your example code. rawgit does not even have a privacy policy.




Fixed. Thanks!


Does it include a CAPTCHA? Comment sections seem very susceptible to spam from experience.


It doesn't at the moment. But someone filed and issue for this and someone else has already begun work on this!

I <3 open source.


Very nice! Small suggestion for nested comments: If you indent just the left side and not on the right side, there would be a lot more space for these comments, while still retaining the look of a thread hierarchy.



How do you prevent comments flood ? Imagine someone write a script calling your server with valid headers, what will happens ? Serious question I asked myself a month ago on a similar project I tried to put on.


At the moment, there's no way. However, Captcha has been suggested. Annoying, but it'll work.



And let google track you instead?


What's the best way to import existing comment data from Disqus into Commento?


There's no way atm. Can we export all Disqus comments into JSON? If so, I can probably write a script to convert that into a sequence of SQL statements and generate a `sqlite3.db` file. And if you place that in the root directory, all your comments will appear properly.


I'm curious how why you need to initialize a local server? Does that run inside the browser?


The `init_commento("http://0.0.0.0:8080")` in the README is an example. You can host your own instance of Commento and just point to that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: