<?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: Victor Darkes</title>
    <description>The latest articles on DEV Community by Victor Darkes (@darkes).</description>
    <link>https://dev.to/darkes</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%2F203004%2Ffc9ccce2-2588-4466-9066-fca11719e007.jpeg</url>
      <title>DEV Community: Victor Darkes</title>
      <link>https://dev.to/darkes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darkes"/>
    <language>en</language>
    <item>
      <title>Popular Kotlin Server-Side Libraries</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Sun, 22 Nov 2020 02:11:08 +0000</pubDate>
      <link>https://dev.to/darkes/popular-kotlin-server-side-libraries-5boo</link>
      <guid>https://dev.to/darkes/popular-kotlin-server-side-libraries-5boo</guid>
      <description>&lt;p&gt;&lt;a href="https://kotlinlang.org/"&gt;Kotlin&lt;/a&gt; is a programming language for &lt;a href="https://kotlinlang.org/lp/mobile/"&gt;mobile cross-platform&lt;/a&gt;, &lt;a href="https://kotlinlang.org/docs/reference/native-overview.html"&gt;native&lt;/a&gt;, &lt;a href="https://kotlinlang.org/docs/reference/data-science-overview.html"&gt;data science&lt;/a&gt;, &lt;a href="https://kotlinlang.org/docs/reference/js-overview.html"&gt;web&lt;/a&gt;, &lt;a href="https://kotlinlang.org/docs/reference/android-overview.html"&gt;Android&lt;/a&gt;, and &lt;a href="https://kotlinlang.org/lp/server-side/"&gt;server-side&lt;/a&gt; development. &lt;/p&gt;

&lt;h1&gt;
  
  
  Kotlin for the Win
&lt;/h1&gt;

&lt;p&gt;Kotlin is a great option for server-side development because it's a modern and concise take on JVM development.  If you write Kotlin code there are advantages to using libraries written in Kotlin versus libraries written in Java. Here are some of those advantages. &lt;/p&gt;

&lt;p&gt;There is less mental load when interacting with a Kotlin-specific library. That's because there is no context switching when you look at the source code of a library or are trying to debug a library feature. Additionally, Kotlin-specific library APIs are more idiomatic. In Kotlin functional programming is a first-class citizen. Many of these libraries lend themselves to functional programming over equivalent Java libraries meant for object oriented programming. Finally, you can avoid &lt;a href="https://kotlinlang.org/docs/reference/java-interop.html"&gt;Kotlin platform types&lt;/a&gt;. Kotlin platform types appear when you reference Java code from within Kotlin code. The type is not guaranteed as nullable or non-nullable, so you can still run into null pointer exceptions. With all that said, here is a list of popular libraries written in Kotlin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/ktorio/ktor"&gt;Ktor&lt;/a&gt; - A Kotlin web framework that has the most GitHub stars relative to other options. Can be used with a variety of the other options mentioned in this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/http4k/http4k"&gt;http4k&lt;/a&gt; - A simple and functional HTTP client and server. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jetbrains/kotless"&gt;Kotless&lt;/a&gt; - A Kotlin serverless framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/mockk/mockk"&gt;Mockk&lt;/a&gt; - A Kotlin &lt;a href="https://stackoverflow.com/questions/2665812/what-is-mocking"&gt;mocking&lt;/a&gt; library. Mocking is commonly done when writing unit tests. Usually what isn't being tested is what you mock so that your individual test can focus on one function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nhaarman/mockito-kotlin"&gt;Mockito Kotlin&lt;/a&gt; - If you're familiar with the Java Mockito library, then this one might be the right choice for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.spekframework.org/"&gt;Spek&lt;/a&gt; - A good option if you're a fan of Jest. &lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Kotlin/dokka"&gt;Dokka&lt;/a&gt; - The official documentation engine for Kotlin. It performs the same role as javadoc in Java.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dependency Injection
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/InsertKoinIO/koin"&gt;Koin&lt;/a&gt; - Has more GitHub stars of the two options. It has a simpler API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Kodein-Framework/Kodein-DI"&gt;Kodein&lt;/a&gt; - A more robust API. Supports Kotlin multiplatform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Database
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/JetBrains/Exposed"&gt;Exposed&lt;/a&gt; - A Kotlin SQL ORM framework. It supports 7 different databases, including MySQL, PostgreSQL, and MariaDB.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/cashapp/sqldelight"&gt;SQLDelight&lt;/a&gt; - Generates type-safe Kotlin models from your SQL statements. &lt;/p&gt;

&lt;h2&gt;
  
  
  Miscellaneous
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/square/okio"&gt;Okio&lt;/a&gt; - An I/O library. If you need to read or write data to a filesystem this is the library for you.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There are a lot of different options for writing server-side Kotlin code. Additionally, many of these libraries are useful for more than just server-side development. Since Kotlin was first released, the ecosystem has matured and provides a lot of different options for Kotlin developers.&lt;/p&gt;

&lt;p&gt;If you use Kotlin do make an effort to use libraries written in Kotlin? Or does it not matter to you? Let me know in the comments.&lt;/p&gt;

</description>
      <category>kotlin</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Infrastructure as Code Explained</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Thu, 12 Nov 2020 20:36:29 +0000</pubDate>
      <link>https://dev.to/darkes/infrastructure-as-code-explained-3fbc</link>
      <guid>https://dev.to/darkes/infrastructure-as-code-explained-3fbc</guid>
      <description>&lt;h1&gt;
  
  
  What is Infrastructure?
&lt;/h1&gt;

&lt;p&gt;Infrastructure is all the necessary underlining technology that supports your running application. Examples include a server, database or private network.&lt;/p&gt;

&lt;p&gt;Before the popularity of cloud all this underlining technology was managed locally. Someone would have to be physically responsible for software updates and upgrades. Now the  high adoption of cloud infrastructure allows for their creation in a cloud providers console with a few clicks. Initially it may seem easy to manage all the cloud resources you have. &lt;/p&gt;

&lt;h1&gt;
  
  
  Why Manage Infrastructure With Code?
&lt;/h1&gt;

&lt;p&gt;As you scale or work on larger projects it can be hard to manage all your cloud resources and prices can increase quickly. Infrastructure as Code (IaC) allows you to provision and manage any cloud, infrastructure, or service with code. IaC provides visibility into what resources are being used. That makes it easier to keep track of changes that occur. Using code also allows for automation to play a larger role in your workflow. That removes potential human errors. IaC also standardizes cloud resources because now there shouldn't be any differences between individual servers. &lt;/p&gt;

&lt;h1&gt;
  
  
  List of Popular Tools
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.chef.io/"&gt;Chef&lt;/a&gt; - Uses a Ruby Domain Specific Language (DSL). &lt;br&gt;
&lt;a href="https://inedo.com/otter"&gt;Otter&lt;/a&gt; - A Windows-oriented solution.&lt;br&gt;
&lt;a href="https://puppet.com/"&gt;Puppet&lt;/a&gt; - Uses proprietary declarative Puppet DSL that's Ruby based. &lt;br&gt;
&lt;a href="http://saltstack.com"&gt;SaltStack&lt;/a&gt; - Acquired by &lt;a href="https://www.vmware.com/"&gt;VMWare&lt;/a&gt; in 2020. 3rd Most GitHub stars.&lt;br&gt;
&lt;a href="https://cfengine.com/"&gt;CFEngine&lt;/a&gt; - The oldest of the group. Used by LinkedIn and Samsung.&lt;br&gt;
&lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; - The one I personally use. Newest of the group and has the 2nd most GitHub star.&lt;br&gt;
&lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt; - Acquired by &lt;a href="//redhat.com"&gt;Red Hat&lt;/a&gt; in 2015 and ships with the Linux &lt;a href="https://getfedora.org/"&gt;Fedora&lt;/a&gt; operation system. Most GitHub stars.&lt;br&gt;
&lt;a href="https://aws.amazon.com/cloudformation/"&gt;AWS CloudFormation&lt;/a&gt; - AWS-only resources can be managed.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Difference
&lt;/h1&gt;

&lt;p&gt;Each of these has it's own approach. Here are some strengths and weaknesses between some of these offerings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuration Management vs Provisioning - Is the IaC tooling more suited for managing software on existing servers or creating new servers?&lt;/li&gt;
&lt;li&gt;Mutable vs Immutable infrastructure - When I make a change are existing resources modified or are new resources created?&lt;/li&gt;
&lt;li&gt;procedural vs declarative - Programming style preference.&lt;/li&gt;
&lt;li&gt;Agent vs Agentless - Does the server that is being configured need to install agent software?&lt;/li&gt;
&lt;li&gt;Master vs Masterless - Does the IaC tooling need it's own server to run from?&lt;/li&gt;
&lt;li&gt;Large vs Small community - Will it be easy for me to find support and resources?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's best to check your requirements and choose a solution that meets your needs.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There isn't one perfect Infrastructure as Code solution out there. For simpler projects they aren't necessary. It can take longer to learn one of these than just provisioning resources yourself. But as you grow that approach does not scale. In an enterprise environment, Infrastructure as Code is vital for reducing costs, and errors, while increasing visibility across an organization, and consistency.&lt;/p&gt;

&lt;p&gt;What's your experience with Infrastructure as Code?&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>aws</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>All Redis Eviction Policies Cheatsheet &amp; Explanation</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Wed, 04 Nov 2020 17:07:09 +0000</pubDate>
      <link>https://dev.to/darkes/all-redis-eviction-policies-cheatsheet-explanation-3cj9</link>
      <guid>https://dev.to/darkes/all-redis-eviction-policies-cheatsheet-explanation-3cj9</guid>
      <description>&lt;h1&gt;
  
  
  What is Redis?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://redis.io/"&gt;Redis&lt;/a&gt; is an open source, in-memory data store that can be used as a database, distributed cache and message broker. It supports strings, collections, along with other data structures. Redis allows &lt;a href="https://stackoverflow.com/questions/52196678/what-are-atomic-operations-for-newbies"&gt;atomic operations&lt;/a&gt; on these types, such as pushing an element to a list. &lt;/p&gt;

&lt;h1&gt;
  
  
  Why use Redis?
&lt;/h1&gt;

&lt;p&gt;A common use case for Redis is as a distributed cache in a microservice-oriented architecture. Let's say you have a service that calls a third-party and only so many requests to the third-party can be made before you're rate limited. You can cache the third-party response in-memory, but typically you'll have multiple instances of your service so that doesn't scale. You can use a use a traditional database, but if the third-party data is being served in real time to end users, that increases latency which is bad. This is where Redis comes in. Redis supports lower latency than a traditional database, and also can be the single source of truth for all the instances of your service so there are less calls to the third-party.&lt;/p&gt;

&lt;h1&gt;
  
  
  In-Memory vs On-Disk
&lt;/h1&gt;

&lt;p&gt;There are different types of computer memory. Accessing data in memory eliminates seek time when querying the data. Eliminated seek time provides faster reads than disk. If you can serve more requests using in-memory data that's a better experience for your end user.&lt;/p&gt;

&lt;h1&gt;
  
  
  What's an Eviction Policy
&lt;/h1&gt;

&lt;p&gt;An eviction policy is a popular feature in caches. It defines  when to remove items from the data store based on what is configured. Redis has &lt;strong&gt;8&lt;/strong&gt; different eviction policies to choose from.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Default Eviction Policy
&lt;/h1&gt;

&lt;p&gt;You might be thinking, &lt;em&gt;there's too many to choose from, I'll  just use the default&lt;/em&gt;, but that is not very wise. The default is &lt;code&gt;noeviction&lt;/code&gt; which means that when the memory is full,  there will be no evictions and Redis will return an error. This is not ideal in any production scenario. It demonstrates why you should use one of the many other eviction policies which will not interrupt your production systems. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;allkeys&lt;/code&gt; vs &lt;code&gt;volatile&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;volatile&lt;/code&gt; means only keys with an &lt;code&gt;expire set&lt;/code&gt; will be evicted. So you need to &lt;em&gt;explicitly&lt;/em&gt; prepare entries for eviction. On the other hand, &lt;code&gt;allkeys&lt;/code&gt; means that all keys are eligible for eviction.&lt;/p&gt;

&lt;h1&gt;
  
  
  vs Least Recently Used (&lt;code&gt;lru&lt;/code&gt;) vs Least Frequently Used (&lt;code&gt;lfu&lt;/code&gt;)
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;lru&lt;/code&gt; means that when the memory limit is reached, the last accessed items will be deleted. &lt;code&gt;lfu&lt;/code&gt; will try to track the frequency of access of items, so that items that are used rarely are evicted while the ones used often have an higher chance of remaining in memory.&lt;/p&gt;

&lt;h1&gt;
  
  
  Unsure of Which Eviction Policy to Use?
&lt;/h1&gt;

&lt;p&gt;The recommended eviction policy is &lt;code&gt;allkeys-lru&lt;/code&gt;. This is an &lt;a href="https://redis.io/topics/lru-cache"&gt;official recommendation&lt;/a&gt; by Redis.&lt;/p&gt;

&lt;h1&gt;
  
  
  Table of all Redis Eviction Policies
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;noeviction (default)&lt;/td&gt;
&lt;td&gt;Returns an error if the memory limit has been reached when trying to insert more data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;allkeys-lru&lt;/strong&gt; (recommended if unsure)&lt;/td&gt;
&lt;td&gt;Evicts the least recently used keys out of all keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;allkeys-lfu&lt;/td&gt;
&lt;td&gt;Evicts the least frequently used keys out of all keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;allkeys-random&lt;/td&gt;
&lt;td&gt;Randomly evicts keys out of all keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;volatile-lru&lt;/td&gt;
&lt;td&gt;Evicts the least recently used keys out of all keys with an “expire” field set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;volatile-lfu&lt;/td&gt;
&lt;td&gt;Evicts the least frequently used keys out of all keys with an “expire” field set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;volatile-random&lt;/td&gt;
&lt;td&gt;Randomly evicts keys with an “expire” field set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;volatile-ttl&lt;/td&gt;
&lt;td&gt;Evicts the shortest time-to-live keys out of all keys with an “expire” field set.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There are a lot more reasons and uses cases for Redis than what I covered. However, I hope this provides an overview of some of what Redis offers and how you can start using it. Remember if data volatility is acceptable in your use case, you should use &lt;code&gt;allkeys-lru&lt;/code&gt;. Do you currently use Redis? Let me know your thoughts down below.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like what you've read, want to continue the discussion, or have anything else on your mind, reach out to me on &lt;a href="http://twitter.com/iamdarkes"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>redis</category>
      <category>webdev</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Cloud Native Computing Foundation Graduated Projects</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Mon, 26 Oct 2020 16:01:50 +0000</pubDate>
      <link>https://dev.to/darkes/cloud-native-computing-foundation-graduated-projects-40jl</link>
      <guid>https://dev.to/darkes/cloud-native-computing-foundation-graduated-projects-40jl</guid>
      <description>&lt;h1&gt;
  
  
  Cloud Native
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://github.com/cncf/toc/blob/master/DEFINITION.md" rel="noopener noreferrer"&gt;Cloud native&lt;/a&gt; technologies empower organizations to build and run scalable applications in modern environments. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs are examples. Cloud native software enables loosely coupled systems that are resilient, manageable, and observable. &lt;/p&gt;

&lt;p&gt;&lt;a href="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%2Fi%2Fzyzbupff0nxo9wthlanb.png" class="article-body-image-wrapper"&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%2Fi%2Fzyzbupff0nxo9wthlanb.png" alt="cncf-color"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Cloud Native Computing Foundation
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://www.cncf.io/" rel="noopener noreferrer"&gt;CNCF&lt;/a&gt; seeks to drive adoption of cloud native software by fostering and sustaining an ecosystem of open source, vendor-neutral projects. CNCF is part of the nonprofit &lt;a href="https://www.linuxfoundation.org/" rel="noopener noreferrer"&gt;Linux Foundation&lt;/a&gt; and members include AWS, Apple, Google Cloud, and Microsoft Azure. &lt;/p&gt;

&lt;h1&gt;
  
  
  Why Care about CNCF?
&lt;/h1&gt;

&lt;p&gt;Now more than ever, companies that are not labeled as software companies are realizing that they need to have their own proprietary software to compete in the digital age. Adopting cloud native technologies and practices enables companies to create software in-house. CNCF technologies enable cloud portability without vendor lock-in. Also the biggest companies develop, support and promote these technologies from their inception so you'll probably work with at least one of these eventually if you already haven't.&lt;/p&gt;

&lt;h1&gt;
  
  
  When a Project Graduates
&lt;/h1&gt;

&lt;p&gt;A CNCF project can have a maturity level of sandbox, incubating, or graduated. The maturity level is a signal by CNCF as to what sorts of enterprises should be adopting different projects. Projects increase their maturity by demonstrating their sustainability to CNCF’s Technical Oversight Committee. Graduate projects are widely adopted, have frequent changes, and have a variety of contributors. &lt;/p&gt;

&lt;p&gt;&lt;a href="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%2Fi%2F5mg3g41y3cg8zmlime7p.jpg" class="article-body-image-wrapper"&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%2Fi%2F5mg3g41y3cg8zmlime7p.jpg" alt="cncf-graduated-color"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Graduated Projects
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/containerd/containerd" rel="noopener noreferrer"&gt;containerd - Container Runtime&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;containerd is a &lt;a href="https://developers.redhat.com/blog/2018/02/22/container-terminology-practical-introduction/#h.6yt1ex5wfo55" rel="noopener noreferrer"&gt;container runtime&lt;/a&gt; with an emphasis on simplicity, robustness and portability. It is available as a daemon, which can manage the complete container lifecycle of its host system: image transfer and storage, container execution and supervision, low-level storage and network attachments, etc. containerd is designed to be embedded into a larger system, rather than being used directly by developers or end-users.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/coredns/coredns" rel="noopener noreferrer"&gt;CoreDNS - Service Discovery&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;CoreDNS is a &lt;a href="https://www.cloudflare.com/learning/dns/what-is-dns/" rel="noopener noreferrer"&gt;Domain Name System (DNS)&lt;/a&gt; server and forwarder, that chains plugins. Each plugin performs a DNS function. CoreDNS is a fast and flexible DNS server that allows you to do what you want with your DNS data by utilizing plugins. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/envoyproxy/envoy" rel="noopener noreferrer"&gt;Envoy - Network Proxy&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Envoy is an edge and service proxy designed for cloud native applications made by Lyft.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/fluent/fluentd/" rel="noopener noreferrer"&gt;Fluentd - Logging&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Fluentd collects events from various data sources and writes them to files, RDBMS, NoSQL, IaaS, SaaS, Hadoop and so on. Fluentd helps you unify your logging infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/goharbor/harbor" rel="noopener noreferrer"&gt;Harbor - Registry&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;An open source registry that secures artifacts with policies and role-based access control, ensures images are scanned and free from vulnerabilities, and signs images as trusted.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/helm/helm" rel="noopener noreferrer"&gt;Helm - Package Management&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Helm is a package manager for Kubernetes that streamlines installing and managing Kubernetes applications. Helm manages Charts, which are packages of pre-configured Kubernetes resources. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/jaegertracing/jaeger" rel="noopener noreferrer"&gt;Jaeger - Distributed Tracing&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Jaeger is a &lt;a href="https://netflixtechblog.com/building-netflixs-distributed-tracing-infrastructure-bb856c319304" rel="noopener noreferrer"&gt;distributed tracing&lt;/a&gt; platform that can be used for monitoring microservices-based distributed systems. It was created by Uber Technologies. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/kubernetes/kubernetes" rel="noopener noreferrer"&gt;Kubernetes - Orchestration&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Kubernetes is an open source system for &lt;a href="https://www.redhat.com/en/topics/containers/what-is-container-orchestration" rel="noopener noreferrer"&gt;managing containerized applications&lt;/a&gt; across multiple hosts. It provides basic mechanisms for deployment, maintenance, and scaling of applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/prometheus/prometheus" rel="noopener noreferrer"&gt;Prometheus - Monitoring&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/rook/rook" rel="noopener noreferrer"&gt;Rook - Storage&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Rook is an open source cloud-native &lt;a href="https://storageos.com/orchestrated-storage-containers" rel="noopener noreferrer"&gt;storage orchestrator&lt;/a&gt; for Kubernetes, providing the platform, framework, and support for a diverse set of storage solutions to natively integrate with cloud-native environments. Rook turns storage software into self-managing, self-scaling, and self-healing storage services. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/tikv/tikv" rel="noopener noreferrer"&gt;TiKV - Key/Value Store&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;TiKV is an open-source, distributed, and transactional &lt;a href="https://aws.amazon.com/nosql/key-value/" rel="noopener noreferrer"&gt;key-value database&lt;/a&gt;. Unlike other traditional NoSQL systems, TiKV not only provides classical key-value APIs, but also transactional APIs with &lt;a href="https://mariadb.com/resources/blog/acid-compliance-what-it-means-and-why-you-should-care/" rel="noopener noreferrer"&gt;ACID&lt;/a&gt; compliance. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/theupdateframework/specification" rel="noopener noreferrer"&gt;TUF - Software Update Spec&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The Update Framework (TUF) helps developers maintain the security of software update systems. TUF provides a flexible framework and specification that developers can adopt to secure any software update system.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/vitessio/vitess" rel="noopener noreferrer"&gt;Vitess - Storage&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Vitess is a database clustering system for horizontal scaling of &lt;a href="https://www.mysql.com/" rel="noopener noreferrer"&gt;MySQL&lt;/a&gt; through generalized sharding. By encapsulating shard-routing logic, Vitess allows application code and database queries to remain agnostic to the distribution of data onto multiple shards. &lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There are a lot of different projects that all have different applications. You don't need to know or use all of these. However, if you are in a situation that requires one of these types of solutions you should consider using one of these products. Do you use any of these products already? If yes, which ones?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like what you've read, want to continue the discussion, or have anything else on your mind, reach out to me on &lt;a href="https://twitter.com/iamdarkes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The 5 Most Popular AWS Products</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Wed, 21 Oct 2020 16:01:05 +0000</pubDate>
      <link>https://dev.to/darkes/the-5-most-popular-aws-products-2epo</link>
      <guid>https://dev.to/darkes/the-5-most-popular-aws-products-2epo</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EPjfOdap--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qzovy1pocot5rtvjetk4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EPjfOdap--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qzovy1pocot5rtvjetk4.png" alt="aws"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS Leads the Cloud Infrastructure Market
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/"&gt;Amazon Web Services (AWS)&lt;/a&gt; has been the leading cloud infrastructure provider. As of 2020, AWS had a &lt;a href="https://www.statista.com/chart/18819/worldwide-market-share-of-leading-cloud-infrastructure-service-providers/"&gt;market share&lt;/a&gt; equal to the next three cloud providers combined (Azure, Google Cloud, Alibaba Cloud). AWS has products for every category and there are some that are more widely used than others. With &lt;a href="https://aws.amazon.com/what-is-aws/"&gt;over 175 services&lt;/a&gt;, navigating AWS can be overwhelming as a beginner. To help simplify the search of which ones to learn first. Here are the most popular AWS products.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why are These the Most Popular?
&lt;/h1&gt;

&lt;p&gt;AWS and &lt;a href="https://www.2ndwatch.com/"&gt;2nd Watch&lt;/a&gt; partnered to determine the most popular AWS products. AWS used data from 2nd Watch clients to create this list. This is the most recently compiled data by the two companies. These 5 are in no particular order, because they were all used by 100% of the companies surveyed. I've linked tutorials to learn more and try them out for yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p6wfYqZ---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ovoio1ppzrlp63w53qyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p6wfYqZ---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ovoio1ppzrlp63w53qyy.png" alt="dynamodb"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://youtu.be/sI-zciHAh-4"&gt;DynamoDB&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Amazon's very own key-value and document NoSQL database. You'll have automatic storage scaling, low-latency data access, and guaranteed throughput. You should use DynamoDB if you won't plan to make a lot relational queries across multiple tables. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/SU4dZ-qgR1Y"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/DqLFfp3Yg_g"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l-1fNHuH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/01holsjchpxi99eleow9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l-1fNHuH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/01holsjchpxi99eleow9.png" alt="s3"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://youtu.be/77lMCiiMilo"&gt;Simple Storage Service (S3)&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;An object storage service. It's advantage over DynamoDB is that it's more suited for storing images and documents. Practical use cases for S3 include: data lakes, website hosting, backup and restore, and big data analytics. Be mindful of the access policies you configure. This prevents making private business data accidentally public.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/5S_QHyPA7H4"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/kt3ZtW9MXhw"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--056piKKN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kkxxonmb9h0n2wvlhiev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--056piKKN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kkxxonmb9h0n2wvlhiev.png" alt="sns"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://youtu.be/u5j1U3qFXDY"&gt;Simple Notification Service (SNS)&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;A fully-managed &lt;a href="https://aws.amazon.com/pub-sub-messaging/"&gt;publish-and-subscribe messaging&lt;/a&gt; service. With SNS you can perform system-to-system and app-to-person communication. Ideal if you plan to have an &lt;a href="https://aws.amazon.com/event-driven-architecture"&gt;event-driven architecture&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/tBs6I__oeLc"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/tm12hr8JDk4"&gt;Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bYpeka-V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nc7zecqwtfmy9d4r7qlm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bYpeka-V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/nc7zecqwtfmy9d4r7qlm.png" alt="ec2"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://youtu.be/TsRBftzZsQo"&gt;Elastic Compute Cloud (EC2)&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Virtual servers managed by Amazon. Very easy to get started with by choosing one of the many &lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html"&gt;Amazon Machine Images (AMI)&lt;/a&gt;. Great for hosting your applications.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/tasoWTGM1hA"&gt;JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://youtu.be/qUHQuZjTOFA"&gt;Python&lt;/a&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6rp2PqgL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hi25bdoeobre4yccgtbx.png" alt="KMS"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://youtu.be/uhXalpNzPU4"&gt;AWS Key Management Service (KMS)&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Helpful for anyone interested in protecting data stored in AWS. KMS makes it easy for you to create, manage and control cryptographic keys across AWS services. Securing data is very important and stricter regulation around data will only continue to grow as time goes on. This isn't one of the more exciting AWS services. Chances are that developers at a larger company developers won't directly interact or be aware of this product. Site Reliability Engineers (SREs) / Security Operations (SecOps) would be more likely to manage keys.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://youtu.be/SOnJyqwGn1I"&gt;Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;If you're new to coding and managed cloud services, these are the ones to start getting yourself familiar with AWS. If you're an experienced developer, do you feel like there's any others that are more ubiquitous than these? Is your favorite product missing? Let me know in the comments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like what you've read, want to continue the discussion, or have anything else on your mind, reach out to me on &lt;a href="https://twitter.com/iamdarkes"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>webdev</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Using Gradle's Kotlin DSL to Bundle React With a Spring Boot Web Application</title>
      <dc:creator>Victor Darkes</dc:creator>
      <pubDate>Sun, 26 Apr 2020 14:57:48 +0000</pubDate>
      <link>https://dev.to/darkes/using-gradle-s-kotlin-dsl-to-bundle-react-with-a-spring-boot-web-application-355k</link>
      <guid>https://dev.to/darkes/using-gradle-s-kotlin-dsl-to-bundle-react-with-a-spring-boot-web-application-355k</guid>
      <description>&lt;h1&gt;
  
  
  Putting Together a Full-Stack Codebase
&lt;/h1&gt;

&lt;p&gt;I was recently looking for a way to serve a &lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt; application in a &lt;a href="https://spring.io/projects/spring-boot" rel="noopener noreferrer"&gt;Spring Boot&lt;/a&gt; microservice and have the two  together in a single, unified, and manageable codebase. If you're working for a large company, then it's usually best to keep the two separate. However, this is just for my personal projects and one repository to keep track of helps with velocity. &lt;/p&gt;

&lt;h1&gt;
  
  
  An Overview
&lt;/h1&gt;

&lt;p&gt;For those unfamiliar with the &lt;a href="https://spring.io/" rel="noopener noreferrer"&gt;Spring Framework&lt;/a&gt;, it is a collection of different projects that make application development easier for &lt;a href="https://www.oracle.com/java/" rel="noopener noreferrer"&gt;Java&lt;/a&gt; and &lt;a href="https://kotlinlang.org/" rel="noopener noreferrer"&gt;Kotlin&lt;/a&gt; developers. &lt;a href="https://spring.io/projects/spring-boot" rel="noopener noreferrer"&gt;Spring Boot&lt;/a&gt; is a microservice starter and is one of those projects. Simply put, the &lt;code&gt;build.gradle.kts&lt;/code&gt; in a Spring application is the equivalent of the &lt;code&gt;package.json&lt;/code&gt; in a React project, as it has your dependencies and tasks (which are the same as scripts). &lt;/p&gt;

&lt;p&gt;Not too long ago, &lt;a href="http://groovy-lang.org/" rel="noopener noreferrer"&gt;Groovy&lt;/a&gt; was the &lt;a href="https://en.wikipedia.org/wiki/Domain-specific_language" rel="noopener noreferrer"&gt;domain-specific language&lt;/a&gt; (DSL) for the Gradle build file. I have seen various articles about achieving what I want to accomplish with Groovy, but I didn't see an examples using Kotlin, which has now become the default DSL. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A domain-specific language is a computer language specialized to a particular application domain. The build file in a Spring project is the application domain. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Spring Into Action
&lt;/h1&gt;

&lt;p&gt;The &lt;a href="https://start.spring.io/" rel="noopener noreferrer"&gt;Spring Initialzr&lt;/a&gt; can help you create an project and the only dependency you need is the &lt;strong&gt;Spring Web&lt;/strong&gt; starter. &lt;/p&gt;

&lt;p&gt;The generated Spring Boot project structure will look like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

├── gradle
│   └── wrapper
└── src
    ├── main
    │   ├── kotlin
    │   │   └── me
    │   │       └── darkes
    │   │           └── springbootreactgradlekotlin
    │   ├── resources
    └── test
        └── kotlin
            └── me
                └── darkes
                    └── springbootreactgradlekotlin


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Creating the React Application
&lt;/h2&gt;

&lt;p&gt;Run the following command inside the &lt;code&gt;/src/main/&lt;/code&gt; directory of your Spring Boot project.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
 create-react-app webapp --use-npm

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This will go ahead and make a new directory called &lt;code&gt;/webapp&lt;/code&gt; with your newly made React application.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting Up the Gradle Build File
&lt;/h2&gt;

&lt;p&gt;The whole process of having a combined codebase is possible because of the Gradle plugin, &lt;a href="https://github.com/node-gradle/gradle-node-plugin" rel="noopener noreferrer"&gt;Gradle Node Plugin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In a Spring application the &lt;code&gt;resources/&lt;/code&gt; directory is where we'd put our generated React &lt;code&gt;build/&lt;/code&gt; files, because that is where a Spring application looks for static files to serve.&lt;/p&gt;

&lt;p&gt;Add all of this to your &lt;code&gt;build.gradle.kts&lt;/code&gt; file in your Spring Boot application root directory.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;


&lt;span class="nf"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.github.node-gradle.node"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="s"&gt;"2.2.2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NpmTask&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"appNpmInstall"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Installs all dependencies from package.json"&lt;/span&gt;
    &lt;span class="n"&gt;workingDir&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"${project.projectDir}/src/main/webapp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"install"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;NpmTask&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"appNpmBuild"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;dependsOn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"appNpmInstall"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Builds project"&lt;/span&gt;
    &lt;span class="n"&gt;workingDir&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"${project.projectDir}/src/main/webapp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Copy&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"copyWebApp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;dependsOn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"appNpmBuild"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Copies built project to where it will be served"&lt;/span&gt;
    &lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"src/main/webapp/build"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;into&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"build/resources/main/static/."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;node&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;download&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
    &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"12.13.1"&lt;/span&gt;
    &lt;span class="n"&gt;npmVersion&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"6.12.1"&lt;/span&gt;
    &lt;span class="c1"&gt;// Set the work directory for unpacking node&lt;/span&gt;
    &lt;span class="n"&gt;workDir&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"${project.buildDir}/nodejs"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// Set the work directory for NPM&lt;/span&gt;
    &lt;span class="n"&gt;npmWorkDir&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"${project.buildDir}/npm"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;withType&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;KotlinCompile&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// So that all the tasks run with ./gradlew build&lt;/span&gt;
    &lt;span class="nf"&gt;dependsOn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"copyWebApp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;kotlinOptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;freeCompilerArgs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;listOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"-Xjsr305=strict"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;jvmTarget&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"1.8"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Building the Project
&lt;/h2&gt;

&lt;p&gt;All you have to do is run &lt;code&gt;./gradlew build&lt;/code&gt; from your project root directory. You'll notice after Gradle is finished, the React build directory is in the new location &lt;code&gt;build/resources/main/static/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you want to see the application in action you can run &lt;code&gt;java -jar build/libs/PROJECT_NAME.jar&lt;/code&gt; from the project root directory. Then visit &lt;code&gt;localhost:8080&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  How It All Works
&lt;/h2&gt;

&lt;p&gt;Typically with a normal React application you'll use &lt;code&gt;npm install&lt;/code&gt; and &lt;code&gt;npm run build&lt;/code&gt;. The Gradle plugin provides &lt;code&gt;NpmTask&lt;/code&gt; to run those same commands. The tasks that I included are all that's needed to install, build and copy the files to where the Spring Boot application will notice them. Additionally, if you're someone who prefers &lt;a href="https://yarnpkg.com/" rel="noopener noreferrer"&gt;Yarn&lt;/a&gt; or just wants to run a &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; script, you can use this plugin to do that too! &lt;/p&gt;

&lt;p&gt;The code can be found here:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/iamdarkes" rel="noopener noreferrer"&gt;
        iamdarkes
      &lt;/a&gt; / &lt;a href="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl" rel="noopener noreferrer"&gt;
        spring-boot-react-gradle-kotlin-dsl
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Using Gradle's Kotlin DSL to Bundle React With a Spring Boot Web Application
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl/workflows/Build%20CI%20with%20Gradle/badge.svg"&gt;&lt;img src="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl/workflows/Build%20CI%20with%20Gradle/badge.svg" alt="Build CI with Gradle"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl/workflows/Docker%20Image/badge.svg"&gt;&lt;img src="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl/workflows/Docker%20Image/badge.svg" alt="Docker Image"&gt;&lt;/a&gt;
&lt;a href="https://www.paypal.me/iamdarkes" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2b3b3f38604d749b543e8577afdc6bd9fab25244f6cb16bfb713273a74350fd7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667" alt="Donate"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Using Gradle's Kotlin DSL to Bundle React with a Spring Boot Web Application&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsldemo.gif"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fiamdarkes%2Fspring-boot-react-gradle-kotlin-dsldemo.gif" alt="demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This project contains an example of how to serve a React application
from Spring Boot using Gradle's Kotlin DSL.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Read the Article&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/darkes/using-gradle-s-kotlin-dsl-to-bundle-react-with-a-spring-boot-web-application-355k" rel="nofollow"&gt;DEV&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How to Connect &amp;amp; Support&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/iamdarkes" rel="nofollow noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/darkes/" rel="nofollow noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/darkes" rel="nofollow"&gt;DEV&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@darkes" rel="nofollow noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/iamdarkes" rel="nofollow noopener noreferrer"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/iamdarkes" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/darkes" rel="nofollow noopener noreferrer"&gt;GitLab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darkes.me/" rel="nofollow noopener noreferrer"&gt;darkes.me&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/iamdarkes/spring-boot-react-gradle-kotlin-dsl" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;I hope this was helpful. If you're used to using another language or technology for your server-side code, this starter is a great way to give Kotlin and Spring Boot a try.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>webdev</category>
      <category>react</category>
      <category>kotlin</category>
    </item>
  </channel>
</rss>
