r/Python • • Jan 02 '25

Discussion Appropriate framework for thesis

Hi everyone!

I'm currently working on my bachelor's thesis in Computer and systems sciences. The focus of my thesis is a comparison of Java and Python in terms of performance and scalability when implementing REST APIs.

For this, I’m using Spring Boot on the Java side. However, I’m unsure which Python framework would be the best equivalent for this comparison. Ideally, it should support REST API development, have a strong community, and be well-suited for performance and scalability testing. So far, I’ve considered Django and Flask, but I’m open to suggestions.

I already know a bit of Flask, but it feels like Flask is a bit too small to offer a fair comparison to Spring Boot.

What do you guys think is the most suitable Python framework to compare with Spring Boot?

0 Upvotes

12 comments sorted by

View all comments

3

u/cgoldberg Jan 02 '25

I'm also curious what you are using for testing/benchmarking if you want to elaborate a little.

3

u/Koratozarix Jan 02 '25

I'm measuring response time and error rates during different amounts of requests to evaluate the performance and scalability. Using tools like K6, I want to simulate low, medium, and high loads to gather metrics such as average response time, percentiles (90th and 99th), throughput, and error rates.

Tell me if you have any thoughts/tips and I'll be happy to hear them!

5

u/cgoldberg Jan 02 '25

I used to do performance and scalability testing as my main job for many years. You are on the right track with your approach.

My only advice is to create workloads reflecting actual user flows. You want to model realistic usage patterns and run a combination of these to simulate real traffic. For example, say you have a complex API with many endpoints. You want to access all of them in the same ways users might, varying the data in the requests you send. Many people try to benchmark performance by just banging on one endpoint with the same request over and over. Doing that will probably get you very unrealistic results.

Good luck. This sounds like a fun project and you might get to leverage it into landing a nice Performance Engineering job! I suggest sharing your code and results on GitHub when you are done to use as a portfolio.