Open infosec-alchemist opened 6 years ago
For the short term, I'd recommend keeping Flask but integrating it with Gunicorn. See https://github.com/unfetter-discover/stix2pattern for an example.
Babelfish is inherently blocking, so an event driven python2 server like Tornado would be unlikely to yield performance gains without a broader redesign.
A broader redesign would involve integration of tools like multi-processing, redis, celery, etc, where Babelfish would be running on a different process from Unfetter Insight's rest API.
This is a WIP here:
https://github.com/unfetter-discover/unfetter-insight/tree/issue-4
There are problems with threading in Flask, which makes it harder to use in production.
Talk to @j987987 and look at an alternative. Likely use the same thing as we use in the unfetter-pattern-hanlders