Comments (6)
What do you mean with byte[] argument? Get all messages in serialized form instead of the deserialized form (with the ArrayNode and ObjectNode arguments)? If yes that is not possible with jawampa because the messages are already deserialized before they are pushed towards the Client/Server object.
Or are you referring to normal function calls or events where some of the parameters are of type byte[]?
from jawampa.
no what i ideally look for is,
Observable<byte[]> client.subscribe("feed")
or something like that, imagine i'm gonna get loooooot of messages very fast, and i want no garbage to be generated because of those millions of messages my gc will trigger wery often, so i need to avoid any object creation, mostly for example when i process json, i ready byte[] from stream then parse it to java primitives which will not keep in heap, but will be in stack...
I'm describing high level problem, because of i'm gonna run many instances of websocket clients, and those will recieve lot of messages very fast, i want to avoid object creation (no jackson parsin or similar thing)...
is that possible with this lib? not currently but by design if i check out the code and try to provide such option do you think its possible with current architecture?
from jawampa.
It's currently not possible with this library and also wouldn't fit the architecture very good. The thing is: The messages are received in a Netty thread and are contained in Netty ByteBuf
objects which are pooled per EventLoop. These are not intended to be passed into other threads (e.g. user application code). If you make a copy of the byte content in order to forward it it would most likely be more expensive than to deserialize it in the transport layer and only to forward the deserialized primitive types in Jackson format - which is what happens at the moment.
These things also don't work very good with the WAMP protocol in general, because all protocol information (e.g. request or subscription IDs, function ID, ...) are serialized together with the message content and with the same serialization format. There is no seperate WAMP message header which could be parsed standalone and then stripped of in order to give you only the payload.
from jawampa.
Ok, i've also looked at code, it seems wamp will make things hard with this particular issue, but anyway i can see its a high level protocol, not caring about that low level access...
Thanks anyway, im closing issue. (i wonder if there is another way to start conversation on github without creating issues every time... like how do i just send a message or something like that...?)
from jawampa.
Yes, unfortunatly github only provides Issues and nothing like Discussions. The only possibility is to add it s a Label to an issue.
If there are general questions about WAMP they can be discussed in the associated newsgroup: https://groups.google.com/forum/#!forum/wampws
Please don't send private messages or emails. This is (as most open source projects) no project that offers private support and so everything should be discussed openly so that also all other people that are interested or have similar questions can get involved.
from jawampa.
Sure, i tought about that as i wrote :) anyway thanks for good lib
from jawampa.
Related Issues (20)
- State not changed to disconnected when connection is lost HOT 1
- Poloniex sequences HOT 13
- ApplicationError(wamp.error.invalid_uri, [], {}) even when URI is completely valid HOT 1
- How can I send a self-defined Java-class object(client) to fit a C++ class (server) by RPC HOT 1
- Web Connection works well on emulator but fail on real devices HOT 3
- Android < 5.0, TLSv1.2 and jawampa
- Problem with varargs in Publish method HOT 2
- Getting publication succeeded callback while network is disconnected HOT 2
- Subscription Id / Event History
- Convert to rxjava 2. Any plans?
- Subscription SocketTimeoutException
- Application throws java.lang.ClassNotFoundException: jdk.internal.misc.Unsafe exception during the creation of the client instance HOT 1
- Can we publish topic on session connection
- Android doesn't work HOT 1
- Correct way to make a client run
- wss secure websocket connection problem
- How to influence the json encoding/decoding? JsonViews possible? HOT 1
- Jawampa crashes when connections is closed. HOT 3
- Authentication in jawampa
- Cannot connect to server only on Android 7.0
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 jawampa.