Open ambarc opened 7 years ago
What did you do in handle(message)
function. Check out this example: https://github.com/jimhigson/oboe.js/blob/master/benchmarking/benchmarkServer.js
.
When you want to streaming data from node server to client. Use res.write
if( i % 2 == 0 ) {
res.write(JSON.stringify({
"id": i,
"url": "http://localhost:4444/item/" + i
}));
} else {
res.write(JSON.stringify({
"id": i
}));
}
Xpost from Oboe Google Forum:
I'm trying to use Oboe on some streaming functionality with the following options:
The weird thing I'm seeing with the request is that I only see data coming out of Oboe when I end the stream server side. However, there isn't any data interchange between the server and client when this happens making me think that the data is already client side. Is there some sort of pass through/resolve that I'm missing?
Oboe
A couple of weird things happen. Only when I force close the stream server side does the node handler start seeing messages. Also, it gets each key while i'd like to synchronize and get each high level object as it gets sent by the server.
I managed to get it working in Node by doing
Each time a JSON object comes up message is that entire object that the server sends one at a time.