Replies: 8 comments
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
Besides the tiered-storage, we have the plugin/integration feature planned for the future. We haven't decided yet how the interface would look like, and how the "connectors" could be implemented (rust, wasm, or maybe via some network protocol like grpc). This is certainly on our roadmap, but if I were to estimate the date, probably no sooner than in a few months. |
Beta Was this translation helpful? Give feedback.
-
|
@thyseus it would be awesome if you could propose a design for implementing this feature. Do you want to put together a proposal? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Actually my rust skills had been barely enough to get a mini-consumer running that is just passing over the payload like this: so i am totally fine; with a hook one would not need any consumer at all to achieve something similar. |
Beta Was this translation helpful? Give feedback.
-
|
I'd recommend taking a look at Apache Camel's Connector design. We can allow people to create "connectors" and configure them with the settings. Every Connector can have a config file or we can have single "Connectors" yaml file which will be loaded into a map when Iggy server is started. So we need to come up with a mechanism of calling these "Connectors" at important places like at the entry point, at the time of writing/persisting or reading etc. Such Connectors can be configured at Topic level or even at the message/batch level. topic level makes the most sense but there could be use cases where we want to let the Clients decide too |
Beta Was this translation helpful? Give feedback.
-
IntroductionI'm going to start out by separating by usecase, of which I see a few:
UsecasesTriggerThe primary use case would be @thyseus' initial idea. Some questions to answer:
UDF/UDAF implementationI've always wanted something like this in a streaming service - the use case primarily being compacted topics. For compacted topics in Kafka and Pulsar, only the most recent value for the specified key is retained and the rest are effectively deleted. If you could embed a UDAF function similar to Datafusion's implementation, one could potentially have "derivative" topics. This would also likely reduce the need for a lot of stream processing engines which are external and require quite a bit of development. Embedded ProgramThis usecase surrounds itself with possibly changing core behaviour inside of Iggy that is difficult to configure with a configuration file format such as yaml. For instance, a developer can implement a script or something that will adjust the way segments get written or possibly set up custom logic for writing partitions to a separate durable store. Embedded Scripting considerationsAll of these usecases can be solved with an implementation of some sort of embedded programming language based on events. I will detail some of the idea I have: WebassemblyWebassembly is really nice for sandboxing specifically. However, this doesn't seem to be a really important feature for Iggy as users will likely trust their own code. Webassembly is also not a target for many higher level languages without shipping the interpreter/runtime with it. Wasm also has a reputation for moving really slow with it's specs. As far as I know, this is what ScyllaDB used for their UDF implementation Shared LibraryThis is probably the most straightforward one and allows the most flexibility when it comes to the API. However, there are only a handful of languages that can be compiled to a smallish shared library, so effectively we are limited to some languages that allow that type of interfacing (Rust, C, C++ and Swift come to mind). This is apparently the way Arroyo went with their implementation of UDF's Specific language runtimeWe could possibly look at embedding a specific language runtime such as RustPython, rusty-v8 or a lua engine. I don't really favour this approach as usually their is a cost to get the data into the VM and get it executed. This also brings a level of overhead as we need to consider things like language version support and all of that. EventsWe also need to consider which events might be interesting for developers to be able to "hook" into. This could be:
I think that eBPF might give us good insights as they have a really nice framework for
|
Beta Was this translation helpful? Give feedback.
-
|
I've just opened another discussion #1670 as the more generic continuation of this topic. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to discuss with you if it is a good idea to implement a "hook" feature on the iggy server side.
What do i mean with "hook" ?
In case a message is incoming, i want to be able to configure one or several "hooks" that will point to a script file or binary that gets executed by the iggy server.
Why is this useful ?
a) i could do mundane tasks that dont require a real consumer implementation, like logs or just pushing the incoming messages somewhere else, really quickly
b) In my use case i have several applications that are written in python, php, rust and many more. Even some, where there is no SDK for iggy yet (php - i have done a primitive one for myself).
Instead of implementing a consumer for each of this applications i could simply register a "hook" in a stream that executes a
php artisan receive-message '{"payload": "example"}'. This also has the advantage that my consumers dont need to "poll" the iggy server but gets the message immediately. (I know that many advantages of a proper "consumer" implementation are missing then; but there may be cases where that is ok).What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions