question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[serializer] MAX_SIZE of StreamOutput?

See original GitHub issue

Hi, the serializer is great stuff I enjoy working with it. Question on the maximum size of StreamOutput: private static final int MAX_SIZE = 1 << 28; // 256MB Is the 256MB defined on purpose or just because it shouldn’t be unlimited? Thank you

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eduard-vasinskyicommented, Jun 2, 2021

Hello, @arsentiikaptsan RPC was designed for quick request/response communication (millions of requests per second). It is not suited for working with large data streams. As for processing large data, you can use the HTTP module (it is a separate module, not part of ActiveJ FS). By using HTTP request/response body ChannelSupplier you can process request data as a stream, one piece at a time. A more advanced solution is to use MessagingWithBinaryStreaming class that works on top of a raw TCP socket and allows working with socket data using CSP. You will have to design some protocol to exchange data between peers. You may take a look at ActiveFsServer and RemoteActiveFs as a reference. Although, we recommend sticking to the HTTP solution. ActiveJ provides one of the fastest Java HTTP client/server, which should be enough for most common applications. Turn to design your own protocol only if you are sure you need to squeeze every last drop of performance.

0reactions
eduard-vasinskyicommented, Jun 3, 2021

@schlangz You could use ActiveJ Serializer without StreamInput/Output. Just create a BinarySerializer and use it to serialize data to a byte array. You can look at serializer examples for reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OutputStream | Apple Developer Documentation
A stream that provides write-only stream functionality.
Read more >
Serialize object with outputstream - java - Stack Overflow
Here is what you do to serialize the object: new ObjectOutputStream(outputStream).writeObject(obj);. If you want to control the byte[] ...
Read more >
JRAbstractLRUVirtualizer (JasperReports 6.20.0 API)
Parameters: maxSize - the maximum size (in JRVirtualizable objects) of the paged in cache. JRAbstractLRUVirtualizer. protected JRAbstractLRUVirtualizer ...
Read more >
CachedOutputStream (Apache CXF JavaDoc 3.5.0 API)
When with Attachment, needs to replace the xml writer stream with the stream used by AttachmentSerializer or copy the cached output stream to...
Read more >
Chapter 4: Appenders - Logback
OutputStream type cannot be conveniently mapped to a string, ... Allow us to repeat for emphasis that serialization of logging events is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found