<?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 Ninad Chaudhari on Medium]]></title>
        <description><![CDATA[Stories by Ninad Chaudhari on Medium]]></description>
        <link>https://medium.com/@ninadpchaudhari?source=rss-f840421ab308------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1F8P0lHNvbKcwKrx.jpeg</url>
            <title>Stories by Ninad Chaudhari on Medium</title>
            <link>https://medium.com/@ninadpchaudhari?source=rss-f840421ab308------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:58:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ninadpchaudhari/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[Intresting read today on anomaly detection and Java]]></title>
            <link>https://medium.com/@ninadpchaudhari/intresting-read-today-on-anomaly-detection-and-java-dab5b9715313?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/dab5b9715313</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 04:31:10 GMT</pubDate>
            <atom:updated>2018-04-18T04:38:05.790Z</atom:updated>
            <content:encoded><![CDATA[<p>Found something really intresting..</p><p>Was reading about <a href="https://medium.com/u/380b36b019ee">The Toast Blog</a> and came across their tech stack.</p><p>It was weird how I was not aware of <a href="http://dropwizard.readthedocs.io/">@Dropwizard</a> and the <a href="https://github.com/dropwizard/dropwizard/wiki/Who&#39;s-using-Dropwizard">organisations that use it</a>. Something exciting from my original Spring love!</p><p>Glanced over <a href="http://jdbi.org/">JDBI 3</a> #memories !</p><p>Also, though old, these links are a good read.</p><p><a href="https://eng.uber.com/tech-stack-part-one/">Uber-Tech-Stack </a>, <a href="https://eng.uber.com/argos/">Uber-argos</a> ( anamoaly detection and realtime-monitoring) &amp; <a href="https://eng.uber.com/tag/anomaly-detection/">Uber-anomaly-detection</a></p><p><a href="https://snyk.io/">Snyk</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dab5b9715313" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring session | video.js record]]></title>
            <link>https://medium.com/@ninadpchaudhari/spring-session-video-js-record-6ba0cbde6d8f?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ba0cbde6d8f</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Fri, 06 Apr 2018 03:56:32 GMT</pubDate>
            <atom:updated>2018-04-06T04:06:39.865Z</atom:updated>
            <content:encoded><![CDATA[<p>Found this good article for Sessions.</p><p><a href="https://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot-jdbc.html">Spring Session - Spring Boot</a></p><p>Videojs record plugin :</p><p><a href="https://www.npmjs.com/package/videojs-record">videojs-record</a></p><pre>&lt;link href=&quot;https://vjs.zencdn.net/6.6.3/video-js.css&quot; rel=&quot;stylesheet&quot;&gt;</pre><pre>&lt;link href=&quot;https://cdnjs.cloudflare.com/ajax/libs/videojs-record/2.1.0/css/videojs.record.css&quot; rel=&quot;stylesheet&quot;&gt;</pre><pre>&lt;script src=&quot;https://code.jquery.com/jquery-3.3.1.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/video.js/6.7.2/video.min.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/RecordRTC/5.4.6/RecordRTC.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/adapterjs/0.15.0/adapter.min.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://collab-project.github.io/videojs-record/dist/wavesurfer.min.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://collab-project.github.io/videojs-record/dist/wavesurfer.microphone.min.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://collab-project.github.io/videojs-record/dist/videojs.wavesurfer.min.js&quot;&gt;&lt;/script&gt;</pre><pre>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/videojs-record/2.1.2/videojs.record.min.js&quot;&gt;&lt;/script&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ba0cbde6d8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring boot — Enable HTTPS]]></title>
            <link>https://medium.com/@ninadpchaudhari/spring-boot-enable-https-d7787ce6deb8?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7787ce6deb8</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Fri, 30 Mar 2018 03:09:58 GMT</pubDate>
            <atom:updated>2018-03-30T03:09:58.154Z</atom:updated>
            <content:encoded><![CDATA[<p>We need the local environment to support HTTPS for our term project!</p><p>We will cover how to use Let’s Encrypt with your EC2 instance, but for now, let’s see how we can just use a local certificate with Spring</p><p>This link might be helpful : <a href="https://drissamri.be/blog/java/enable-https-in-spring-boot/">https://drissamri.be/blog/java/enable-https-in-spring-boot/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7787ce6deb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring — Save data to MySql over RDS]]></title>
            <link>https://medium.com/@ninadpchaudhari/spring-save-data-to-mysql-over-rds-1c2ed65bbc7b?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c2ed65bbc7b</guid>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Fri, 23 Mar 2018 04:00:36 GMT</pubDate>
            <atom:updated>2018-03-23T06:33:56.423Z</atom:updated>
            <content:encoded><![CDATA[<p>The article discusses and lists important references that would make saving data easier in a spring app.</p><h4>Assumptions &amp; Notes</h4><ul><li>Though it hardly matters, we are using JSP for views here.</li><li>MySql is installed and user is famalier to basic database operations.</li><li>We will be using Spring Data in this.</li><li>We are not using JSTL / Spring Forms / Spring tags.</li><li>JPA is not covered in depth.</li></ul><h4>Artcles :</h4><p>Here is an excellent guide for Just doing this : <a href="https://spring.io/guides/gs/accessing-data-mysql/">https://spring.io/guides/gs/accessing-data-mysql/</a></p><p>This might be helpful to understand how JPA works: <a href="https://spring.io/guides/gs/accessing-data-jpa/">https://spring.io/guides/gs/accessing-data-jpa/</a></p><p>Spring Data Repository docs : <a href="https://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html">https://docs.spring.io/spring-data/data-commons/docs/1.6.1.RELEASE/reference/html/repositories.html</a></p><p>Ways to init database for your app : <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html">https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html</a></p><p>Spring data JPA reference : <a href="https://docs.spring.io/spring-data/jpa/docs/current/reference/html/">https://docs.spring.io/spring-data/jpa/docs/current/reference/html/</a></p><h4>Additional Information:</h4><p>If you are intrested in using Spring forms, This is an excellent article : <a href="https://www.packtpub.com/books/content/working-spring-tag-libraries">https://www.packtpub.com/books/content/working-spring-tag-libraries</a></p><p>Also, you can find the complete set of attributes here : <a href="https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/spring-form-tld.html">https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/spring-form-tld.html</a></p><p>Though Spring with JSP isn’t supported as deployment to AWS BeanStalk, this guide is handy to just know the envirnment variables : <a href="https://aws.amazon.com/blogs/devops/deploying-a-spring-boot-application-on-aws-using-aws-elastic-beanstalk/">https://aws.amazon.com/blogs/devops/deploying-a-spring-boot-application-on-aws-using-aws-elastic-beanstalk/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c2ed65bbc7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[https://insights.stackoverflow.com/survey/2018/?utm_source=Iterable&utm_medium=email&utm_campaign=de]]></title>
            <link>https://medium.com/@ninadpchaudhari/https-insights-stackoverflow-com-survey-2018-utm-source-iterable-utm-medium-email-utm-campaign-de-4e3cf479f6bd?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e3cf479f6bd</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Tue, 13 Mar 2018 13:08:12 GMT</pubDate>
            <atom:updated>2018-03-13T13:08:12.185Z</atom:updated>
            <content:encoded><![CDATA[<p>https://insights.stackoverflow.com/survey/2018/?utm_source=Iterable&amp;utm_medium=email&amp;utm_campaign=dev-survey-2018-promotion</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e3cf479f6bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What an amazing read on Swap today !https://chrisdown.name/2018/01/02/in-defence-of-swap.html]]></title>
            <link>https://medium.com/@ninadpchaudhari/what-an-amazing-read-on-swap-today-https-chrisdown-name-2018-01-02-in-defence-of-swap-html-4d0e5c651878?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d0e5c651878</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 02:32:23 GMT</pubDate>
            <atom:updated>2018-03-12T02:32:23.010Z</atom:updated>
            <content:encoded><![CDATA[<p>What an amazing read on Swap today !https://chrisdown.name/2018/01/02/in-defence-of-swap.html</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d0e5c651878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java EE -> Jakarta EE]]></title>
            <link>https://medium.com/@ninadpchaudhari/java-ee-jakarta-ee-81594bdc789?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/81594bdc789</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Sun, 04 Mar 2018 15:56:39 GMT</pubDate>
            <atom:updated>2018-03-04T15:56:39.516Z</atom:updated>
            <content:encoded><![CDATA[<p>Something intresting</p><p><a href="https://news.slashdot.org/story/18/03/04/035236/java-ee-has-been-renamed-jakarta-ee">&#39;Java EE&#39; Has Been Renamed &#39;Jakarta EE&#39; - Slashdot</a></p><p>least glad the big daddy is embrasing os community with EE4J, don’t care about the Naming frankly :p</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81594bdc789" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Good guide for Git workflow]]></title>
            <link>https://medium.com/@ninadpchaudhari/good-guide-for-git-workflow-f8371e7073c1?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8371e7073c1</guid>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Fri, 02 Mar 2018 20:41:54 GMT</pubDate>
            <atom:updated>2018-03-02T20:41:54.733Z</atom:updated>
            <content:encoded><![CDATA[<p>Just found this article :</p><p><a href="https://guides.github.com/introduction/flow/">GitHub flow - GitHub Docs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8371e7073c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring boot — JSP | test-Deploy]]></title>
            <link>https://medium.com/@ninadpchaudhari/spring-boot-jsp-test-deploy-2ee8718dda8a?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ee8718dda8a</guid>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Sat, 24 Feb 2018 04:14:34 GMT</pubDate>
            <atom:updated>2018-03-04T22:59:38.857Z</atom:updated>
            <content:encoded><![CDATA[<h4>Remove IAM accessKey and Secret from Java file.</h4><p>We have kept the Access key and secret obtained from IAM user for S3 in the java file. This is always a bad idea since sharing your code compromises your credentials.</p><p>Checkout the documentation, for Externalized Configuration :</p><p><a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config">Spring Boot Reference Guide</a></p><h4>Using Environment Variables</h4><p>One of the ways is to use environment variables. As we saw in the Lab, you can use the Spring’s autowring to get a Environment Variable as a String.</p><pre>@Value(&quot;${accessKey}&quot;)<br>String key;<br>//This fetches the accessKey from environment / application.properties</pre><p>To set environment variables, you can either edit the /etc/environment or /.bash_profile etc or just use</p><pre>export variable=value</pre><p>in terminal. Remember to set the env variable BEFORE starting your spring boot app.</p><h4>Install Java</h4><ol><li>We need Java to be installed on the EC2 instance.</li><li>This link is an excellent resource for all the steps. <a href="https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04">https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04</a> [Every command from this tutorial was explained in the lab. Please meet me in the office hours if you need further help.]</li></ol><h4>Open port 8080 for your EC2</h4><p>You need to open the port “8080” for your EC2 instance from the AWS console.</p><p>For extra info [Not required for assignment 2] , if you want to run the app on port 80, you need sudo before the maven command. You can set “server.port” in application for this, or set an environment variable “SERVER_PORT=80” for spring to override the port declared in application properties.</p><h4>Run your app on EC2,</h4><p>Note that,</p><p>We have been using JSP with the Spring boot application though it is not recommended to keep a little famaliarity with your previous knowledge.</p><p>Note the limitations :</p><p><a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-jsp-limitations">Spring Boot Reference Guide</a></p><p>This means we cannot use the jar obtained from “mvnw package”to deploy your projects.</p><p>This leaves us with 2 options, either get the war from the project, install Tomcat/Jetty on your EC2 instance or just clone the project folder onto S3 and running “./mvnw spring-boot:run”</p><p>For this assignment, you can just clone the entire folder onto your instance and run with</p><pre>chmod 755 ./mvnw<br>./mvnw spring-boot:run</pre><p>Your app should be online now on :</p><pre><a href="http://name:8080/">http://name:8080/</a> OR http://&lt;Your IP&gt;:8080/</pre><blockquote>If you want to speedup the load times,</blockquote><ul><li>Run “.\mvnw clean package” on your PC, this would create a jar file.</li><li>Then Copy the entire project folder to EC2</li><li>Then after you cd to the project directory, run “chmod 755 ./mvnw” to make the mvnw executable.</li><li>Then run “java -jar target/&lt;projectname&gt;.jar”</li><li>Your app should be running !</li></ul><h4>Make the app run in background</h4><p>After you confirm that the spring app works, you can make the app run till your server stops by using “screen” app</p><p>A Good tutotial is here:</p><p><a href="https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/">How To Use Linux Screen</a></p><h4>Conclusion</h4><p>You need to take the following steps:</p><ol><li>run “.\mvnw clean package” in your project directory [ optional but recomended]</li><li>Install Java on EC2</li><li>Set the JAVA_HOME variable in /etc/environment [Mostly it would be : /usr/lib/jvm/java-8-openjdk-amd64 ]</li><li>Copy the entire project folder to EC2</li><li>cd to the project folder</li><li>Make the mvnw executable</li><li>export required environment variables</li><li>Install screen</li><li>start a new screen</li><li>run java -jar target/&lt;Your jar name&gt;.jar</li><li>Confirm its working.!</li><li>Detach the screen.</li></ol><h4>References</h4><p>— You can checkout Spring documentation at :</p><p><a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/">Spring Boot Reference Documentation</a></p><p>And,</p><p>— Sample Spring boot app with JSP</p><p><a href="https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-tomcat-jsp">spring-projects/spring-boot</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ee8718dda8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upload the files to S3 and display the same in a page]]></title>
            <link>https://medium.com/@ninadpchaudhari/upload-the-files-to-s3-and-display-the-same-in-a-page-c3dd13ecab9c?source=rss-f840421ab308------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3dd13ecab9c</guid>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ninad Chaudhari]]></dc:creator>
            <pubDate>Fri, 16 Feb 2018 02:17:33 GMT</pubDate>
            <atom:updated>2018-02-16T02:17:33.720Z</atom:updated>
            <content:encoded><![CDATA[<p>Note, we will be writing the code in the “Controller” itself. Ideally, we should have created a new “Service” class for this type of thing.</p><p>Remember : controller does not have any business logic.</p><p>Also, remember we will be using a seperate file called “application-secrets.properties” to store your credentials for AWS and other credentials which are secret. Do not forget to add them to your gitignore!</p><ol><li>Start a new Spring boot application as mentioned in lab1</li><li>Create a new Controller “profileController”</li><li>Add a get mapping for “/” route</li><li>Make the function accept a “MultipartFile” type of object.</li><li>Create a new AmazonS3 client object. This object will act as entry point for every request you sent to AWS</li><li>Create a new <br>“PutObjectRequest” object which contains the name of bucket, name of the key, a inputstream from the Multipart object your function has in it’s arguments and a new “ObjectMetadata” object .</li><li>We want the uploaded file to be public, hence add “.withCannedAcl(CannedAccessControlList.PublicRead )” to the object.</li><li>call the “putObject” method in the s3 client object you created earlier, and pass the PutObjectRequest object as parameter.</li></ol><p>— This would cause the image to be sent to S3.</p><p>You can get the public facing http link to the object you just put by calling the “getObject” method on the s3client object, but there is also a simple trick which works!</p><p>Every object has the following uri :</p><pre>http://&lt;bucketname&gt;.s3.amazonaws.com/&lt;keyname&gt;</pre><p>Key is the string ( in our case the filename) by which you uniquely identify the an object (in our case the file) in a bucket.</p><p>You can use this link as the value of the src attribute of the img tag in your view.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3dd13ecab9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>