Giter Site home page Giter Site logo

Comments (5)

fritzprix avatar fritzprix commented on August 18, 2024

session_ctrl

from yarmi.

fritzprix avatar fritzprix commented on August 18, 2024

only a blob parameter or response per method is allowed.

allowed example

    Response<Long> postMediaFile(@Body(name = "media") BlobSession media);
    Response<BlobSession> getMediaFile(@Query(name = "id") Long id);

Not allowed example

    // there are two blob parameters 
    Response<Long> postMediaFile(@Body(name = "media") BlobSession media, @Query(name="another") BlobSession anotherMedia);    
    // there are blob parameter and response simultaneously 
    Response<BlobSession> getMediaFile(@Query(name = "id") Long id, @Body(name = "media") BlobSession media)    

from yarmi.

fritzprix avatar fritzprix commented on August 18, 2024

Blob is sent following after CHUNK SessionControlMessage and will be

  • full size chunk is size of 64 kbytes
  • end with CRLR ("\r\n")
  • Chunk Parameter containing seq #, size of chunk in char, type (middle or last)
  • if the chunk is not full (is less than max size), it also means the chunk is last one.

from yarmi.

fritzprix avatar fritzprix commented on August 18, 2024

Proof-of-concept

  1. heterogeneous data on a single channel but consider the situation where some of data type handled outside of messaging protocol

    • Pros
      • able to reuse connection already exists
      • compatiable to network protocol which support only 1-to-1 connection (there is no need for multiple connection to handle two heterogeneous types of data)
    • Cons
      • any other RMI request(s) couldn't be handled within session
      • that mean there will be serious amount of bottle neck in request at concurrent invocation secenario.
        • more complexity in design
        • if teardown message for session drops, any other following request will block permanently. -> that means there would be some sort of timeout stratedgy
  2. heterogeneous data on a single channel and adopt messaging protocol capable of handling all the data type (including blob) -> example BSON etc,.

  3. heterogeneous data on dedicated channel

from yarmi.

fritzprix avatar fritzprix commented on August 18, 2024

JSON also able to embed byte array on it, however there should be some sort of text encoding / decoding (for example base64) and it makes the size of message larger.
so I don't consider JSON for second option above comment

from yarmi.

Related Issues (19)

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.