Models, Controllers, Packages and ThreadPools

video locked
Enroll to watch

12 mins

Gaurav Sen explains the structure of a rate limiter server, where the code is split into different packages and classes.

The main class is not going to have anything inside it because simple objects used only by the rate limiter will be stored in the models package, and all requests that are accepted by this service can be kept in the request package.

We also mention the response package, which can have a generic response class and abstract response. In addition, we talk about the controller, which is a set of classes that expose all of the public APIs in the service.

Finally, we define an update request and an update response, which is the response to an update request.