Conversation
env.response = post | ||
serialized = serialize.serialize_response(env) | ||
socket.write "#{serialized.length}\n" | ||
socket.write "#{serialized}\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use \r\n
for line breaks.
Overall this is a good start. Post comments with updates as it evolves, and I'll jump in. |
…ll threads using queues
…r is that enough?)
@@ -3,6 +3,8 @@ | |||
require 'logger' | |||
require 'sequel' | |||
|
|||
Thread.abort_on_exception = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ewwww.... you don't want to do this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this forwards an exception to the main thread in the middle of an ensure block?
Are you looking to implement this feature in 0.3? |
Streaming has been deferred until 0.4 and tentd has been completely rewritten for 0.3. |
The initial points outlined by @titanous:
This is the first draft of what I came up with. Check it out and run
The concurrency is utterly broken and completely open to DoS and probably countless other attacks, and the performance sucks. Yesyes. I'm open to everything.
Things still to be done:
TentD::Serializer
or similarPost.fetch_with_permissions
/fetch_all
API