Link: http://unbe.cn/erlang_php_socket_test_01/
Some time ago, I chatted with my brother in the group about memcached and APC and gradually talked about/dev/SHM. I said that he used/dev/SHM for caching. This discussion triggered my tests on the read/write performance of memcached, APC, and dev/SHM data.
During the test, I thought of the Erlang built-in ETS and the legendary concurrency performance. If I use Erlang
Recently, I took the time to read some Erlang things. They are very interesting, pure functional programming, and process/message programming models. Of course, what I care about most is the basic philosophy behind language design about building a robust system.
Functional programming is not new, and it is not new. It has been available in lisp for a long time. Erlang looks like a pure FP language, looks g
Erlang vs. cerl
As we all know, Erlang is not introduced here. Its advantages include:
The most concise and refined Distributed Model
Node, process, mail (Message)
The most elegant error handling model: fail fast)
If any exception occurs, immediately die.
Genserver programming framework
The program code style is consistent for easy communication
Lightweight Process
We c
Step 1:Check whether the number of processes is normal? Erlang: system_info (process_count ).
Step 2:Check the node memory consumption?> Erlang: memory ().[{Total, 2099813400 },{Processes, 1985444264 },{Processes_used, 1985276128 },{System, 114369136 },{Atom, 4479545 },{Atom_used, 4477777 },{Binary, 22756952 },{Code, 10486554 },{ETS, 47948808}]It is shown that most of the memory is consumed by the process,
* Make sure there are no compilation warnings
* In Erlang, string is implemented by list. In 32-bit systems, the space of one character is 8 bytes (four values are saved and four pointer values are saved ). Therefore, the string speed is slow and the space usage is large.
* On the server, you always try your best to write tail-recursive functions.
* When '+ +' is used, the left list will be copied and added to the right list header. Therefore, i
This is a creation in
Article, where the information may have evolved or changed.
Http://blog.sina.com.cn/s/blog_6e1bd8350102uwgl.html
Rainy weekend, suitable for the season of the code word ...
A year ago, when I began to learn the go language, unsanitary environment, both Python coding efficiency and 15 times times the performance improvement. Especially in the area of asynchronous programming, you can use channel synchronization threads, without locking can make full use of CPU multi-core com
Notes SeriesErlang Environment and sequential programmingErlang Concurrent ProgrammingErlang Distributed programmingYawsErlang/otpDate Change Description2014-12-21 A Outline, 1Agenda0 ScopeAround the OTP design principles, record behavioral patterns, supervisory tree concepts, applications, releases and deployments, and a product-level caching solution in [3].1 OTP Design PrinciplesErlang Doc: OTP Design principles User ' s guideThe OTP design principle illustrates how
And friends of the high concurrency, and once again involved in the Erlang,erlang from the family of Ericsson, has a very high stability of the virtual machine and Platform library, Facebook used it to implement the chat system, Amazon developed SimpleDB, The most amazing is the What ' sapp, the high concurrency of the processing mechanism is eye-catching, it is time to understand
1,DiscoIs a framework that implements map-Reduce and is developed using Erlang + python.Development language: Erlang PythonProject home: http://discoproject.org/Document address: http://discoproject.org/doc/: Http://discoproject.org/download.html
2,Stress testing toolsTo test servers including HTTP, WebDAV, PostgreSQL, MySQL, LDAP, and XMPP/jabber.Development language: ErlangProject home: http://tsung.erlan
Reprinted: http://www.cnblogs.com/me-sa/archive/2011/10/29/erlang0010.html
Erlang originated from the telecom industry. Joe Armstrong mentioned the design requirements of Erlang.Software maintenance should be performed without stopping the system. In practice, we also benefited a lot from this kind of continuous service hot update, and finally we don't need to wait until there is no one in the middle of the night to update again. So how do we do hot u
Erlang is a functional programming language with immutable state
The variable of Erlang is a one-time assignment variable (single-assignment variable)
In Erlang, the obtained value of a variable is the result of a successful pattern matching operation, = is a pattern matching operator
In Erlang, atoms are used to
Http://www.cnblogs.com/me-sa/archive/2011/07/20/erlang0006.htmlUsing tuple in Erlang, the order \ Number of data items is determined, and once the data item order is adjusted or the field is added or subtracted, it is easy to appear badmatch.At the same time some constants if hard-coded into the code, once the value changes, it is difficult to replace all reliable replacement values.These two data-plane changes, the corresponding solution in
What is Erlang?A "niche" language (ranking more than 50)
A functional language (a variable can be assigned only once)
A dynamic type language (the variable type is determined at runtime,CodeIt must be compiled before execution. It is different from Python and Ruby)
A strong language
A concurrency Oriented Language
Storm in a cup (published in 《ProgramClerk, issue 9 and 10), and the large-scale multiplayer online system that easily achieve
The process--process in Erlang is lightweight, and there is no sharing between processes. Looked at a lot of information, it seems that no one said that the lightweight process is what the concept, continue to find ... Gossip does not mention, into the concurrent programming world. This article is a study note, it can be said that "Concurrent programming in ERLANG," The fifth of a brief translation.
1. The
Use and optimization suggestions of erlang list, erlanglist
Erlang has two composite structures: tuple and list. The difference between the two is that the number of child elements of tuple is fixed and cannot be changed after declaration. The list is variable, you can use [H | T] to retrieve or insert new elements. In the previous article, I talked about tuple-related content. In this article, I will talk
There are only two mixed data types within Erlang: list and tuple, neither of which supports named access, so it is not possible to create associative arrays in PHP, Ruby, or Python (hash in Ruby) without additional libraries.
I can do this in Ruby:
Copy Code code as follows:
server_opts = {:p ort => 8080,: IP => ' 127.0.0.1 ',: Max_connections => 10}
This expression is not supported at the syntax level of
Erlang Installation
Online page http://www.erlang.org/download.html. Select the appropriate platform on the page. The proposed Erlang learning platform is Linux or UNIX.For Linux or UNIX-series platforms, download Souce File directly and compile the installation.
The code is as follows
Copy Code
wget http://www.erlang.org/download/otp_src_17.0.tar.gzTAR-XZVF otp_src_17.0.tar.gz
The following views are a bit biased, but a good articleThe world is the only one we are right, the others are all wrong. We (Erlang programmers) found the crux and solved the problem correctly, and all the others (non-Erlang) looked in the wrong direction and solved the wrong problem.The question that other people around the world is trying to solve is how to make existing programs run in parallel. until 2
Exit interaction mode: Ctrl + C and then press a; halt ().The command must be followed by a break '.' to be valid.% Comment out the current code to the end of the lineCompile ERL code C (modulename)
_ Represents any variableA variable can be assigned only once in its context (scope ).
For help: Use Erl-man XX in bash
File start format:-Module (modulename ).-Export ([funcname1/paranum,...]).
A Data Type in Erlang, which starts with a lowercase letter.
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.