The service layer is conceptually similar to a web framework in that there are apps, endpoints, middleware, requests and responses. As a compared to a web framework, however, Ravel has a more abstract notion of what these things are. Ultimately, the service layer presents a public interface to the outside world.
As mentioned before, the architecture of the service layer is a lot like a web framework, but there are some important additions--namely, stages 2, 3, and 7 below.
In the first stage, middleware has a chance to initiate services and access the arguments with which an API endpoint was called. Note that arguments may differ, depending on the type of Ravel application being run. In a web app, these arguments might consist of an HTTP request; for a gRPC service, they'd consist of protocol buffer messages.