Does php have objects and cache? (Coming soon for php)

Source: Internet
Author: User
Tags apc
Does php have objects and class caches? (Coming in with expectation for php) after nine years of php, I started webgame in a new company. I used to work in java at the same time, he introduced java to me today, reminding me of php's inability to do something like webgame: 1 socket. does php have objects and class caches? (Coming soon for php)
After nine years of practice in php, I started webgame again when I got to a new company. I used to work in java at the same time. he gave me a lecture on java today, it reminds me of the inability of php to do something like webgame:
1 socket. although someone has developed libevent, it is still a single thread. it should be able to handle a chat, but it is not necessary to play the game service!
2 thread, no thread function, only process, so that php cannot play game services
3 object cache. if the first two items can be ignored, this option will also be very encouraging! I know two types of existing cache: apc, eaccelerator, and xcache Cache opcode (which can also cache data, which is not very suitable); and memcache and redis. They can only cache "strings" (memcache Cache objects, but also automatic deserialization )!

For the playback system, there can be no "object cache", because an object can be used for a period of "termination" after it is created. However, for the conversion system, each request needs to read the last status, this is very frustrating, so I don't know if there is such a thing. after searching, all of them are memcache, static, reverse proxy, and so on.

There are no similar things or good solutions!
Are there any good solutions for the above three hard injuries?




------ Solution --------------------
I also hope to have a module that can cache the definition of classes and functions, but unfortunately it does not. In the future, APC has not yet been added to the core. Even with APC, classes are still loaded and destroyed every time, and a large amount of resources are wasted by such repetitive work.
However, I have never actually made any contribution, and I have any qualifications to accuse others.
------ Solution --------------------
It can only be hoped for the future of PHP.
I used php to develop an examination system for multiple users at the same time. because of the special requirements of the customer, the efficiency is very poor, it would be nice to have a good memory mechanism.
Coming soon...
------ Solution --------------------
Is apc maintained by Laruence? Maybe you can give some feedback to him.

Discussion

I also hope to have a module that can cache the definition of classes and functions, but unfortunately it does not. In the future, APC has not yet been added to the core. Even with APC, classes are still loaded and destroyed every time, and a large amount of resources are wasted by such repetitive work.
However, I have never actually made any contribution, and I have any qualifications to accuse others.

------ Solution --------------------
Asp depends on iis
. Net relies on. net framework
Jsp relies on tomcat
Therefore, more or less continuous objects are provided.

Php does not have an exclusive host, so the efficient continuous object can only be a month of water.

------ Solution --------------------
HTML5 game development is still possible, and the thread/cache is hard to crack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.