zz85 / kafka-streams-viz

Kafka Streams Topology Sketch Diagram Visualization
https://zz85.github.io/kafka-streams-viz
411 stars 84 forks source link

Allow passing topology as base64-encoded URL hash #8

Closed bfncs closed 5 years ago

bfncs commented 5 years ago

This allows passing a topology as base64-encoded URL hash.

Example:

https://zz85.github.io/kafka-streams-viz/#ClRvcG9sb2dpZXM6CiAgIFN1Yi10b3BvbG9neTogMAogICAgU291cmNlOiBLU1RSRUFNLVNPVVJDRS0wMDAwMDAwMDAwICh0b3BpY3M6IFtudW1iZXJpbmcucHJpdmF0ZS5kYi5ubXNkLnBkYXRhXSkKICAgICAgLS0+IEtTVFJFQU0tTUFQVkFMVUVTLTAwMDAwMDAwMDEKICAgIFByb2Nlc3NvcjogS1NUUkVBTS1NQVBWQUxVRVMtMDAwMDAwMDAwMSAoc3RvcmVzOiBbXSkKICAgICAgLS0+IEtTVFJFQU0tRk9SRUFDSC0wMDAwMDAwMDAyCiAgICAgIDwtLSBLU1RSRUFNLVNPVVJDRS0wMDAwMDAwMDAwCiAgICBQcm9jZXNzb3I6IEtTVFJFQU0tRk9SRUFDSC0wMDAwMDAwMDAyIChzdG9yZXM6IFtdKQogICAgICAtLT4gbm9uZQogICAgICA8LS0gS1NUUkVBTS1NQVBWQUxVRVMtMDAwMDAwMDAwMQ==

zz85 commented 5 years ago

Thanks, this is useful! Just curious, where are you generating your base64 string from?

bfncs commented 5 years ago

Thanks for the project, it would be great if you could merge the PR so it would be usable through your Github Pages website for everyone.

I have a stream processing application where I simply call Topology.describe(), generate the URL with the base64ed result and write it to the log when starting the application. This is makes it easy to have a quick look at the topology while working on it without doing any tedious copy & paste.

gAmUssA commented 5 years ago

@zz85 do you think you can merge it and redeploy?

zz85 commented 5 years ago

Done, it would be nice to have the README updated too