Which Programming Language is Best for Web Server and Data Science?

0
1
Asked By TechieExplorer42 On

I'm trying to decide on a programming language that can handle both web server functionality and data science tasks. My options include Python, Scala, Java/Kotlin, and TypeScript.

Currently, I have a Jupyter notebook that takes 7 hours to run, which is due to all the synchronous web requests. Right now, I'm only dealing with REST requests, but I might want to incorporate Beautiful Soup for web scraping later on. After I collect the data, I perform some basic SciPy operations, although I anticipate that these may grow more complicated in the future.

I want to deploy this as a web service so that users can request reports, and ideally, I would like to implement web sockets for real-time progress updates during report generation.

I have some concerns about using Python, particularly with asynchronous programming. There seems to be a lot of overhead with Java, and I've heard mixed things about Scala's future. While I have a fondness for TypeScript, I'm unsure about its capabilities in the data science domain.

I'm looking for a language that can efficiently handle asynchronous requests, run a lightweight web server, and has solid data science libraries. My priorities are speed of development and reliability.

3 Answers

Answered By DataScientistPro On

For data science tasks, I'd still recommend sticking with Python since it has great libraries like pandas, NumPy, and matplotlib for data analysis and visualization. However, I understand the need for async handling as well. Your question is quite specific about needing both web capabilities and data science support, so maybe look deeper into Python frameworks that support async operations.

Answered By WebDevNinja99 On

You could consider using Flask or FastAPI for your application. FastAPI, in particular, has excellent async capabilities if you’re looking for that. It's lightweight and works well for handling web requests.

Answered By CodeWhisperer77 On

Honestly, it seems like Python might still be your best bet. It fits almost all your needs, especially with libraries for data science. I think your issues with Python might be more about preference than actual limitations. If types are a concern, you can use type hints and tools like mypy to help with that. Plus, I wouldn't worry too much about Python web services; they can be reliable if set up correctly. Maybe reframe your question to ask if there are alternatives to Python for your case or whether Python really is the best option.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.