Yesterday, I was invited by USTC LUG to attend the 2014 Open Source Technology Conference (OSTC) hosted by CSDN. I would like to share with you the notes I took at the conference and my unreliable memory. If there are any errors or omissions, please point them out in the comments. Some of the pictures in this article are from CSDN’s official live broadcast. I obviously don’t have the speakers’ slides, but I heard that CSDN will release them in the next few days.

IMG_20140330_081339IMG_20140330_081339

In the morning, I met the tall and handsome Thomas Yao and Wang Yong from Deepin (I didn’t take a picture).

IMG_20140330_081322IMG_20140330_081322 IMG_20140330_081405IMG_20140330_081405

Outside the venue were Deepin and Microsoft’s exhibition boards (not just these two)

IMG_20140330_083037IMG_20140330_083037IMG_0008IMG_0008

The panoramic view of the venue and the open source movie “Big Buck Bunny” played before the opening

Keynote 1: Tencent’s Open Source Strategy

13961441628281396144162828

Chen Lei, Vice President of Tencent’s Social Network Business Group, shared Tencent’s open source strategy. Tencent has achieved code sharing within the company. Previously, Tencent regarded code as a core secret, and the code of QQ must not be leaked. But only 1% of Google’s code related to core technologies such as search engines is not open, and the vast majority of code is shared by the entire company.

Why does Tencent now have the confidence to share code within the company and gradually share it with the whole society in the form of open source? Because code is no longer the core value of software companies, even if the code of QQ and WeChat is opened, it is difficult to produce a second product that can compete with QQ and WeChat. The company culture is now the core value of software companies, and open source is a way to promote company culture.

Tencent’s open source is divided into three stages: open interface, open capabilities, and open code. Opening the interface means opening some APIs for developers to call. Opening capabilities means opening network infrastructure and service quality to external use. Opening code is open source. After the 3Q war, Tencent began to adopt an open strategy, but the openness immediately after the end of the 3Q war was superficial, and it is now developing in depth. For example, regarding the openness of the monitoring and operation system, Tencent originally planned to open it in the form of SaaS (Software as a Service), but now there are many mature monitoring and operation open source frameworks, so it is not meaningful to open a few APIs at this time. Therefore, Tencent now plans to open core technologies such as SDN to other companies to gain community support.

The next part of the sharing is Tencent’s “Way of Massive Data”, including small steps and quick runs, first withstand and then optimize, big systems do small, etc. For example, Tencent Search spent two years building a new architecture from scratch, but it never went online. As a result, many problems were discovered on the first day of going online, and it was forced to go offline after 8 days. Now Tencent has an unwritten rule that new projects must go online within two months and gradually improve based on actual operating conditions.

Tencent is gradually opening the source code of several core systems in stages, with 6 in the first phase and more than 30 in the second phase.

Keynote 2: Accidentally On Purpose: the Early Story of Open Source

13961419825411396141982541

The speaker of this lecture is Larry Wall, the founder of the Perl language and an early advocate of the open source software movement. Many people were asking for his autograph with the “Camel Book” long before the conference started. Larry Wall’s speech was very humorous, his slides had a hacker style, and he even mixed in some Chinese.

13961476121571396147612157

Larry Wall said he was “Crazy on purpose”. The history of open source is as long as the history of computers. As early as the PDP-11 era, researchers in universities were sharing program codes via Email.

Open source software needs users to test their programs. In large companies, there are dedicated testing teams for software, but in the world of open source software, users are the testing team.

The theme of this talk is “Accidentally On Purpose”, which means that when you are making software, you don’t really know what you are doing. Sometimes software is made on purpose, but more often it is made by accident. The Warp Star Wars game running on PDP-11 was the first open source software, which was made by accident.

Larry Wall said his life was a coincidence. The first coincidence was that he was born into a programmer’s family. His family worked for RAND Corporation in the 1950s, when computers were still using drum memory, and he was only 3 years old. The second coincidence was that he had food allergies and couldn’t enjoy many delicious foods, so he had to stay at home and work on computers.

In the prehistoric era of the Internet, Larry Wall and others were using Usenet. The protocol used at that time was UUDP, with a bandwidth of only 100~200 bit/second. In that era, he wrote the Usenet client rn. News was spread by broadcasting (flooding), and Email was delivered by routing. The Email addresses at that time did not have global naming (i.e., there was no @ and the domain part afterwards).

Next, Larry Wall developed Warp, a Star Wars game. It was the first open source software, without a copyright statement (license), running on the BSD operating system, and now it cannot be compiled on Linux.

In those days, patches for code were sent by mail, and manually merging these patches became a nightmare for programmers. Therefore, Larry Wall wrote the patch utility. The first version had only him as a developer, with only one option: to patch or not to patch (written in both Chinese and English on the slides). Later, there were more developers, and the patch program also had the ability to protect itself.

To facilitate the writing of template code, Larry Wall also created metaconfigure, which automatically generates programs by writing Manifest files. Metaconfigure is the predecessor of the current autoconf in terms of ideas.

Larry Wall is largely known as the founder of the Perl language. Perl was originally born by accident in an NSA project, but it later went bankrupt (the project, not the NSA), and then NASA took over the Perl project on purpose, allowing Perl to continue to develop. Perl 3 was released under the GPL copyright agreement, and Perl 4 was released under the GPL + Artist dual agreement.

Perl became popular because it was the first generation scripting language of the WWW (World Wide Web), and Perl accidentally helped the WWW. This may be because Perl is a glue language, which can be embedded in HTML and work well together. Perl 6 is a deliberate fork of Perl 5, but it accidentally became a bigger fork (note: it swallowed the main line, like GCC).

Software development is big and small, fast and slow. When a bug appears, it takes courage to fix it early or delay it. Consider the user’s pain points. Only fix the places that crash, and don’t touch other places.

When users need something, what they actually need may be something else. We should not just satisfy those users who are easy to satisfy, but satisfy those users who should be satisfied (target users).

When participating in other people’s projects, it seems that we have no control, but in fact we have more control, because we can choose from different tasks. When launching our own projects, it seems that we have a lot of control, we can do whatever we want, but in fact we don’t have much control, because we have to consider the overall project and can’t just rely on personal preferences.

In software projects, some people are like turtles, slow and persistent; some people are like rabbits, fast but soon run out of sight. Both types of people should take advantage of their strengths. For project initiators, you must not let yourself burn out like a light bulb, you must persist. When the project just starts, don’t talk about grand plans, start from a small point, and don’t rush to invite others to join.

Keynote 3: The Open Source Journey of Douban Code

13961501687511396150168751

Qingfeng, the technical director of Douban, shared the journey of building Douban’s internal code management system, Code. The name Code was chosen casually, but later the boss asked to change the name. However, changing the name would require a major overhaul of the source code, so they said that the four letters CODE each represented a meaning, and they managed to get by.

Douban spent a year migrating from SVN to git. All of Douban’s code was in one SVN repository at the time. Everyone’s workflow was to first open a branch, make several commits, and merge to trunk. The method of code review was also very crude: gather the relevant people for a meeting, project the code onto the screen, write down opinions on paper, go back and modify, and repeat the process after the modifications are done. This was very inefficient, the suggestions made were generally not very deep, and more importantly, there was no accumulation of code review suggestions, and new people had to go through the same process again.

The initial intention of the Code project is mainly two-fold: one is to hope that each group can share some common code and libraries, so as not to reinvent the wheel. The second is the need for a platform to complete code reviews. This reflects the culture of Douban in terms of code review: use tools to solve problems instead of rules and regulations. Can we use the workflow of open source projects? Can the practice of pull requests in open source projects be used internally?

Initially, Github was tried, but there were cases of data loss. Gitlab was at a lower version at that time, only supporting a single project. Github charges for private projects, which is relatively costly; to ensure code security, whether using Github or Gitlab, an SA needs to be configured, which is also a cost. The boss said, try writing one yourself in a week, if it doesn’t work, use an existing product. Fortunately, a prototype was built a week later, and it was usable.

The development process of the Code system is progressive, “first make a skateboard, find that you need a handle, make it into a bicycle, and finally make it into a car”. For example, expanding the code up and down on the diff page, previewing the color in CSS, are all functions spontaneously done by engineers for the code project. To this day, more than half of the company’s engineers have participated in the improvement of the code system, and mobile developers have also made an iOS App for brushing dynamics on the road.

The most important thing about the company’s internal code management system is to integrate with the CI (Continuous Integration) system. Code review is basically about code style, such as camel case naming not conforming to Python specifications. The CI system is a means to check program logic. For a pull request, as long as the CI is red (there are tests that have not passed), it will definitely not merge, even if it is a hot fix. CI can also promote writing unit tests. Previously, verbal encouragement to write unit tests was ignored, and cash rewards were not appropriate for programmers. Now there is a CI system integrated with the code management system. If you don’t write unit tests, you will be scolded by everyone.

In terms of git usage, Qingfeng made a few suggestions:

  • Commit messages should be meaningful.
  • Large pull requests of thousands of lines are not allowed. Do not encourage to write a large function in one go, but to do it step by step, send a pull request after each step, review bit by bit, and finally merge into a large pull request (no need to review again).
  • Encourage the use of commit -p, self-review, do not submit irrelevant code.
  • Git merge can lead to a messy git log order, encourage the use of git rebase to merge with the upstream.
    Douban’s products are frequently launched (8~10 times a day), each launch point will mark the code written by which engineers, and will attach commit log and code snippets, which will bring a sense of honor to engineers. Engineers can also get medals in the Code system, which Github does not have. Every time an engineer completes a certain task (such as writing unit tests, commenting on other people’s commits), they can get a certain number of points. The points will be displayed on the engineer’s homepage in the form of color depth, which makes even VP-level engineers embarrassed to leave their timeline blank.

There are more than 5000 projects in Douban’s Code system. The reason for so many projects is that Douban encourages writing code as libraries or services. Open source is not a simple git push, you need to have a license, organize the code, and write it in the form of a library or service for others to use. There are no private projects in Douban, all projects are open to the company.

On the timeline, you can see the code dynamics of the whole company, and there is also an iOS App that can brush dynamics anytime and anywhere. The Code system also supports emojis (emoji), the most used is LGTM.

The Code system is now open source.

Roundtable: Operation and Development of Open Source Community in China

13961571619151396157161915

There were some disagreements among the guests at this roundtable about their understanding of the open source community. Some guests believe that there needs to be a business model while being open source. Every major open source project has strong company support behind it. Other guests believe that most open source communities are still entertaining themselves, without a tendency to commercialize, just like the catchphrase of the Python Chinese community Zoom.Quiet “Do good deeds, don’t ask about the future.” (In fact, the commercialization of the open source community was the original theme of this roundtable)

For entrepreneurs, open source helps to improve reputation and makes it easier to recruit. Active college students in the open source community do not need to write resumes, and it takes teamwork to build a technical community with people who are five or six years older than themselves in society, which is more challenging than clubs. Students doing activities like TedX, need to be brave and not afraid of losing face. Google I/O has a talk called “The Secret of Genius Programmers“, the so-called genius programmers also have times of pain and being a newbie, and also need 10,000 hours of effort. The most important thing about doing open source is to persist in the community, the mailing list is public, you need to maintain a consistent image, you can’t support Microsoft today and Oracle tomorrow.

The community is not supported by one or two people, there are veterans and newbies, everyone has limited energy, the best ecology of the open source community is that everyone is willing to come in with a slight call. But the reality is that most open source communities do not have new leaders, and they all rely on the founders to hold on to the end. This is mainly because the participants in China’s technical community have a sense of “latecomers” and “subordinates of the founder”, this kind of thinking stems from the education of listening to commands from a young age, in fact, there is no distinction between leaders and subordinates in the open source community, there are just some basic rules that everyone follows, don’t be afraid to do it. China’s open source community needs to create a culture where everyone is the owner.

Audience question, why can’t the tech community be as entertaining as Tianya and Maopu? Thomas Yao once operated Baidu Linux Bar, where religious wars with Windows were often provoked, and there were also “explosions”. Thomas hopes that the bar can calm down and have some technical discussions. In fact, everyone can have multiple identities and circles, but each circle should have its own culture, and the entertainment circle is different from the tech circle.

Audience question, what if someone changes our open source software and puts their own flag on it? Open source needs to be prepared, there will definitely be people doing this, and open source needs a tolerant attitude.

Audience question, open source project developers need to spend a lot of time dealing with novice questions, what if there is not enough time? The founder of the “LAMP Man” community believes that it is indeed necessary to deal with such people, who are potential users and customers. In fact, many participants in the open source community are not computer professionals. We need to do a good job in documentation and user interface, and we cannot demand users with the requirements for technical personnel. In addition, open source projects need to find resources including companies and manpower to support.

The Future of Python Open Source Asynchronous Concurrency Framework

IMG_0047IMG_0047IMG_0048IMG_0048

This is a speech made by Wang Chuan from the Archlinux community in the sub-venue 1. The difference between parallel and concurrent is compared to “applying for a passport”: parallel refers to the number of windows, and concurrent refers to the number of people waiting in the hall. Concurrency is to regard the server as a black box, considering from the user’s perspective, without caring about how many cores and other hardware capabilities that parallel computing often cares about. Modern Internet applications pay more attention to concurrency.

The simplest paradigm to achieve concurrency is multi-process/multi-threading, but Python’s multi-threading performance is not ideal. Another paradigm is event-driven concurrent programming, implemented by system calls such as select, epoll, kqueue.

Python’s popular open source asynchronous concurrency framework, the first introduced is Tornado. It uses a callback paradigm similar to node.js, and calls the specified callback function after the I/O is finished. When the program logic is complex, it is easy to get confused.

Twisted is currently the most popular asynchronous concurrency framework, including multiple programming paradigms.

  1. protocol/transport: protocol is a class, which calls a specific method when a specific event (such as HTTP request) occurs, and calls transport to do I/O operations (such as sending HTTP response) in the method.
  2. deferred: callback paradigm.
  3. inline callback: Use Python’s generator to implement seemingly synchronous but actually asynchronous, I/O operations use anonymous functions as callbacks, and after the I/O is completed, the yield in the anonymous function will be called, “returning” to the synchronous main calling function.
    Another asynchronous concurrency paradigm is to use the greenlet library to change the explicit yield in the generator to implicit. eventlet and gevent are representatives of this framework, which can turn existing synchronous code (such as django) into asynchronous at a relatively small cost.

Representing the future of Python’s asynchronous concurrency framework is AsyncIO, written by the author of Python, and has been added to Python 3.4. AsyncIO is similar to the twisted framework in design, and it is modular. Each module can use the original engine or replace components. Adapters (adapter) can be written for different frameworks, and interoperability between different frameworks can be achieved through AsyncIO, which will end the chaos of adapting to each other between frameworks, and it is also convenient to migrate legacy code using other frameworks to AsyncIO. AsyncIO is a complete asynchronous concurrency framework, allowing component replacement is considering legacy code, on the other hand, different frameworks have their own strengths.

Use the Command Line Like a Hacker

IMG_0049IMG_0049

This is a speech made by Toy, the webmaster of LinuxToy, in the sub-venue 1. The power of the command line pipeline is that it can combine unrelated commands. For example, to find photos in March, you need to use the mouse to click into the photo folder, select the detailed information mode display, sort by file modification time, and then manually find those in March. But in the command line, just “cd photo; ls -l | grep Mar” two commands will do. (Note: I think this also reflects the weakness of UNIX pipes being only text streams without types, if the photo name contains Mar, it will also be selected)

Toy asked those who had the experience of entering the wrong command to raise their hands, and the whole audience raised their hands and fell into laughter. If you enter the wrong command, you don’t need to re-enter it or move the cursor to the wrong position. You can use ^suffix to delete the extra characters at the end, ^match^replacement to replace, !:gs to do global replacement. The mnemonic is “one delete, two change, three all change”.

The working principle of command substitution is to record history, “forgetting history is betrayal”. You can use !prefix to execute the command that matches the beginning in history, !?substr to execute the history command containing the substring, !-n to execute the nth history command.

You can use x=$(command) to save the execution result of a command to a shell variable, and then reference $x in subsequent commands; you can use for loopvar in … to traverse a list and do specific things for each element in the list. Toy also talked about many similar shell tricks, which are not listed one by one (would I say it’s because I forgot all of them?).

After the speech, there was a question from the audience, are the two commands connected by a pipe concurrent or blocking? Toy answered “The output of the previous command is the input of the next command, so it is blocking”. In my humble opinion, this simple answer could be misunderstood as “the command on the left is executed before the command on the right”. In fact, the commands on both sides of the pipe start almost simultaneously, it’s just that the command on the right is waiting for the output of the command on the left, and the command on the left will wake up the command on the right to read this line as soon as it has a line of output (or reaches the buffer length). If the command on the right is doing calculations and not waiting for input, then the commands on both sides are concurrent.

Someone in the audience also asked, do you prefer to use vi or emacs? The whole audience burst into laughter…

From Open Source Software to Open Services

This speech in Sub-venue 1 was given by Li Daobing of Qiniu Cloud Storage. Li Daobing is one of the few Debian Developers in China.

Qiniu Cloud Storage uses GitHub to host code, why not build their own git server? This reflects the difference between traditional software and SaaS (Software as a Service). Their feeling is that once you start using cloud services, it’s hard to go back.

Recently, there’s a joke circulating online “just short of one to write code”, in fact, this one who writes code needs to do a series of work online, development, operation, front-end, etc., can one person complete it?

  • Online part: L, A, M, P, cache, storage, full-text search, message queue
  • Development part: software repository, bug management, continuous integration, deployment
  • Operation part: monitoring, logs, data analysis, daily upgrades
  • Front-end part: Sorry, I don’t understand front-end
    All of the above work now has mature open source software, some of which already have cloud services. Cloud services save the cost of building, configuring, and operating open source software, allowing engineers to focus more on code. In the field of monitoring, Monitoring Bao is an example of a cloud service, and monitoring is one of the earliest fields to enter cloud services. Cloud storage is the second area where cloud services are rapidly being promoted. Storage is not as simple as storing data on a hard drive. How to get user data to the server quickly, and server data to the user quickly? First, you need to deploy CDN nationwide, and you also need to quickly push the data generated by the backend server to the CDN server, all of which require a lot of experience to do well, this professional field is the most in need of cloud services.

Not only storage, other areas can also have cloud services. For example, operating systems, who will patch Linux security patches? Database, a general DBA can optimize MySQL to 2000 QPS (query per second) is good, but a professional optimization team can do tens of thousands or even hundreds of thousands of QPS. Video transcoding ffmpeg anyone can use, but the parameters? What about the adaptation of different devices and resolutions? Full-text search is even more professional.

What form does cloud service exist in?

  • PaaS (Platform as a Service): No operating system, which means it’s impossible to analyze the bottleneck of the existing system, the ability to locate online bugs is greatly reduced, can only rely on logs. And it’s impossible to develop stateful services, some business logic must be implemented in a dirty way, PaaS can’t do it.
  • Public cloud: Can solve some problems, but for performance-demanding applications, such as databases, it still can’t guarantee response time (for example, the database server and application server are deployed in different computer rooms).
    Li Daobing believes that cloud services should be deployed in computer rooms. Some IDCs are indeed doing this, but professional things should be done by professional teams. For example, the database performance problem mentioned earlier, video transcoding problem.

Another important issue for cloud services is fairness. Current open source software generally does not consider the issue of fairness, for example, MySQL has 50 users, if one user abuses, will it affect the other 49 users? This requires a lot of work from open source project developers and cloud service providers.

Should we trust cloud services? For developers, both trust and distrust are needed. Trust means actively embracing cloud services. Distrust means:

  • Check the integrity of the service return data
  • Require the service provider to provide a complete exception log
  • It’s best to include a request ID in the request for troubleshooting with the service provider
  • Stateless services find two cloud service providers for hot backup

Open Source Radio and GNU Radio

IMG_0052IMG_0052IMG_0055IMG_0055

This speech in Sub-venue 1 was given by Wang Kang, former president of the Computer Association of Tsinghua University, who produced a board that supports the HackRF open source software radio platform.

The first demonstration was using a sound card and GNU Radio software to parse the DTMF (Dual Tone Multi Frequency) signal of a telephone dial. Wang Kang and a professor from the Department of Electronics at Tsinghua University whistled out the dual tone multi-frequency 7 together, winning rounds of applause. Alipay’s “Shushushu Payment” also uses similar technology. Connect the left channel of the sound card to the oscilloscope X, the right channel to Y, press hold, and you can print out words on the oscilloscope. Some people have even developed an IP protocol stack that runs on a sound card, so it’s not safe to unplug the network cable, you have to unplug the sound card.

In the above demonstration, the Software Defined Radio (SDR) peripheral is the microphone + speaker, and GNU Radio is an open-source signal processing framework, where the performance-sensitive parts are written in C++, and the upper-layer applications are written in Python. With a Qt-based graphical front end, software engineers can learn it in half a day without needing basic knowledge of signal processing.

If we want to send real radio waves, such as making a “Renmin University High School Gate Remote Control“ (IoT device manufacturers often do not consider security issues because they think everyone does not have radio equipment), what should we do? Radio is often jokingly referred to as “unlimited pad”, and radio transceivers are not cheap; the USRP motherboard that supports GNU Radio costs tens of thousands, and a specific daughter board must be purchased for each supported frequency band; to measure signals, you have to buy instruments from companies like Agilent that cost hundreds of thousands. Open-source software radio will provide radio enthusiasts with an affordable experimental platform, and students will no longer have to “imagine” when studying related courses.

The open-source software radio platform HackRF raised funds on Kickstarter, originally planning to raise 80,000 US dollars, but ended up raising 600,000 US dollars. HackRF’s base frequency covers 30 MHz to 6 GHz, with a bandwidth of 20 MHz, which can reach 20MB/s when transmitting data, running full USB 2.0 interface. However, HackRF has been delayed due to manufacturing process issues, so Xingtian Technology made one in China. The live demonstration included radio broadcasting of Tsinghua school song (93.4 MHz), remote control of a small car, and the remote control car demonstrated a bug, which was debugged on the spot.

This product is currently quite expensive (2000+ RMB), mainly because the chip that converts 30M to 6G universal frequency to 2.6G costs 600 yuan, and these component costs cannot be reduced for the time being.

Within the scope permitted by law, the software radio platform can have many uses, such as DAB digital broadcasting with near CD-quality sound, GPS signal playback, monitoring the location of global civil aviation aircraft and ships, wireless control of electronic displays on the Fourth Ring Road, interfering with car lock signals to make the lock ineffective, etc.

Fedora Ambassador Project & FUDCon

IMG_0057IMG_0057IMG_0058IMG_0058

This speech in Sub-venue 1 was given by Zhao Tao of the Fedora Chinese community. Zhao Tao is a member of the Tsinghua University Network Management Association (TUNA).

Fedora is a Linux distribution, it has “Four Foundations”: Freedom, Features, Friends, First. In 10 years, Fedora has had 20 releases, the most recent being Fedora 20.

The Fedora project is community-driven and sponsored by Red Hat, divided into several sub-projects. Zhao Tao introduced the Fedora Ambassador Group he is in. Fedora Ambassadors represent the image of Fedora, divided into several regions worldwide, and decisions are made by regional discussions. The communication methods of the Fedora Ambassador Group include meetings, mailing lists, IRC, and trac.

The events held by the Fedora Ambassador Group include Fedora Release Party, Fedora Activity Day (the event in Sub-venue 1 is also known as Fedora Activity Day), FUDCon (the largest Fedora event in the Asia-Pacific region), Flock (an emerging event format in Europe and America to replace FUDCon). The budget for holding events is discussed in trac. The more budget applied for, the higher-level meeting needs to be discussed and passed. After the meeting, reimbursement is made through PayPal with a PDF format invoice. To join the Fedora Ambassador Group, you need to choose a mentor to lead.

This year’s FUDCon was held at Beihang University from May 23rd to 25th, free to attend without tickets. This is the first time FUDCon has come to China. On the evening of May 23rd, FUDpub will be held first, and the activities for the next two days include Keynote (inviting well-known people in the open source community), standard speeches, lightning talks, workshops (training lectures), HackFest (exchange PGP signatures, packaging, etc.). The standard speeches are open for submission (call for papers), with an acceptance rate of about 50%.

Developing Local Applications with Node.js and HTML5

IMG_0060IMG_0060IMG_0061IMG_0061

This speech in Sub-venue 2 was given by Wang Wenrui from Intel’s Open Source Technology Center. In 2011, he created the node-webkit open-source project in his company’s 10% spare time. Node-webkit has now become the hottest C++ project on GitHub and has been adopted by an internal project of Intel. Wang Wenrui is now maintaining the node-webkit project full-time.

Node-webkit takes advantage of the natural combination of Webkit and HTML5, as well as the widely used Node.js. The function call between Node.js and Webkit is direct, without IPC (Inter-Process Communication). Node.js adopts an asynchronous programming paradigm, partly to support high concurrency, and partly because JavaScript historically runs in the browser and cannot block the browser’s UI thread for a long time, so JavaScript programmers are accustomed to asynchronous programming.

Node-webkit supports the three major platforms: Windows, Mac, and Linux. It has a cross-platform UI library that supports menus, system trays, and shell command calls. Node-webkit can also compile JS into machine code to protect the source code. Architecturally, there is a V8 (JavaScript engine) in Node.js and another V8 in Webkit. They are merged into one instance in node-webkit, sharing the same context.

The challenge faced by node-webkit is the different security models of browsers and local applications. Local applications are trusted, while web applications are not trusted by default and require user permission to access specific settings. Node-webkit should be able to write local applications, and it should be able to do everything that C++ can do. Therefore, on the basis of the original browser frame and iframe, a new frame type, node-frame, is introduced, which can call the proprietary functions of the node-webkit library, modify browser settings, cross-domain access, access persistent storage, remove window borders, etc.

Node-webkit has now “incubated” some successful open source projects:

  • Light Table: A WYSIWYG IDE, created by a former Microsoft Visual Studio project manager. Reason for choice: HTML5 is a UI technology that the industry continues to invest in.
  • Sqwiggle: Online collaboration software.
  • Leap Motion: You can use node-webkit to write controller applications, and the official app store is also written with node-webkit.
  • Popcorn Time: P2P movie player (very popular, but infringes copyright)
    In terms of project maintenance, the author of node-webkit believes that open source projects should not be done just to patch, what we should care more about is how many users the project has. Open source software requires time and love, and he has already put users on par with parents, partners, and children.

SHLUG’s Operation and Management

IMG_0063IMG_0063

This is the only speech in the entire conference that does not use slides, made by Thomas Yao in Sub-venue 1. Thomas found that many people in Taiwan are using traditional instant messaging tools such as IRC, but few in mainland China are using them. There are many fun things for geeks on IRC, such as teasing bots. As for posting pictures, there are open paste services, similar to the gist that GitHub is now doing.

SHLUG (Shanghai Linux User Group) was born on IRC in 1997, and held the “First Congress” and “Second Congress”. In 1999, due to internal contradictions over the direction of development for profit, the community was shut down for two or three years. In the end, those who supported non-profit believed that this open source community should continue. So there was Geekbone, the earliest open source software mirror in China, but it completed its historical mission after the 163 source and university sources came out.

Thomas once operated Baidu Linux Bar, turning the mixed bar into a place for technical discussions. Technical communities do not need rules and regulations, if there are inappropriate behaviors, just inform, and if there are violations, just drive away. Thomas’s rule is not to allow discussion of commercial projects in technical exchange communities, including his own startup projects. The management of the open source community should not exceed 3 people.

After Yucang from Taiwan joined SHLUG, he brought a new breath and started the Hacking Thursday event, where everyone sat in a cafe to exchange technology. This event was not easy to start at first, sometimes only one or two people came to participate, but Yucang still insisted on holding it every week. Now every Hacking Thursday has twenty or thirty people, and wherever they go, the cafe is full. Interestingly, once a cafe drove them away because there were too many people, and now this cafe has closed down.

Another interesting activity is Rails Girls, which teaches girls to write websites with Ruby in two days. This activity was unexpectedly popular with girls, and now there are too many girls, every time there are forty or fifty, and there are not enough men (mentors).

Thomas also told an interesting anecdote: the birth of Canonical. Someone asked on the Debian mailing list, I have 200 million US dollars, do you want to make a distribution? Many people on the list thought it was spam, but it didn’t sound like spam, so someone replied to ask. Ubuntu came from here.

Roundtable Discussion: Review and Future of China’s Open Source Operating System

IMG_0066IMG_0066

He Weijia of Red Flag Linux, Yu Jie of Ubuntu Kylin, Wang Yong of Linux Deepin, etc. participated in the roundtable discussion, hosted by Thomas Yao. In the self-introduction session, Wang Yong of Linux Deepin asked the Vim and Emacs parties in the field to raise their hands, openly provoking a “holy war”. Below are some views of the guests (please do not take it personally, if you guess all of them correctly, I can only admire you).

Do you see a promising future for Linux in the desktop field?

  • I started working on Red Flag in 2000. Linux not only includes PCs but also mobile computing. Now the idea is to simplify and lighten the high-end Linux technology used in supercomputers for ordinary users.
  • Developers always develop on personal PCs, 3 minutes of development, 30 minutes of tinkering with Emacs, they have deep feelings for the Linux desktop. In terms of the Linux desktop, government policy guidance plays a significant role, such as the peak in 2004~2005, and the recent Prism Gate reflects security issues. Now is a good opportunity for the development of the Linux desktop, reasons include: the popularity of Android and iOS has made users aware of the diversity of operating systems; the diversification of browsers and the standardization of the Web have ended the era of browsers adapting to websites; more and more commercial companies are contributing to the development of Linux.
  • Desktop Linux users include end consumers and office users. Desktop Linux should first be promoted in the office field. As long as the compatibility of the OA system is resolved, office computers in the company do not need other applications. With the development of the cloud, applications like iCloud make data automatically synchronized across various devices, and the operating system is no longer important.
  • I counter-question the host, why does the Linux desktop have development capabilities and a community, but cannot capture the market? We should reflect on whether the Linux desktop has really solved the problems of ordinary users. Regardless of how input and output devices are updated, Apple can understand the real needs of people who buy equipment in QQ groups, while many Linux desktop developers do not understand.

How will your companies cooperate?

  • There should be a hundred flowers blooming, people love Lanzhou ramen and Beijing fried sauce noodles. Open source should not be developed in isolation, what is made should be shared. Back then we imitated XP, there were all kinds of doubts in society, but the company needs business after all.
  • Domestic Linux distributions cannot be unified, and they have not reached the time when a hundred flowers bloom. There are hundreds of distributions on DistroWatch, how many are from China? We need to maintain a sense of crisis.
  • The differences between different distributions mainly lie in the UI (User Interface), the UI is in fact a very important part of the software, different distributions are suitable for different industries.

How can the open source community attract, retain and cultivate talent?

  • Jiang Taigong fishes, those who are willing to take the bait, all Deepin developers are not computer professionals. Deepin uses the Tower project management tool to create a relaxed environment for developers.
  • Some of our company are Geeks, and some are according to the software company model. Due to the profit model of Linux desktop, it is actually “not worth the loss” for capable developers, and they still have to rely on love to support it.
  • The company’s employees are divided into survival type, investment type, and personal realization type, and they should be treated differently.
  • There is only public forgetfulness, no selflessness, Lei Feng still has food and drink when he returns to the army, and personal survival needs must be met. As a leader of an open source project, it is normal for hundreds of people to leave, and a good team is needed to retain people. The current social reality is not supported by a few heroes, and it still has to be business-oriented.
  • The ideal is not empty talk, but the result of five or ten years of tempering in society, you must think about whether you really like to do it.

How do you hope other resources in society can help?

  • Thomas once helped Wang Yong contact musicians, and campus students have more spare time, how to use it?
  • Many open source talents do not come from computer science, because our education does not cultivate the broad spirit of open source. In high school, there are original and alternative ones, and the college entrance examination may not be able to enter a prestigious university. But the current open source system gives them a chance to show their achievements.
  • I have awe for the training process of the science class in my heart, so I went back and read a science class master. Linux initially developed in the form of forums in China, but the health condition is not good. Red Flag is not unwilling to open up, but the thought and channels are stuck in that era.
  • 90% of us here are computer science graduates, the team is highly homogeneous, this is a big problem. Product design, QA (Quality Assurance) need people from other fields to provide some new perspectives.
  • My English course was the last, but today I can communicate fluently with Larry Wall. The things in the textbook are all outdated, you have to come here to burn the book first.
  • There is a book “Education Factory” (?) worth reading, after the industrial revolution, capitalists need batches of screws, they need to be obedient. But these screws are no longer suitable for the Internet industry.
  • I approve of the science class curriculum, but the current curriculum does not explain why this thing needs to be learned. The principles of operating systems have not changed for three or four decades, and the current database is basically a complete operating system, these theoretical foundations are very useful. Computer courses should be learned with a greater sense of accomplishment, not outputting a few diamonds, calculating Fibonacci sequences. Don’t pay too much attention to programming languages, programming languages are just tools, otherwise you will be unemployed at 40, back then I did Haskell with Wang Yong, and later it was useless.
  • We should cooperate with schools to let students know more about reality and industry in school, and know what the outside world is like.

Comments