<?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 LIRIL on Medium]]></title>
        <description><![CDATA[Stories by LIRIL on Medium]]></description>
        <link>https://medium.com/@liril?source=rss-553ff41f3e7f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-wvDs1FXwSrSyo1I33f9lg.jpeg</url>
            <title>Stories by LIRIL on Medium</title>
            <link>https://medium.com/@liril?source=rss-553ff41f3e7f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:42:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@liril/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[Summary of 2017 — The beauty of enginerring]]></title>
            <link>https://medium.com/@liril/summary-of-2017-the-beauty-of-enginerring-6a6608b608a6?source=rss-553ff41f3e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a6608b608a6</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[LIRIL]]></dc:creator>
            <pubDate>Thu, 08 Feb 2018 15:43:21 GMT</pubDate>
            <atom:updated>2018-02-08T15:43:21.774Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3xzQfLwWb3W9W6nZepcqA.png" /></figure><p>It is a pity that i was “optimized” by my company due to my lack of output. So i would like to share my experience of this year’s work. Hope that it can help you in a way.</p><h3>Docker</h3><p>The first non-business project that i have done at this company was a combination of front-end development and docker with <a href="https://medium.com/u/9be34efbf54e">Cinwell.li</a>. With the help of k8s, we have built a tool that can share development environment in the cloud. So, it would be a good news for my poor performance MacBook. And it would shorten the time of switching projects without waiting for the first compilation of Webpack.</p><p>There are three main parts of this project:</p><ol><li>Server. The main purpose of server is to communicate with api of k8s. So we can create or destroy a deployment and achieve service discovery with k8s service and nginx. And we will assign a domain name to each project, so that it will help front-end developer share their pages with others. And with the help of domain, cors can no longer be a problem.</li><li>Agent. We should install an agent in each pod to communicate with our server.(Install it in the image we use).So we can do port scanning via this agent and find the truly port our user used to register without their config. Besides, we can do something such as authentication and monitor. This is not very important due to we aim to help front-end developer in their development environment.</li><li>Client. We have published a command line tool which will communicate with our server and the pod created by it. We will sync our files via Rsync and keep ssh connection alive which will help us communicate with pod and return the result of command after pod created and ready to connect.</li></ol><p>We have also do some optimization with dependencies, cause we all know that node_modules seems like a black hole. Files in node_modules will be zipped with the hashed key of package-lock.json, and with the help of persistent storage, we can easily create a new deployment of the same project for others in a short time.</p><p>Reload nginx with new generated config file via template file makes it an easy way to assign domain to each project. APIs such as location information can also be available due to ssl certification we provided.</p><p>Although this project become archived due to limitation of k8s and lack of promote. It would be welcome if you want to discuss with me about details of this project. I do believe it can significantly reduce the machine performance requirements of front-end developers.</p><p>And with the help of docker, it would be easy to achieve consistency and stability of development environment. And multiplayer collaboration can also be available due to the sharing connection of pod.</p><p>Finally, i have integrated a new feature as reverse proxy for this project. I have found that a special domain target to local machine is what most developers need. Maybe a dynamic dns register will be more effective.</p><h3>Monitor</h3><p>Then, i turn to do some refactor to front-end monitor system of my company in another team. Now a new round refactor have started with a more advanced concepts. There was a well built front-end monitor system (support both web page and weex page) before i joined this company.</p><p>It can be divided to two main parts of front-end monitor system in a functional point of view. One is performance monitoring and another is error feedback. I have refactored the JavaScript SDK used in front-end totally and upgrade administration pages. (Although they are now being replaced because of architectural changes).</p><p>As a monitor sdk, the first thing it should promise is no side effect to business. Which means that it should robust enough to handle its own errors. Besides, it should be included as early as possible, a slow start speed is also not allowed. And we should all concern the timing of reporting due to we have requirements to change report config.</p><p>As for performance data, performance API should be a good choice. What you need to do is to understand each field of its result. And the main part of error reporting is the parsing of error message. We should get call stack and misclassify for our collector. Great lib like raven.js would process error depend on the browser. Besides, i have also do some optimization like dynamic listeners and combined request.</p><p>Upgrading build tools is one big work in this project, i have packaged sdk with rollup and do test with webpack. So it would be helpful for other maintainers.(I should refresh my browser manual at the beginning)</p><p>It would be a long story about the achievement detail of the collector and data processor. I would not discuss about it cause that i have not really code it. It is such an important part for a mature front-end for company. So it is worth investing a lot in it. And it will be charming in front of such a huge data.</p><h3>Publish</h3><p>At last, i have came back to my own team and join to maintain the publish system of front-end. And this inspire me the beauty of enginerring.</p><p>A publish system contains 3 main parts: source code management, CI/CD and source publishing.</p><p>We use github and gitlab as source code manage platform. In this part, we should process the different webhooks of each platform and then unified them as we need. It is not a technical work, what you should do is just read API documents and deal with it. And CI tools like drone.io have achieved automatically inject webhooks to project in gitlab or github, this would be helpful if you want to reduce the cost of use.</p><p>Jenkins may be the most popular tool to execute CI, and it is different in each company. In a short word, it will execute a series of pipeline operations by reading the configuration files in the repository. And you can easily implement a set of your own publishing flow using Pipeline of Jenkins.</p><p>Thins such as dynamic docker image and environment injection may involve secret technique of my company, so i will not discuss it here. As for CD, the main job is to deliver output to different environments and mange each output of build, for instance, version rollback and backup.</p><p>The last and maybe the most important part is publish resource to place where users can access. This place may be specific machine or a painless management with CDN and OSS.</p><h3>Component Library</h3><p>One of my work as a front-end developer is to maintain the open source project of our company. And i have do some works to the scaffold and build flow of our new mobile component library.</p><p>It is so tired to maintain such an open source project, i should give my heartfelt admiration to other maintainers of the project. You should dive into the framework you use other than logic of component to solve issues.</p><p>I do not have much to say about it, because this is my essential work as a front-end developer. And i shall do it better in the future.</p><h3>Summary</h3><p>I have to say that my team and department are extremely good. I have nothing to complain about this optimization of me. But i do hope that a similar situation will never happen again in the future.</p><p>I have spent half of this year learning about backend, server operation and maintenance. And it is the charm of the enginerring makes this year a great year in my short career. And i will give back to the open source community about my own implements differ from company (due to copyright).</p><p>You can discuss with me about front-end or others if you are interested in what i have talked above.</p><p>Thanks for your reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a6608b608a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>