<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andre Oliveira on Medium]]></title>
        <description><![CDATA[Stories by Andre Oliveira on Medium]]></description>
        <link>https://medium.com/@oliveira.andreeduardo?source=rss-a5094edc2fd0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6nemYA2s5gkEYpzHiR9I2g@2x.jpeg</url>
            <title>Stories by Andre Oliveira on Medium</title>
            <link>https://medium.com/@oliveira.andreeduardo?source=rss-a5094edc2fd0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:29:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oliveira.andreeduardo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Efficient Logging with Spring AOP]]></title>
            <link>https://medium.com/analytics-vidhya/efficient-caching-with-spring-aop-92f2242287d5?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/92f2242287d5</guid>
            <category><![CDATA[aop]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[logs]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Sun, 30 Jun 2024 09:59:34 GMT</pubDate>
            <atom:updated>2024-07-24T18:43:06.710Z</atom:updated>
            <content:encoded><![CDATA[<h4>Log Everything without touch the existent code using Spring AOP.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MxG6z65zEgxznrfbut_wdQ.jpeg" /></figure><p>Let’s get straight to the point: you want to log everything in your project without messing up all your methods with logging code. The solution? Aspect-Oriented Programming (AOP).</p><p>You can find the link for the git with the code <a href="https://github.com/gigandre/aspect-log">here</a>, but I’ll explain below in case you need it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*9r8N7KzP1nHvEhAsynl0HQ.png" /><figcaption>Project Structure</figcaption></figure><p>As you can see, is a vanilla Spring Boot project where I created a CRUD application containing a controller, a service and a repository to show that the logs works in different classes and packages. But the class that matter most for us is the LoggerAOP where the real magic happens.</p><pre>package com.example.logger.aspect.aop;<br><br>import lombok.extern.slf4j.Slf4j;<br>import org.aspectj.lang.JoinPoint;<br>import org.aspectj.lang.annotation.AfterReturning;<br>import org.aspectj.lang.annotation.AfterThrowing;<br>import org.aspectj.lang.annotation.Aspect;<br>import org.aspectj.lang.annotation.Before;<br>import org.springframework.stereotype.Component;<br><br>import java.util.Arrays;<br><br>@Aspect<br>@Component<br>@Slf4j<br>public class LoggerAOP {<br><br>    @Before(&quot;execution(* com.example..*(..))&quot;)<br>    public void logMethodInputs(JoinPoint joinPoint) {<br>        log.info(&quot;Logging method inputs for class: &quot; + joinPoint.getTarget().getClass().getName() +<br>                &quot;, method: &quot; + joinPoint.getSignature().getName() + &quot; with args: &quot; + Arrays.toString(joinPoint.getArgs()));<br>    }<br><br>    @AfterReturning(pointcut = &quot;execution(* com.example..*(..))&quot;, returning = &quot;result&quot;)<br>    public void logMethodOutputs(JoinPoint joinPoint, Object result) {<br>        log.info(&quot;Logging method outputs for class: &quot; + joinPoint.getTarget().getClass().getName() +<br>                &quot;, method: &quot; + joinPoint.getSignature().getName() + &quot; with result: &quot; + result);<br>    }<br><br>    @AfterThrowing(pointcut = &quot;execution(* com.example..*(..))&quot;, throwing = &quot;ex&quot;)<br>    public void logMethodException(JoinPoint joinPoint, Exception ex) {<br>        log.error(&quot;Exception in method for class: &quot; + joinPoint.getTarget().getClass().getName() +<br>                &quot;, method: &quot; + joinPoint.getSignature().getName() + &quot; with exception: &quot; + ex.getMessage());<br>    }<br>}</pre><p>This class is all you need to add in your application. You can easily adapt this to your own application by replacing the package structure (in my example, I’m using com.example).</p><p>When you make a POST request to http://localhost:8080/item with a JSON payload like this:</p><pre>{<br>    &quot;id&quot;: 1,<br>    &quot;name&quot;: &quot;Your Item Name&quot;,<br>    &quot;quantity&quot;: 10<br>}</pre><p>You’ll receive an output like this:</p><pre>2024-06-24T11:13:12.230+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method inputs for class: com.example.logger.aspect.controller.ItemController, method: save with args: [Item[id=1, name=Your Item Name, quantity=10]]<br>2024-06-24T11:13:12.230+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method inputs for class: com.example.logger.aspect.service.ItemService, method: save with args: [Item[id=1, name=Your Item Name, quantity=10]]<br>2024-06-24T11:13:12.230+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method inputs for class: com.example.logger.aspect.repository.ItemRepository, method: save with args: [Item[id=1, name=Your Item Name, quantity=10]]<br>2024-06-24T11:13:12.230+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method outputs for class: com.example.logger.aspect.repository.ItemRepository, method: save with result: Item[id=1, name=Your Item Name, quantity=10]<br>2024-06-24T11:13:12.230+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method outputs for class: com.example.logger.aspect.service.ItemService, method: save with result: Item[id=1, name=Your Item Name, quantity=10]<br>2024-06-24T11:13:12.232+01:00  INFO 31051 --- [logger-aoc] [nio-8080-exec-4] c.example.logger.aspect.aop.LoggerAOP    : Logging method outputs for class: com.example.logger.aspect.controller.ItemController, method: save with result: &lt;200 OK OK,Item[id=1, name=Your Item Name, quantity=10],[]&gt;</pre><p>I hope it helps you in your project, if you need more information let me know in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92f2242287d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/efficient-caching-with-spring-aop-92f2242287d5">Efficient Logging with Spring AOP</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Custom Cache Solution with Spring AOP — Part 1]]></title>
            <link>https://towardsdev.com/creating-a-custom-cache-solution-with-spring-aop-part-1-3936c2ea6c3d?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3936c2ea6c3d</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[improvement]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[cache]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 17:06:36 GMT</pubDate>
            <atom:updated>2023-10-02T17:06:36.727Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a Custom Cache Solution with Spring AOP — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIuoO5f430gaADqiTVLJYQ.jpeg" /></figure><p><strong>Introduction</strong><br>Are you in a situation where you need a caching solution tailored to your specific project requirements, and you can’t afford to wait for approvals or integrate third-party solutions like Redis or Memcached? If so, this tutorial is for you. In this guide, we will walk through the process of building your own cache solution using Spring AOP. While there are excellent off-the-shelf caching options available, sometimes a custom solution can be the most efficient way to meet your project’s unique needs.</p><p><strong>Project Structure</strong><br>Let’s start by examining the structure of our cache implementation project. We’ll create a service class, a controller, an annotation, an entity, a repository, and an aspect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*o1Y8RIaQol0aOnVml_UvLw.png" /></figure><p><strong>Service Class</strong></p><p>I have created a service class with a method that performs random calculations and returns the execution time. On my laptop, the execution time is approximately 700 milliseconds.</p><pre>package com.example.custom.cache.service;<br><br>import java.util.Random;<br>import org.springframework.stereotype.Service;<br>import org.springframework.util.StopWatch;<br><br>@Service<br>public class LoopExecutionService {<br>    public Long getLoopExecutionTime(int exampleParam){<br>        StopWatch stopWatch = new StopWatch();<br>        stopWatch.start();<br>        Random random = new Random();<br>        int total = 0;<br>        for(int i=0; i &lt; 100_000_000; i++){<br>            total = total * exampleParam * random.nextInt(100);<br>        }<br>        stopWatch.stop();<br>        return stopWatch.getTotalTimeMillis();<br><br>    }<br>}</pre><p><strong>Controller</strong></p><p>I called this service using a simple controller with two APIs. Please pay attention to the ‘@MyCache’ annotation; we will explore how to create it.</p><pre>package com.example.custom.cache.controller;<br><br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.web.bind.annotation.GetMapping;<br>import org.springframework.web.bind.annotation.RequestMapping;<br>import org.springframework.web.bind.annotation.RequestParam;<br>import org.springframework.web.bind.annotation.RestController;<br><br>import com.example.custom.cache.annotation.MyCache;<br>import com.example.custom.cache.service.LoopExecutionService;<br><br>@RestController<br>@RequestMapping(&quot;test/cache-execution&quot;)<br>public class LoopExecutionController {<br><br>    @Autowired<br>    LoopExecutionService loopExecutionService;<br><br>    @GetMapping<br>    @MyCache(evictTime=1000)<br>    public Long getLoopExecutionTime(){<br>        return loopExecutionService.getLoopExecutionTime(1);<br>    }<br><br>    @GetMapping(&quot;/with-param&quot;)<br>    @MyCache(evictTime=1)<br>    public Long getLoopExecutionTimeWithParam(@RequestParam String testId){<br>        return loopExecutionService.getLoopExecutionTime(1);<br>    }<br><br>    <br>}</pre><p><strong>Annotation</strong></p><p>The mentioned annotation, ‘@MyCache,’ will be used to cache all items that include it. The ‘evictTime’ parameter will come into play in Part 2. The main concept is to determine how long we should retain this cache.</p><pre>import java.lang.annotation.ElementType;<br>import java.lang.annotation.Retention;<br>import java.lang.annotation.RetentionPolicy;<br>import java.lang.annotation.Target;<br><br>@Retention(RetentionPolicy.RUNTIME)<br>@Target(ElementType.METHOD)<br>public @interface MyCache {<br>      int evictTime() default 1;<br>}</pre><p><strong>Entity and Repository</strong></p><pre>package com.example.custom.cache.entity;<br><br>import java.time.LocalDateTime;<br><br>import lombok.AllArgsConstructor;<br>import lombok.Builder;<br>import lombok.Data;<br>import lombok.NoArgsConstructor;<br><br>@Data<br>@Builder<br>@NoArgsConstructor<br>@AllArgsConstructor<br>public class CacheEntity {<br>  private String id;<br>  private String cacheValue;<br>  private String objType;<br>  private LocalDateTime evictTime;<br><br>}</pre><pre>package com.example.custom.cache.repository;<br><br>import java.util.HashMap;<br>import java.util.Map;<br>import java.util.Optional;<br><br>import org.springframework.stereotype.Repository;<br><br>import com.example.custom.cache.entity.CacheEntity;<br><br>@Repository<br>public class MyCacheRepository {<br>    private static Map&lt;String, CacheEntity&gt; map = new HashMap&lt;&gt;();<br><br>    public Optional&lt;CacheEntity&gt; findById(String cacheKey){<br>        return Optional.ofNullable(map.get(cacheKey));<br>    }<br><br>    public void save(CacheEntity cacheEntity){<br>        map.put(cacheEntity.getId(), cacheEntity);<br>    }<br>    <br>}</pre><p><strong>Aspect Implementation</strong><br>Now, let’s dive into the aspect where the magic happens. While it may not be the most elegant code, it gets the job done.</p><pre>package com.example.custom.cache.aop;<br><br>import java.lang.reflect.Field;<br>import java.lang.reflect.InvocationTargetException;<br>import java.lang.reflect.Method;<br>import java.time.LocalDateTime;<br>import java.util.ArrayList;<br>import java.util.Arrays;<br>import java.util.Collection;<br>import java.util.List;<br>import java.util.stream.Collectors;<br><br>import org.apache.commons.beanutils.PropertyUtilsBean;<br>import org.apache.commons.codec.digest.DigestUtils;<br>import org.aspectj.lang.ProceedingJoinPoint;<br>import org.aspectj.lang.annotation.Around;<br>import org.aspectj.lang.annotation.Aspect;<br>import org.aspectj.lang.reflect.MethodSignature;<br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.cglib.beans.BeanMap;<br>import org.springframework.stereotype.Component;<br><br>import com.example.custom.cache.annotation.MyCache;<br>import com.example.custom.cache.entity.CacheEntity;<br>import com.example.custom.cache.repository.MyCacheRepository;<br>import com.fasterxml.jackson.databind.ObjectMapper;<br><br>@Aspect<br>@Component<br>public class MyCacheAop{<br><br>    @Autowired<br>    MyCacheRepository myCacheRepository;<br><br>  @Around(&quot;@annotation(com.example.custom.cache.annotation.MyCache)&quot;)<br>  public Object cache(final ProceedingJoinPoint pjp) throws Throwable {<br>    final List&lt;String&gt; paramValueList = new ArrayList&lt;&gt;();<br>    Arrays.stream(pjp.getArgs()).forEach(param -&gt; this.getPropertiesValue(param, paramValueList));<br><br>    final String cacheKey = this.getCacheKey(paramValueList);<br><br>    final CacheEntity cacheEntity = this.getCacheEntity(cacheKey);<br><br>    if (cacheEntity != null) {<br>      final String response = cacheEntity.getCacheValue();<br>      if (response != null) {<br>        final ObjectMapper objectMapper = new ObjectMapper();<br>        final Class&lt;?&gt; klass = Class.forName(cacheEntity.getObjType());<br>        return objectMapper.readValue(response, klass);<br>      }<br>    }<br><br>    final Object returnValue = pjp.proceed();<br><br>    final String jsonString = new ObjectMapper().writeValueAsString(returnValue);<br><br>    final MethodSignature signature = (MethodSignature) pjp.getSignature();<br>    final Method method = signature.getMethod();<br>    final MyCache myCache = method.getAnnotation(MyCache.class);<br><br>    this.myCacheRepository.save(new CacheEntity(cacheKey, jsonString, returnValue.getClass().getName(),<br>        LocalDateTime.now().plusMinutes(myCache.evictTime())));<br><br>    return returnValue;<br>  }<br><br>  private CacheEntity getCacheEntity(final String cacheKey) {<br>    return this.myCacheRepository.findById(cacheKey).orElse(null);<br>  }<br><br>  private String getCacheKey(final List&lt;String&gt; paramValueList) {<br>    final String concatedValues = paramValueList.stream().map(Object::toString).collect(Collectors.joining(&quot;,&quot;));<br>    return DigestUtils.sha256Hex(concatedValues);<br>  }<br><br>  private List&lt;String&gt; getPropertiesValue(final Object paramObj, final List&lt;String&gt; paramValueList) {<br>    if (paramObj instanceof String || paramObj instanceof Number) {<br>      paramValueList.add(String.valueOf(paramObj));<br>      return paramValueList;<br>    } else if (paramObj instanceof Collection) {<br>      for (final Object objParam : (Collection&lt;?&gt;) paramObj) {<br>        this.getPropertiesValue(objParam, paramValueList);<br>      }<br>    }<br><br>    final BeanMap beanMap = BeanMap.create(paramObj);<br>    final PropertyUtilsBean propertyUtilsBean = new PropertyUtilsBean();<br>    beanMap.keySet().stream().sorted().forEach(objAttributeName -&gt; {<br>      try {<br>        final String attributeName = String.valueOf(objAttributeName);<br>        final String atrributeTypeClassName = String.valueOf(propertyUtilsBean.getPropertyType(paramObj, attributeName));<br>        if (atrributeTypeClassName.contains(&quot;java.lang.&quot;)) {<br>          paramValueList.add(String.valueOf(propertyUtilsBean.getProperty(paramObj, attributeName)));<br>        } else if (atrributeTypeClassName.contains(&quot;java.util.Collection&quot;)) {<br>          try {<br>            if (propertyUtilsBean.getProperty(paramObj, attributeName) != null) {<br>              for (final Object obj : (Collection&lt;?&gt;) propertyUtilsBean.getProperty(paramObj, attributeName)) {<br>                for (final Field field : obj.getClass().getDeclaredFields()) {<br>                  final String atrributeTypeName = field.getGenericType().getTypeName();<br>                  if (atrributeTypeName.contains(&quot;java.lang.Integer&quot;) || atrributeTypeName.contains(&quot;java.lang.String&quot;)) {<br>                    paramValueList.add(String.valueOf(obj));<br>                  } else if (atrributeTypeName.contains(&quot;java.util.Collection&quot;)) {<br>                    // Do nothing, we are handling it in another place<br>                  } else if (atrributeTypeName.contains(&quot;&quot;)) {<br>                    this.getPropertiesValue(obj, paramValueList);<br>                  }<br>                }<br>              }<br>            }<br>          } catch (final Exception e) {<br>            e.printStackTrace();<br>          }<br>        } else if (atrributeTypeClassName.contains(&quot;com.example.custom.cache&quot;)) {<br>          this.getPropertiesValue(propertyUtilsBean.getProperty(paramObj, attributeName), paramValueList);<br>        } else if (attributeName.equals(&quot;class&quot;) &amp;&amp; paramObj != null &amp;&amp; !paramObj.toString().isEmpty()) {<br>          paramValueList.add(paramObj.toString().substring(0,<br>              paramObj.toString().contains(&quot;@&quot;) ? paramObj.toString().indexOf(&quot;@&quot;) : paramObj.toString().length()));<br>        }<br>      } catch (final IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {<br>        e.printStackTrace();<br>      }<br>    });<br>    return paramValueList;<br>  }<br><br>}</pre><p><strong>GitHub Repository</strong><br>You can find the complete implementation and code examples on our GitHub repository: <a href="http://[GitHub Custom Cache]">https://github.com/gigandre/custom-cache</a>.</p><p><strong>Conclusion</strong><br>With this guide, you have everything you need to create your own custom cache solution tailored to your project’s specific needs. While there are robust third-party caching options available, sometimes rolling your own solution can be both efficient and effective. I hope this tutorial proves helpful for your caching needs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3936c2ea6c3d" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/creating-a-custom-cache-solution-with-spring-aop-part-1-3936c2ea6c3d">Creating a Custom Cache Solution with Spring AOP — Part 1</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running a Spring Image on Docker with MongoDB]]></title>
            <link>https://medium.com/analytics-vidhya/running-a-spring-image-on-docker-with-mongodb-777a5df0567?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/777a5df0567</guid>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Fri, 17 Mar 2023 08:47:50 GMT</pubDate>
            <atom:updated>2023-03-17T08:47:50.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*yZhTnXrOgsayKzCaYvfS6A.png" /></figure><p>To run a Spring application on Docker with MongoDB is super easy.<br>I’ll skip the Spring Application because I’ll suppose you already have a configurated Spring Application using a MongoDB configuration and you also have a Docker daemon up and running as I had.</p><p>So let’s start creating a Docker image of our project using creating in the root folder — the same level as the pom.xml, file Dockerfile.</p><pre># Image for build the project<br>FROM maven:3.8.3-openjdk-17 as maven<br># copy pom to get off-line dependencies<br>COPY ./pom.xml ./pom.xml<br># copy your other files<br>COPY ./src ./src<br># build up project<br>RUN mvn dependency:go-offline package -B<br># Create a new light container just with compiled jar<br>FROM openjdk:17-alpine<br>COPY - from=maven target/your-app-name*.jar ./app.jar<br>ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;app.jar&quot;]</pre><p>After that, we must create a docker-compose.yml file in the same folder that Dockerfile to build and execute our project’s image and also run the MongoDB.</p><pre>version: &quot;3.8&quot;<br><br>services:<br><br>    your-app-name:<br>      build: ./<br>      container_name: your-app-name<br>      image: your-app-name<br>      restart: always<br>      ports:<br>        - 8080:8080<br>      depends_on:<br>      - mongo  <br><br>    mongo:<br>      image: mongo<br>      container_name: mongo<br>      restart: always<br>      ports:<br>        - 27017:27017<br>        <br>  <br>    mongo-express:<br>      container_name: mongo-express<br>      image: mongo-express<br>      restart: always<br>      ports:<br>        - 8081:8081</pre><p>Note that I also added the Mongo Express to manage the data. You can open it using the URL <a href="http://localhost:8081/">http//:localhost:8081</a>.</p><p>To finish, we must update our application.yml or properties with those configurations.</p><pre>spring:<br>  data:<br>    mongodb:<br>      host: mongo<br>      port: 27017<br>      database: admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*t1b_KeNkH9IDw0QknsqvhQ.png" /><figcaption>Folder Structure</figcaption></figure><p>That is all. As I said, it is super simple.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=777a5df0567" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/running-a-spring-image-on-docker-with-mongodb-777a5df0567">Running a Spring Image on Docker with MongoDB</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a scheduled AWS Lambda App with Node.js, MongoDB, and Docker — Part 1]]></title>
            <link>https://medium.com/analytics-vidhya/how-to-create-a-scheduled-aws-lambda-app-with-node-js-mongodb-and-docker-part-1-491ff2778ae4?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/491ff2778ae4</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[lamba]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 11:35:37 GMT</pubDate>
            <atom:updated>2021-10-17T13:45:15.814Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create a scheduled AWS Lambda App with Node.js, MongoDB, and Docker — Part 1</h3><p>A few days ago I needed to create an application that consumes a Rest service application and saves the response in a database every night at midnight.</p><p>The app could be basically a function so I decide to use AWS Lambda and the AWS CloudWatch to trigger my function daily. The MongoDB was because the service’s response is a JSON object, so I do not need anything besides receive and save the response and the Docker was chosen in order to keep the environment completely under my control, otherwise, I could create a function directly on the AWS.</p><p>To avoid a huge guide, I&#39;ll split this tutorial into three parts:</p><ul><li>MongoDB</li><li>NodeJs and Docker</li><li>AWS Lambda</li></ul><p>Let’s get straight to the point, creating a MongoDB database and a collection.</p><h4>MongoDB</h4><p>In our tutorial, we going to use the MongoDB Atlas where there is a free option. <br><a href="https://www.mongodb.com/"><em>https://www.mongodb.com/</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uhKXeyVIrBRKa5RvRI1LVw.png" /></figure><p>After the login or create a new account. We need to have an Organization, I called mine <strong><em>test-tutorial</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*gYaiS62WNS9nv02FlTYdkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*z6Vt2xnPsPtWp_1uOyC21Q.png" /></figure><p>Now we need to create a new project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*cwN_TNa2Ep0Ax1xWrnhxFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*O_MqcA_yneXQcP6cIY0Kkw.png" /></figure><p>We are almost done, now we are going to create the database and the cluster. Select the free option. We can choose between different vendors, but I’ll select AWS just to keep everything in the same place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UfAVOEk1oOijU1a_b3Qj7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*nR9GhL1MPNEHXIdkPTgq2Q.png" /></figure><p>After few minutes, our cluster is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCBlFU4C0DgJm0B4KOw9fg.png" /></figure><p>To finalize, click on <strong><em>Browse Collections</em></strong> and <strong><em>Add My Own Data</em></strong>, to create our database and our first collection. For the ones who don’t know MongoDB yet, a collection is the same as a table in a traditional database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWiF_SYq1QWaFWbSBYFhag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1-StHO0CWbpX6xKm23m5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTetfoW3EdivKZ_qcHQEVQ.png" /></figure><p>Now we are ready to create our Node.js application that will use our database.</p><p>See you at the part 2.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=491ff2778ae4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/how-to-create-a-scheduled-aws-lambda-app-with-node-js-mongodb-and-docker-part-1-491ff2778ae4">How to create a scheduled AWS Lambda App with Node.js, MongoDB, and Docker — Part 1</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Java to JavaScript or Java and JavaScript?]]></title>
            <link>https://medium.com/analytics-vidhya/from-java-to-javascript-or-java-and-javascript-1bcdaf847bc9?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bcdaf847bc9</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 14:12:16 GMT</pubDate>
            <atom:updated>2020-06-14T17:36:19.041Z</atom:updated>
            <content:encoded><![CDATA[<p>Java and JavaScript are no teenagers anymore, they are mature languages besides from been almost twins because they own similar names that caused a lot of confusion until today, they were born almost in the same year and mainly have died at least for the specialists and therefore have revived a lot during all these years, today they standing uncontested as one of three most important languages dividing the podium with Phyton, but they are very distinct languages</p><p>When I started to program, javascript was merely used to perform dynamic things on the front end, yes there was a long time ago. But I have been hearing for years about javascript been running on the server-side and I need to confess, was hard to believe, especially if you lived the same period than me, where we didn’t considerate javascript a serious language or a language at all.</p><p>Some day, from nowhere, I started to think about how some languages lose space and how their programmers don’t see it happening. Today nothing indicates this kind of thing will occur with Java, but we never know, right?!. With this idea in mind, I decided to give a try to the momentum language, where there are a lot of people saying that we can pretty do everything.</p><p>Time to the second confession, yeah they were right and JavaScript is awesome.</p><p>As I said, I have been working with java for a long time, over 14 years, but after some days using JavaScript I started to question myself “why to use Java instead of JavaScript, once JavaScript is faster to program and we can save a lot of resources on the cloud?”.</p><h4>NODEJS</h4><p>NodeJS was <a href="https://en.wikipedia.org/wiki/Node.js">created in 2009</a> and nowadays is used for thousands of companies like <a href="https://softwarebrothers.co/blog/companies-that-use-node-js/">Netflix, Paypal, and LinkedIn</a> and if you spend a few hours reading and using it, it is quite easy to get why NodeJS grew up this much, is very simple to start and to use. Just to make clear, I’m not saying that you going to become a master senior Jedi javascript developer in few weeks, but you will be able to build greats thing in much less time than other languages like Java for example, but as always this is just my opinion, based on my personal experience so far.</p><p>Study JavaScript and NodeJS also helped me to understand better the changes suffered by Java and recognized something likeFunction Expression released in Java 8 and the “var” word-concept that came in Java 10.</p><p>Yes I know, I just said good things about JavaScript. You must be wondering, JavaScript is the so chased silver bullet? Until now I don’t see anything that JavaScript doesn’t solve well, but the specialists always say this kind of thing doesn’t exist, so let remain with them, it is quite possible they found or needed some specific thing or situation that I don’t.</p><p>I have been saying a lot of good things about JavaScripts and nothing about Java, but don’t give me wrong. I love Java and definitely, Java is a very very good language, maybe I’m just excited about a new thing as a child when they have a new toy. I continue working on my daily base with Java, and to the ones who want to learn Java, I strongly recommend, especially because nowadays when we have wonderful options to work on the Java universe as Spring and <a href="https://medium.com/analytics-vidhya/quarkus-what-why-and-how-114bce3cc46f">Quarkus</a> where you can create a rest API in few minutes.</p><p>The reason to write this text is that it is not clear to me where/when one is better than the other one, or if I/we continue with Java or jump to JavaScript. Maybe the question is we need both? or They solve the same problems?</p><p>Maybe you can help me with your answer.</p><p>For now, I follow Malcolm X’s advice.</p><blockquote>Education is the passport to the future, for tomorrow belongs to those who prepare for it today.</blockquote><p>Probably the best advice is to study both languages and stay read for what comes next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bcdaf847bc9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/from-java-to-javascript-or-java-and-javascript-1bcdaf847bc9">From Java to JavaScript or Java and JavaScript?</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Maybe native executable in Quarkus is not for you, but it is awesome]]></title>
            <link>https://medium.com/analytics-vidhya/maybe-native-executable-in-quarkus-is-not-for-you-but-it-is-awesome-967588e80a4?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/967588e80a4</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Mon, 02 Mar 2020 08:45:53 GMT</pubDate>
            <atom:updated>2020-03-02T08:45:53.296Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*oQGTdP-KqUc6bkwvMueW5A.png" /><figcaption><a href="https://quarkus.io/">https://quarkus.io</a></figcaption></figure><p>First things first, If you don&#39;t have a good machine with at least 8GB Ram, maybe generate a native executable isn&#39;t for you. To generate a native executable in a machine powerless than this is very hard and almost impossible to do on a daily base.</p><p>Summarizing the history, a tried to generate a native executable file in my two machines a Mac Air i5 and a Dell XPS i7 both with 4 GB ram and I got the same error, each time I tried:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80C73pH_klqUma5tonzkDg.png" /><figcaption>Error: Image build request failed with exit status 137</figcaption></figure><p>I could only create this when I changed the configuration of my Linux machine to text mode to save all memory possible and even that way a had to wait for an hour.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npJhSZXfSeCEhMFPMShjug.png" /></figure><p>I tried to figure out the minimum machine specification required and all I found was this:</p><blockquote>Prerequisites</blockquote><blockquote>For compilation native-image depends on the local toolchain, so please make sure: glibc-devel, zlib-devel (header files for the C library and zlib) and gcc are available on your system.</blockquote><blockquote>Another prerequisite to consider is the maximum heap size. Physical memory for running a JVM-based application may be insufficient to build a native image. For server-based image building, we allow to use 80% of the reported physical RAM for all servers together, but never more than 14GB per server (for exact details please consult the native-image source code). If you run with --no-server option, you will get the whole 80% of what is reported as physical RAM as the baseline. This mode respects -Xmx arguments additionally.</blockquote><p><em>Source: </em><a href="https://www.graalvm.org/docs/reference-manual/native-image/"><em>https://www.graalvm.org/docs/reference-manual/native-image/</em></a></p><p>I didn’t understand what that meant, but I can affirm. Generate a native executable in a 4GB ram machine is at least counterproductive. Now, Back to the technical matters.</p><p>In our first <a href="https://link.medium.com/QuDQDUWbu4">post</a> about Quarkus, I have shown you what is Quarkus, why Quarkus can be a good option for your new project and how to use it. Today we are going to talk about native executable and GraalVM and why it improves, even more, the Quarkus performance.</p><p>Before we dive in about what it is and how to create an executable using Quarkus, It is important to learn and understand GraalVM.</p><p>According to <a href="https://www.graalvm.org/">https://www.graalvm.org</a>:</p><blockquote>GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Groovy, Kotlin, Clojure, and LLVM-based languages such as C and C++.</blockquote><blockquote>GraalVM removes the isolation between programming languages and enables interoperability in a shared runtime. It can run either standalone or in the context of OpenJDK, Node.js or Oracle Database.</blockquote><p>The part that matter to us is:</p><blockquote>Native images compiled with GraalVM ahead-of-time improve the startup time and reduce the memory footprint of JVM-based applications.</blockquote><p>This is the point that Quarkus comes back. Quarkus takes advantage of this feature and allows us to create native images improving, even more, the startup time of our application. To test this we going to use the application created in the first post and compare the startup time with a native executable version. Let’s do it, it is very easy.</p><h4>Setup the environment:</h4><p># dnf (rpm-based)</p><pre>sudo dnf install gcc glibc-devel zlib-devel libstdc++-static</pre><p># Debian-based distributions:</p><pre>sudo apt-get install build-essential libz-dev zlib1g-dev</pre><p># MacOS</p><pre>xcode-select --install</pre><p>I&#39;ll continue to use docker in our examples to avoid the need the install things in our machine since we are only going to test and sure, to practice docker. That been said, we going to use a multi-stage Docker to create the native executable. A multi-stage Docker build is like two Dockerfile files combined in one, the first is used to build the artifact used by the second.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*__EDQNKhwyDvXpVGe3Yv9Q.png" /><figcaption><a href="https://quarkus.io/">https://quarkus.io</a></figcaption></figure><p>Create a new file in src/main/docker/Dockerfile.multistage</p><pre>## Stage 1 : build with maven builder image with native capabilities</pre><pre>FROM quay.io/quarkus/centos-quarkus-maven:19.3.1-java11 AS build</pre><pre>COPY src /usr/src/app/src</pre><pre>COPY pom.xml /usr/src/app</pre><pre>USER root</pre><pre>RUN chown -R quarkus /usr/src/app</pre><pre>USER quarkus</pre><pre>RUN mvn -f /usr/src/app/pom.xml -Pnative clean package</pre><pre>## Stage 2 : create the docker final image</pre><pre>FROM registry.access.redhat.com/ubi8/ubi-minimal</pre><pre>WORKDIR /work/</pre><pre>COPY --from=build /usr/src/app/target/*-runner /work/application</pre><pre>RUN chmod 775 /work</pre><pre>EXPOSE 8080</pre><pre>CMD [&quot;./application&quot;, &quot;-Dquarkus.http.host=0.0.0.0&quot;]</pre><p>Finally</p><pre>docker build -f src/main/docker/Dockerfile.multistage -t quarkus-test/hello .</pre><pre>docker run -i --rm -p 8080:8080 quarkus-test/hello</pre><p>Now you will see the application starting in milliseconds instead of seconds and you have a native executable for your application containing the application code, required libraries, Java APIs, and a reduced version of a VM. The smaller VM base like was said before improves the startup time of the application and produces a minimal disk footprint.</p><h3>Benchmark</h3><pre>./mvnw compile quarkus:dev</pre><pre>...</pre><pre>INFO  [io.quarkus] (main) quarkus-test 1.0.0-SNAPSHOT (running on Quarkus 1.2.1.Final) <strong>started in 8.022s.</strong> Listening on: http://0.0.0.0:8080</pre><p><em>Default application with jar file.</em></p><pre>$ docker run -i --rm -p 8080:8080 quarkus-test/hello</pre><pre>..</pre><pre>INFO  [io.quarkus] (main) quarkus-test 1.0.0-SNAPSHOT (running on Quarkus 1.2.1.Final) <strong>started in 0.067s<em>.</em></strong> Listening on: http://0.0.0.0:8080</pre><p><em>The application started with native executable and inside docker image. Less than 1 second</em></p><p>All code is available in my GitHub:</p><p><a href="http://git/"><strong>https://github.com/gigandre/quarkus-test.git</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=967588e80a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/maybe-native-executable-in-quarkus-is-not-for-you-but-it-is-awesome-967588e80a4">Maybe native executable in Quarkus is not for you, but it is awesome</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quarkus What? Why? and How?]]></title>
            <link>https://medium.com/analytics-vidhya/quarkus-what-why-and-how-114bce3cc46f?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/114bce3cc46f</guid>
            <category><![CDATA[quarkus]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Sun, 23 Feb 2020 00:32:05 GMT</pubDate>
            <atom:updated>2020-02-29T12:44:03.446Z</atom:updated>
            <content:encoded><![CDATA[<p>Ultimately I have been reading a lot about this new framework created by RedHat. I remember the first time I heard about it wasn’t clear to me the necessity to use another framework then Spring, where almost everything is made magically, but from the moment that I started going deep in this framework I find out in Quarkus an excellent option in the matter of Microservices and even more to Serverless using java.</p><p><strong>What is Quarkus?</strong></p><p>Quarkus is a framework build upon the best java libraries and patterns. The mains Quarkus’s goals are to allow faster development and application initializations, being smaller and consuming fewer machine resources. Quarkus born with the idea to be Cloud Native, be used in Microservices and Serverless projects.</p><p>The first release 0.0.1 was 12/12/2018 and the latest version is 1.2.0.</p><p>Quarkus is Supersonic, Subatomic, hot reloading and container first, which means it was tailored to run in containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*dZRZw6M15Vv3YLbhmUG7gw.png" /><figcaption><a href="https://quarkus.io/">https://quarkus.io</a></figcaption></figure><p><strong>Why use Quarkus in your projects?</strong></p><p>This answer is quite easy when you understand the “whats” question. If you need or want to run your application on a cloud using Docker and/or Serverless, Quarkus is an excellent choice, as the startup time is extremely fast and the memory consumption is optimized. With that said, if you going to use several containers on a cloud service it is essential a good memory management to save money, apart from that, Quarkus has a great features named Panache, which is an ORM framework to execute queries using a different approach, directly from your entity, which allows us to write queries faster. Last but no least Quarkus has hot reloading and also brings observability tools out-of-the-box.</p><p><strong>How to start?</strong></p><p>Like the Spring framework, Quarkus provides the following website <a href="https://code.quarkus.io/">https://code.quarkus.io</a>, where it allows the possibility of creating a project from the ground with all required dependencies needed.</p><p>In this tutorial, we will create a Rest application with MongoDB. So, let’s open the site and create our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*-TnqA6Z8QJGedIVx-4FxIQ.png" /><figcaption><a href="https://code.quarkus.io/">https://code.quarkus.io</a></figcaption></figure><p>After selecting all the required dependencies to our project, click on <em>Generate your application.</em></p><p>To run your new application without any configuration, all you need is to run the following command:</p><pre>./mvnw compile quarkus:dev</pre><p>Access your app by the url:</p><p><a href="http://localhost:8080/">http://localhost:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*zojcEJNrVTPZawTMy-qIfQ.png" /></figure><p>If you see the above page is a signal that we are in the right way.</p><p>There is a default url API too.</p><p><a href="http://localhost:8080/hello">http://localhost:8080/hello</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*jHSXGhtQNc52cOgNI79l8g.png" /></figure><p>Now, it is time to create our Rest API. There is something absolutely awesome, at least to me, which is Quarkus allowing us to create Rest API as Spring, using the same code, to achieve this, all we need is adding the spring-web extension.</p><pre>./mvnw quarkus:add-extensions -Dextensions=spring-web</pre><p>Before write some code, lets set up our environment, I’ll use MongoDB with docker, to achieve this we just need 2 commands:</p><pre>docker pull mongo</pre><pre>docker run -d -i -t -p 27017:27017 mongo</pre><p>Resource with Spring annotations, using extension:</p><pre>package io.andre.quarkus;</pre><pre>import java.util.List;</pre><pre>import javax.ws.rs.Consumes;</pre><pre>import javax.ws.rs.GET;</pre><pre>import javax.ws.rs.POST;</pre><pre>import javax.ws.rs.Path;</pre><pre>import javax.ws.rs.Produces;</pre><pre>import javax.ws.rs.core.MediaType;</pre><pre>@RestController</pre><pre>@RequestMapping(“/hello”)</pre><pre>public class ExampleResource {</pre><pre>@GetMapping</pre><pre>public List&lt;User&gt; findAll(){</pre><pre>return User.findAll().list();</pre><pre>}</pre><pre>@PostMapping</pre><pre>public void save(){</pre><pre>User.persist(new User(1, “Andre”, 35));</pre><pre>}</pre><pre>}</pre><p>Resource with Rest API default, plain java:</p><pre>package io.andre.quarkus;</pre><pre>import java.util.List;</pre><pre>import javax.ws.rs.Consumes;</pre><pre>import javax.ws.rs.GET;</pre><pre>import javax.ws.rs.POST;</pre><pre>import javax.ws.rs.Path;</pre><pre>import javax.ws.rs.Produces;</pre><pre>import javax.ws.rs.core.MediaType;</pre><pre>@Path(“/hello”)</pre><pre>@Produces(MediaType.APPLICATION_JSON)</pre><pre>@Consumes(MediaType.APPLICATION_JSON)</pre><pre>public class ExampleResource {</pre><pre>@GET</pre><pre>public List&lt;User&gt; findAll(){</pre><pre>return User.findAll().list();</pre><pre>}</pre><pre>@POST</pre><pre>public void save(){</pre><pre>User.persist(new User(1, “Andre”, 35));</pre><pre>}</pre><pre>}</pre><p>The second provides the swagger out-of-box to test our APIs.</p><p><a href="http://localhost:8080/swagger-ui/">http://localhost:8080/swagger-ui/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*0_AY-Kyd8gOJlAiz8h4IeA.png" /></figure><pre>package io.andre.quarkus;</pre><pre>import io.quarkus.mongodb.panache.PanacheMongoEntity;</pre><pre>public class User extends PanacheMongoEntity{</pre><pre>public Integer id;</pre><pre>public String name;</pre><pre>public Integer age;</pre><pre>public User(Integer id, String name, Integer age) {</pre><pre>this.id = id;</pre><pre>this.name = name;</pre><pre>this.age = age;</pre><pre>}</pre><pre>public User() {</pre><pre>}</pre><pre>}</pre><p><em>application.properties</em></p><pre>quarkus.mongodb.connection-string = mongodb://localhost:27017</pre><pre>quarkus.mongodb.database = test</pre><p>In this tutorial, you could see how easy and fast it is to build an application using Quarkus and Mongodb, and also see its benefits compare to the other frameworks out there, to easy your choose in your next ou actual project.</p><p>All code is available in my GitHub:</p><p><a href="http://git/"><strong>https://github.com/gigandre/quarkus-test.git</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=114bce3cc46f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/quarkus-what-why-and-how-114bce3cc46f">Quarkus What? Why? and How?</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t fear NoSQL]]></title>
            <link>https://medium.com/analytics-vidhya/dont-fear-nosql-2042c0965697?source=rss-a5094edc2fd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2042c0965697</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[develop]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andre Oliveira]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 21:12:39 GMT</pubDate>
            <atom:updated>2020-04-24T07:19:13.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KvbSyUmkaCC3gbUt1Ssgvw.png" /></figure><p>Recently I was doing an excellent Coursera’s course, entitled <a href="https://www.coursera.org/learn/learning-how-to-learn">Learning How to Learning: Powerful mental tools to help you master tough subjects</a> where Dr. Barbara Oakley brilliantly taught that when we are a master in some subject this knowledge form a chunk of information in our brain that smooth the learning of a new subject.</p><p>I believe that almost all programmers in whole or at least in some carrier’s moments had to handle SQL. As you know SQL — Structured Query Language — for decades since 1979 is the main way the persist the information used in our software or even the unique option. But in the recent past was created a real good alternative regarding this problem, since 1998 we have NoSql standing by No Only SQL, where we can store our data in ways different than relational since 1998. According to the book <em>Introducing Data Science,</em> we can store our data using four big NoSQL types: key-value store, document store, column-oriented database, and graph database, nowadays it is possible chose the database correct to our applications needs among dozen of vendors such as MongoDB, Cassandra, and DynamoDB.</p><p>Unfortunately or fortunately, the difference between SQL and NoSQL is enormous, starting by the syntax, the way the data is stored, passing through the differences like how you refer to a SQL Table that in NoSql is called Collection.</p><p>But the reason why I started this text talking about chunk information in our brains? Because besides all differences and learning curves, we already have an excellent or at least some background using SQL. Like I said SQL was our single option, and this knowledge will help you to learn NoSql, you can for instance easily link that a SQL Table is a Collection on NoSQL. Learn NoSql will help you to do your job better knowing that exists a world of options and it is possible to choose the right one for your application, transforming your system in a system more resilient, productive, performative and for brighter and happier days, so if you are scared or worried about trying those technologies or each one other, just do it and you will feel very rewarded by this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2042c0965697" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/dont-fear-nosql-2042c0965697">Don’t fear NoSQL</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>