<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Santos</title>
    <description>The latest articles on DEV Community by Daniel Santos (@dougniel).</description>
    <link>https://dev.to/dougniel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F825287%2F57296f39-8f0b-41cf-9f1f-c10d08ab4cd5.png</url>
      <title>DEV Community: Daniel Santos</title>
      <link>https://dev.to/dougniel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dougniel"/>
    <language>en</language>
    <item>
      <title>🎯 Sending flat files to Kafka</title>
      <dc:creator>Daniel Santos</dc:creator>
      <pubDate>Wed, 03 May 2023 06:41:54 +0000</pubDate>
      <link>https://dev.to/optnc/sending-flat-files-to-kafka-2n06</link>
      <guid>https://dev.to/optnc/sending-flat-files-to-kafka-2n06</guid>
      <description>&lt;p&gt;Hello 🖐️ !&lt;/p&gt;

&lt;p&gt;Following the mechanisms described &lt;a href="https://killercoda.com/opt-labs/course/kafka/kcat" rel="noopener noreferrer"&gt;here&lt;/a&gt; to send CSV files into Kafka in JSON using &lt;a href="https://github.com/edenhill/kcat" rel="noopener noreferrer"&gt;kcat&lt;/a&gt; through shell pipelines, we packed 📦 all of that in a new &lt;em&gt;home-made&lt;/em&gt; tool named &lt;a href="https://hub.docker.com/r/optnc/producer-file" rel="noopener noreferrer"&gt;&lt;code&gt;producer-file&lt;/code&gt;&lt;/a&gt;. Here are the features :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💨 Sending line by line&lt;/li&gt;
&lt;li&gt;💪 CSV to JSON conversion &lt;/li&gt;
&lt;li&gt;🔦 Support message headers by file and/or by line&lt;/li&gt;
&lt;li&gt;⚡️ Delta-changes mode &lt;em&gt;(only send changes occurred after last send)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;☝️ More about the &lt;em&gt;shell&lt;/em&gt; way : &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/optnc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F5458%2F98dc3bfe-45f7-48c6-a182-21944edf46b6.jpg" alt="opt-nc"&gt;
      &lt;div class="ltag__link__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446871%2F3e9ded5c-f368-4906-a277-35e56c9f97a7.png" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/optnc/pipe-xlsx-files-intofrom-kafka-from-cli-with-kcat-plp" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;⌨️ Pipe xlsx files into/from Kafka... From cli with (k)cat 🙀&lt;/h2&gt;
      &lt;h3&gt;adriens for opt-nc ・ Oct 10 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#productivity&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#kafka&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#linux&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Motivations
&lt;/h2&gt;

&lt;p&gt;Using &lt;code&gt;jq&lt;/code&gt; + &lt;code&gt;kcat&lt;/code&gt; with shell pipelines do the job well, but this doesn't fit the company's requirements today about software packaging and logging capabilities 🤷🏻‍♂️.&lt;/p&gt;

&lt;h2&gt;
  
  
  📽️ Demo
&lt;/h2&gt;

&lt;p&gt;Short video demonstrating how to use this tool to send a CSV file in JSON into Kafka within a Docker environnement :&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_RV1JTkCcKk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  📖 Ressources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/r/optnc/producer-file" rel="noopener noreferrer"&gt;🐳 producer-file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://killercoda.com/opt-labs/course/kafka/kcat" rel="noopener noreferrer"&gt;🥷 Killercoda about the "shell way"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kafka.apache.org/" rel="noopener noreferrer"&gt;🪶 Kafka&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>kafka</category>
      <category>docker</category>
      <category>productivity</category>
      <category>devops</category>
    </item>
    <item>
      <title>Finally, my first steps on Quarkus 🚀, as an Spring-boot developper</title>
      <dc:creator>Daniel Santos</dc:creator>
      <pubDate>Fri, 22 Jul 2022 04:47:35 +0000</pubDate>
      <link>https://dev.to/optnc/finally-my-first-steps-on-quarkus-as-an-spring-boot-developper-1h7b</link>
      <guid>https://dev.to/optnc/finally-my-first-steps-on-quarkus-as-an-spring-boot-developper-1h7b</guid>
      <description>&lt;p&gt;Hi everyone 🙋🏻‍♂️,&lt;/p&gt;

&lt;h2&gt;
  
  
  We just started trying Quarkus 🙏
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/opt-nc/api-transitaires" rel="noopener noreferrer"&gt;api-transitaires&lt;/a&gt; was the first, it's time to do some quick feedback now 📢&lt;/p&gt;

&lt;p&gt;👉 First, I know that it's already a 3 years old framework &lt;em&gt;(some &lt;code&gt;npm&lt;/code&gt; libs don't live that long)&lt;/em&gt;, but in some &lt;code&gt;J&lt;/code&gt;Companies the investissement to set up some Spring[-Boot] 🍃 developers has been challenging, so the replacement has to be valuable (or &lt;a href="https://www.bdlp.org/fiche/15010?modal=1" rel="noopener noreferrer"&gt;&lt;em&gt;fin valab&lt;/em&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Why to move from Spring-Boot ?
&lt;/h3&gt;

&lt;p&gt;We have a lot of Sping-Boot apps and we are going forward to k8s in &lt;em&gt;serverless&lt;/em&gt; way, so &lt;a href="https://dev.to/optnc/knative-the-easy-way-to-serverless-a-java-app-3n36"&gt;we did some tests with Spring-Native&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It worked 👍, but not so smoothly because of Spring's long history 🏭 which led us to more recent alternatives like 👉 Quarkus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this app ?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/opt-nc/api-transitaires" rel="noopener noreferrer"&gt;api-transitaires&lt;/a&gt; it's a very basic one-endpoint REST API that serves the list of freight forwarders that manage customs clearance on New-Caledonia 🇫🇷.&lt;/p&gt;

&lt;p&gt;The main goal was to try Quarkus in a end to end way, in &lt;a href="https://dev.to/optnc/this-is-how-we-maintain-release-secured-software-on-github-2pn3"&gt;our GitHub CI&lt;/a&gt; : native app, Docker..&lt;/p&gt;

&lt;p&gt;Ok, let's go now..&lt;/p&gt;

&lt;h2&gt;
  
  
  1# IDE integration 📝 - VSCode plugin
&lt;/h2&gt;

&lt;p&gt;I used since almost 2 years VScode, I was happy to discover a &lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-quarkus" rel="noopener noreferrer"&gt;Quarkus's plugin&lt;/a&gt; who does the job  : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generate new project : like SprinBoot does 😉&lt;/li&gt;
&lt;li&gt;launch and debug : ok, relies to &lt;code&gt;mvn&lt;/code&gt; but it works most of the time 🙄.. sometimes it switched off without saying goodbye _(ex: after adding a Quarkus's extension). Otherwise, I don't like that they preferred to use a specific menu for that rather than VSCode's classic "run and debug" 😒&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;⭐️ What I appreciate :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;faster code change / test cycle out-of-the box 📦 : do the change, switch to browser and the change is already applied (I experienced a &lt;em&gt;refresh the browser twice&lt;/em&gt; cycle with Spring-boot Devtools)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;☝️ Nice to have :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;autocompletion on &lt;code&gt;application.properties&lt;/code&gt; as &lt;a href="https://marketplace.visualstudio.com/items?itemName=Pivotal.vscode-boot-dev-pack" rel="noopener noreferrer"&gt;Spring-Boot's plugin&lt;/a&gt; does&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2# Coding a Rest API 👨🏻‍💻 - the standard way
&lt;/h2&gt;

&lt;p&gt;While Spring has chosen to make its own annotations &lt;em&gt;(almost a copy of the standard)&lt;/em&gt;, with Quarkus we go back to the Java standard's ones. Ok, &lt;a href="https://jcp.org/aboutJava/communityprocess/final/jsr311/index.html" rel="noopener noreferrer"&gt;JSR's&lt;/a&gt; are not so fancy 🌈, but less intrusive 🐙.&lt;/p&gt;

&lt;h2&gt;
  
  
  3# Docs 📖 - self sufficient 👍
&lt;/h2&gt;

&lt;p&gt;No need to rely &lt;a href="https://www.baeldung.com/spring-boot" rel="noopener noreferrer"&gt;on other documentations&lt;/a&gt; to do basic things, &lt;a href="https://quarkus.io/guides/" rel="noopener noreferrer"&gt;Quarkus's guides&lt;/a&gt; are in my opinion succinct, practical (&lt;em&gt;getting started&lt;/em&gt; style) and well referenced from google 🤓.. 1st result is the official one ! &lt;/p&gt;

&lt;p&gt;Game changing after years of &lt;a href="https://spring.io/guides/gs/actuator-service/" rel="noopener noreferrer"&gt;Spring's &lt;em&gt;empty shell&lt;/em&gt; getting started guides&lt;/a&gt; or &lt;a href="https://docs.spring.io/spring-kafka/docs/current/reference/html/#connecting" rel="noopener noreferrer"&gt;JavaDoc style reference documentation&lt;/a&gt; 😵‍💫&lt;/p&gt;

&lt;p&gt;👉 I used : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://quarkus.io/guides/rest-json" rel="noopener noreferrer"&gt;Rest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quarkus.io/guides/getting-started-testing" rel="noopener noreferrer"&gt;Test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quarkus.io/guides/building-native-image" rel="noopener noreferrer"&gt;Native&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4# Fast 🏃💨 - minimum included
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Lighter &amp;amp; faster, some fresh metrics from a recent migration from Spring-Boot (&lt;a href="https://github.com/opt-nc/colisnc-api" rel="noopener noreferrer"&gt;colisnc-api&lt;/a&gt;) :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;startup time&lt;/em&gt;: from &lt;code&gt;1s8&lt;/code&gt; to &lt;code&gt;0.5s&lt;/code&gt; &lt;em&gt;(is native really needed with Quarkus ? 🤔)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;CI native build&lt;/em&gt; : from &lt;a href="https://github.com/opt-nc/colisnc-api/actions/runs/2692500500" rel="noopener noreferrer"&gt;&lt;code&gt;14min&lt;/code&gt;&lt;/a&gt; to &lt;a href="https://github.com/opt-nc/colisnc-api/actions/runs/2696232492" rel="noopener noreferrer"&gt;&lt;code&gt;5min&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Docker Native image size&lt;/em&gt; : from &lt;code&gt;40Mo&lt;/code&gt; to &lt;code&gt;30Mo&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Minimum included : it's a philosophy and I like it ❤️ &lt;em&gt;(even the &lt;code&gt;yaml&lt;/code&gt; configuration is not included : &lt;a href="https://quarkus.io/guides/config-yaml" rel="noopener noreferrer"&gt;an extension is needed&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  5# Native ⚡️ - the way is paved 🛣
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It seems that it's was on the Quarkus cookbook since the beginning, not added at the end : Spring Native is still in experimentation.&lt;/li&gt;
&lt;li&gt;Light by default : some basic things are not provided by default like SSL protocol support, but it's easy to do &lt;a href="https://quarkus.io/guides/native-and-ssl" rel="noopener noreferrer"&gt;&lt;code&gt;quarkus.ssl.native=true&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6# Monitoring / dev tooling - Side dishes 🥗
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;less than actuator, but enough in my mind : &lt;a href="https://quarkus.io/guides/smallrye-health" rel="noopener noreferrer"&gt;health&lt;/a&gt;, &lt;a href="https://quarkus.io/guides/openapi-swaggerui" rel="noopener noreferrer"&gt;Swagger&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Nice to have &lt;a href="https://quarkus.io/guides/dev-ui" rel="noopener noreferrer"&gt;online web dev&lt;/a&gt; that gives some basic but useful metrics &lt;em&gt;(as others do since a while, like Symfony 😉)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/opt-nc/api-transitaires" rel="noopener noreferrer"&gt;api-transitaires&lt;/a&gt; : first app&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/opt-nc/colisnc-api" rel="noopener noreferrer"&gt;colisnc-api&lt;/a&gt; : first &lt;a href="https://github.com/opt-nc/colisnc-api/pull/99/files" rel="noopener noreferrer"&gt;migration from Springboot done within 1h30&lt;/a&gt; ⏱&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/optnc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F5458%2F98dc3bfe-45f7-48c6-a182-21944edf46b6.jpg" alt="opt-nc"&gt;
      &lt;div class="ltag__link__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446871%2F3e9ded5c-f368-4906-a277-35e56c9f97a7.png" alt=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/optnc/jfokus2022-quarkus-back-from-the-future-445l" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;📑 #jfokus2022 : Quarkus [...] back from the Future&lt;/h2&gt;
      &lt;h3&gt;adriens for opt-nc ・ Jul 12 '22&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#quarkus&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#java&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#kubernetes&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#showdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Cheers 🍻&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>quarkus</category>
      <category>keepitsimple</category>
    </item>
    <item>
      <title>Knative : the easy way to serverless a java app</title>
      <dc:creator>Daniel Santos</dc:creator>
      <pubDate>Fri, 04 Mar 2022 11:01:57 +0000</pubDate>
      <link>https://dev.to/optnc/knative-the-easy-way-to-serverless-a-java-app-3n36</link>
      <guid>https://dev.to/optnc/knative-the-easy-way-to-serverless-a-java-app-3n36</guid>
      <description>&lt;p&gt;Hi everyone 🙋🏻‍♂️,&lt;/p&gt;

&lt;p&gt;Let me introduce you &lt;a href="https://knative.dev/docs/"&gt;Knative&lt;/a&gt;, a friend &lt;em&gt;(or extension)&lt;/em&gt; of Kubernetes ☸, &lt;em&gt;an easy way to stop apps when not used&lt;/em&gt; and so, save our planet 🌏 from CO₂ attack!&lt;/p&gt;

&lt;p&gt;Works out of the box for a Docker/OCI image of a &lt;em&gt;serving&lt;/em&gt; app (like a REST app), but needs &lt;a href="https://knative.dev/docs/eventing/"&gt;some changes for &lt;em&gt;event consumers&lt;/em&gt; one's&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As the app starts on first request, is better to have a rabbit 🐰 startup performance level degree than a tortoise's 🐢 one &lt;em&gt;(only works in this case 🏁)&lt;/em&gt;. In Java ☕️ apps, &lt;a href="https://www.graalvm.org/22.0/reference-manual/native-image/"&gt;&lt;em&gt;native-images&lt;/em&gt;&lt;/a&gt; comes to rescue 🚀 &lt;em&gt;(more about that in the next post)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You can see a working example of Knative serving a native java &lt;code&gt;REST&lt;/code&gt; app in &lt;a href="https://bit.ly/3B5TAqp"&gt;this interactive Katacoda tutorial&lt;/a&gt;, or if you are a lucky 🇫🇷French🇫🇷 speaker, you can simply watch this demo video: &lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pj-gzsbZJ58"&gt;
&lt;/iframe&gt;
.&lt;/p&gt;

&lt;p&gt;Cheers 🍻&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://knative.dev/docs/"&gt;Knative&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bit.ly/3B5TAqp"&gt;Interactive Katacoda tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.graalvm.org"&gt;GraalVM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.graalvm.org/22.0/reference-manual/native-image/"&gt;native-images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/"&gt;Spring Native &lt;em&gt;(experimental)&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>serverless</category>
      <category>kubernetes</category>
      <category>java</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
