Original link: https://www.skywind.me/blog/archives/2719
Recently, I saw a lot of people arguing on the timeline. People who work on the Internet feel that the development of the game server is very slow, and Internet technology is changing with each passing day. It seems that Internet technology is ten years ahead of the game back-end technology. This conclusion is obviously arbitrary. The Internet Even today, even if any Internet server is taken out, its complexity is far less than that of a game server, even various Internet infrastructure projects developed by C/C++.
At the same time, I didn’t realize that the complexity and real-time nature of the interaction between game players is unmatched by most Internet projects. The story is divided into two parts. I saw that some students who work on the back end of the game think that the Internet is simpler, and e-commerce and the like are more CRUD additions, deletions, modifications, and queries, which are more than ten years behind the game server.
I don’t think it’s necessary for the students on the game server side to have the same knowledge as the people on the Internet. No matter what they say, the game server side is ten years more advanced than the Internet. This is another extreme, and some situations need to be taken seriously:
1) The game server is complex enough, but the development is too slow, and the ancestral code has been patched and run for more than ten years, not too many. It is a good thing to be able to use it, but without the introduction of new concepts, the usability and development efficiency have not been improved much.
2) Each works behind closed doors, without forming industry standards and joint efforts. The code of this project is difficult to share in another project, and there is a lack of support and collaboration between them.
3) Randomly picking out a service from the Internet backend (including various C/C++ infrastructure) is likely to be less complicated than the game server, but in the past ten years, it has changed with each passing day, forming a strong mutual combination and mutual reinforcement.
What I mentioned above are Internet infrastructure projects, not Internet CRUD. The development of these infrastructures in the past ten years has brought the overall usability, performance, and development efficiency of the Internet to many levels, which should not be ignored blindly.
If you feel that the game server is ten years ahead of the Internet, you can turn right directly. If you are open-minded, I can talk more (click more below to read more):
For example, the infrastructure in the audio and video field is not simpler than the game server:
1) One channel of high-definition video 720-1080p, almost 2MB/s of data per second, and 100w online at the same time, the entire network has at least 2T/s of data running per second, not only regardless of server, but also players It is spread all over the world, and there is no lag, no drop, and no delay. This data volume is several orders of magnitude larger than the game news, right? While properly arranging the 2T/s data, it is also necessary to ensure that the delay does not exceed 500ms, otherwise the game cannot be played.
2) The number of people in a room is as few as 2-4 people, and as many as thousands of people, covering 4-5 countries. When you open a screen, you can watch the videos of 50 people at the same time. Although it is a small window, you can hold it Any small window can be quickly enlarged to full screen, and the jitter caused by the obvious sharpness gradient switching can not be seen. How to achieve it?
3) Hundreds of computer rooms around the world work together to form a large network. When there is a problem in this computer room, and the line is blocked in a while, it can be switched dynamically and freely, so that users can hardly feel it, and it is not easy. Bar?
4) There is no need to stop the update and stop the service. Even if the server behind a room of 1,000 people is updated, you may not feel it. The video room is also considered to be stateful. This smooth switching is not easy, right?
5) In the case of a weak network, driving a car to follow the video, switching base stations continuously, in the case of 60% packet loss, although there will be some lag, but if you want to ensure that the basics are available, it still has a bit of technical content.
6) The server runs a video encoder. Even if there is a ready-made open source one, it needs to be redeveloped with great efforts. The accumulation of encoders, if you don’t do it for four or five years, you won’t be able to get it, right? The knowledge in this area is changing with each passing day, and there are new standards every year, updated much faster than the game.
7) Back-end image enhancement, allowing users with insufficient bandwidth to send relatively poor videos and enhance them into clearer videos. This AI enhancement technology is several steps more complicated than DLSS 1/2.
8) Even if it is not real-time communication, on-demand, it looks simple, but there are many challenges. For example, when you watch short videos on the client side, you keep sliding your finger up, swipe ten times in a row, no card, seconds out, silky switching, How big is the amount of data alone? How should the client manage resources? How many optimizations should the server do from access service, scheduling service, to CDN and transmission protocol?
9) How to achieve high availability and cost optimization with such a large real-time resource throughput?
Let me talk about two interesting technologies:
The emerging LCEVC encoding technology ( Low Complexity Enhancement Video Codec ) allows the use of a relatively poor encoder, such as x264, to reduce the video resolution by several times, such as reducing the video resolution of 1080p to 240p, and then send it to a relatively poor encoder To encode, the remaining residual is sent to LCEVC for encoding:
In the final decoding, first use 264 to decode a 240p video, enlarge it to 1080p, and then fill in the residual part of LCEVC encoding, and you will get better video quality than the same bit rate encoded by 265 encoder.
It’s quite interesting, especially for various high-definition videos. Another advantage is that it is resistant to packet loss. If the bandwidth is insufficient, if you lose half of the bandwidth, you can still solve a video with average definition, which is naturally suitable for long-distance transmission. High quality video. Good is good, but this LCEVC has a patent, can you achieve something similar? What about using AV1/2 to create something clearer and more suitable for transmission?
As another example, IM technology
Hundreds of millions of users are online at the same time, such as tg:
1) Super-large distributed object model, global access, multi-site computer room level disaster recovery, no problem for one or two computer rooms offline at any time,
2) The update is not stopped.
3) If you don’t log in for a few thousand new messages overnight, suddenly logging in is not like some domestic IMs, which are stuck in the interface, stuck in the network, and historical messages can be flipped casually (not like some domestic IMs, which only save the last few days), and you are interested You can read all the way to a few years ago without getting stuck in the middle.
4) Log in with multiple devices at will, without losing messages or history, and it won’t be said that yesterday’s messages were collected by the ipad, but the mobile phone will not see them.
5) In a room with 100,000 people, how should each person speak a sentence? How should a server broadcast be done?
6) Push a message to all online users in China, how should this broadcast be done?
7) Like tg, upload 1-2GB files at any time and anywhere (unlike some domestic IMs that limit 70-100MB), for download by friends all over the world, and keep them permanently (tg has been saved for at least 7/8 years so far, and has not been deleted. How to arrange and build the storage infrastructure behind it?
8) Press and hold the speech film continuously for 30 seconds, how can someone else play multiple continuous voice films synchronously without pause?
There are many more:
Sina Weibo: Although being a service is very simple and stateless, to be able to use it smoothly, the overall structure is not simple, right?
Online documents: Collaborative office, the boss said in the video, each team please register your xxx, and then 200 people in the company edit the same excel together, you set a function, I will do a replacement, keep in sync, not inferior to game sync ?
. . . .
It seems that there are enough examples, so let’s talk about it first. . .
–
Conclusion: It can be compared with Internet infrastructure, each has its own difficulties, and each has its own places worth learning.
But don’t compare it with Internet CRUD every day, it’s meaningless.
The post Is internet technology a decade ahead of game backend technology? appeared first on Skywind Inside .
This article is transferred from: https://www.skywind.me/blog/archives/2719
This site is only for collection, and the copyright belongs to the original author.