Does PHP have objects and kinds of caches? (expect to come in with PHP)

Source: Internet
Author: User
Tags apc
Does PHP have objects, class caches? (expect to come in with PHP)
After 9 years of PHP, to the new company, and began to do Webgame, the former company is also here, he is doing Java, he gave me today to preach the next Java, let me think of PHP for doing webgame this thing feel powerless place:
1 socket, although someone opened the libevent, but he is still single-threaded, processing a chat should be able to do, but to do game service, no!
2 thread, no thread function, only process, also makes PHP no way to do game service
3 Object Cache, if the first two can be ignored, if so, it will be very inspiring! Existing cache I know the two kinds of apc,eaccelerator,xcache this kind of cache opcode (can also cache data, not very suitable), and the second is Memcache, Redis. They can only cache "strings" (memcache cache objects, which are automatically deserialized)!

for the playback system, there can be no "object cache", because the establishment of an object can be used to a "stop" period, but for the turn system, each request needs to read the state of the last time, it is very frustrating, so I do not know if there is no such thing, search, out of the memcache, Static, reverse proxy and the like.

There is no such thing, or a good solution!
Above three mishap, is there a good plan?




------Solution--------------------
I would also like to have a module that can cache the definitions of classes and functions, unfortunately not. And there is no future, and APC has not been added to the core yet. Even with APC, the definition of a class is still loaded and destroyed every time, and a lot of resources are wasted by such repetitive work.
But then again, I have never actually made any contribution, and what qualifications to accuse others.
------Solution--------------------
Only hope for the future of PHP.
I used PHP to develop a multiplayer test system, because of the special requirements of customers, so the efficiency is very poor, if you can have a good buffer system is good.
Looking forward to ...
------Solution--------------------
Does APC seem to be being maintained by Laruence now? Perhaps some feedback could be given to him.

discuss

I would also like to have a module that can cache the definitions of classes and functions, unfortunately not. And there is no future, and APC has not been added to the core yet. Even with APC, the definition of a class is still loaded and destroyed every time, and a lot of resources are wasted by such repetitive work.
But then again, I have never actually made any contribution, and what qualifications to accuse others.

------Solution--------------------
ASP relies on IIS
. NET relies on the. NET Framework
JSP relies on Tomcat
So it's more or less a constant object.

PHP does not have a dedicated host, so the efficient continuation of the object is only water in the month

------Solution--------------------
Engage in HTML5 game development is still possible, thread/cache is flawed
  • 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.