java - TimeLine推拉模式请教
ringa_lee
ringa_lee 2017-04-18 10:54:08
0
2
575

redis如何实现推拉模式结合,如果根据用户是否在线判断推送和拉取,用户登陆后后台应该如何区分是从数据库中拉取还是读取redis中推送的timeline呢,这个是如何实现的呢

ringa_lee
ringa_lee

ringa_lee

reply all(2)
PHPzhong

First of all, if the number of users online exceeds a certain level, it is difficult for you to push. At this time, you can pull it. Pull it when the user logs in. It is impossible for users to log in at the same time. There is no extreme concurrency situation in pulling at this time. The pull should be in the cache. Pushing can be done when a certain base of users are online at the same time, such as three thousand. If you push once, the amount of long links maintained by a single machine is not large. If there are too many, tens or even hundreds of millions of users will not be able to push. You can choose to temporarily pull appropriately.

Ty80

It is recommended to read this:

  1. https://www.keakon.net/2015/1...

  2. http://blog.lovemydeer.com/20...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template