Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks Pratik. After trying different approaches yesterday (goliath, async_sinatra and etc) I finally made a decision that any solution I will go with should support AR (because I want to share AR between API and the system) and should support Rack sync middleware (because I'm want to expose omniauth as part of API). As I understand the only way to use AR in EM is to go with fibers. So my question is - what benefits can Cramp give me atop of Sinatra/fiber-pool? As I understood Cramp gives simplicity compared to EM style way (callbacks), but if Cramp and Sinatra both use fibers than I'm lost.
      singulars
    2. COYes, the only way to use AR in EM is to go with fibers. Cramp doesn't have major benefits over async sinatra/fiber-pool unless you want to maintain many open connections or provide streaming API. If you are using sinatra with EM, be sure to checkout async sinatra too - https://github.com/raggi/async_sinatra If you don't need to maintain a large number of long lasting open connections, why not just use plain sinatra ? Using threads/mysql2 should go a long way as mysql2 C extensions isn't blocking - https://github.com/brianmario/mysql2/blob/master/benchmark/threaded.rb
      singulars
    3. COI won't be opening long lasting connections. I expect to have huge number of fast clients and that's why I'm turning to event loop solutions, because I can't scale infrastructure right now. I didn't get that you said regarding threads and mysql2 - I thought that it's impossible to run sinatra in multithread mode because no web server will run it like that, they only run full stack in a different thread so mysql2 wont be shared between threads - or I'm totally mistaken?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload