The experienced predecessors were all asked to persuade
哪个语言最厉害
Beginners often say that a system is in multiple languages, so that all languages are best placed in their area of expertise. At the same time other occasions also have predecessors often say, because
PHP
Easy to deploy, with high development efficiency, so it is used to handle business logic, and some
分布式
,
并行
And so on.
java
implementation, involving
数据处理
Wait for
python
Realize. But none of them mentioned specific design methods.
So ask here, how to design a system in multiple languages?
Based on my own shallow knowledge, I probably came up with two options.
Using the C/C++
expansion of the underlying, the various languages written in the modules connected together. But my gut tells me it's not scientific.
The various language modules are designed to C/S mode, the module with the socket interaction, but this feeling is not high efficiency, and if all the modules can be deployed on the same machine, but also to design a C/s mode?
Have asked over Niang, really can not find the answer needed, just came here to ask questions, hope to have relevant experience of the predecessors to share experience, if the relevant information to give more good, thank you!
Reply content:
Experienced seniors who have spoken to all 哪个语言最厉害
the new recruits often say that a system is in multiple languages, so that languages are best placed in their field of expertise. At the same time other occasions also have predecessors often said, because PHP
easy to deploy, development efficiency is high, so used to handle business logic, and some of the 分布式
并行
use of, and so on java
implementation, involving the 数据处理
python
implementation. But none of them mentioned specific design methods.
So ask here, how to design a system in multiple languages?
Based on my own shallow knowledge, I probably came up with two options.
Using the C/C++
expansion of the underlying, the various languages written in the modules connected together. But my gut tells me it's not scientific.
The various language modules are designed to C/S mode, the module with the socket interaction, but this feeling is not high efficiency, and if all the modules can be deployed on the same machine, but also to design a C/s mode?
Have asked over Niang, really can not find the answer needed, just came here to ask questions, hope to have relevant experience of the predecessors to share experience, if the relevant information to give more good, thank you!
Thrift or restful is a conventional multi-lingual glue solution.
Cross-language is common in two ways. One is based on SOA architecture, and services can be written in multiple languages, but interfaces are unified. The client can also be written in multiple languages, requiring only the invocation of a unified service interface. A typical example is a variety of development interfaces, such as micro-blogging, and other development interfaces such as this. Invoking SQL in a program can actually be counted in this category.
Another way is to provide a common way to develop scripts two times, in the program to provide a set of APIs by customers to develop plug-ins such as the API, such as the VBA in Office.
In fact, the most common multi-lingual development is actually a Web page, generally at least by the HTML, CSS and JavaScript to cooperate with the development, even if you do not CSS when the language, HTML and JavaScript is always the Language bar, not to mention the less such as the CSS preprocessing language.
It's common to embed the assembler in C + + in the past, but now it's rare.
Do not use multiple languages in order to use multiple languages, before the multi-lingual cooperation is also cost-required. Sometimes if you can solve in a language, it is not necessarily necessary to use a variety of languages to do their own good things.
The key to see what you do system, if you understand the characteristics of each language and the existing class library, then you probably know how to combine your business to do how to choose
1) C + + pursuit of extreme performance must use C + +, performance is unparalleled, disadvantage is low development efficiency, don't say what Java than C + + faster, that is based on C + + programmer level and no optimization premise, the trial field: Graphics image processing, game background development, Reason: No GC, no delay, Imagine you do a game background server, the server does GC cause dozens of milliseconds in the client is a what kind of bad experience, at present a lot of do hand swims also in Java, but hand tour and end tour is 2 matter, hehe.
2) Java If you do the Web or other latency is not so demanding, this is a better choice, performance near C + +, development efficiency is not so low, a lot of libraries and frameworks can be used, whether it is the Web or big data, Java is a good choice, even if you do not like Java, There are a lot of JVM-based language for you to choose, for the enterprise, recruit a can work of Java than recruit a similar C + + easier, training a few months can start to write Java, this C + + is absolutely not to do, a lot of write more than half a year more than C + + also do not know what is the compile period, what is the
3) script, such as PHP, Python what scripting language, rough Fast province, online a bunch of examples, Balabala can write a minimum granularity can run up an example, small company's best choice, and Python is a glue language, both Jython this JVM, there is. NET implementation, syntax is also very easy to use, so Python is also a lot.
4) Other, such as C#,delphi, do not comment.
The plan can't catch up with the change, I think the landlord thinks too much. In fact, there is no need to be so meticulous, first of all, multi-lingual deployment, your developer cost increases immediately, and then coordination costs, maintenance costs are correspondingly increased, not worth the candle. In fact, in a language can be developed in advance, such as PHP is easy to deploy and more flexible things, after the project is formed, if the actual use of the specific problems, and PHP can not provide a good solution, the specific use of other languages to solve the problem. As business logic has stabilized, the cost of refactoring is reduced.