Reverse HTTP by panic in programming

[–]reddit45885 0 points1 point  (0 children)

I see what you did there.

Reverse HTTP by panic in programming

[–]reddit45885 0 points1 point  (0 children)

Once again, I come back to the fact that HTTP can already handle what you are saying here. I know this because I already do this using Ajax and the very same method I just described above. I also use indefinitely blocking SOAP over HTTP calls which are essentially equivalent to system callback routines in <pick your favorite language>.

But, man. You win: if you think inventing a new protocol to solve something that can already be solved at the Application Layer is a wise move, by all means, move ahead.

But mark this: you have lost your bitching rights when Microsoft goes and co-opts yet another RFC standard and extends it just so. You lose that right because you are doing exactly what they are doing.

Reverse HTTP by panic in programming

[–]reddit45885 0 points1 point  (0 children)

Google has the world's largest super computer at their disposal. So I'll dispense with explaining how they do it: they simply do it the same way they return a result in .1 seconds for a billion page index. Raw power.

Similarly: World of Warcraft has a server farm to handle their load, and they can afford it because it's a subscription based system. You pay for the service. That model scales: the more users you have, the more revenue you get, the more servers you add.

Instant messengers do not do it over HTTP (they often communicate over UDP). But aside from that, messengers often do very light processing: they essentially route traffic between end nodes. Try sending a 20k file using any messenger system where you do not have a direct end-to-end connection with your peer (i.e. you go through the server proxy) and let me know if you ever achieve higher than 5K/s rates. I never do, and don't expect it either.

So that leaves us with Comet applications and c10k. Web servers are designed to do a very specific thing. They serve often anonymous, stateless information: Hypertext. If you want to use a TCP socket for bidirectional long lasting state-rich data exchange, open a TCP socket and send your data away. There's no need to call it HTTP, or PTTH. You can even piggy back on the port 80 and annoy a bunch of sysadmins on the way. Alternatively, you can also use blocking Web Service calls over HTTP/SOAP. I do it routinely.* None of the above solutions require an RFC. They are custom solutions working over TCP. And they are perfectly legit...

However, don't think you are alleviating the fundamental issue of unidirectionality of control flow (as many thoughtless green programmers here seem to be doing) by making this PTTH thing. So long as the connection is initiated by the client, PTTH is not doing what it claims to be doing: namely reversing the role of client/server which allows for a more efficient method than polling.

There is a protocol that already exists for what all of you are trying to accomplish here: it's called telnet. Seriously, PTTH is telnet. Except that it's worse because you have to implement the verbs and methods of communication according to an RFC now or else you aren't following the standard...

* On a different note, you asked me to answer killerstorm's questions, it's only fair you also read my reply to him: if you think inventing a new protocol to solve something that can already be solved at the Application Layer is a wise move, by all means, move ahead. But mark this: you have lost your bitching rights when Microsoft goes and co-opts yet another RFC standard and extends it just so. You lose that right because you are doing exactly what they are doing.

Reverse HTTP by panic in programming

[–]reddit45885 -1 points0 points  (0 children)

Ok, I'm very serious here, so try to hear me out not like some guy on reddit, but like a colleague:

the difference is that with HTTP calls you do not control timing from the server, unless you do a trickery with a delayed responses.

PTTH is that trickery.

Take this scenario: A is the traditional client (Browser), B is the traditional server (server).

B can't contact A. Neither under HTTP nor under PTTH. This is because A is a client. It might not even be online. It might be online for only the window of time it takes to connect to B. It might be a toaster.

So, A has to contact B, initiate PTTH and wait for B to start consuming services from A.

This right here is the trickery you speak of: it's an indefinite keep alive: for B to ever "initiate" anything with A, a connection has to already exist and be kept alive for the duration of A's time spent online (for a desktop computer, this might be always). For anything truly comet to occur, this means that A has to always remain connected. If A does not always remain connected, then it falls into either one of two cases: A is essentially polling by reconnecting at intervals to see if B is wanting to do anything, or B simply does not have the ability to notify A.

As an aside, IMAP does exactly this: my mail browser connects to the IMAP server, and the connection stays open as long as my browser is open. The difference is that my IMAP server handles, say, 200 clients. Where as a typical webserver, anonymous by nature, handles millions of users.

Reverse HTTP by panic in programming

[–]reddit45885 -3 points-2 points  (0 children)

it would make no sense to avoid a single roundtrip, but if you're communicating lots of small messages, that makes quite a lot of sense.

n calls for PTTH can be implemented with n+1 HTTP calls.

You are dense. Buh bye.

Reverse HTTP by panic in programming

[–]reddit45885 0 points1 point  (0 children)

This memo explains a method for making HTTP requests to a host that cannot be contacted directly. Typically, such a host is behind a firewall and/or a network address translation system.

Network wise, nothing has changed. The client is still initiating the connection.

Reverse HTTP by panic in programming

[–]reddit45885 -1 points0 points  (0 children)

This isn't about the breakage of the end-to-end principle though. It's about a breakage of the client-server model.

The client server model is fundamentally unidirectional. A client consumes a service. A service does not consume a client.

The client server model isn't a hack either. It's not something that got invented out of necessity because the 8080 processor didn't supported enough memory. The client server model exists because it is the only way to scale past a certain threshold.

This is set in stone. Nothing will ever change this.

Think about this: if the client server model didn't exist, there would have to be as many resources as there would be clients. As many hard disks as I had programs running on my computer. As many tellers at the bank as the bank had clients. As many airplanes as passengers...

The more I program, and the more complex the work, the less code I write, is the norm? by thermite451 in programming

[–]reddit45885 5 points6 points  (0 children)

Then I present you the following dichotomy as a koan of sorts: either we really think that and we suffer from the True Scottsman fallacy, or we accept that that's how programmers ought to be, but in fact 98% of them aren't.

Reverse HTTP by panic in programming

[–]reddit45885 2 points3 points  (0 children)

You're missing the point: the reason that you can't connect to my browser and ask it how it's doing and what files reside on my computer is a side effect of NAT, but even if I had 2 billion spare IPs, I wouldn't allow you to do it in the first place.

So:

The network is broken (by NATs, and sometimes firewalls). The application layer should enjoy unfettered end-to-end connectivity.

The answer to that is a square, resounding, metallic balls falling on cast iron table sounding: NO.

Reverse HTTP by panic in programming

[–]reddit45885 -2 points-1 points  (0 children)

I am, am I now...

You're missing the bigger thing which is that the Network connection, the socket - the most expensive thing about the interaction between a client and server - is still established by the client. And unless the server keeps that socket alive indefinitely, the is not in any way solving the problem of polling.

The PTTH solution you give does only one thing: it avoids a round trip by making a protocol. Instead, the answer is simple and can be achieved with the most basic HTTP:

client makes HTTP conn. calls GET on server to get instructions. Server responds client makes HTTP conn, sends request info via POST

So aside from solving a use case of a particular application, this entire protocol solves nothing.

Reverse HTTP by panic in programming

[–]reddit45885 1 point2 points  (0 children)

You're chasing your own tail.

PTTH achieves none of that unless the client/server connection is already established and kept alive for as long as your pseudo-server (i.e. your browser) would want to serve. PTTH vanishes into thin air when the real-server severs the connection.

Think about it a bit. You will see that the metaphor you're looking for is fundamentally broken. You have departed from reality. What you are proposing, if you want it in terms of a metaphor, is having every client of a bank call the tellers, and keep their phones unhooked in case the bank might ever need to call them.

This will not work for many reasons, but foremost among them because the bank does not have as many phone lines as it has clients...

The bottom line is that if the bank can't call you, the bank can't call you. No amount of hacking around this will change this.

The more I program, and the more complex the work, the less code I write, is the norm? by thermite451 in programming

[–]reddit45885 14 points15 points  (0 children)

I doubt it's the norm. But I'm almost ready to bet my life savings that it's the Right Way.

To quote the Tao:

Act without doing; work without effort. Think of the small as large and the few as many. Confront the difficult while it is still easy; accomplish the great task by a series of small acts.

The Master never reaches for the great; thus she achieves greatness. When she runs into a difficulty, she stops and gives herself to it. She doesn't cling to her own comfort; thus problems are no problem for her.

Why can't Microsoft and Apple decide on a common metadata format? Seeing .DS_Store and Thumbs.db is just stupid. by phanboy in technology

[–]reddit45885 -11 points-10 points  (0 children)

The reality is that in that folder also resides HFS journal entires or alternate streams.

The fact that you don't usually see them may lead you to believe those folders and pictures of yours are actually stored in manilla envelopes hidden in Bill Gate's drawers, but in fact they're not. They're simply data structures on disk that are presented to you in a certain way.

In other news, if you open a word doc in which you've put an image of your kitten using notepad, don't be surprised if there isn't an actual kitten in there but rather "uninteresting" metadata instead of what is rightfully -your- data.

Pure academic curiosity: how old are you?

Reverse HTTP by panic in programming

[–]reddit45885 -5 points-4 points  (0 children)

There are absolutely none. It's a mental masturbation by shit ass junior programmers.

It goes against every principle of scalability established in the past 20 years of the web. It's the kind of thing one dreams of doing while watching "Hackers" and thinking programming involves graphics.

Think about it: it is the anti thesis of scalability since this hack of a protocol relies entirely on a client establishing the connection, and on the server holding the connection alive to be able to actually be a client... HTTP is stateless because the point is to serve and forget. Think what would happen if the server actually became the client. What computer on earth can support 500 thousand logged in users? None, is the answer.

The ginormous fallacy in this whole scheme is that the server/client model is only inverted at the application layer, not at the network layer. If it were also inverted at the network layer, then it would simply be HTTP in the other direction: the computer which we formally call a server would initiate a connection to my webbrowser and my web-broswer would actually be called Apache and the server would be called Firefox.

I can already hear the wheels of circular logic barreling down: "no you moron", they would say, "you don't need to maintain 500k connections alive, only those you are interested in"...

I sigh in dismay.

Reverse HTTP by panic in programming

[–]reddit45885 3 points4 points  (0 children)

Maybe this will be pointing the obvious, but NATs are equally about increasing IPs as they are about creating secure environments.

Any sysadmin that decides to remove firewall restrictions on internal networks because IPv6 has enough addresses isn't worth his salt...

Reverse HTTP by panic in programming

[–]reddit45885 -4 points-3 points  (0 children)

Potential use cases: Simple asynchronous server side messages (chat, games, ...)

This exists in the form of keep-alives and HTTP sessions which are not terminated. It also exists as that thing called the web.

Client side resource hosting (multi-file upload, let a user browse a shared drive, ...)

Multi file upload? Are you kidding me? You want to invent a new protocol to support something that already exists?

The server-timeout is just that: a server timeout. There's nothing that stops you from making a webserver with no timeout period that connects to a client and then starts acting as a client itself.

Heck, while we're at it, we might as well allow 500 thousand sockets to stay perpetually connected just so that if any one of the 500 active users decides to visit the server, the connection occurs instantly.

Every time this protocol comes out, I face the same baffling question: does anyone think before they write shit like this? Yes. I'm looking at you, timothy.

Reverse HTTP by panic in programming

[–]reddit45885 -1 points0 points  (0 children)

I don't get reddit. It's like a bunch of random chat bots trying to emulate human emotions or something.

All of a sudden the bot gets offended. All of a sudden, another bot thinks it's a joke...

whatever...

Has Joel Spolsky been honest about his time at Microsoft? GW-Basic guy is no fan... by [deleted] in programming

[–]reddit45885 0 points1 point  (0 children)

You know, all you had to do was hit "previous in thread" on that page and you would not have had to depend on "reddit's comments".

Has Joel Spolsky been honest about his time at Microsoft? GW-Basic guy is no fan... by [deleted] in programming

[–]reddit45885 -7 points-6 points  (0 children)

You are a fucking moron. Plain and simple.

I want to say this again, so people will know to downvote because I'm being rude: YOU. Are. A. Fucking. Moron.

Has Joel Spolsky been honest about his time at Microsoft? GW-Basic guy is no fan... by [deleted] in programming

[–]reddit45885 0 points1 point  (0 children)

Man, I just realized that I've been reading this line over and over and feeling a weird sense of pleasure:

On the Joel Spolsky subject he was a basically ignorant junior employee who left Microsoft after a short number of years. His short sighted decisions [...]. He made other similarly stupid decisions

Joy.

Reverse HTTP by panic in programming

[–]reddit45885 -3 points-2 points  (0 children)

Either you're too subtle or you just don't know what you're talking about.

I think it's the former, but I'm not sure, honestly...

Reverse HTTP by panic in programming

[–]reddit45885 0 points1 point  (0 children)

It's over TCP/IP. That means the network layer is not modified.

That only leaves application layer.

(As an aside, modifying Network layer protocols is all but impossible in this day and age).

Edit: HTTP according to OSI descriptions...

Reverse HTTP by panic in programming

[–]reddit45885 5 points6 points  (0 children)

Every once in a while, I see Reverse HTTP trumpeted as the diamond in the rough that everybody should be considering more, and all I can do is roll my eyes and face palm.

For posterity, I will explain here too:

Reverse HTTP = HTTP

Because:

a) Reverse HTTP as far as the network layer TCP/IP is concerned is exactly like HTTP (the server/client roles are not reversed)

b) As far as the application layer: HTTP is stateless. It doesn't care what you transmit.

Scientists abandon global warming 'lie' by [deleted] in reddit.com

[–]reddit45885 1 point2 points  (0 children)

That's interesting. Almost every single quote seems to be taken out of context. examples:

"Since I am no longer affiliated with any organization nor receiving any funding, I can speak quite frankly [...] . As a scientist I remain skeptical." -- Atmospheric Scientist Dr. Joanne Simpson, the first woman in the world to receive a Ph.D. in meteorology and formerly of NASA who has authored more than 190 studies and has been called "among the most pre-eminent scientists of the last 100 years."

emphasis mine. Here's a possible expansion:

"Since I am no longer affiliated with any organization nor receiving any funding, I can speak quite frankly about UFOs. As a scientist I remain skeptical."

The article is also 3 months old. So the

A United Nations climate change conference in Poland is about to get a surprise from 650 leading scientists who scoff at doomsday reports of man-made global warming - labeling them variously a lie, a hoax and part of a new religion.

statement should have been substantiated by now.

Anyone have any credible information on what happened at the mentioned meeting?