Earlier quoted context omitted.
Authentication has to be done again over websockets - on every connect and reconnect. That means it is going to make the app resource hungry. Right, except that WebSockets only connect once in normal operation. You'd be surprised how resource hungry WebSockets aren't when compared to constant HTTP connections. Waiting 2.5 seconds for messages to arrive to all clients feels a little imperfect.
I live in a country where latency for websockets is 300-400ms for most hosting services (US/Europe). And the most common internet connection speed 512kbps. Websockets disconnects for me frequently. So during reconnection, I'll have to reauth in my case.
Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
51–60 of 71 posts
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#52This is cool, and as a heavy IRC user, I'm eager to find a solution that can replace self-hosted IRSSI+ZNC entirely, without compromising security. Don't reinvent the protocol, reinvent the UI.
Why irssi+znc? Why not just run irssi on the box you run znc on (inside screen or tmux)?
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#53I would like to see a credible open source alternative to Campfire, etc, so this is nice work. But if it's an Ember app, why don't the different rooms present as different URLs?
When URLs change the message pollers also will be destroyed and reinitialized. That would be a problem. IMHO, chat apps usually push the limits of any frontend framework.
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#54I would like to see a credible open source alternative to Campfire, etc, so this is nice work. But if it's an Ember app, why don't the different rooms present as different URLs?
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#55Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#56Earlier quoted context omitted.
Just to clarify: var t = document.createTextNode(msg); content.appendChild(t); That code sanitises all possible content in msg. I don't need to list out HTML tags, script/style tags, do special case for unicode exploits, etc. You need to list what variables are "unsafe", but you don't need to list out the ways they might be unsafe. If it's got the potential to be unsafe, assume it's completely unsafe in every conceiv…
Ya, but if they built it so msg=' msg ' that would remove the bold, no? So it is a bit more complex than that if they want to enable user markup. https://code.google.com/p/pagedown/source/browse/Markdown.Sa... https://code.google.com/p/pagedown/wiki/PageDown
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#57Earlier quoted context omitted.
I live in a country where latency for websockets is 300-400ms for most hosting services (US/Europe). And the most common internet connection speed 512kbps. Websockets disconnects for me frequently. So during reconnection, I'll have to reauth in my case.
Well it isn't difficult to detect that case and drop back to polling (which should have the exact same latency anyway). Aiming for lowest common denominator in this stuff seems unwise.
MogoChat is right now a one-man project, so supporting websockets and then polling seemed tedious, especially with something like Faye or SocketIO missing in Elixir. Phoenix Framework will soon have a high level abstraction over websockets (with Faye-like features). Once that's in, I'll be able to use it.
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#58Earlier quoted context omitted.
Just to clarify: var t = document.createTextNode(msg); content.appendChild(t); That code sanitises all possible content in msg. I don't need to list out HTML tags, script/style tags, do special case for unicode exploits, etc. You need to list what variables are "unsafe", but you don't need to list out the ways they might be unsafe. If it's got the potential to be unsafe, assume it's completely unsafe in every conceiv…
Ya, but if they built it so msg=' msg ' that would remove the bold, no? So it is a bit more complex than that if they want to enable user markup. https://code.google.com/p/pagedown/source/browse/Markdown.Sa... https://code.google.com/p/pagedown/wiki/PageDown
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#59Earlier quoted context omitted.
Just to clarify: var t = document.createTextNode(msg); content.appendChild(t); That code sanitises all possible content in msg. I don't need to list out HTML tags, script/style tags, do special case for unicode exploits, etc. You need to list what variables are "unsafe", but you don't need to list out the ways they might be unsafe. If it's got the potential to be unsafe, assume it's completely unsafe in every conceiv…
InnerHTML should be removed from browsers. While it's still the fastest method for changing the page DOM it shouldn't be. When used outside of user inputted scenarios it's fine.
Re: Show HN: Mogo Chat – open-source team chat app written in Elixir and Ember.js
#60Earlier quoted context omitted.
Ya, but if they built it so msg=' msg ' that would remove the bold, no? So it is a bit more complex than that if they want to enable user markup. https://code.google.com/p/pagedown/source/browse/Markdown.Sa... https://code.google.com/p/pagedown/wiki/PageDown
I'm not even a front end guy but I'm pretty sure the field they are adding the user message to should handle the style, not the user message.
It is [message] -> [parse] -> [sanitize], generally.