3 ms·
Does this trend of replacing TCP/IP with HTTP start being more common, or it just looks to me that way? I get a feeling that HTTP is stretched too much outside
by shmerl 10y ago
Does this trend of replacing TCP/IP with HTTP start being more common, or it just looks to me that way? I get a feeling that HTTP is stretched too much outside of what it's designed for, and it results in messy design.
- brongondwana 10y agoThere are benefits to using http as a substrate, like request bundling on mobile to reduce radio and battery usage. JMAP is transport agnostic in its core form, but json for structure over https for transport is the current best choice for simplicity and developer friendliness
- vbezhenar 10y agoMost important thing is JavaScript from browser can use only HTTP, so if you want to build web-based mail client, you won't have to build proxy HTTP service, you can just implement protocol on client. Another important thing is proxy, many organizations don't allow anything but HTTP, so it's easier to just use it. HTTP is not that bad, anyway. You don't have to use every quirk.
- djsumdog 10y agoI agree with your comments about web-based e-mail clients, but: > many organizations don't allow anything but HTTP, so it's easier to just use it. Remember when we allowed for newer protocols to have their own ports and didn't blacklist everything but HTTP? Why are we doing this again, now? Please don't say security/firewalls or else I'm going to ram an ice pick in my eye. If your organisation is blocking ports, they're probably filtering HTTP. Companies that care about filtering deny access to most personal e-mail on work machines. So basically you're saying "let's abuse HTTP so people can violate company policy." You may or may not also being saying, "Let's build a brand new awesome shiny latest and greatest protocol...and permanently tie it to the technical debt wreckage of HTTP/2. oh and Google could just fix their terrible broken IMAP implementation.
- Arnt 10y ago(HTTPS, actually.) HTTPS (when combined with JSON) provides requests and responses, without harsh size limits, with nice addressing. TCP provides a byte stream. A lot of people are finding it easier to express their upper-level protocols in terms of requests and responses than in terms of a byte stream. Having to cope with NAT middleboxes breaking the byte stream doesn't help, of course.
- Qwertious 10y agoI think that HTTP-based applications are "easier", because they're less likely to be clobbered by a firewall (which is fairly inherently hostile to Apple-grade users). In other words, the layer below (TCP/IP) is judged inadequate so everyone just jumps up a layer (HTTP) and deals with it there, even when it's a terrible idea.
- awinder 10y agoI think maybe it's time to embrace many of the upgraded specs available in http2, which you can upgrade http connections to anyways. As for existing solutions that have been around for a while, http keepalives implemented in a smart manner, and exposing apis through a cdn are huge difference makers.
- unscaled 10y agoWe can probably blame misguided corporate IT policies for starting this trend, by blocking most of the outgoing ports and migrating many newer protocols to use TLS over port 443 (although it doesn't really have to be HTTP to bypass corporate firewalls). This is still the most often cited reason, but I don't think it's a good one anymore (as said before, nothing prevents you from using TLS). If you have a stateless protocol is dealing with autonomous request, HTTP is quite frankly the best general-purpose transport layer for you. The only other well-supported transport layers are the message-based UDP and the stream-based TCP, TLS (which offers encryption), SSH (which offers encryption and multiplexing). If you've got a stateless request-based protocol, you want a message-response based transport, but UDP doesn't quite offer the same abstraction and lacks reliability guarantees and large message support. With a stream-based protocol on the other hand, you're bound to redo an ad-hoc, informally-specified, bug-ridden, slow implementation of half of HTTP[1]. Yeah, you probably don't need all of the features of HTTP for your protocol, but being able to use existing HTTP infrastructure solutions (such as proxies, load balancers, caches, testing tools, endpoint monitoring tools) is a great boon that you would never get with your own homegrown protocol. [1] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule
- shmerl 10y agoHow would you implement something like push in HTTP for example? I remember, that XMPP had to come up with some hacks (BOSH[1]) to do it over HTTP. 1. https://en.wikipedia.org/wiki/BOSH_(protocol) https://en.wikipedia.org/wiki/BOSH_(protocol)
- jkarneges 10y agoStreaming (server trickles out a response that never ends) or long-polling (server intentionally waits before sending a full response) work very well for pushing data. BOSH uses long-polling, and as someone from the XMPP community I'll admit it's a bit of a hack around HTTP, mainly because it's stateful. However, it's entirely possible to have RESTful/stateless long-polling, for example in Dropbox's API: https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-longpoll https://www.dropbox.com/developers/documentation/http/docume...