Why does Facebook not use the Java architecture? What are the advantages and disadvantages of using the Java and PHP architectures? -Php Tutorial

Source: Internet
Author: User
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply content: because PHP is a scripting language, and Java is a compilation language.
Scale (especially horizontal scaling) is the core issue of large-scale Internet systems. scale is not a language solution. So we will focus on the architecture of these systems. Facebook is mainly a content-based system and a messaging system. The main problems it faces are data access and message transmission, which are irrelevant to the front-end (in a broad sense.
Because the core issue is not directly related to the "front-end (broadly)", it is an independent issue. So the logic is:
  1. The language used by Founder. the relational network of Founder uses many languages. These two factors are the first.
  2. The script language has a faster cycle in testing and deployment, and the ecological chain is simpler.
  3. Although Java JDK is a rocket technology, its authorization is always a problem, which greatly affects the choice of the entire technical license.
These factors do not take Java for granted. using other scripting languages is a possibility that occurs. Language problems are not important to companies like facebook, but the standards they consider must be different from what we usually do when we do a project. Facebook has a large number of excellent engineers who can transform php at the language level. Moreover, php is said to be a glue language for facebook.
The advantage of j2ee is that it allows a large number of low-level engineers to work together to develop a usable system. It is difficult to comment on projects that have not been actually developed in other languages.
The general feeling is that the level of facebook leads to any language they can use to achieve development goals. for general companies, it is still a good choice to use j2ee or. net for enterprise-level development. If you want to be agile, use php or python. When the project started, the author was good at php and asked which project was not the cause. other explanations were self-satisfied. 1. facebook used php.
2. facebook has developed HipHop, which greatly improves the performance.
3. the distributed architecture of the database is good. The user login verification table contains only two fields, and all the other fields are split.
4. Other tasks should be completed using C/C ++.

PHP itself is a language used for Internet development. it is very suitable for Web development and has a wide range of class libraries, high development efficiency, and high execution efficiency.
Java was originally designed for embedded devices, and Web development was a little cumbersome. In fact, most Internet companies use PHP. In the past two years, Android has developed many developers for java development.

In comparison, java has better maintainability than PHP, and java code is more readable than PHP. it is a bit dizzy to see a bunch of $ symbols. Some java and c ++ FB are definitely not php's on the front-end backend. PHP is a skin at most.

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.