Considering the internet has substantially revolutionized our way of life (you're using it right now in fact) I was wondering whether it was ever envisaged in science fiction. I'm therefore inquiring as to what the first reference in a science fiction story is where there are computers of some description (not necessarily digital, but devices which serve the same functions as computers do for us today) connected with access to the data on each device or to a central server and can communicate via this over long (even global/planet-to-planet) distances. Basically, what is the first reference in sci-fi to a system like today's internet?
I've read The Machine Stops a few times, and I don't think it's quite similar enough to the internet. There, the humans live within a giant machine. But the internet is a network of machines. For something a little closer, I think, I'd go with Murray Leinster's "A Logic Named Joe." from March 1946. You can find it for free from the Baen Free Library.
In A Logic Named Joe, every house has a Logic (a computer with a screen) which accesses a network of information for the home user. The Logic is not a mere terminal, it communicates and interacts with the network. When something goes wrong with one particular Logic, the network becomes compromised, and other Logics are infected. People find themselves getting answers for questions that shouldn't be answered and accessing things they aren't supposed to. For example, people asking how to get away with murder, and kids accessing adult programming coughcough.
Thus in one story we have a computerized network, a network virus, network security, computers in the home, and internet porn. I can't think of a better example of the internet.
One of the earliest examples of something similar, and one often hailed as the earliest mention of many modern concepts, is E. M. Forster's The Machine Stops from 1909.
The story envisions a post-apocalyptic world where the surface has been made uninhabitable and people reside in tiny cells inside a huge underground complex overseen by The Machine. The machinery provides them with the means of communicating with other people - both letters and voice and video calls, and provides access to information and media.
Forster's story is remarkably prescient, and touches on themes that are popular also in modern reactions to the internet and social networks. Its main protagonists live on the opposite sides of the world but communicate instantly, with one character resenting the alienation resulting from no physical contact.
It being over a century old, the full text is available, freely and without copyright.
A note: in the Wikipedia entry, it is mentioned that:
In the preface to his Collected Short Stories (1947), Forster wrote that "The Machine Stops is a reaction to one of the earlier heavens of H. G. Wells."
This might indicate that an earlier H.G.Wells story might touch on similar issues and be an earlier example, but I don't know which story Forster was referring to.
I'm not sure if it's close enough to qualify, but Jules Verne's "Paris in the 20th Century" (1863) describes electrically-powered mechanical calculators which can send messages to each other.
Mark Twain's short story "From the 'London Times' of 1904" (1898) describes a worldwide network of "telelectroscopes" by which "the daily doings of the globe made visible to everybody, and audibly discussable too, by witnesses separated by any number of leagues."
Here is a a description of a character using it from the story:
Day by day, and night by night, he called up one corner of the globe after another, and looked upon its life, and studied its strange sights, and spoke with its people.
He seldom spoke, and I never interrupted him when he was absorbed in this amusement. I sat in his parlour and read and smoked, and the nights were very quiet and reposefully sociable, and I found them pleasant. Now and then I would hear him say, 'Give me Yedo[Tokyo]'; next, 'Give me Hong-Kong'; next, 'Give me Melbourne.' And I smoked on, and read in comfort, while he wandered about the remote under-world, where the sun was shining in the sky, and the people were at their daily work. Sometimes the talk that came from those far regions through the microphone attachment interested me, and I listened.
Ernst Jünger's Heliopolis (1949) describes something like smart phones with the Phonophor and something like Wikipedia appears in the (sort-of) sequel Eumeswil (1977).
An old short i read called "codemus". Everyone had a "little brother" who advised them when to get up, get dressed etc. All interconnected, voice controlled and with a webcam!. Waaaay back in the 50's
Brunner, John - "Shockwave Rider" 1975 - A really prescient view of many aspects of today's web. Even includes a foreview of a Google-like entity. Predates some web aspects that are only now in gestation.
Not the first example, but surely the most uncannily accurate prediction, is in Frederik Pohl's "The Age of the Pussyfoot" written in 1965. In it, everyone carries a "Remote access computer transponder called a Joymaker", which does everything the smart phone does for us today - but also dispensed drinks and aspirin!
A candidate answer that is clearly about computers which are interconnected is the 1970 movie "Colossus: The Forbin Project". In this movie, a powerful American defense computer connects with its Soviet counterpart. Between them, they attempt to take control over humanity.
While it doesn't depict anything like our modern internet, it depicts a scenario bearing some similarity to the beginnings of our internet - two computers connected together.
William Gibson - "Neuromancer" 1984 - Not the first, but perhaps one of the most detailed. Gibson's version of the internet predicted many things we're still trying to build, and did a pretty good job on the social impact as well.