Professional Documents
Culture Documents
Scalability is viewed from two different angles: (1) machines — how the
system behaves when the system usage increases and (2) humans -
how the system behaves when the development team grows.
In most cases, scalability is viewed as how much load system can bear
at a time (machine scalability). In that sense, Python is less scalable in
terms of performance and execution speed than other programming
languages like Java and C++ because of several reasons discussed
below.
Human Scalability
After knowing all of the above scalability issues found in Python, you
would be wondering why should you pick Python language for your
project as it has several scalability issues, or why Python is still used by
many large companies in large projects. It’s because there are several
solutions to these limitation issues.
Using Python with C-like performance is totally possible. This goal can
be achieved with CPython, which is a superset of Python and also
includes some features of C, in which Python code is written.
This particular process of scaling has two types: vertical scaling and
horizontal scaling. Vertical scaling is the process of adding more
memory, disk space, and CPUs to the single machine. Though vertical
scaling will eventually hit its limits depending on the machine or server
that how much it can support. In that case, we should apply horizontal
scaling which is the process of adding entire machines or servers to the
system in order for it to handle more throughput.
Better architecture
Essentially, scalability is not the problem within the language itself but
it depends on (in some aspects) decisions taken at the design and
architectural level in the development process. The architecture should
be designed in such a way that it has the flexibility to grow or scale.
Many optimizations can be done in the early phase of the projects. For
example, Nginx for static and apache for dynamic content, using CDN
for static content, Proper use of vertical and horizontal scaling, and
Load balancers and auto-scaling features.
Final Thoughts
460
Scripting language v/s Programming language
The first question which strikes into the mind is, what is the difference between programming
and scripting language. The only difference which exists is that the scripting language does not
require any compilation, it is directly interpreted.
For example, the programs written in a language such as C++ are compiled before execution
whereas the programs written in scripting languages such as Python or JavaScript are directly
interpreted and are not compiled.
Example
Live Demo
## x is a list here
print(type(x))
## x is a bool here
print(type(x))
## we can also redefine 'x' as many times as we want
Output
If you run the above program, it will generate the following results.
<class 'list'>
<class 'bool'>