op-Force pretty PHP End-blast Java

Source: Internet
Author: User
Tags fpm throw exception

op-Force pretty PHP End-blast Java

op-Force pretty PHP to explode Java, while PHP is the world's best language no one!!!

    1. Get up in the middle of the night. Restart Tomcat what's there?

    2. Is there a morning upgrade? Do you have a weekend private time upgrade?

    3. Null pointer throws an abnormal crash there is no?

    4. There was an exception, and there was no solution.

    5. Can only be restarted to keep the system afloat?

    6. Throw exception system crashes, business pauses, is the boss hanging a meal there? OPS blame?

    7. The program problem boss will let the development process, but will buckle you an operation response is not timely.

    8. OPS to send someone to develop the download log files every day?

    9. Tomcat does not dare to use Vhost (virtual machine) There is no, using virtual machine a system crash all dead?

    10. You cannot use a virtual machine to run only multiple instances. Multiple instances to open a bunch of ports is there?

    11. is the JSP page implanted with malicious code?

    12. Database link pool Is there a problem?

    13. Server monitoring a night all over the police.

    14. Configuration files are you dead?

Operational PHP projects are much easier to do than Java from an operational perspective. and Java Web site is going to be very bothered, you have to do the 7x24 hour standby, mobile phone often open, ready to restart at any time for the development of a log, a lot of development can not solve the problem, pushed to operations. Ben Wang currently has not seen a stable and robust Java program for you. What is a stable and robust program, can do 0 errors, abnormal throw, can be stable for a long time to run, do not have an accident in the middle of the night.

Web operation and Maintenance

PHP Web Solutions Mainstream There are two, one is the Apache + mod_php partner, and the other paramilitary is FastCGI department php-fpm usually with the Nginx partner.

Mod_php and PHP-FPM no matter which scheme, robustness, stability is far more than Tomcat + Servlet.

In theory, Servlets should be better at speed than mod_php and PHP-FPM. But the reality is not very prominent, because the system bottleneck is not the application server, but the database.

Two Web solutions are able to address application server stress issues through load balancing and scale-out.

The mod_php and PHP-FPM principle is a request to release the OS resources when the operation is complete. No matter how bad the program can run, a function module has problems, others can still be used normally.

The Servlet is loaded into memory after it is started, and the program is not written well enough to crash easily. A collapse is a big event, even the home page can not go, this will point to operations.

Local application operations

What is a native application, which is plainly the application running at the command line. These applications are usually run at timed intervals and daemons run.

Most Java developers use Eclipse or NetBeans's integrated IDE development on Windows, and then hand it over to operations after compiling it in the IDE, usually giving the program a problem.

All say that Java is a cross-platform, in fact, there is still a big difference between different platforms. Java is essentially a boast VM, but not cross-platform. If there is no jvm,java on a platform, it cannot cross the past.

Since most Java developers use IDE development and do not involve command-line processing, just click the two button run and build in the IDE's integrated development environment, and once you leave the IDE, it's unclear what to do with Linux. I think Ant,ivy,maven should be mastered, and many Java developers haven't heard of Ant yet.

PHP developers are more familiar with Linux commands than Java developers and are useless to worry about. Java, at least with the company.

Java does not have access to the underlying, the Jre is running on the OS, the daemon needs to write a shell, implementation start, extract pid,pid write files, log logs, into the background to run, stop exiting and so on, this script Java developers often do not.

PHP can call Pcntl to write the perfect daemon.

The local application is bound to involve multi-threading, PHP Junior Programmer Training can write good quality multithreaded programs, and Java Intermediate software engineers may not write the same quality programs. PHP pcntl + pthreads + libevent is lower than Java Thread + NIO threshold, low learning cost, easy to get started, and easier to develop efficient and stable applications.

Configuration complexity

Java does not dare to run in Vhost mode, but instead uses multiple instances to reduce the area affected by the crash and the impact of downtime during the upgrade. Multi-instance problems come, this may high cohesion program, multi-instance after the project has generated a communication cost, each project after deployment carries a large number of configuration files, configuration is very cumbersome, there are problems need to be examined.

That's why it's time-consuming to troubleshoot Java projects once they're in trouble.

Security

Many people think that Java is compiled to run, it is safe, it is a big mistake, the actual situation of Java Web site attack the number of opportunities and vulnerabilities is no less than the PHP site.

Was injected there? , have they been taken off the library?

Hackers are now less disruptive, and more often than not, they control chickens and get valuable data. Finding a business vulnerability from the periphery is more straightforward and effective.

In addition, whether Java or PHP, many developers have refused to upgrade, because each upgrade will pull out a lot of old bug, who do not want to solve, take responsibility.

Many versions of the manufacturers are not providing technical support and subsequent upgrade updates, once the version of the vulnerability, the consequences are very serious, we all know.

God horse PHP 5.2.17, JDK 1.5, Tomcat 5 are pits, out of the problem of operation and maintenance blame.

Summarize

Java operations should keep an eye on the log, Java project crashes are not accidental, is a variety of throw exception accumulation results. For Java projects, restart is omnipotent, through script monitoring to find the exception to restart, do not try to find the root cause of the problem, because the log you can never understand, to ensure that the business is the most important, then lost a log to the developer, and told the boss.

From the operational perspective, the use of what language is not important, safe, stable, robust this is the kingly. The language of the various deficiencies can be from the architecture, deployment, design to make up.

No language is omnipotent, and each language is designed to be designed for a particular domain or a tendency to solve a particular field.

Many of the questions mentioned above are not all language issues, possibly container problems, or virtual machine problems. For OPS doesn't care about these details, many people don't know what the language is, what the compiler is, what the virtual machine is, and we just look at the results.


Please pay attention to the following QR code is my public number.

op-Force pretty PHP End-blast Java

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.