Comments (5)
from yarmi.
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.
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.
Proof-of-concept
-
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
- Pros
-
heterogeneous data on a single channel and adopt messaging protocol capable of handling all the data type (including blob) -> example BSON etc,.
-
heterogeneous data on dedicated channel
from yarmi.
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)
- Optimize Request Size
- SimpleServiceDiscovery doesn't work across the hosts HOT 2
- Concurrent method call should be serialized HOT 2
- add health check for service
- add support messaging protocol more appropriate for binary data HOT 1
- add high availability support (HaRMIClient) HOT 1
- Generic containers (Response) have been not properly deserialized
- blobsessin closed with remaining unread data
- downgrade to Java 8 -> 7
- HaRMIClient raises exception in invoking call proxy
- Logo Proposal for Yarmi HOT 15
- RMIClient::create causes exception on Android K HOT 2
- key for method lookup is not unique HOT 1
- Handling recursive type parameter in serialization HOT 1
- concurrent request timeouts when single request blocks HOT 2
- JUnit testing is failing on Travis CI HOT 2
- service discovery migration (into separate package) HOT 2
- slim down dependencies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yarmi.