unfetter-discover / unfetter-insight

Unfetter Insight performs natural language processing and analysis for text data to determine and convert to CTI Stix data automatically.
19 stars 6 forks source link

Identify a better alternative to flask #6

Open infosec-alchemist opened 6 years ago

infosec-alchemist commented 6 years ago

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

j987987 commented 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.

j987987 commented 6 years ago

This is a WIP here:

https://github.com/unfetter-discover/unfetter-insight/tree/issue-4