With the advent of the social internet boom, the real-time web is getting more and more attention. On the one hand, the message real-time notification greatly improves the friendliness of the system from the point of view of the business scene. On the other hand, from the performance point of view, the new data is automatically pushed by the service side, rather than the user automatically refresh the page to obtain, greatly reducing the server pressure.
Foreign media recently published an article that the real-time web is not just a fashion, but a technical trend. In the future, real-time technology will become a default technology and will be more and more civilian, not only Google, Facebook and Twitter such large players can afford to play.
The following is a summary of the article content:
Real-time web is not just a fashion, but a technology transfer-instant access to the Web.
Real-time technology makes Web applications faster and, in some cases, almost indistinguishable from desktop applications.
Delisle "Failed edition" MMO "Asteroid" (Tencent Science and Technology map)
The original source of inspiration for real-time technology was simple--the development of the online version of the Classic arcade game asteroid (asteroids), different from multiplayer online games (MMO).
Thanks to the powerful network backend support, the online version of asteroids needs to support hundreds of of people playing simultaneously. More importantly, to achieve real-time effects, every game player can see every shot, every action, without delay.
This is unfortunate for the hacker News community, as they initially discovered that it was simply not achievable, just an April Fool's joke.
Understandably, this makes many gamers feel disappointed, but the idea sounds practical. With the development of technology, it seems that the goal is not far away. For example, the presence of node, the JavaScript toolkit used to write High-performance Web servers, allows a small number of servers to handle the instructions of large numbers of users at the same time. There are also websocket protocols that make it possible for persistent connections between users.
But JavaScript developer Bo Lee-Delisle (Seb Lee-delisle) still thinks it is not, and he believes that once the MMO version of the asteroid is actually launched, its resilience and stability are not guaranteed because the game often exchanges data, adjusts settings, checks for conflicts, and so on. Delisle said: "To tell you a bad news, if you really launch an MMO version of the asteroid, then the game will be very boring." ”
The MMO version of the asteroid became a reality
Another developer, Vikramniza (Vikrum Nijjar), wanted to make it a challenge and considered feasible. Fortunately, Nizatidine, in collaboration with other developers, has developed software firebase that makes it real. This time, Nizatidine's MMO version of the asteroid became a reality, and it also boarded the Hacker News home page.
Although slightly flawed, it ensures that all actions are displayed in real time, minimizing delays.
"Real Time" is a popular buzzword in the technology community, and is used by developers, businesses, and public relations representatives to describe an experience or instant online interaction. For example, Twitter has been praised as a real-time source of information, and Facebook has also used friends ' updates and images to update users ' home pages, and a technology blog site has pledged to update content in real time.
However, in the so-called real-time services mentioned above, there are delays, short seconds, long minutes. It's just that we don't care, or we don't have to worry about it, because the content we finally get is still valuable and satisfying. Nevertheless, the de facto delay is undeniable. These delays can be tolerated when chatting or commenting. But as the data becomes more complex, in some cases, such as large multiplayer online games at the same time, latency is unacceptable.
Many of today's Internet applications run in a way that the client sends a data request to the server and then extracts the data from the database. If there is any change in the data, the application itself needs to be verified again with the server, lest the user manually refresh the page. This process of repeatedly connecting to a server is called "polling" (polling).
But in a real-time environment there is no polling at all, but subscriptions (subscriptions). Data from a client subscription database, and the client will be updated whenever the data changes. This change does not require polling because they are unsolicited, as some notifications are pushed to smartphones.
A shift in 15
Creating a Web framework for rich media real-time applications Meteor Matedepo Debergalis, a joint developer, said: "We are currently in this transition period, which happens every 15, and all code is rewritten." ”
From the 1970s to the early 80, Debord explained, the software was primarily run on large hosts and servers, and users were connected using a device that was not smart. By the 80 's, the client-server model appeared, followed by the advent of the Internet.
Debord said: "About 15 years later, the Web again requires us to rewrite all software. Because we're going to move from desktop application to new mode, this time the software runs on the server again. "But the difference is that this time the terminal is a Web browser.
Today, the gorgeous user interface of desktop software is disappearing, replacing some simple Web features. This change can be seen from Gmail and Rdio, and the access terminal is a Web browser.
Rdio Application (Tencent Science and Technology matching map)
This is real time connectivity, and applications are almost indistinguishable from desktop applications in appearance and performance, and we expect future interactions to be no different. Rdio is an excellent web application that runs in a browser and is almost indistinguishable from running on the desktop.
Of course, real-time technology is nothing new, low latency software and hardware, and almost simultaneous access to information has been around for years. But Vierlegette, a developer, said: "No one is used outside of the financial world." Leggetter ”
Only in recent years, Leggett said, real-time technology has come into the mass market in small areas. Twitter is a turning point that allows information to be discovered in real time. But Leggett said: "The next target is real-time delivery." ”
Economically affordable node
Talking about real-time technology with any developer will inevitably talk about node. Node is a JavaScript toolkit for writing high-performance Web servers, and many real-time applications today use node.
Of course, node is not the only way to implement it. The real-time search results of the Twitter server use the front-end system blender, which relies on the Java Network Framework Netty. Facebook uses Apache Web servers and self-developed hiphop.
The difference is that Facebook, Twitter and Google not only send and receive information, they also need a lot of computing power to annotate, analyze, and return data. The needs of some small developers are simple, and using node is more practical.
Real-time applications usually do not require a lot of computing power because these requirements can be addressed to professional services such as Amazon's EC2. Instead, they need the ability to move, route, and connect large amounts of data at the fastest speed.
That's why speed is crucial. In Debord's Web browser terminal World, there are only two factors limiting the user experience, the speed of data transfer and the number of simultaneous servers. And node can solve these two problems to a large extent.
This may not be a problem for Facebook, as they are satisfied with custom PHP and Apache services and have enough money to upgrade. But for small developers or development teams, it is no doubt crucial to develop a more compelling, real-time experience with the least amount of resources.
Firebase Four developers (Tencent technology map)
Bright future
After years of real-time technology research, developers Leggett optimistic. ' We've seen some products and services that don't have real time as a selling point but really rely on real-time technology, which is a good thing, ' he said.
"That means we're starting to see real-world applications of real-world technology, not just theory," Leggett said. This technology is very cool, let us work together to fully explore its use value. ”
Delisle is also optimistic that the MMO version of the asteroid is just the beginning. "Real-time technology is going to be a default technology that not only Google, Facebook and Twitter can afford," he said. ”