I've just finished drilling a small page  about Ignite data streaming and I want to share my impressions. The situation is common for many Ignite documentation pages, impressions are the same.
My problem was to adapt IgniteDataStreamer to data loading using the binary format as described in my article . I try to use the same approach:
1) load data on the client node;
2) convert it to the binary form;
3) use IgniteDataStreamer/StreamReceiver pair (instead of ComputeTaskAdapter/ComputeJobAdapter) to ingest data in the cache.
I modified my production code using IgniteDataStreamer<BinaryObject, BinaryObject> and StreamReceiver<BinaryObject, BinaryObject>, tried to start on the dev cluster made of 2 server nodes and 1 client node. That is it: ClassNotFoundException for the class that exists on the client node only.
The solution to the problem seems to be in setting streamer.keepBinary(true), but page  never says about it. I found that setter in the IgniteDataStreamer source code after a single day of troubleshooting. Definitely, "In Ignite We Trust" - what else reason would drive me to spend so much time?
The code snippets on the page  are hard to implement in real-world applications because of using only primitive types String, Integer, etc. These are more like unit tests.
My proposal - it would be great to create a small GitHub repo containing a complete compilable code example, one repo for every page. I think such repos will keep the newbie Ignite users inside the project and prevent them from leaving.
Most of the code snippets are already arranged in complete and ready-for-usage samples:
Anyway, those are code snippets that are injected into quite generic documentation pages. Your case represents a situation when someone needs to work with binary objects and streaming APIs. What if we add a data streamer example for BinaryObjects into Ignite's examples and put a reference to that example from the documentation page? Are you interested in contributing the example?
On Fri, Dec 4, 2020 at 2:58 AM Vladimir Tchernyi <[hidden email]> wrote:
I think the code examples we already have do not show the nature of Ignite as a DISTRIBUTED database. These examples are oriented on a single-node start. An inexperienced user can have a false impression that a single Ignite node can outperform, for example, a commercial database server.
IMHO the documentation should be written for a multinode Ignite cluster. I do not understand what is the purpose to show how to stream 100_000 integer values in a cache defined as <Integer, String>. In the real world, I need to stream structured records (Kafka Avro messages), and I will create a POJO to hold each message. It is known that Ignite does not peer-deploy user POJOs, so using BinaryObject is the only way to forward my POJOs to the remote nodes (correct me if I am wrong).
I trust Ignite and I managed to create really fast Ignite app in production. But recently I faced again the long-forgotten feeling - the page is nice but hard to use. Hope my experience will help to improve documentation.
as for contributing, I need some time to get my Kafka Ignite app to production to be sure of it. After that, I will be ready to contribute
сб, 5 дек. 2020 г. в 06:31, Denis Magda <[hidden email]>:
|Free forum by Nabble||Edit this page|