{"id":1016,"date":"2021-03-05T09:51:26","date_gmt":"2021-03-05T09:51:26","guid":{"rendered":"http:\/\/www.igfasouza.com\/blog\/?p=1016"},"modified":"2021-04-19T20:56:23","modified_gmt":"2021-04-19T19:56:23","slug":"oci-dashboard-with-smashingdashing-and-kafka","status":"publish","type":"post","link":"http:\/\/www.igfasouza.com\/blog\/oci-dashboard-with-smashingdashing-and-kafka\/","title":{"rendered":"OCI Dashboard with Smashing\/Dashing and Kafka"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka2.jpg\" alt=\"\" class=\"alignnone size-full wp-image-1017\" width=\"515\" height=\"556\" srcset=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka2.jpg 515w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka2-278x300.jpg 278w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/p>\n<p><b>What&#8217;s up?<\/b><br \/>\n<small style=\"color:#9f9f9f\">2021\/03\/05<\/small><\/p>\n<p>This is another blog about Raspberry PI, and today I want to show how I did a simple Kafka cluster demo. It&#8217;s kind of a continuation from my two previous blogs, <a href=\"http:\/\/www.igfasouza.com\/blog\/kafka-at-the-edge-with-raspberry-pi\/\" rel=\"noopener\" target=\"_blank\">Kafka at the edge with Raspberry PI<\/a> and <a href=\"http:\/\/www.igfasouza.com\/blog\/real-time-locating-system-with-kafka\/\" rel=\"noopener\" target=\"_blank\">Real-Time Locating System with Kafka<\/a>.<\/p>\n<p>If you\u2019re not familiar with Kafka, I suggest you have a look at my previous post <a href=\"http:\/\/www.igfasouza.com\/blog\/what-is-kafka\/\" rel=\"noopener\" target=\"_blank\">What is Kafka?<\/a> before, and you can have a look at how I created the Kafka cluster <a href=\"http:\/\/www.igfasouza.com\/blog\/raspberry-pi-kafka-cluster\/\" rel=\"noopener\" target=\"_blank\">here<\/a>.<\/p>\n<h2>Idea<\/h2>\n<p>I found the idea of an <a href=\"https:\/\/www.oc-blog.com\/2019\/05\/13\/oci-dashboard-with-smashing-dashing\/\" rel=\"noopener\" target=\"_blank\">OCI dashboard with smashing dashing<\/a> in a colleague&#8217;s <a href=\"https:\/\/www.oc-blog.com\/\" rel=\"noopener\" target=\"_blank\">blog<\/a> some time ago and I decided to pivot a little bit in a simple Raspberry Pi Kafka example where I can get OCI data and combine it with the smashing dashing dashboard idea.<\/p>\n<p>For the producer part, you can use my Micronaut Sense hat example as a start point and just change to get the OCI data. You can get the full Micronaut Kafka Producer code on my <a href=\"https:\/\/github.com\/igfasouza\/micronaut_sensehat\" rel=\"noopener\" target=\"_blank\">GitHub<\/a>.<\/p>\n<p><a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/SDKDocs\/javasdk.htm\" rel=\"noopener\" target=\"_blank\">https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/API\/SDKDocs\/javasdk.htm<\/a><br \/>\n<a href=\"https:\/\/github.com\/oracle\/oci-java-sdk\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/oracle\/oci-java-sdk<\/a><\/p>\n<p>For the consumer part, you can use my Quarkus example. You can get the full Quarkusl Kafka Consumer code on my <a href=\"https:\/\/github.com\/igfasouza\/quarkus-kafka-consumer\" rel=\"noopener\" target=\"_blank\">GitHub<\/a>.<\/p>\n<p>clone the <a href=\"https:\/\/github.com\/AnykeyNL\/oci-smashing\" rel=\"noopener\" target=\"_blank\">code<\/a> and change the update.py file to read the value from the REST interface that Quarkus generates.<\/p>\n<p><b>Results<\/b><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka1.jpg\" alt=\"\" class=\"alignnone size-full wp-image-1018\" width=\"636\" height=\"313\" srcset=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka1.jpg 636w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka1-300x148.jpg 300w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/OCI-kafka1-624x307.jpg 624w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<p>Because this is a kind of Oracle Cloud solution you can use Oracle Streaming Service instead of hosting your Kafka.<\/p>\n<p>Oracle Streaming Service (OSS) is a real-time, serverless, Apache Kafka-compatible event streaming platform for developers and data scientists, it provides a fully managed, scalable, and durable solution for ingesting and consuming high-volume data streams in real-time. To learn more about Oracle Streaming Service, see the <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Streaming\/Concepts\/streamingoverview.htm\" rel=\"noopener\" target=\"_blank\">documentation overview<\/a>.<\/p>\n<p>You can check my <a href=\"https:\/\/github.com\/igfasouza\/OSS_examples\" rel=\"noopener\" target=\"_blank\">GitHub<\/a> with some OSS examples and check the Micronaut one.<\/p>\n<p>You just need to change the &#8220;application.yml&#8221; file from my Micronaut sense hat idea.<\/p>\n<div class=\"codecolorer-container java blackboard\" style=\"overflow:auto;white-space:nowrap;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/><\/div><\/td><td><div class=\"java codecolorer\">kafka<span class=\"sy0\">:<\/span><br \/>\nbootstrap<span class=\"sy0\">:<\/span><br \/>\nservers<span class=\"sy0\">:<\/span> streaming.<span class=\"br0\">&#123;<\/span>your<span class=\"sy0\">-<\/span>region<span class=\"br0\">&#125;<\/span>.<span class=\"me1\">oci<\/span>.<span class=\"me1\">oraclecloud<\/span>.<span class=\"me1\">com<\/span><span class=\"sy0\">:<\/span><span class=\"nu0\">9092<\/span><br \/>\nsecurity<span class=\"sy0\">:<\/span><br \/>\nprotocol<span class=\"sy0\">:<\/span> SASL_SSL<br \/>\nsasl<span class=\"sy0\">:<\/span><br \/>\nmechanism<span class=\"sy0\">:<\/span> PLAIN<br \/>\nkey<span class=\"sy0\">:<\/span><br \/>\nserializer<span class=\"sy0\">:<\/span> org.<span class=\"me1\">apache<\/span>.<span class=\"me1\">kafka<\/span>.<span class=\"me1\">common<\/span>.<span class=\"me1\">serialization<\/span>.<span class=\"me1\">StringSerializer<\/span><br \/>\ndeserializer<span class=\"sy0\">:<\/span> org.<span class=\"me1\">apache<\/span>.<span class=\"me1\">kafka<\/span>.<span class=\"me1\">common<\/span>.<span class=\"me1\">serialization<\/span>.<span class=\"me1\">StringDeserializer<\/span><br \/>\nvalue<span class=\"sy0\">:<\/span><br \/>\nserializer<span class=\"sy0\">:<\/span> org.<span class=\"me1\">apache<\/span>.<span class=\"me1\">kafka<\/span>.<span class=\"me1\">common<\/span>.<span class=\"me1\">serialization<\/span>.<span class=\"me1\">StringSerializer<\/span><br \/>\ndeserializer<span class=\"sy0\">:<\/span> org.<span class=\"me1\">apache<\/span>.<span class=\"me1\">kafka<\/span>.<span class=\"me1\">common<\/span>.<span class=\"me1\">serialization<\/span>.<span class=\"me1\">StringDeserializer<\/span><br \/>\nretries<span class=\"sy0\">:<\/span> <span class=\"nu0\">5<\/span><br \/>\nmax<span class=\"sy0\">:<\/span><br \/>\nrequest<span class=\"sy0\">:<\/span><br \/>\nsize<span class=\"sy0\">:<\/span> <span class=\"nu0\">1048576<\/span><br \/>\npartition<span class=\"sy0\">:<\/span><br \/>\nfetch<span class=\"sy0\">:<\/span><br \/>\nbytes<span class=\"sy0\">:<\/span> <span class=\"nu0\">1048576<\/span><br \/>\ngroup<span class=\"sy0\">:<\/span><br \/>\nid<span class=\"sy0\">:<\/span> group<span class=\"sy0\">-<\/span><span class=\"nu0\">0<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>And you can use all solutions in the cloud.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06-1024x533.png\" alt=\"\" class=\"alignnone size-large wp-image-1019\" width=\"625\" height=\"325\" srcset=\"http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06-1024x533.png 1024w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06-300x156.png 300w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06-768x400.png 768w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06-624x325.png 624w, http:\/\/www.igfasouza.com\/blog\/wp-content\/uploads\/2021\/03\/Screenshot-2021-03-03-at-15.01.06.png 1422w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>The Kafka consumer and the dashboard can be hosted in a cloud VM as well.<\/p>\n<p>OCI Logging service is a highly scalable and fully managed single pane of glass for all the logs in your tenancy. Logging provides access to logs from Oracle Cloud Infrastructure resources. These logs include critical diagnostic information that describes how resources are performing and being accessed. To learn more about the Logging service, see the <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/Logging\/Concepts\/loggingoverview.htm\" rel=\"noopener\" target=\"_blank\">documentation overview<\/a>.<\/p>\n<p>OCI Service Connector Hub moves data, such as logs from Logging, to services, such as Object Storage, Streaming, and Monitoring. It triggers functions for custom data processing and sends notifications about changes to cloud resources. To learn more about the Service Connector Hub, see the <a href=\"https:\/\/docs.oracle.com\/en-us\/iaas\/Content\/service-connector-hub\/overview.htm\" rel=\"noopener\" target=\"_blank\">documentation overview<\/a>.<\/p>\n<p>Here using Service Connector Hub I can get the logs from my tenancy and send them to OSS in a simple way.<\/p>\n<h2>Links<\/h2>\n<p><a href=\"https:\/\/www.oc-blog.com\/2019\/05\/13\/oci-dashboard-with-smashing-dashing\/\" rel=\"noopener\" target=\"_blank\">https:\/\/www.oc-blog.com\/2019\/05\/13\/oci-dashboard-with-smashing-dashing\/<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/AnykeyNL\/oci-smashing\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/AnykeyNL\/oci-smashing<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What&#8217;s up? 2021\/03\/05 This is another blog about Raspberry PI, and today I want to show how I did a simple Kafka cluster demo. It&#8217;s kind of a continuation from my two previous blogs, Kafka at the edge with Raspberry&hellip; <a href=\"http:\/\/www.igfasouza.com\/blog\/oci-dashboard-with-smashingdashing-and-kafka\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1017,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[17,7,13],"class_list":["post-1016","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-java","tag-kafka","tag-raspberry-pi"],"_links":{"self":[{"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/posts\/1016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/comments?post=1016"}],"version-history":[{"count":3,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions"}],"predecessor-version":[{"id":1114,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/posts\/1016\/revisions\/1114"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/media\/1017"}],"wp:attachment":[{"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/media?parent=1016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/categories?post=1016"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.igfasouza.com\/blog\/wp-json\/wp\/v2\/tags?post=1016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}