Need Help Getting Started

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need Help Getting Started

KrisCB
I'll preface this with I am brand new to this. I've got something I've been trying to work on but I'm having a really hard time getting started. I'm looking for guidance.

I'm attempting to utilize the CEP library to do some complex processing on event messages over time.
What I want is to:
1. Be able to send messages (in this case plaintext) over the network to the program
2. Parse it out to make it usable to the program (should be easy enough w/ regex)
3. Use the CEP library to process events over time.
4. Send out another message, in my case, something like a curl -XPOST to another server.

I am more or less stuck at the first part (which I would think be the easiest). I'm currently trying to figure out how the Streaming api and Windowing api work. I believe I can accomplish #1 with a combination of the Streaming API and socketTextStream. I'm going over the example files and trying to understand what they do.

I'm not necessarily looking for exact code, but rather guidance. Am I going in the right direction with this?
Any help is much appreciated.

-KrisCB
Reply | Threaded
Open this post in threaded view
|

Re: Need Help Getting Started

Sonex
1. If you create a socket (not from flink) and send simple string messages to that socket, then flink can read messages from the socket with socketTextStream as you said.
2. You can parse string messages or transform them simply by using a map function over the stream.
3. Based on these transformations, you can then write patterns with the CEP library and apply those patterns to the stream.
4. You may need to use some other library/software (not just flink) to send messages to another server, although I am not quite sure. One approach would be to write the messages you need to send to another socket and then with some other software or plain java you can send the messages (which you read from the socket) to the server.