Giter Site home page Giter Site logo

Comments (2)

jampukka avatar jampukka commented on July 30, 2024

This is due to the current streaming implementation. I think we could change the logic so that we first buffer a set of features before commiting to writing 200 OK (e.g. change BufferedResultSet to eagerly fetch the first batch of features, not lazily during first call to hasNext() so that we fail before any bytes are written to the OutputStream provided to us by the JAX-RS impl). That might do the trick depending on how the JAX-RS implementation acts. Otherwise it's bit larger change to the logic: we'd have to buffer the serialization phase by trying to write first n bytes to memory before returning Response.ok() to the JAX-RS implementation. Still doable though.

from hakunapi.

jampukka avatar jampukka commented on July 30, 2024

The error might occur when writing nth feature so it's difficult to determine the right amount of buffering. One megabyte might solve most problems but not all.

Also the highlighted issue might not be something hakunapi even aims to support (handling changes in sources after startup). Obviously it might be difficult to recognize these sorts of errors if service monitoring is configured to just check the status code. Not sure what would be correct move here.

from hakunapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.