About XData

Hi,

· 1 - Does TMS XData support rate limiting?

  • I want to implement a rate limit (e.g., X requests per second) for a service I’m writing on the server side in XData. Does XData natively support this feature? If yes, is there any documentation or example available?
  • If not supported, how can I implement this using middleware or a custom implementation in XData?

· 2 - How can I perform pagination and offset-limit operations on the server side with TMS XData?

  • When fetching data from the database or returning large datasets through an endpoint, how can I implement pagination and offset-limit functionality?
  • For example, how can I efficiently process the page and pageSize parameters sent from the client?
  • Does XData provide any built-in query feature support or internal mechanism for this? Or should it be implemented manually?
  • When used in conjunction with TMS Aurelius , are there any specific recommendations to simplify these operations?

Best Regards.

No, it's not supported natively. While you might be able to use the middleware system - which is very flexible - you will be implementing lots of things from scratch and reinventing the wheel. I would recommend you use something out of the box like reverse proxies (Nginx and Traefik are the more populars that come to mind).

Unless you really need to use something very very simple and don't need to much performance. In this case you should be able to implement it with the middleware, by checking the endpoint being called and counting how many times that specific IP has accessed the endpoint. But you have to do it yourself.

Have you seen the pagination system in TMS Aurelius (which you can when implementing XData service operations) or even $top and $skip query options (which you can use in automatic CRUD endpoints)?