Architecture¶
Mihari uses following components:
- rails/thor for building the CLI application.
- ruby-grape/grape, rack/rack and puma/puma for building and running the web application.
- sidekiq/sidekiq for (optional) background processing.
- vuejs for building the frontend SPA.
Basic¶
flowchart LR
CLI["CLI\n(Thor)"] --> Database
Web["Web\n(Grape on Rack + Puma)"] --> Database
Advanced¶
flowchart LR
CLI["CLI\n(Thor)"] --> Database
Web["Web\n(Grape on Rack + Puma)"] --> Database
Web --> Sidekiq["Job Queue\n(Sidekiq)"]
Sidekiq --> Database
Sidekiq --> Redis
This one is recommended if you want to use the API a lot.
Sidekiq handles time-consuming jobs such as searching a rule, etc.
Note
The web application runs on Rack + Puma. Its default HTTP request timeout is 60s. It means that a search exceeds 60s will fail.