vanvalenlab / kiosk-data-processing Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: gRPC API for pre- and post-processing data
DEPRECATED: gRPC API for pre- and post-processing data
Flask is by default blocking HTTP server. The client calling the DP API is using tornado to quickly get all responses for multiple images. When sending multiple requests with tornado, the following error gets hit:
[ERROR]:[tornado.application]: Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 222, in _read_message
yield body_future
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 589, in _read_fixed_body
min(self.params.chunk_size, content_length), partial=True)
File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 261, in _read_message
delegate.on_connection_close()
File "/usr/local/lib/python3.6/site-packages/tornado/http1connection.py", line 683, in on_connection_close
return self._delegate.on_connection_close()
File "/usr/local/lib/python3.6/site-packages/tornado/simple_httpclient.py", line 472, in on_connection_close
raise self.stream.error
File "/usr/local/lib/python3.6/site-packages/tornado/iostream.py", line 945, in _read_to_buffer
bytes_read = self.read_from_fd(buf)
File "/usr/local/lib/python3.6/site-packages/tornado/iostream.py", line 1238, in read_from_fd
return self.socket.recv_into(buf)
ConnectionResetError: [Errno 104] Connection reset by peer
This is an async
vs sync
issue I believe. StackOverflow leads me to think that using another HTTP Server besides the default WSGI would be helpful (and probably a best practice for production deployment)
Python 2.7 will reach end of life
The Flask documentation has example tests.
The repo should have tests for each of the processing functions, and for the routes themselves.
Swagger docs may be a good idea as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.