Java high concurrency solution

< P style = "margin top: 0px; margin bottom: 0.75em; padding top: 0px; padding bottom: 0px; font size: 16px; line height: 27.2px; text indent: 1em; color: rgb (51,51,51); font family: 'Helvetica Neue', Helvetica, Tahoma, Arial, stxihei, 'Microsoft YaHei', Microsoft YaHei, sans serif; background color: rgb (254)" > many users visit in high concurrency, As a result, the system data is incorrect and data is lost, so we think of using queues. In fact, queue resolution can also be handled. For example, when we auction goods, forward comments, microblogs or spike goods, the number of visits is particularly large at the same time. Queues play a special role in this. Put all requests into the queue in milliseconds, Orderly, so that there will be no data loss and incorrect system data.

3. Code optimization

The performance requirements are very simple. With the continuous enrichment of Internet business, website related technologies have been subdivided into very detailed aspects after these years of development. Especially for large websites, the technologies used cover a very wide range, and have high requirements in various fields from hardware to software, programming language, database, webserver, firewall and so on, It is not comparable to the original simple HTML static website.

, Sybase, etc. have good solutions, and the commonly used master / slave is similar. You can refer to the corresponding solutions to implement what kind of DB you use.

The memory cache provided on is a common cache interface and can be used in web development. For example, when developing in Java, you can call memorycache to cache and share some data. Some large communities use this architecture. In addition, when developing with web language, various languages basically have their own cache modules and methods. With pear's cache module, there are more Java I'm not very familiar with it. I believe there must be. Www. 68mn.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>