fomo icon indicating copy to clipboard operation
fomo copied to clipboard

Some questions

Open tricarte opened this issue 2 years ago • 1 comments

Apparently, this project is either dead or something improved will emerge out of it ( hopefully ). But I want to ask a few questions.

I'm reading the code base for a few days. It's really easy to approach even for a complete OOP idiot like me. What I want to learn is that why you created the http server using Swoole\Server? I mean why not the Swoole\HTTP\Server. I looked at the code multiple times and only recently realized that it's not based on Swoole\HTTP\Server while I wanted to try file uploads. And I think it's not possible to do file uploads with this version, right? My only guess is that you wanted to reach the maximum queries per second by using a raw TCP server other than a more feature-rich HTTP server, I don't know.

I can ask a few more questions but this is the most important one. For example, if it was based on Swoole\HTTP\Server, I would ask why you did not implement the Request and Response objects based on Swoole\HTTP\Request or Swoole\HTTP\Response. But at this point, it's not relevant.

Thank you for this framework, man. I learned lots of things with it. It's lightweight and I love lightweight frameworks. But this was like hitting a wall.

tricarte avatar Feb 03 '24 18:02 tricarte

Hello, thank you for your questions

Unfortunately, I am busy with other things and I don't have the opportunity to make changes in fomo right now.

But your guess about swoole server is correct.

If you pay close attention to the code, you will see that the requests are cached, and this is not the case in Swoole\HTTP\Server, and I tried to handle the requests in a lower layer, TCP, so that I can store the requests in a cached form.

This is the reason why it is not possible to send and receive photos

This framework still has a lot of problems that I hope I can or will be able to solve in the future

amirfaramarzi avatar Feb 03 '24 18:02 amirfaramarzi