Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9009991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:20:35+00:00 2026-06-16T02:20:35+00:00

So, we may be streaming tons of data from an http server through an

  • 0

So, we may be streaming tons of data from an http server through an http server to a client. So http chunking + tcp flow control comes to mind. Normally to be a man in the middle like this, our man in the middle would read from a downstream asynch socket and try to write upstream and if the write was async, we would need a callback. We would NOT read from the downstream socket again until the write callback is called which would cause tcp flow control to automatically take affect once the nic buffer fills up(at least I have seen this occur before correctly).

So I think I have two questions really

  1. Does any version playframework have a write callback so we know when the write has officially been sent through such that we can continue processing again.
  2. Does anyone know of a java http client that calls a hasData and I have to invoke a read next chunk until I stop which calls the typical hasHeaded(Headers h), hasStatus(HttpStatus), hasChunk(HttpChunk chunk)

Well #2 would be ideal but anything close would be nice.

Also, if I am wrong on any points, feel free to correct me.

thanks,
Dean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:20:36+00:00Added an answer on June 16, 2026 at 2:20 am

    I should add more info and I will update this if I remember(and you can remind me just by posting a comment as I receive notifications via email).

    We looked into it and it is not too much work. There is an http class in netty we have to copy and modify play to add the one we modify and we have to modify play to have a writeChunk(chunk, callback) as well so the callback willl be given to netty to call when the write is complete.

    Downstream, we ported channelmanager(someething I wrote pre-netty and pre-mina and doesn’t have pipelines and all that complexity but looks just like java’s Sockets instead except you register listeners to hear the data coming in). This new channelmanager just keeps giving you DataChunk that has a ByteBuffer and until you call Datachunk.setProcessed, we actually stop reading from that socket allowing tcp flow control to kick in.

    We plan on leveraging netty’s parser. Though netty, grizzly and mina ALL make the mistake of tying their parser too tightly to their framework 🙁 :(….the first thing when It think parser is don’t tie it to the framework….oh well. That said, all 3 gave some good advise on how I might leverage their parsers so I don’t have to rewrite that portion….doing tcp flow correctly was already a big huge pain and took me 2 solid days of test breaking/fixing on channelmanager.

    Once that is all in play and wired into async-http-client which can have different nio libraries under it, then I can easily accept a chunk of data and when I finally writeChunk(newChunk, callback), I can pass in a callback that calls the DataChunk.setProcessed to allow downstream to continnue again. This is very useful if you aggregate streams OR if you just want to be robust in the face of one really really nasty client who sends you something but makes his nic fill up.

    In fact, this might be a new kind of attack on webservers where on many webservers it works except it would not affect our server at all ;). You can write a client to write and then not read from the socket letting the nic fill up and keep writing to the server…eventually many servers will hang on the write out as tcp flow control kicks in…..I should try that on tomcat and the old playframework and such someday.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a server which accepts connections from multiple client machines, maintains
Let's start with a simple example. A HTTP data stream comes in the following
This may seem like a silly question. We have a streaming server and the
I have a problem about streaming my video to server in real-time from my
I use a JTable to display data sourced from a streaming data feed. Each
I have java-servlet application +hibernate + streaming server Flow: user login begin video streaming
May I know how could I pass the value of driver from code behind
May I know if there is any way to remove non-alphabetical symbols from a
Designing an Azure application where remote clients will be 'streaming' data/images at a frequency
I am not looking for any alternative of streaming file contents from database, indeed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.