It's becoming very clear that the synchronous nature of Flask is getting in the way. Already, we have 3 different tasks that services have to do concurrently: respond to http, handle amqp messages, and maintain health checks. This has resulted in thread hacks in a few different places.
Because of this, I am working on refactoring the basic service to [Tornado]() which seems more suitable for cooperative-multitasking and frees us from a lot of headaches. This refactor will start off version 0.4.0 and takes care of a few different issues like #31 and #2 and also enables support for #29.
Unfortunately, nautilus has been relying on the flask and its community for various bits of support. Moving away will likely mean rewriting a large portion of nautilus internals. All of the work on this refactor is being done in the tornado branch. I'll try to track my progress below:
[x] Drop sqlalchemy in favor of an asynchronous library (like [peewee]())
[x] Implement schema generation from new model types
[x] replace action handler consumers with ones compatible with tornado
[x] integrate keep_alive checks with tornado
[x] model querying for schema resolution needs to match new ORM
[x] CRUDActionHandlers
[x] reimplement cli without flask command manager
[x] reimplement auth workflow
[x] Primitives
[x] "upgradable" password
[x] user
[x] AuthRequestHandler
[x] login_user
[x] logout_user
[x] sets/retrieves jwt
[x] login_required decorator
[x] integrate into schema
[x] Login form + handler
[x] Logout form + handler
[x] Registration form + handler
[x] UserPassword model
[x] accept configuration from objects
[x] equivalent of service.route
[x] Add route to tornado
[x] convert to classmethod
[x] handle database backend integration (figure out which peewee db from path - look at playhouse.db_url)
[x] figure out best way for manager to pass configuration to the service (like debug flag)
It's becoming very clear that the synchronous nature of Flask is getting in the way. Already, we have 3 different tasks that services have to do concurrently: respond to http, handle amqp messages, and maintain health checks. This has resulted in thread hacks in a few different places.
Because of this, I am working on refactoring the basic service to [Tornado]() which seems more suitable for cooperative-multitasking and frees us from a lot of headaches. This refactor will start off version 0.4.0 and takes care of a few different issues like #31 and #2 and also enables support for #29.
Unfortunately, nautilus has been relying on the flask and its community for various bits of support. Moving away will likely mean rewriting a large portion of nautilus internals. All of the work on this refactor is being done in the tornado branch. I'll try to track my progress below:
keep_alive
checks with tornadologin_user
logout_user
login_required
decoratorservice.route