About Experimental package
This package contains experimental extensions for flaskJSONRPCServer. This mean that this extensions need more testing or they breaks some functionality.
For use provided patches, pass flag <experimental>
to server's constructor. Server will be automatically patched with optimal settings.
server=server=flaskJSONRPCServer(["127.0.0.1", "8080"], experimental=True)
For now this package contain next patches.
MoreAsync ¶
Tricky implementations of some servers methods that add async executing. It very useful in Gevent backend. When server start some methods (like compression or hashing) with large data, it hang all server. It very big performance problem and this extension solve this. When moreAsync enabled, some jobs run in separate threads (greenlets) and main thread only wait for completing. And while wait, it can do another jobs.
For now moreAsync replaces this methods (server will use async variant of method, if some conditions happened):
_compressGZIP()
(input's size more then 1mb)_sha256()
(input's size more then 200mb)_sha1()
(input's size more then 300mb)
Perfomance issues | None |
Testing | Need more |
Broken functionality | None |
uJSON ¶
Extremely fast JSON-backend, based on UltraJSON package, written in pure C with bindings for Python. Experimental package automatically use this backend, if it installed in system.
For now uJSON replaces this methods (server will use new variant of method by default):
Perfomance issues | None |
Testing | Need more |
Broken functionality | For now it not implements type-extending (<default> param) and disabling escaping of non-ASCII characters ( <ensure_ascii> param). Also it not support long() type and crash on them (see this issue). |
asyncJSON ¶
Pseudo-async implementation of JSON parser and dumper. It allow to switch context (switching to another greenlet or thread) every given number of seconds. This mean that if method proseccing so long, it will be paused and switched to another task. Useful on processing large data.
For now asyncJSON replaces this methods (server will use async variant of method, if some conditions happened):
_parseJSON()
(input's size more then 10mb)_serializeJSON()
(input's size more then 1mb)
Perfomance issues | 3-5 times slower (than uJSON) on serialization and 10 times on parsing |
Testing | Need more |
Broken functionality | For now it not implements type-extending (<default> param), disabling escaping of non-ASCII characters ( <ensure_ascii> param) and checking circular reference (<check_circular> param) |
Also asyncJSON correctly supports long()
type, so i planning to use it as fallback, when uJSON crached. Progress of this task can be fineded here (in russian).