inakianduaga / kafka-image-processor Goto Github PK
View Code? Open in Web Editor NEWProcess client images using Kafka & reactive architecture
Home Page: https://inakianduaga.github.io/kafka-image-processor/#/
Process client images using Kafka & reactive architecture
Home Page: https://inakianduaga.github.io/kafka-image-processor/#/
CycleJS can't seem to push to the websocket, always throwing
WebSocket is already in CLOSING or CLOSED state.next @ websocket.ts:13Stream._n @ core.js:909Stream.shamefullySendNext @ core.js:1688next @ index.js:25next @ index.js:50Stream._n @ core.js:913MapOperator._n @ core.js:729Stream._n @ core.js:909MapFlattenInner._n @ core.js:635Stream._n @ core.js:909intervalHandler @ core.js:260 150:1 GET https://unsplash.it/150/150?image=462 404 (Not Found)
next: outgoing => ws.send(outgoing), // debug error
However a simple test shows the websocket connection should be working from scratch:
var ws = new WebSocket('ws://localhost:9000');
ws.send(JSON.stringify({"test": 123}));
We want
This will always use V2 of the schema to read the data, with Avro schema evolution filling the gap for V1 produced data.
So what we will test initially is the case of "old producers", which are pushing data into the stream with an older version of the schema, and consumers still can read data properly.
Update docker compose and hook this up to the schema registry
https://github.com/Landoop/schema-registry-ui
Then the schemas can be visualized
Related to #15
We want to introduce a toggle to select the filter to be applied. If it's not enabled, we will
Has toggle to distinguish between V1 or V2. When V2 is chosen, it will forward the filter type to be used to process the image
Play 2.5 changed a few things,
https://www.playframework.com/documentation/2.5.x/ScalaWebSockets
Remove random websocket id / actor mapping, we don't need it, we'll use the actor's own path as the unique identifier to be able to recognize it.
Add custom JSON data types for the InEvent / OutEvents
Regular bare API & kafka streams are not working too nicely, let's give Akka streams a shot
http://kafka-connect-ui.landoop.com/
Seems to display what things are hooked to Kafka, which is nice to understand the topology
http://kafka-topics-ui.landoop.com/
To visualize the topics coming/going to kafka (also allows to see the system topics)
Seems it's straightforward, just need to run sbt with the option and open the port for external connections
http://daodecode.com/2013/04/19/debug-an-sbt-plugin-in-intellij-idea/
https://github.com/Tapad/sbt-docker-compose/blob/master/examples/basic-with-tests/docker/docker-compose.yml
Frontend should
We need to hook listening events to Kafka topics so we can stream the data to the corresponding websocket (such as when the image processing is done, processing stats, etc)
This needs to be done on app startup, Play mentions this can be the constructor of any dependency injected class
https://www.playframework.com/documentation/2.5.x/GlobalSettings
Example of confluent platform
https://github.com/confluentinc/cp-docker-images/blob/master/examples/cp-all-in-one/docker-compose.yml
Setup docker compose to run
Right now we do the whole deserializing / serializing from an Avro GenericRecord
by hand. It would be nice to be able to hydrate directly into a generated Avro case class from AvroHugger. We have to see how this can be done
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.