<?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 Baris Gece on Medium]]></title>
        <description><![CDATA[Stories by Baris Gece on Medium]]></description>
        <link>https://medium.com/@barisgece?source=rss-38a934b6fbff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*U6eY9nBj7sW1yZaBWU9KnA.jpeg</url>
            <title>Stories by Baris Gece on Medium</title>
            <link>https://medium.com/@barisgece?source=rss-38a934b6fbff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:20:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@barisgece/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[Determining MIME Types in Java for AWS S3]]></title>
            <link>https://medium.com/qacolony/determining-mime-types-in-java-for-aws-s3-1006ab520836?source=rss-38a934b6fbff------2</link>
            <guid isPermaLink="false">https://medium.com/p/1006ab520836</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[metadata]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Baris Gece]]></dc:creator>
            <pubDate>Sun, 18 Mar 2018 23:46:19 GMT</pubDate>
            <atom:updated>2018-03-23T09:50:04.385Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>UPDATE NOTE<em>: </em>It’s resolved after AWS SDK java 2.0.0-preview-8</strong></blockquote><blockquote><strong>NOTE:</strong> The main purpose of the post is a workaround to determine AWS S3 content-type automatically. However, I shared the web pages where I got help about MIMETypes and Determining File Types in Java<strong> </strong>in the References section. You can find detailed information there.</blockquote><p>I use AWS S3 to store <a href="https://gatling.io/">Gatling</a> test result because you can reach test results like published website.</p><p><a href="https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/PutObjectRequest.html"><em>PutObjectRequest</em></a> use the file extension to determine the correct content type and content disposition to use for the object in <em>AWS SDK for Java 1.x.x.</em></p><figure><a href="https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/PutObjectRequest.html"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0w7vwW3MZQRQAlx09SQfCA.png" /></a><figcaption>AWS SDK for Java — 1.11.297</figcaption></figure><p>There is no problem until i try to develop with <em>AWS SDK for Java 2.0. </em>Determining the correct content type automatically is not yet implemented in <em>AWS SDK for Java 2.0</em>. Therefore, i needed to find quick and simple workaround for this problem. After a little research I came across <a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/spi/FileTypeDetector.html"><em>FileTypeDetector</em></a></p><figure><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/spi/FileTypeDetector.html"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqks9DmYBIeGqDqQdLUOtw.png" /></a></figure><figure><a href="https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#probeContentType-java.nio.file.Path-"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qt-Mb_V7ydq3oSz4njH6Vg.png" /></a><figcaption>Java NIO File — FileTypeDetector</figcaption></figure><p><strong>Sample Code for PutObjectRequest</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/07985b35f8e47ee5f6a016bf7d515100/href">https://medium.com/media/07985b35f8e47ee5f6a016bf7d515100/href</a></iframe><p>If there is an extension of the files to be uploaded, the result of <em>Files.probeContentType</em> is as follows.</p><p><strong>ico</strong> : image/vnd.microsoft.icon<br><strong>gif</strong> : image/gif<br><strong>css</strong> : text/css<br><strong>xml</strong> : application/xml<br><strong>jpg</strong> : image/jpeg<br><strong>log</strong> : text/x-log<br><strong>json</strong> : application/json<br><strong>png</strong> : image/png<br><strong>html</strong> : text/html<br><strong>js</strong> : application/javascript</p><p>If there is <strong>not</strong> an extension of the files to be uploaded, the result of <em>Files.probeContentType</em> is as follows.</p><p><strong>xml</strong> : text/plain<br><strong>jpg</strong> : image/jpeg<br><strong>gif</strong> : image/gif<br><strong>ico</strong> : image/vnd.microsoft.icon<br><strong>js</strong> : text/plain<br><strong>log</strong> : text/plain<br><strong>json</strong> : text/plain<br><strong>html</strong> : text/html<br><strong>css</strong> : text/plain<br><strong>png</strong> : image/png<br><strong>html</strong> : text/html</p><blockquote>NOTE: If you want to determine ContentType correctly, you should be careful about file extensions.</blockquote><p>Also, you can find below <em>AWS SDK for Java 1.x.x</em> automatically defined content type vs <em>Files.probeContentType</em></p><p><strong>FileExtentions</strong> : Files.probeContentType→AWS SDK for Java 1.x.x</p><p><strong>ico</strong> : image/vnd.microsoft.icon →image/x-icon<br>gif : image/gif →image/gif<br>css : text/css →text/css<br>xml : application/xml →application/xml<br>jpg : image/jpeg →image/jpeg<br><strong>log</strong> : text/x-log →application/octet-stream<br><strong>json</strong> : application/json →application/octet-stream<br>png : image/png →image/png<br>html : text/html →text/html<br><strong>js</strong> : application/javascript → application/x-javascript</p><h4>References :</h4><p><a href="https://dzone.com/users/293462/java_dm.html">Dustin Marx</a>,<a href="https://dzone.com/articles/determining-file-types-java"> Determining File Types in Java</a>, Mar. 04, 15</p><p><a href="https://dzone.com/articles/determining-file-types-java">Determining File Types in Java - DZone Java</a></p><p><a href="http://www.rgagnon.com/howto.html">Real’s How To</a>, <a href="http://www.rgagnon.com/javadetails/java-0487.html">Get the Mime Type from a File</a></p><p><a href="http://www.rgagnon.com/javadetails/java-0487.html">Get the Mime Type from a File - Real&#39;s Java How-to</a></p><p><a href="https://developer.mozilla.org/">MDN Web Docs</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME Types</a></p><p><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME types (IANA media types) - HTTP | MDN</a></p><p><a href="https://www.freeformatter.com/">FreeFormatter</a>, <a href="https://www.freeformatter.com/mime-types-list.html">MIME Types List</a></p><p><a href="https://www.freeformatter.com/mime-types-list.html">MIME Types List</a></p><p>Stackoverflow</p><p><a href="https://stackoverflow.com/questions/9664282/difference-between-application-x-javascript-and-text-javascript-content-types">Difference between application/x-javascript and text/javascript content types</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1006ab520836" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qacolony/determining-mime-types-in-java-for-aws-s3-1006ab520836">Determining MIME Types in Java for AWS S3</a> was originally published in <a href="https://medium.com/qacolony">QaColony</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Server Virtualization]]></title>
            <link>https://medium.com/qacolony/what-is-server-virtualization-7d2c1541961f?source=rss-38a934b6fbff------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d2c1541961f</guid>
            <category><![CDATA[virtualization]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[infrastructure]]></category>
            <dc:creator><![CDATA[Baris Gece]]></dc:creator>
            <pubDate>Tue, 05 Sep 2017 17:08:15 GMT</pubDate>
            <atom:updated>2018-03-19T00:03:20.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fnyH3ABSfTy6d1LkTzdgA.jpeg" /><figcaption>Image Source : <a href="http://edumuch.com/wp-content/uploads/2016/02/infrastructure-featured.jpg">Edumuch</a></figcaption></figure><p><strong>Virtualization </strong>means creating IT resources as logical resources rather than separate physical resources.<strong> </strong>By using specially designed software, an administrator can creates many virtual systems within a single physical system. Each virtual server acts like a unique physical device, capable of running its own OS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*Mv4EmpUIOdOsdt0vAHSBVQ.gif" /><figcaption>Image Source : <a href="https://www.ibm.com/developerworks/cloud/library/cl-hypervisorcompare/figure1.gif">IBM</a></figcaption></figure><p>Server virtualization is usually implemented with <strong>hypervisor</strong> technology, but hypervisor method is not the only method for virtualization.</p><h4>What is Hypervisor?</h4><p><em>Hypervisor</em> is a software or firmware component that can virtualize physical system resources. A hypervisor is also known as a Virtual Machine Manager (<strong>VMM</strong>). The hypervisor separates the OS from the hardware by taking the responsibility of manage distribution of CPU, memory, GPU, and other hardware. Each operating system controlled by the hypervisor is called a <strong>Guest OS</strong>, and if the hypervisor’s has an operating system, is called the <strong>Host</strong> <strong>OS</strong>.</p><p><strong>There are two types of Hypervisors:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*103--mqcB6Q7ym9KB9saPQ.gif" /><figcaption>Image Source : <a href="https://www.ibm.com/developerworks/cloud/library/cl-hypervisorcompare/figure2.gif">IBM</a></figcaption></figure><p><strong><em>Type 1 hypervisor </em></strong>runs on the system hardware without an OS — A “<em>bare metal</em>” embedded hypervisor. (<em>Microsoft Hyper-V, VMware vSphere, Citrix Xen</em>). It has directly access to all hardware and features. The type 1 hypervisor is to run multiple operating systems on the same computer without the overhead of a host OS and it provides advantage like portability and hardware abstraction without host OS dependencies. Thus, carrying to virtual servers from hardware to hardware is safer and effortless. In addition, virtual server performance is high and it can be fully utilized from the capacity of the physical server.</p><p>The<strong><em> type 1 hypervisor </em></strong>structure is divided two parts. These are <strong><em>Microkernelized</em> <em>hypervisor</em> </strong>and <strong><em>Monolithic hypervisor</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*gh5wWvbi3anEorAXVbl5ow.png" /><figcaption>Image Source : <a href="https://www.researchgate.net/figure/261411692_fig1_Fig-1-Micro-kernelized-hypervisor-vs-Monolithic-hypervisor-11">ResearchGate</a></figcaption></figure><p><strong><em>Microkernelized hypervisor</em></strong>, such as Hyper-V, work<em>s </em>with<em> parent partition </em>to perform functions except CPU and memory management. The parent partition is also a virtual machine. It hosts the independent hardware vendor drivers required by the virtual machines, so that no third-party code runs in the hypervisor and only standard drivers are required for the hardware. Thus, the microkernelized hypervisor support much more varied physical server because of that drivers provided by the parent partition. The greatest benefit of this type of hypervisors is that size is too low (about 1,1.5 MB) and virtual machines can access physical equipment via parent partition so that it’s make it much safer.</p><p><strong><em>Monolithic hypervisor,</em></strong> such as VMware ESX Server, does not have a parent partition. It handle all hardware access for their partitions. These hypervisors have to host drivers for all hardware that they access, including storage, network, and input devices. Monolithic hypervisors are installed on the hardware directly, and virtual servers access hardware via hypervisor directly, so they must also include drivers for the physical hardware. This is reduced the number of supported hardware and virtualization stacks are part of the hypervisor, therefore its size take up a lot of space. Also, there are third party codes and it can cause attack from outside easily.</p><p><strong><em>Type 2 hypervisor</em></strong> runs on a Host OS that provides virtualization services. (Oracle VirtualBox, VMware Workstation). Type 2 hypervisor can still run multiple operating systems at a time, but it doesn’t have direct access to the hardware and therefore has more overhead when running a guest. This means that the guest OS will not run at its full potential and if your host crashes, you won’t have access to your guests either. It is the type of hypervisor used in simple test environments.</p><blockquote><strong><em>Note </em></strong><em>: If you want to virtualize your physical servers, it’s CPU should support virtualization otherwise you can not virtualize your physical servers.</em></blockquote><h4>VPS &amp; VDS</h4><p><strong><em>VPS (Virtual Private Server)</em></strong> is an operating system-level virtualization. All VPSs on that server must use the operating system installed on the main server and they all look like small particles that work in tandem with this operating system.Since the entire CPU and RAM sharing is done in software in the VPS, if there is a problem in the main server or one of the VPSs has excessive CPU or RAM usage, all VPSs in the server are affected.</p><p><strong>VDS (Virtual Dedicated Server)</strong> is an operating hardware-level virtualization. VDSs become totally independent small servers. Each can have a different operating system, each of use resources completely independent. VDSs are used only allocated CPU and RAM, so that VDSs do not affect each other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d2c1541961f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qacolony/what-is-server-virtualization-7d2c1541961f">What is Server Virtualization</a> was originally published in <a href="https://medium.com/qacolony">QaColony</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>