<?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[Basic People - Medium]]></title>
        <description><![CDATA[Publikasi resmi dari kelompok A6 PPL Fasilkom UI 2019 (Basic People). Publikasi ini berisi seluruh pengalaman tim developer selama mengembangkan aplikasi di mata kuliah PPL. - Medium]]></description>
        <link>https://medium.com/basic-people?source=rss----d06a946af3a8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Basic People - Medium</title>
            <link>https://medium.com/basic-people?source=rss----d06a946af3a8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:09:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/basic-people" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Git Flow lessons for project development.]]></title>
            <link>https://medium.com/basic-people/git-flow-lessons-for-project-development-41afc8a541eb?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/41afc8a541eb</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[gitflow]]></category>
            <dc:creator><![CDATA[Fran Na Jaya]]></dc:creator>
            <pubDate>Tue, 28 May 2019 21:32:24 GMT</pubDate>
            <atom:updated>2019-05-28T21:32:08.822Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>It’s really important to understand git flow and how it works to develop your application when collaborating on version control like git.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*wZBJxPJ0jDuy-ZyAduZsew.png" /></figure><p>Hello everyone, after learning about what is git and how they works <a href="https://www.google.com/url?q=https://medium.com/basic-people/development-activities-need-git-as-best-friend-team-coding-as-parent-and-knowing-git-flow-as-630a88dc022f?source%3Dfriends_link%26sk%3D4f11763a306fc861d6fc615d332896e1&amp;sa=D&amp;ust=1559053617116000&amp;usg=AFQjCNGQU8eTQpvJ57Nk7D9XdsXVxllrUw">here.</a> Today I want to give a lessons for you who are collaborating on git and needed to know what and how git flow works. Git flow is a way to act and work on your repository, it is like a pattern that must be followed. The main purpose using Git Flow is to maintain production application in the best state also this flow can control and track any works that are on going. Here is the lessons from my own experience and I hope it will help you to prepare your development with scrum methodology.</p><h4>Preparation</h4><p>First of all, create the <strong>master branch</strong> this is the production branch that only able to be merged when a work really done(passing the testing, code review, and accepted by product owner). Master branch can not be edited by any of developer member except scrum master of the team. This rule will maintain the master branch not polluted by any bad hands of developer :).</p><p>Second one is <strong>staging branch</strong>, staging branch should be the development branch that deployed a ready to test application. This branch is able to edit by any of developer member but of course there should be a rule to maintain this branch in a good condition that will not be a bug can grow :).</p><p>Then after the preparation step you should be curious about how developer be able to code their works, right? To answer this question you should understand what rule is applied to staging branch first. The rule is as below<br>1. Developer is not allowed to code in staging branch<br>2. Staging branch is branch that contain and collect all the user story branch(will be explained in next section) that should be merged to staging<br>3. Every time user story branch want to merged to staging this should request a merge request and pass the code review process.<br>4. Every merge request should request minimal 2 person of developer member(if the developer team is small as mine) to approve the merge request.</p><p>Now, you are ready to be the developer member. Remember my advice, to be a good developer you should follow the rule and guide so you will not break the flow in your team. Developer member able to complete any task that they want to take(<a href="https://www.google.com/url?q=https://medium.com/basic-people/agile-implementation-in-team-b15c1dad09e6?source%3Dfriends_link%26sk%3D982e0f0b9b0500fd63ef88f9c5ea77a5&amp;sa=D&amp;ust=1559053617106000&amp;usg=AFQjCNHclCgft5e9jmg4vENGmiNWFnzUGw">agile development based</a>). How to complete the task? yeah you should have your own user story branch.</p><h4>Completing Task from One Product Backlog Item</h4><p>In scrum there are PBI and in each PBI can be contain some of user story that should be completed in one sprint. Then, in the sprint review every PBI that completed will be reviewed by the product owner and can be rejected or accepted. Every user story in PBI can contain one or more task. Hold on what you want to learn is how to completing task, okay the explanation above is a little thing that you should know what is ‘task’ and ‘user story’ in scrum.</p><h4>User Story Branch</h4><p>That’s right to complete one task first of all you should create a <strong>user story branch.</strong> User story branch naming should be good to keep it tracked. User story branch naming should follow this rule</p><p>US-&lt;the user story number&gt;-&lt;name of the story&gt;</p><p>example</p><p>US-1-landingpage</p><p>Then, if in one user story only contain one ‘task’ you can start code on the branch, but, if you have some task for one user story you should create a new branch I recommend this method because in my team, user story is treat as task, so there is too many US branch. Then for the task branch rule is simple</p><p>T-US-&lt;the user story number&gt;-sub-&lt;task name&gt;</p><p>example</p><p>T-US-1-sub-membuatstaticlandingpage</p><p>This method maintain the flow of the branch. Also you and your friend can share task in one user story with no problem in the process of working. Then, after knowing about the branch structuring you should be curious ‘how the hell I should start code and what rule in it????’. Next section will be talk about rule of commit(part of the coding for developer), review and approving.</p><h4>Commit Once and you should not regret it</h4><p>Complete your code in local repository and you want to commit it to your remote repository. There is some rule for committing your change.</p><ol><li><strong>Commit message prefix</strong>, There are 4 main message prefix you should use. They are [CHORES], [RED], [GREEN], [REFACTOR]. Use [CHORES] when your change is about dependencies, main settings about your apps, and other things that you add which ‘must be’ in you apps. Use [RED] when your change is failing the pipeline but the change is must be in there as example a unit test when you are using TDD methodology this [RED] case usually happen. Use [GREEN] when your commit is not failing the pipeline and also the change is not categorized to refactor or chores, usually you will use the [GREEN] prefix to your change that implement any feature that already tested. Use [REFACTOR] when you changing inside implementation without change the code behavior, usually you will use it when you want to optimize the code and any other case. [RED]-[GREEN]-[REFACTOR] Basically you will use this flow when implementing you code using TDD methodology you can see the explanation <a href="https://www.google.com/url?q=https://medium.com/basic-people/test-driven-development-is-red-green-blue-development-f268e2150981?source%3Dfriends_link%26sk%3D596d0a9c99b9003e974eab6f7c67227b&amp;sa=D&amp;ust=1559053617149000&amp;usg=AFQjCNFGuVlowezjSvzcGykS_54ReyLtvA">here</a>.</li><li><strong>Commit Message</strong>, commit message should not be a random word or sentence that not explain anything, like ‘good implement’, ‘complete code’, ‘best thing’ or any other words. You should mention your main change in your commit message. This allow you to remember what you do on that commit, also make others can understand your developing flow because there will be code review for your merge request.</li></ol><p>For example about this committing rule here is example of my works</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nAYnUlZb_nwjDXLi-sBVkQ.png" /><figcaption>Example of commit message</figcaption></figure><p>Then after you complete your code, of course you should combine you working to your head branch. Combining your work is not easy as you think there are some rule you should follow too, because you don’t want to ruins all the branch and other developer’s work right?</p><h4>Integrate Branch</h4><p>After I experienced some of the integrating method and read the explanation <a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing">here</a> I choose and suggest you to use ‘merge’ than ‘rebase’ but you can thinking about it by exploring more. So before you merge your works you need some rules of course, this will mange your teamwork flow.</p><ol><li><strong>Pull before Merge, </strong>this will be needed because you will not be able to merge before the head of your destination branch is updated in your branch. Also it is not possible to ask everyone in your developer team is there any update on X branch. So before you create merge request you should pull the update on your destination branch.</li><li><strong>Don’t ever Merge failed commits, </strong>even if you want to present your works to your PO because failed commits means your work is not fully completed. Merging failed commits also will drive to some bug if you forgot to resolve it. So I highly recommend you to push only a branch that is fully completed done.</li><li><strong>Don’t ever forgot the approval number, </strong>minimal you need 2 approval because sometimes you as developer forgot some little thing and your approval may notice it in the code review. You should help other member merging too, you have to do code review on other member works.</li><li><strong>Choose the right target branch, </strong>it’s important to choose the right target. Integrate task branch only to the right user story, and integrate user story only to staging branch. Master branch merge from staging only if the PBI is already accepted by PO without any fixing.</li></ol><p>Now, after knowing the rule above you are ready to merge any branch in your repository. Wait, there are something you should know about branching after merge. There are special case that maybe occur after sprint review or after task merged but not really needed in the staging or there are some bug get away from testing.</p><h4>Special Case</h4><p>What is this special case is a fixing method to some bug or rejected works. You should create new branch to fix the problem.</p><ol><li><strong>ColdFix branch, </strong>this branch can you use when staging already merged but on the sprint review your work is not accepted by PO. You have to rollback all change from that user story. This may be happened to all user story that wanted to be released but rejected by PO.</li><li><strong>HotFix branch</strong>, this branch can you use when there are bug on master branch. Fix the bug in hotfix branch then after the bug is fixed you can merge to master branch again.</li></ol><p>Then all the lessons for Git Flow is finished. I have shared all my experience and dedication in this lessons. Hopefully you can learn from this written explanation. Oh of course don’t forget to be discipline, because it’s needed more attention to pay if you want to keep your work as tidy as possible.</p><blockquote>Hopefully my experience will be a lessons for you</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41afc8a541eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/git-flow-lessons-for-project-development-41afc8a541eb">Git Flow lessons for project development.</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Gitflow Ever]]></title>
            <link>https://medium.com/basic-people/best-gitflow-ever-21f4cddd290?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/21f4cddd290</guid>
            <dc:creator><![CDATA[Tirta Hema]]></dc:creator>
            <pubDate>Tue, 28 May 2019 09:12:33 GMT</pubDate>
            <atom:updated>2019-05-28T09:12:33.623Z</atom:updated>
            <content:encoded><![CDATA[<p>pada story kali ini saya akan membuat dan merancang gitflow versi saya sendiri.</p><p>Git adalah sebuah version control system yang terdesentralisasi. Git sangat berguna jika kita mengerjakan sebuah proyek secara bertim karena git dapat melakukan automasi pada beberapa task dan bisa menggabungkan pekerjaan-pekerjaan yang sudah dilakukan menjadi satu.</p><p>Jika mengerjakan sebuah proyek secara bertim dimana proyek itu terdapat banyak fitur-fitur dan proyek tersebut terus berkembang sepanjang waktu akan sangat sulit dilakukan jika tidak menggunakan workflow yang baik. Dengan menggunakan workflow yang baik kita dapat mengatur merge antar fitur atau merelease edisi terbaru dari proyek yang sedang kita kerjakan.</p><p>ini merupakan contoh workflow paling sederhana</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/0*mhaoiqOYcrguFQql.png" /></figure><p>pada flow ini developer hanya akan berkerja pada satu branch saja yaitu branch master. flow ini akan sangat sulit jika kita mempunyai banyak fitur atau beberapa fitur dikerjakan secara bersamaan. misalnya pada saat salah satu fitur mengalami fail pada tahap build maka seluruh branch tersebut akan fail padahal hanya satu fitur yang fail tidak keseluruhan. Sehingga gitflow seperti ini tidak baik digunakan untuk proyek-proyek besar.</p><p>berikut adalah flow yang saya buat terinspirasi dari gitflow gitflow yang ada di internet maupun yang digunakan pada PPL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*09xpWrKtLt9YcZX8tvN4SQ.png" /></figure><p>pada flow yang saya buat dimulai dari branch master yang akan berisi dengan initial commit yang memuat seperti penjelasan akan proyek dan lainnya. selanjutnya pada branch development, pada awal branch ini memuat seperti setting seperti gitlabci, dockerfile dan lain-lain yang mendukung. Tidak ada pengerjaan fitur pada branch ini. fitur-fitur dikerjakan pada branch feature branch. pada diagram yang saya gambarkan terdapat 2 garis branch feature. Branch feature bisa menjadi sangat banyak tergantung dari fitur-fitur yang akan dibuat. sehingga pada branch feature developer dapat bekerja di branch masing-masing tanpa menggangu branch lain.</p><p>Lantas bagaimana ketika suatu feature sangat kompleks sehingga harus dikerjakan oleh beberapa orang? Akan ada sebuah branch baru yang bernama sub-feature yang nantinya setelah selesai dapat di merge ke branch feature berikut adalah ilustrasinya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*g3e4MfXWEIAM1tZ1TLiyPg.png" /></figure><p>Setiap merge pada branch feature dan sub-feature harus melewati tahap code review. code review adalah tahapan dimana code yang dibuat oleh para developer sudah baik dan tidak mempunyai error atau bug.</p><p>Jika sebuah fitur sudah selesai branch tersebut akan dimerge ke branch developer. di branch developer fitur akan di deploy tetapi hanya untuk kepentingan developer saja. disini developer dapat melihat apa yang sudah mereka kerjakan, kemudian dari branch developer akan lanjut ke branch pre-release. pre-release adalah branch dimana diluar tim developer bisa melihat hasil tetapi, bukan untuk umum hanya untuk internal team saja seperti product owner. jika terdapat kesalahan atau bug dari branch ini akan langsung diselesaikan pada branch hotfix untuk pre-release.</p><p>Jika sudah memenuhi persyaratan dari tim internal, dan sudah siap di release maka akan di merge ke branch master. branch master akan mendeploy hasil pekerjaan yang sudah melewati tahap-tahap sebelumnya kepada publik. jika terdapat kesalahan atau bug pada branch ini akan langsung dikerjakan pada branch hotfix untuk master.</p><p>Tujuan dari gitflow yang saya buat adalah git flow ini memungkinkan feature dibuat oleh beberapa orang sekaligus tanpa menganggu satu sama lain. Pembagian feature harus modular sehingga tidak harus saling menunggu. Mengapa saya membuat gitflow mempunyai banyak tingkatan seperti developer, pre-release, release adalah mengurangi kemungkinan adanya bug atau tidak sesuai dengan permintaan owner pada saat di release, sehingga pada saat release dan dipakai oleh publik aplikasi yang dibuat sesuai dengan keinginan tim, dan bebas dari bug.</p><p>Sekian blog saya terima kasih sudah membaca.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21f4cddd290" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/best-gitflow-ever-21f4cddd290">Best Gitflow Ever</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ini Hubunganku Mana Hubungan Mu]]></title>
            <link>https://medium.com/basic-people/ini-hubunganku-mana-hubungan-mu-d7c119ec6054?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/d7c119ec6054</guid>
            <dc:creator><![CDATA[Tirta Hema]]></dc:creator>
            <pubDate>Tue, 28 May 2019 03:55:42 GMT</pubDate>
            <atom:updated>2019-05-28T03:55:42.004Z</atom:updated>
            <content:encoded><![CDATA[<p>Pada story ini saya akan melanjutkan story sebelumnya yang dapat anda lihat pada link <a href="https://medium.com/basic-people/do-you-wanna-be-my-friend-fe318dd08356">ini</a>.</p><p>Pada pertemuan dengan Bu Maya pada tanggal 26 april lalu saya sudah menceritakan peran PO dan konsultan serta tentang permasalahan bertemu user. Berikut adalah peran PO dan konsultan selama 6 kali sprint.</p><p>Selama proses development kami banyak bertemu dengan orang-orang dari lapor. Orang-orang tersebut adalah dari pihak konsultan yang bekerjasama dengan Kantor Staff Presiden serta pegawai dari KSP sendiri. Pada prosesnya saya banyak terlibat dengan orang-orang dari konsultan tersebut.</p><p>Saya akan memperkenalkan orang-orang yang terlibat pertama tim PPL kami, tim PPL A-6, serta scrum master kami Fayya. Dari pihak LAPOR! kami berhubungan dengan 3 orang yaitu Rifki pegawai KSP, Eric dan Didit dari konsultan yang di kontrak untuk menjadi operator dari LAPOR! (kantor konsultan Mas Eric dan Mas Didit berbeda dengan pihak yang membuat LAPOR! jobdesk mereka adalah bug fixing dari komplain user).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2M-jWt7sOrJvEe33Yugjw.jpeg" /><figcaption>paling kiri adalah Mas Eric, dan orang disebelah kanan saya adalah Mas Rifki</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJtcdLFHfddRa61gmqCLZA.jpeg" /><figcaption>orang yang paling depan adalah Mas Didit</figcaption></figure><p>Hubungan saya dengan pihak-pihak dari LAPOR! sangat baik. Tidak pernah ada konflik yang berkelanjutan atau menghambat proses development. Konflik-konflik yang terjadi biasanya karena miskomunikasi. Miskomunikasi yang biasanya terjadi karena perubahan orang yang hadir pada setiap sprint sehingga terjadi kebingungan terlebih ketika ada perubahan fitur atau perubahan warna. contohnya seperti ini</p><p>Pada saat sprint 1 saya hanya bertemu Mas Eric dari pertemuan itu beliau sudah setuju dengan pemilihan warna dan tampilan. Hal ini sebenarnya sudah disetujui sebelum sprint 1 dimana pada saat itu kami melakukan video call dengan Mas Rifki. Pada sprint 2 di mana Mas Rifki hadir pada sprint tersebut Mas Rifki komplain karena pemilihan warnanya tidak sesuai dengan keingnan pihak mereka. Hal ini beberapa kali terjadi misalnya pada saat Mas Didit hadir mulai dari sprint ke-4. Beliau juga protes terhadap pemilihan warna yang sebenarnya sudah disetujui oleh pihak LAPOR!.</p><p>Saya dan kelompok sempat kebingungan menghadapi permaslahan ini. Cara yang saya lakukan adalah mencoba memberikan pemahaman kepada mereka bahwa design ini telah disetujui. Permasalahan lain yang saya hadapi adalah tentang fitur kami selalu menghadapi kesulitan untuk membuat fitur-fitur LAPOR! karena kami tidak memiliki cukup informasi dan biasanya hanya berbekal dari coba-coba kami di aplikasi sandbox. Setelah berdiskusi dengan pihak LAPOR! akhirnya kami mendapatkan EER dan dokumentasi dari LAPOR! yang sangat membantu proses development. Menurut saya setiap masalah bisa diselesaikan ketika kita bisa sama-sama berdiskusi untuk mencari jalan keluar bersama :)</p><p>Untuk user sampai hari ini saya belum bisa bertemu langsung dengan user. Saya dan Kris sudah mencari-cari dari kenalan kami tetapi belum bisa bertemu dengan user. Dari pihak LAPOR! sendiri tidak pernah berurusan langsung dengan user karena mereka hanya menerima laporan komplain error dari Kominfo atau Kemenpan RB.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7c119ec6054" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/ini-hubunganku-mana-hubungan-mu-d7c119ec6054">Ini Hubunganku Mana Hubungan Mu</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orchestrate Our React Application in Docker]]></title>
            <link>https://medium.com/basic-people/orchestrate-our-react-application-in-docker-a9d5ff7d765b?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/a9d5ff7d765b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-orchestration]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[swarm]]></category>
            <dc:creator><![CDATA[Fran Na Jaya]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 07:26:22 GMT</pubDate>
            <atom:updated>2019-05-23T07:17:31.798Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Need to manage many docker containers? Need to communicate two or more containers? Orchestration is the solution</blockquote><p>Docker is one of many tools to develop application. Docker use image as the base application source to serve on a container and service. So, when you use docker as your service you need to make any of your application appear as image docker. There are already exist so many base image serve by Docker as Node, nginx, Django, postgre, and else.</p><p>When you develop applications sometimes you meet so many image in one Software, you know it right? As example you want to make your application front end based on React, and you want to make your database use postgre, then at least you need two containers for the front end and the back end. Then you have to think how to connect them, you can use services to connect it.</p><p>Two image to serve one applications, it will be exhausting you to manage it one by one and deploy it one by one. Here is orchestration Docker show up to solve the problem. So, what are Container Orchestration manage?</p><p>Container orchestration usually used to manage and automate many task, including :</p><ul><li>Provisioning and deployment of containers</li><li>Redundancy and availability of containers</li><li>Scaling up or removing containers to spread application load evenly across host infrastructure</li><li>Movement of containers from one host to another if there is a shortage of resources in a host, or if a host dies</li><li>Allocation of resources between containers</li><li>External exposure of services running in a container with the outside world</li><li>Load balancing of service discovery between containers</li><li>Health monitoring of containers and hosts</li><li>Configuration of an application in relation to the containers running it</li></ul><p><strong>Docker Orchestration examples that usually used is:</strong></p><ol><li>Kubernetes</li><li>Swarm</li><li>Apache Meos</li></ol><p>So how to make the docker orchestrations? In simple way you can use yml configuration through docker-compose.yml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*nUSnFL3UQMvqWp98MmA92w.png" /></figure><p>Explanations about the docker-compose above:</p><p>Using version 3.4 of the compose service. The composer define to make service of web. In web they have build and environments.</p><p><strong>Docker orchestration in our team</strong></p><p>So, basically we don’t need the orchestration up until now because we only create a front-end application and not creating database system for our applications. As the result we only manage Dockerfile to serve our applications.</p><p>Here is the brief explanation of this</p><h3>Software Architecture</h3><p>First of all, our application is doing a revamp in admin site Lapor.go because of that we don’t have any database in our apps. So, we doesn’t need an orchestration because we only develop the front end.</p><p>We also change the dockerfiles functionalities, in the begining of this development we use nginx to develop our app. After searching about nginx layer for nodejs we know that nginx is used for load balancing the react application serving.</p><p>Our application doesn’t use any database, we subtitute the database system use json files. So there is no need to use load balancer for our application. Then, we create new dockerfiles that fulfill our needed.</p><p>This is our new docekerfiles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*82sKnoo-4NI8VtBTWD6Zig.png" /></figure><p>This dockerfile use node base image.</p><p>Then copy all the files and folder in directory to the image.</p><p>Then expose port 80 for development</p><p>The last syntax is CMD. This task run the npm run startstaging to run the development</p><h3>Conclusion</h3><p>So, we don’t use the orchestration and load balancer in our software architecture because we don’t use any database.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9d5ff7d765b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/orchestrate-our-react-application-in-docker-a9d5ff7d765b">Orchestrate Our React Application in Docker</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Orchestration]]></title>
            <link>https://medium.com/basic-people/docker-orchestration-6ef769dcb029?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ef769dcb029</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[container-orchestration]]></category>
            <dc:creator><![CDATA[Marco Kenata]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 07:22:30 GMT</pubDate>
            <atom:updated>2019-05-29T13:38:07.057Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M2E-rJnkgz7RGUn7" /><figcaption>Photo by <a href="https://unsplash.com/@mesmithdesign?utm_source=medium&amp;utm_medium=referral">Michael Smith</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Bukan docker yang ini manteman, tapi kita akan membahas docker orchestration, atau boleh disebut juga dengan container orchestration. Simak ya!</p><p>Docker / Container Orchestration ini sebenarnya adalah mengurus daur hidup dari container-container yang ada, yang ada dalam <em>environment </em>yang dinamik. Contoh orchestrator yang dikenal kalangan masyarakat luas, salah satunya adalah kubernetes, atau docker swarm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*dxqxqVtoGYv2YAecs9OtSQ.png" /><figcaption>Simulasi Docker Orchestration dalam Kubernetes.</figcaption></figure><p>Cara kerja Docker orchestrator seperti yang ada di gambar di atas adalah, pod IP address bertugas untuk menyimpan container-container yang dipakai oleh host tersebut, lalu di kontainer tersebut, interaksi antar kontainer dalam docker orchestration dijalankan via service <em>third party</em>, sehingga service tersebut dapat meregulasi usage image file dalam kontainer.</p><p>Setelah kita tahu cara kerja docker orchestration,kita dapat menggunakan <em>orchestrator </em>untuk mengerjakan beberapa tugas-tugas berikut :</p><ol><li>Pembuatan dan <em>deployment </em>dari kontainer yang ada</li><li><em>Redundancy </em>dari kontainer yang ada</li><li>Mengatur <em>load </em>dari setiap docker itu sendiri</li><li>Pemindahan host jika salah satu host mati</li><li>Alokasi <em>resources</em></li><li>Untuk menampilkan detil <em>services </em>yang jalan</li><li>Health monitoring dan load balancing</li><li>Konfigurasi dari aplikasi yang menjalankan docker</li></ol><p><strong>Pemanfaatan Orchestrator<br></strong>Pada tugas kali ini, kita tidak menggunakan docker orchestration dikarenakan hanya menggunakan 1 container, kalau dipakai cenderung <em>overkill, </em>dan juga redundant.</p><p><strong>Docker Swarm</strong></p><p>Swarm sendiri merupakan <em>self-healing group of engines.</em></p><p>Command : docker swarm init</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RrHX51C39HpuArqBMFb-_g.png" /></figure><p>Ketika command tersebut dijalankan, maka docker akan membuat 2 token, yakni token worker dan token manager. token manager ini berguna dalam menerima commands dan task scheduler, token worker ini berguna untuk ekseskusi kontainer yang diberikan oleh manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYC_TkhBjc0vtaPjjrg6MQ.png" /></figure><p><strong>Docker swarm command</strong></p><p>Dalam memulai proses di swarm, baik mereplikasi proses / distribusi / memuat proses-proses, kita menggunakan docker service.</p><p>Contoh command: docker service create tester -p 80:80/tcp nodes:8.15.1-jessie-slim</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*nhOLyTEjbaXxtmKefEXCMQ.png" /></figure><p>Command diatas menyatakan keadaan yang diinginkan pada <em>swarm</em> untuk dapat dijangkau sebagai satu kesatuan, yang memuat secara <em>internal</em> pada port 80 dari setiap <em>node </em>yang tersedia.</p><p>Sekian blog saya!<em>have a nice day!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ef769dcb029" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/docker-orchestration-6ef769dcb029">Docker Orchestration</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactor REACT app Compilations]]></title>
            <link>https://medium.com/basic-people/refactor-react-app-compilations-dcfa2b674ecd?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/dcfa2b674ecd</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[refactoring]]></category>
            <category><![CDATA[design-patterns]]></category>
            <dc:creator><![CDATA[Fran Na Jaya]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 06:54:25 GMT</pubDate>
            <atom:updated>2019-05-23T06:49:04.332Z</atom:updated>
            <content:encoded><![CDATA[<h3>Refactor REACT App In Team Development</h3><blockquote>Refactor is the solution to make your implementation looks good, Even if you have tried your best to make a clean code</blockquote><p>So, what is refactor? is that really important? <strong>Refactoring </strong>is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Sometimes you need this technique to tackle a error that is unexpected when you make an implementation of function, library, tools or any code.</p><p>In the react application there are some cases could happened that are</p><h4>Bloated Components</h4><p>Then, when coder create an react components sometimes there is master component that act as the end point of all the components and function. This master component usually created used a wrong implementation like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*jvSTK4OqW708wfNHPeDBZg.png" /></figure><p>The components above are implementation of JSX that make too many components in one render task, so you have to refactor it to make it cleaner.</p><p>You can create <strong>single React Component </strong>to avoiding a 1000000000 line code implementation in one by one component. So first of all you have to think as object oriented programmer. The object in one page as example is<strong> Header, Body, Footer, </strong>in body part we can also separate it to some object as <strong>Navigation, Body Card, Body Footer.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*GPWZZtJ0DWLdwiBUADqp7A.png" /></figure><h4>Repetitive Logic</h4><p>When I needed to copy something <strong>fourth time</strong> and have to extracted. Then I have exhausting myself by repeat it again and again to make a same things. So to avoid it, you can step away to more useful implementation. You have to passing over an element because dependencies to the parent properties. React can do it, you can use <a href="https://reactjs.org/docs/higher-order-components.html"><strong>Higher Order Component</strong></a><strong> </strong>and also use passing parameters to other components by <a href="https://reactjs.org/docs/render-props.html"><strong>Render Props</strong></a>. When having</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*LI38tJqTUXkSPmjTKNV4nw.png" /></figure><h3>JSX Outside the Render Method</h3><p>Then sometimes you need to make a function to rendering or passing a div component or else with some case or something else. Then you needed to avoid the JSX outside render method. You have to make a better look of your code.</p><p>Here the examples</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*1e6X_qJpkOcQVlrmZtyHTA.png" /></figure><p><strong>Refactoring in Our Team</strong></p><p>Bad Components :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*_LIgNGiuw-I7zHqjrruKbQ.png" /></figure><p>On the components above there is too many components in one rendering, so, we have to seperate it, also we know that komentar is not only one item but may include some items from this function below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*QA88-jTIrBrAr081WGQEbw.png" /></figure><p>Penyelesaian :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*nVa2ogcfp0NQ-3bk3kig_w.png" /></figure><p>The komentar Conten Render we create to simplify the rendering return functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*BsossfCa3ouozgp74YaqlQ.png" /></figure><p>This is the komentar render functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*o19Q49mMYM1Qbb0ek8ee3Q.png" /></figure><p>This is the button render functions.</p><h4>React Patterns</h4><p><strong>Function Components : </strong>You may define function js in react app as usual, declaration is same as javascript function.</p><p><strong>Destructuring</strong> <strong>Props : </strong>Props is a property in react app that can store value, and used in the function and other in same files.</p><p><strong>JSX spread attributes : </strong>variable spread is one of JSX feature. You can make it use {} for the variable used, and the value will be stored in Props.</p><p><strong>Conditional rendering : </strong>Is one of the special feature in JSX, and really useable in the react app. You can define it as :</p><p>if</p><p>{ condition &amp;&amp; &lt;span&gt;Rendered when `truthy`&lt;/span&gt;; }</p><p><strong>Event Switch : </strong>Changing an event handler result by define a new function of event handler.</p><p>Our application example of react patterns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*8LehftWimqAg3mFMQeFUzA.png" /><figcaption>Example of Handle Change in Our apps</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*RdpMViG5xotAflr2fjAieA.png" /><figcaption>Example of Function in our react app</figcaption></figure><p>You can explore more about this react patterns <a href="https://reactpatterns.com/">here</a>. In our apps we use only some of the pattern because some of the feature is not needed to used.</p><h3>Conclusion</h3><p>Keep you spirit to stick to the rule that react app use object oriented programming paradigm. You need to make separate component for a biggest component. You can step by step make the component smaller by make a sketch of your apps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcfa2b674ecd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/refactor-react-app-compilations-dcfa2b674ecd">Refactor REACT app Compilations</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Software Orchestra]]></title>
            <link>https://medium.com/basic-people/the-software-orchestra-2d61e9e19308?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/2d61e9e19308</guid>
            <dc:creator><![CDATA[Kris Tianto]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 06:42:22 GMT</pubDate>
            <atom:updated>2019-04-30T06:42:21.941Z</atom:updated>
            <content:encoded><![CDATA[<p>Halo semua! Pada blog kali ini saya akan menjelaskan secara singkat mengenai Container Orchestration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MQ-RQ4pSj5DRZnpy.jpg" /></figure><p>Bukan, bukan orchestra seperti yang di atas, tapi orchestra seperti yang di bawah ini..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6gfNMLB5x03OIO85.png" /></figure><h4>Jadi, sebenarnya apa itu Container Orchestration?</h4><p>Container Orchestration merupakan sebuah proses untuk mengorganisasi lifecycle dari containers, khususnya dalam environment yang besar dan dinamis. Contoh-contoh container orchestration yang cukup dikenal diantaranya adalah Apache Mesos, Google Kubernetes, dan Docker Swarm.</p><h4>Apa saja yang dapat diatur oleh Container Orchestration?</h4><p>Container orchestration biasanya digunakan untuk mengatur dan meng-automate banyak tasks, di antaranya:</p><ul><li>Provisioning and deployment of containers</li><li>Redundancy and availability of containers</li><li>Scaling up or removing containers to spread application load evenly across host infrastructure</li><li>Movement of containers from one host to another if there is a shortage of resources in a host, or if a host dies</li><li>Allocation of resources between containers</li><li>External exposure of services running in a container with the outside world</li><li>Load balancing of service discovery between containers</li><li>Health monitoring of containers and hosts</li><li>Configuration of an application in relation to the containers running it</li></ul><h4>Bagaimana implementasi Container Orchestration dalam PPL kami?</h4><p>Container Orchestration merupakan suatu hal yang cukup menguntungkan, apabila kita menggunakan banyak container dalam proyek kami. Namun, karena proyek kami hanya berfokus ke sisi front-end saja dan hanya menggunakan 1 container, maka kami memutuskan untuk tidak mengimplementasikan container orchestration.</p><p>Demikian blog kali ini, semoga bermanfaat!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d61e9e19308" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/the-software-orchestra-2d61e9e19308">The Software Orchestra</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Refactor? Lagi?]]></title>
            <link>https://medium.com/basic-people/refactor-lagi-6ee438c215?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ee438c215</guid>
            <category><![CDATA[mvc]]></category>
            <dc:creator><![CDATA[Marco Kenata]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 06:42:15 GMT</pubDate>
            <atom:updated>2019-05-29T06:47:03.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wkcTWyZc-NO0WnjE" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Tenang, tenang! Kali ini beda kok! Kita akan jelaskan nature dari <em>React </em>sekarang. Simak ya!</p><p>React merupakan library JavaScript yang digunakan oleh Facebook, lalu diimplementasikan oleh publik. Umumnya React sendiri menggunakan Object Oriented Programming, lalu kita memanfaatkan design pattern MVC untuk membuat aplikasi React baru, lalu menggunakan template HTML yang mengandung markup dan <strong>controller. </strong>Setelah kita membahas nature dari React itu sendiri, kita akan membahas kesalahan-kesalahan umum yang ada dalam React itu sendiri.</p><p><strong>Bloated Components</strong></p><p>Ini yang perlu dihindari pada saat menggunakan React untuk mendesain suatu halaman. Dan biasanya Komponen dalam React itu memiliki ujung berupa Render.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Gal65ThwYvPes4EEKm98A.png" /><figcaption>Umumnya component yang ada di sini di satukan langsung semua.</figcaption></figure><p>Setelah kita lihat postingan di atasm kita dapat melihat HTML yang dijalankan menjadi satu, sehingga kalau mau debugging menjadi susah kalau misalnya ada 1 komponen yang <em>outlier</em>, Jadi bagaimana cara menghindari hal-hal di atas? Dan menggunakan secara penuh Object Oriented Programming? Yaitu dengan cara membuat komponen-komponen lain, yang terdiri atas kodingan-kodingan render di atas, lalu diimport ke dalam js baru, contoh :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ar-IHboCleNlI79cmckKBQ.png" /></figure><p>Kita dapat melihat disini bahwa LowClass1 dan LowClass3 merupakan class yang akan diturunkan ke page HighClass, sehingga lebih mudah dilihat.Lalu ada kasus baru nih, jika kita harus ngepass sesuatu dari parent Component ke Component yang lain, kita tidak usah mengulang komponen-komponen yang tersedia, kita dapat langsung menggunakan props</p><p>Contoh :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VW4SRqtXuDucb-B64_tTzQ.png" /></figure><p>Props itu berguna untuk mengepas elemen-elemen dari satu class menuju yang lain, sehingga tidak perlu pemanggilan ulang-ulang pada saat LowClass. Setelah itu,kita juga dapat menghindari kodingan HTML yang super panjang tersebut dengan cara bagi menjadi method-method di luar render, contoh :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w-gDEmKypu9Gnalhyf42hA.png" /></figure><p>Method yang dibuat pertama kali juga berperan untuk misalnya ada fungsionalitas tambahan, seperti call ke DB / Local Storage.Lalu, saya ingin menceritakan implementasi pada kelompok kita, apakah memenuhi kriteria-kriteria di atas?</p><p>Studi Kasus :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bp-RuVkDE-OHr0NFnzjsDA.png" /></figure><p>Dari studi kasus ini, kita menggunakan method-method untuk keperluan localStorage, seperti yang sudah dijelaskan di atas, dan juga kita menggunakan props untuk load data dari upper class.</p><p>Studi Kasus 2 :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OoUF14baCOuDs5hNZSeUGg.png" /></figure><p>Dari studi kasus ini, kita menggunakan props dengan frekuensi yang lebih tinggi, dikarenakan page ini merupakan page controller dari Report Box, yang merupakan suatu instance laporan.</p><p><strong>Component Pattern</strong></p><p>Selain dari refactoring, di react, kita juga kenal design pattern yang khusus ada di dalam React. Atau dapat disebut juga dengan component pattern.</p><p><strong>Apa itu Component?</strong></p><p>Sesuai yang ada di website <em>reactjs.org</em>, <em>“Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.” </em>Dalam bahasa Indonesia berarti, <em>Components </em>mempunyai kapabilitas dalam membagi UI menjadi independen, potongan <em>reuse, </em>dan satu komponen terhadap komponen lainnya bersifat isolatif.</p><p>Pertama kali penginstalan react pada komputer anda, anda sendiri mendapatkan 1 hal, komponen dan API yang mengikutinya. Sesuai dengan fungsi JavaScript, komponen mendapatkan input dalam bentuk “<em>props</em>” dan membalikkan elemen React, yang mendeklarasikan bagaimana UI suatu aplikasi dapat terbentuk. Oleh karena itu, React sendiri diklasifikasikan sebagai API deklaratif, karena kita sendiri yang memberi tahu React bagaimana cara UI tersebut terlihat di publik, dan React akan mengatasi semua hal.</p><p><strong>API dalam <em>Component</em></strong></p><p>Dalam penginstalan React, kita dapat melihat terdapat 5 macam API, berupa</p><ul><li>render</li><li>state</li><li>props</li><li>context</li><li>lifecycle events</li></ul><p>Dari 5 API di atas, kita dapat membagi menjadi 2 kelompok besar pengembangan aplikasi React, yakni <strong>stateful </strong>dan <strong>stateless. </strong>Stateful umumnya dijumpai oleh function yang menginisiasi variabel baru dari state tersebut, sedangkan stateless umumnya dijumpai oleh function yang mengoper value dari komponen yang lebih tinggi derajatnya. Umumnya stateful menggunakan API render, state, dan lifecycle events, Lalu stateless menggunakan render, props, dan context.</p><p>Dari 5 API di atas, kita akan membahas <em>Component Pattern </em>yang merupakan salah satu hal unik dari React sendiri. Component Patterns juga merupakan salah satu best practices dan pertama kali diperkenalkan untuk memisahkan logic layer dan UI atau presentational layer. Dengan cara ini, diharapkan <em>component </em>yang dihasilkan lebih reuseable dan kohesif .</p><p><strong>Component Pattern</strong></p><p>Pattern yang saya gunakan dalam pengerjaan proyek ini adalah :</p><p><strong>Function Components : </strong>Deklaarasi fungsi JS seperti biasa.Pemanfaatan:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MHbnAG6aWgvl1A1p6uB4g.png" /><figcaption>Contoh function</figcaption></figure><p><strong>Destructuring</strong> <strong>Props : </strong>Turunkan props di react lalu bisa diturunkan kepada komponen-komponen lain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UVYzIMh-_W6GDUumKxbI7w.png" /><figcaption>Kodingan saya tentang props</figcaption></figure><p><strong>JSX spread attributes : </strong>Penggunaan {} dalam inisiasi variabel, sehingga diturunkan dalam bentuk props</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VwbV5TNuSpgdNutqNn9mA.png" /><figcaption>Kodingan saya terkait JSX Spread</figcaption></figure><p><strong>Event Switch : </strong>Menggunakan function terpisah untuk handle event yang terjadi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*hJm6eAEXs06zn-DlbJN5yA.png" /><figcaption>Kodingan saya terkait handle change</figcaption></figure><p>Sekian blog saya, have a nice day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ee438c215" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/refactor-lagi-6ee438c215">Refactor? Lagi?</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Profiling? Apakah itu?]]></title>
            <link>https://medium.com/basic-people/profiling-apakah-itu-2b721adedefe?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b721adedefe</guid>
            <category><![CDATA[profiling]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Marco Kenata]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 06:12:06 GMT</pubDate>
            <atom:updated>2019-05-29T10:27:01.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ebQU8q9nNpAAdTFk" /><figcaption>Photo by <a href="https://unsplash.com/@benwhitephotography?utm_source=medium&amp;utm_medium=referral">Ben White</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Mungkin pada saat kita bermain game, kita mengenal istilah <em>profile </em>sebagai karakter kita sendiri, tapi pada saat programming, profiling sendiri menjadi beda istilah. Jadi apakah itu? Mari kita bahas!</p><p>Profiling adalah sebuah bentuk dari analisis program yang dinamis, yang mengukur memori suatu program, kompleksitas waktu suatu program, dan penggunaan instruksi-instruksi tertentu dan durasi pemanggilan fungsi. Dan paling umum itu profiling bertugas untuk meng<em>assist</em> optimisasi program.</p><p>Dalam program kami, kami mengukur profiling ini melalui performance tools dari <em>chrome </em>sendiri karena sejak React 16, tidak ada Profiler yang independen lagi untuk menjalankan.</p><p>Cara melakukan profiling ala Chrome adalah sebagai berikut :</p><ol><li>Klik kanan, lalu memilih Inspect</li><li>Membuka tab performance.</li><li>Langkah ini paling penting, karena kita harus menentukan apa yang harus dibuka terlebih dahulu, lalu jangan ditutup tab performance nya, sehingga dapat terekam dengan jelas.</li><li>Tekan rekam dalam tab performance nya, lalu jalankan URL yang sesuai.</li><li>Setelah URL tersebut berhasil ke-<em>load</em> maka hentikan rekaman yang ada.</li><li>Di tab performance akan terlihat hasilnya.</li></ol><p><strong>Performance Tab Stats<br></strong>Di tab performance tersebut setelah proses perekaman, kita dapat melihat bahwa ada <em>updat</em>e terbaru dari tab yang memunculkan gambar :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3CAy22UznSt7fb0rSzqPA.png" /><figcaption>Contoh profiling.</figcaption></figure><p>Di atas, saya telah menjalankan tes untuk membuka tab disposisi dan melakukan error tindak lanjut. Lalu saya akan menjelaskan apa yang terjadi pada tab Performance.</p><p>Setelah melakukan perekaman, kita dapat membaca dari atas terlebih dahulu, yaitu :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*eOJUSBA3jDiJrq_tQtgmyw.png" /><figcaption>Profile 1</figcaption></figure><p>Kita mulai baca dari atas, yakni dari FPS, semakin tinggi bar hijaunya maka semakin baik pula perjalanan aplikasi web tersebut bekerja. Selanjutnya kita lihat bar CPU, jika bar CPU tersebut memiliki grafik yang tinggi, maka kita dapat menyimpulkan bahwa mungkin saja ada perbaikan untuk menghandle algoritma.</p><p>Lalu kita lanjut kepada no 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*wHBUdz1S1ZPuhj0QIVp7ZA.png" /></figure><p>Tab ini bertujuan untuk menunjukkan waktu dan workload dari heap tersebut. Garis merah menunjukkan jumlah dokumen, garis biru menunjukkan berapa banyak memori JS yang digunakan, grafik oranye menunjukkan berapa banyak listeners yang digunakan, sedangkan grafik hijau menunjukkan berapa banyak node yang berjalan ketika aplikasi tersebut dijalankan.</p><p>Lalu kita lanjut kepada no 3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*TUwLDrvqTRQmmGUpUbgEzw.png" /></figure><p>Tab ini bertujuan untuk menghitung total runtime dari awal sampai akhir run dari page tadi, dan juga menampilkan mana saja function yang paling ribet dibandingkan dengan yang lainnya.</p><p>Setelah kita melihat cara-cara profiling, kita dapat mengambil kesimpulan berupa keuntungan profiling, berupa optimisasi hal-hal berikut ini :</p><ol><li>Algoritma<br>Optimisasi algoritma yang dipakai di fungsi. Fungsi yang umumnya di optimisasi adalah loading time, apakah kodingan tersebut bergantung satu sama dengan yang lainnya.</li><li>Arsitektur<br>Optimisasi penggunaan memory, seperti caching, sehingga menentukan apakah suatu array memakai terlalu banyak space, sehingga penggunaan memory menjadi lebih sedikit.</li><li>Organization<br>Menggunakan clean code untuk optimisasi , sehingga semua fungsi yang digunakan seminimal mungkin berhubungan satu sama lain, sehingga optimisasi dapat dilakukan.</li></ol><p>Optimisasi pada kelompok kita sekarang umumnya muncul pada bagian Organization, sehingga kode-kode yang <em>redundant</em> dapat menjadi <em>clean, </em>seperti di bawah ini:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZALklK61D2mZR0J-3FQwJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TCnUq1RsVc26ZLYWsLzySg.png" /><figcaption>sebelum dan sesudah clean code</figcaption></figure><p>Sekian blog saya, <em>have a nice day!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b721adedefe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/profiling-apakah-itu-2b721adedefe">Profiling? Apakah itu?</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Orchestration]]></title>
            <link>https://medium.com/basic-people/docker-orchestration-d701e5a33e57?source=rss----d06a946af3a8---4</link>
            <guid isPermaLink="false">https://medium.com/p/d701e5a33e57</guid>
            <dc:creator><![CDATA[Tirta Hema]]></dc:creator>
            <pubDate>Tue, 30 Apr 2019 06:01:28 GMT</pubDate>
            <atom:updated>2019-05-20T11:28:35.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*QMqJ_DuvctIYCUSo.jpg" /></figure><p>Pada story kali ini saya akan banyak membahas tentang Docker. <a href="https://www.codepolitan.com/tag/docker/">Docker</a> adalah salah satu platform yang dibangun berdasarkan teknologi container. Docker merupakan sebuah project <a href="https://www.codepolitan.com/tag/open-source/"><strong>open-source</strong></a> yang menyediakan platform terbuka untuk developer maupun sysadmin untuk dapat membangun, mengemas, dan menjalankan aplikasi dimanapun sebagai sebuah wadah (container) yang ringan. Dengan sangat populernya docker, sebagian orang sering menganggap docker adalah sebutan lain untuk container.</p><p>Docker berguna untuk melakukan virtualisasi pada tingkat OS. Aplikasi yang beerjalan pada docker biasanya lebih cepat dan efisien karena Docker adalah lightweigh platform yang memakan memori sangat sedikit karena tidak perlu menyiapkan OS secara penuh. Docker menjalankan aplikasi bertipe image. Darimana image itu didapat ? Image didapat setelah ketika aplikasi react sudah melewati tahap docker build</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*KLHpbqAeuRzu87c01tRegw.png" /></figure><p>Ada beberapa keuntungan pada saat kita menggunakan docker ;</p><ol><li>aplikasi selalu jalan dalam environment yang sama (local computer atau server)</li><li>Terdapat fitur sandbox yang menjamin aplikasi berjalan tanpa ada gangguan dari enviroment host</li><li>Mudah untuk menjalankan semua dependecies-nya</li></ol><p>Docker dibangun berdasarkan empat prinsip ini :</p><blockquote>Simple Yet Powerful — Orchestration is a central part of modern distributed applications; it’s so central that we have seamlessly built it into our core Docker Engine. Our approach to orchestration follows our philosophy about containers: no setup, only a small number of simple concepts to learn, and an “it just works” user experience.</blockquote><blockquote>Resilient — Machines fail all the time. Modern systems should expect these failures to occur regularly and adapt without any application downtime that’s why a zero single-point-of-failure design is a must.</blockquote><blockquote>Secure — Security should be the default. Barriers to strong security — certificate generation, having to understand PKI — should be removed. But advanced users should still be able to control and audit every aspect of certificate signing and issuance.</blockquote><blockquote>Optional Features and Backward Compability — With millions of users, preserving backwards compatibility is a must for Docker Engine. All new features are optional, and you don’t incur any overhead (memory, cpu) if you don’t use them. Orchestration in Docker Engine aligns with our platform’s batteries included but swappable approach allowing users to continue using any third-party orchestrator that is built on Docker Engine.</blockquote><p>Pada dunia nyata banyak perusahaan yang mempunyai ratusan aplikasi dan mungkin mempunyai banyak container. Hal ini tidak mungkin kita atur satu per satu karena akan sangat repot dan memakan waktu yang sangat banyak. Sehingga kita memerlukan Docker Orchestration, Docker Orchestration adalah hal-hal yang dibutuhkan untuk melakukan deploy dari container individual pada single host ke multi container apps pada banyak mesin. Hal ini membutuhkan platform terdistribusi, independen dari infrastruktur dan selalu online, dan bisa bertahan dari kegagalan hardware dan software update.</p><p><strong>Tujuan penggunaan docker orchestration</strong></p><blockquote>Provisioning and deployment of containers</blockquote><blockquote>Redundancy and availability of containers</blockquote><blockquote>Scaling up or removing containers to spread application load evenly across host infrastructure</blockquote><blockquote>Movement of containers from one host to another if there is a shortage of resources in a host, or if a host dies</blockquote><blockquote>Allocation of resources between containers</blockquote><blockquote>External exposure of services running in a container with the outside world</blockquote><blockquote>Load balancing of service discovery between containers</blockquote><blockquote>Health monitoring of containers and hosts</blockquote><blockquote>Configuration of an application in relation to the containers running it</blockquote><p><strong>Bagaimana cara Kerja Docker Orchestration ?</strong></p><p>Cara kerja Docker Orchestration hampir sama pada docker biasa. Pertama kita harus melakukan konfigurasi pada file JSON/YAML tergantung orchestration tool yang kita pakai. konfigurasi ini akan mengatur bagiamana membangun koneksi antar docker, dimana mengumpulkan container images, dan berapa volume storage yang akan kita gunakan. Pada umumnya sebuah tim developer akan membuat branch pada vesion control system sehingga mereka bisa melakukan deploy pada aplikasi yang sama tetapi pada environment yang berbeda sebelum mereka melakukan deploy pada production cluster (jika pada PPL ini dapat diartikan pada staging atau master). Pada saat container sudah berjalan pada host, orchestration akan melakukan perintah-perintah sesuai dengan konfigurasi. Keuntungan dari penggunaan orchestration adalah kita dapat menggunakan dalam environment apapun.</p><p><strong>Aplikasi-aplikasi penunjang</strong></p><p>Pada pengerjaan proyek kelompok kami, kami hanya mengerjakan bagian front-end jadi tidak memerlukan pengaturan server dan lain-lain seperti yang bisa dilakukan pada docker orchestration. Pada proyek ini kami awalnya menggunakan engine x, engine x kami gunakan untuk routing pada saat pembuatan image di docker, dan untuk mengatur agar tidak ada CORS error pada saat penggunaan API yang disediakan. Tetapi pada saat berjalan kami tidak menggunakan engine x karena mengalami kesulitan jika routing pada engine x dan tidak menggunakan lagi API sehingga tidak memerlukan aplikasi untuk mencegah CORS error.</p><p><strong>Contoh dari Docker Orchestration:</strong></p><ol><li>Kubernetes</li><li>Swarm</li><li>Apache Meos</li></ol><p>Setiap docker orchestrartion mempunyai kelebihan dan kekurangan masing-masing kita harus memilih sesuai kebutuhan kita dan tidak memaksakan untuk menggunakan salah satu orchestration walaupun tidak sesuai dengan kebutuhan kita.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d701e5a33e57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/basic-people/docker-orchestration-d701e5a33e57">Docker Orchestration</a> was originally published in <a href="https://medium.com/basic-people">Basic People</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>