web-frameworks icon indicating copy to clipboard operation
web-frameworks copied to clipboard

[Lua] Add restia

Open waghanza opened this issue 4 years ago • 4 comments

Hi @DarkWiiPlayer,

Would you mind to add (or consent that we add) restia in here ?

This project compare performance based on 3 routes :

  • GET /, SHOULD return a successful status code and an empty string
  • GET /user/:id, SHOULD return a successful status code and the id
  • POST /user, SHOULD return a successful status code and an empty string

Regards,

waghanza avatar Jun 18 '20 19:06 waghanza

In principle yes, but since restia sits on top of openresty and only takes care of what openresty doesn't already do out of the box, those three mentioned benchmarks would really just measure the performance of nginx, not the Lua part of the framework.

DarkWiiPlayer avatar Jun 18 '20 20:06 DarkWiiPlayer

Indeed, I think we must stick to benchmark only the lua part (at least for now) but I have no idea on how achieve that 😭


That's said, there is the same issue in php. Some frameworks could not handle http parts, so I have to use nginx to add it here

waghanza avatar Jun 18 '20 20:06 waghanza

It's a bit of a complicated situation with restia; one of the design goals I have set is to provide easy access to things for prototyping in a way that's still performant enough for parts of the application that aren't critical enough to squeeze every last drop of performance out, but still make it easy to remove restia bit by bit from the more critical parts of the application. In other words, it's one of its selling points that a fully optimized restia app is no more a restia app, which makes it very hard to come up with a reasonable benchmark scenario.

DarkWiiPlayer avatar Jun 20 '20 08:06 DarkWiiPlayer

I understand what you are saying.

However, if the question is

I have to write ... I want a performant / easy to write solution, COULD I choose restia ?

In my humble opinion, even if there is this complicated situation (same with some php frameworks) restia can take place in this list.

:warning: but you some explanation of that :fire:

Last, it's YOUR call. If you are opposed to this, I'll respect you choice :heart:

waghanza avatar Jun 20 '20 08:06 waghanza