RestRserve is an R web API framework for building high-performance AND robust microservices and app backends. With Rserve backend on UNIX-like systems it is parallel by design. It will handle incoming requests in parallel - each request in a separate fork (all the credits should go to Simon Urbanek).
Creating application is as simple as:
Now you can type
http://localhost:8080/hello in your favourite browser and see (surprisingly!) Hello from RestRserve.
- Easy to install, small number of dependencies
- Fully featured http server with the support for URL encoded and multipart forms
- Build safe and secure applications - RestRserve supports https, provides building blocks for basic/token authentication
- Concise and intuitive syntax
Raise meaningful http errors and allows to interrupt request handling from any place of the user code
- Comes with many examples - see
- Saves you from boilerplate code:
- automatically decodes request body from the common formats
- automatically encodes response body to the common formats
- automatically parses URI templates (such as
- helps to expose OpenAPI and Swagger/Redoc/Rapidoc UI
- It is fast!
Guidelines for filing issues / pull requests - CONTRIBUTING.md.
- RestRserve is primarily tested on UNIX systems. While it works natively on Windows please don’t expect it to be as performant as on UNIX-like systems. If you really want to use it on Windows - consider to try Windows Subsystem for Linux and report back.
- Keep in mind that every request is handled in a separate process (fork from a parent R session). While this feature allows to handle requests in parallel it also restricts reuse of certain objects which are not fork-safe (notably database connections, rJava objects, etc)