If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Back-end Solutions: From PHP to Node.js and Beyond

Started by PetraNicoleGoff, Jan 24, 2024, 12:16 AM

Previous topic - Next topic

PetraNicoleGoffTopic starter

I often ponder over the question of which programming language is more productive for the back-end. Currently, I'm working on a project that requires high performance and scalability, akin to a social network.

The dilemma lies in selecting the right programming language for the back-end, with performance being the primary criterion. Speed is crucial for user experience, and while skill and optimization can make any language work, the fact that Facebook migrated from PHP to C is compelling.

My current stack includes HTML, CSS, JavaScript, PHP, and MySQL. However, I feel that building a large-scale project in PHP may not be the most efficient choice today. This isn't just about trends but about actual performance. Thus, I wonder which language would provide faster page load speed.

This brings me to the question of whether it's worthwhile to study another programming language or start with PHP and later rewrite the code for scalability. Additionally, if I opt for PHP, the next decision would be choosing a framework: Laravel, Symfony 4, or Phalcon.

Considering alternative solutions, I'm exploring Node.js, Go (Golang), Python, and Java for the back-end. Furthermore, I'm also contemplating which database would be more productive and easier to scale.

Lastly, I seek opinions from experienced programmers proficient in various languages, with at least 2 years of experience. Your insights would be invaluable in navigating this decision-making process.
  •  


WambLyday

It's vital to acknowledge that the choice of programming language significantly impacts the overall performance and scalability of the project. While your current stack includes PHP, which has been traditionally used for web development, it's important to evaluate whether it aligns with the performance requirements of a large-scale social network.
Considering the need for faster page load speed, it's worth exploring alternative languages such as Node.js, Go (Golang), Python, and Java for the back-end. Each of these languages has its strengths in terms of performance and scalability. For example, Node.js is known for its non-blocking I/O, making it well-suited for handling multiple concurrent connections, while Golang is praised for its efficiency and speed. Python and Java also have robust ecosystems and are capable of handling complex tasks efficiently.

Furthermore, when evaluating the back-end programming language, it's crucial to consider the ecosystem and community support. Assessing factors such as available libraries, frameworks, and tools can significantly impact development speed and maintainability.

In addition to the programming language, the choice of database is equally important. For a high-performance and scalable social network, a distributed database such as Cassandra or a high-throughput database like MongoDB may be worth considering due to their ability to handle large amounts of data and scale horizontally.

When it comes to transitioning from PHP to another language, it's essential to weigh the long-term benefits against the short-term challenges. While rewriting the code for scalability in a different language can be a daunting task, it may offer substantial performance improvements in the long run.

Regarding experienced programmers' insights, it's valuable to seek opinions from professionals with diverse backgrounds. Their practical experience in handling performance-critical systems will provide valuable insights into the strengths and limitations of different programming languages and databases in real-world scenarios.
The decision to select the most productive programming language and database for the back-end of a high-performance social network involves a comprehensive evaluation of performance, scalability, ecosystem, and long-term maintenance considerations. Each language and database option has its unique advantages, and the final decision should be driven by a combination of thorough research, practical testing, and expert insights.
  •  

Ensurnded

Well, it's often more advantageous to create a dependable product quickly. Actually, always. In the real world, the speed of development along with reliability, ease of maintenance, or readability is consistently more crucial.

Node.js can be challenging for large-scale products (especially given one wrong interpretation). Erlang is impressive, yet it's not currently favored. Python is good, but until it becomes speedy... Java is a veteran, but... Kotlin is gaining popularity, but based on reviews on habr, it still seems somewhat raw. C# and .NET Core are progressing swiftly, as far as I've noticed.

Some even say that people at the poles, or even on Asma, might receive performance from the Celestial Empire... theoretically. However, it takes a long time to develop. There's even experimentation happening with Prolog (I couldn't find the link in a couple of minutes, but I saw it on habr recently).

A valuable product will attract investors. If the investor is content with the demand growth rate and quality, performance can be addressed by investing in infrastructure (whether it's their own or cloud-based).
  •  

bittaphete

I would recommend exploring the performance benchmarks of various projects written in different programming languages and using different libraries. You can find these benchmarks on the website https://www.techempower.com/benchmarks/

For quite some time, Rust has been the standout performer among the web frameworks. YAP, which not only generates binary executable code with minimal runtime and no garbage collection, but also ensures code security at the language level, has been a significant contributor to Rust's status. Additionally, YAP has recently incorporated functionality for asynchronous code writing (async/await). It features strict typing, composition, and a trait-based type system, although it lacks inheritance. One of its major strengths is the compiler's ability (borrow checker) to identify potential issues with unsafe code in a multithreaded environment during compilation.

Naturally, achieving high performance relies on various factors such as architecture, distribution, database management, static content caching, and other considerations outlined in the responses.

Learning Rust can be challenging, requiring more time than learning other languages at the level of C++. However, the benefits it offers make the effort worthwhile.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...