Sinatra is often seen as a framework to suit small projects. However, at Idyllic Software we have seen it as a big add value to large scale applications.
Most high traffic, large scale applications have a functionality that are used more than others. Some of these functionalities may also have time consuming tasks associated with them which makes them take longer to execute. This substantially reduces the load that the application can handle at that point in time when these tasks are being performed.
You might be able to performance tune the application to a certain extent, after which the recommended solution is to add a few more servers to the mix and load balance. To add to the miseries, every time these high performing tasks are modified, deployment is required for the whole application which reduces the up time of the application and requires deployments too often.
If you are able to take these tasks and manage them separately, then the application can not only scale better, but it requires much fewer deployments. This is where Sinatra can come to the rescue. The key is identifying the singular tasks that can be managed in such way.
A good first step is considering anything that can be handled asynchronously. The parent application can then speak to the Sinatara application using REST API that is exposed and continue its operations.
It is important to note that Sinatra has a very small foot print. It is 1500 lines of code as compared to a full blows rails stack which is more than 10,000 lines of code. By visiting Sinatra’s site, you can find a list of applications and websites that use the Sinatra framework (including the business-networking site LinkedIn)!
Follow me on Twitter