<?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 Penghui Li on Medium]]></title>
        <description><![CDATA[Stories by Penghui Li on Medium]]></description>
        <link>https://medium.com/@codelipenghui?source=rss-39390b884dac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o-wfvBPFQ2eJaeKBnzybxw.png</url>
            <title>Stories by Penghui Li on Medium</title>
            <link>https://medium.com/@codelipenghui?source=rss-39390b884dac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:41:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codelipenghui/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[Navigating the realms of leadership can be a thrilling journey! ]]></title>
            <link>https://medium.com/@codelipenghui/navigating-the-realms-of-leadership-can-be-a-thrilling-journey-3457ba3706bf?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/3457ba3706bf</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[leadership-skills]]></category>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[leadership-styles]]></category>
            <category><![CDATA[leadership-coaching]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 09:07:50 GMT</pubDate>
            <atom:updated>2023-11-28T09:07:50.129Z</atom:updated>
            <content:encoded><![CDATA[<h4>Authoritative, Affiliative, Democratic, and Coaching has its unique strengths and approaches.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*Y0t16T0qqZEOrbWIosdcNA@2x.jpeg" /></figure><p>👑The Authoritative Leader is the vision-setter, the one who points the team towards the horizon and empowers them to get there. They are confident, assertive, and decisive.</p><p>💞 The Affiliative Leader, on the other hand, is the heart of the team. They focus on harmony, creating emotional bonds, and promoting a sense of belonging where everyone feels valued.</p><p>🤝 The Democratic Leader values everyone’s input. They encourage open communication, collaboration, and consensus before decision-making. They believe that the best ideas can come from anywhere and anyone.</p><p>🏋️‍♀️ The Coaching Leader is the mentor, the guide, the one who helps individuals unlock their potential. They invest time in understanding their team members, honing their skills, and helping them grow.</p><p>Remember, no one style is superior to the others. The best leaders are adaptable, and they can switch between different styles depending on the situation.</p><p>👇 #LeadershipStyles #LeadershipMatters #InspireToLead</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3457ba3706bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Plato and Aristotle, specifically their different opinions about poetry]]></title>
            <link>https://medium.com/@codelipenghui/plato-and-aristotle-specifically-their-different-opinions-about-poetry-bd380aa854be?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd380aa854be</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[philosophy-of-mind]]></category>
            <category><![CDATA[philosophy-of-science]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Mon, 27 Nov 2023 13:13:36 GMT</pubDate>
            <atom:updated>2023-11-27T13:13:36.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*0eKY843N7nsXf6WFEntW4Q@2x.jpeg" /></figure><p>Plato viewed poetry as a threat, believing it could stir unnecessary emotions and limit the pursuit of truth. He considered it a false representation of reality, leading people away from rational thought. On the contrary.</p><p>Aristotle embraced poetry, viewing it as a powerful tool for teaching and catharsis. He believed that through tragedy in poetry, audiences could experience and release emotional tension, thus promoting personal growth and understanding. 🎭✍️</p><p>🤔💭 #PlatoVsAristotle #poetry #philosophy #debate</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd380aa854be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Golden Mean]]></title>
            <link>https://medium.com/@codelipenghui/golden-mean-f51aa28aeffa?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/f51aa28aeffa</guid>
            <category><![CDATA[philosophy-of-mind]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[philosophy-of-life]]></category>
            <category><![CDATA[philosophy-of-science]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Mon, 27 Nov 2023 04:06:33 GMT</pubDate>
            <atom:updated>2023-11-27T04:06:33.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Golden Mean</p><p>I’d like to take a moment to share with you an extraordinary concept that has been shaping minds and lives for centuries. It’s a theory from someone you might have heard of – he’s called Aristotle. 🏛👴</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*V7DDAeZGtFoTS2OCrTXV_g@2x.jpeg" /></figure><p>In the grand tapestry of his philosophies, one stand-out concept is the idea of the ‘Golden Mean’ or the Doctrine of the Mean. This isn’t about being average or settling for mediocrity. Rather, it’s about finding that sweet spot between two extremes, the balance that gives life its richness and depth. It’s about understanding that virtue lies in moderation and harmony, rather than in excess or deficiency. 🌿🌓</p><p>Imagine a tightrope walker. To successfully cross the rope, he must maintain a perfect balance. If he leans too much to the right or left, he risks falling. Just like him, we too must navigate our lives, finding that perfect balance in our actions and emotions. This ‘middle way’ is what Aristotle referred to as the Golden Mean. ⚖️🚶‍♂️</p><p>Let’s take courage as an example. On one end of the spectrum, there’s recklessness. On the other end, there’s cowardice. But the Golden Mean, the ideal state, is courage. It’s neither rushing into danger without thought, nor running away from it, but facing it with equanimity and wisdom. 🦁💭</p><p>This philosophy can be applied to all facets of our life – our ambitions, our relationships, our personal growth, our emotional health. It’s not about suppressing our feelings or desires, but about expressing them in a balanced, healthy way. It’s about understanding that the world isn’t black or white but a spectrum of colors, and the most beautiful shade is that of balance. 🌈⛅</p><p>Sometimes, we might tilt towards one extreme. And that’s okay. We’re all human, after all. But it’s important to recognize this and strive to return to the balance, to the Golden Mean. Because that’s where true virtue and happiness lie. 💖✨</p><p>#Aristotle #GoldenMean #Philosophy #Wisdom #Balance #Moderation #Harmony #Virtue #PersonalGrowth #Mindfulness</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f51aa28aeffa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Harnessing Reason, Managing our passions, Guiding Our Spirit]]></title>
            <link>https://medium.com/@codelipenghui/harnessing-reason-managing-our-passions-guiding-our-spirit-da0e0243f359?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/da0e0243f359</guid>
            <category><![CDATA[philosophy-of-life]]></category>
            <category><![CDATA[philosophy-of-mind]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Sun, 26 Nov 2023 15:47:29 GMT</pubDate>
            <atom:updated>2023-11-26T15:47:29.816Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*-2Etk3Fdflg2nR6yAwZ9mg@2x.jpeg" /></figure><p>🔬 Reason: The Key to Balance</p><p>In Plato’s philosophy, reason is seen as our guiding light, helping us make sense of the world and make fair decisions. It encourages us to use our intellect to analyze situations objectively, to seek truth, and to understand the consequences of our actions. By embracing reason, we can ensure that our pursuit of justice is grounded in thoughtful consideration and logical thinking. 🧠💡</p><p>🌪️ Managing Our Passions</p><p>Passions can be powerful forces within us, driving our desires and influencing our actions. However, if left unchecked, they can lead to chaos and injustice. The Platonic ideal of justice emphasizes the importance of managing our passions, finding a balance between our desires and the well-being of others. By doing so, we can avoid acting impulsively and ensure that our actions align with fairness and empathy. ❤️🌱</p><p>💫 Guiding Our Spirit</p><p>Our spirit, that inner essence that defines who we are, plays a vital role in the pursuit of justice. Plato believed that by cultivating virtues like wisdom, courage, and temperance, we can guide our spirit towards justice. This means staying true to our values, acting with integrity, and treating others with respect and fairness. By nurturing our spirit, we can become agents of positive change in the world. 🌟🙌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da0e0243f359" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moral Relativism and Ethical Egoism]]></title>
            <link>https://medium.com/@codelipenghui/moral-relativism-and-ethical-egoism-cb1eea6f259b?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb1eea6f259b</guid>
            <category><![CDATA[philosophy-of-mind]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[philosophy-of-life]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Sun, 26 Nov 2023 14:42:43 GMT</pubDate>
            <atom:updated>2023-11-26T14:42:43.893Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*2SCn6f2Z0fF-tJS0WExJgg@2x.jpeg" /></figure><p>Socrates believed that moral relativism can be traced back to ethical egoism due to a few key reasons. Here’s a glimpse into his line of thinking: 🤔📚</p><p>1️⃣ Self-Interest as the Driving Force: According to Socrates, ethical egoism places self-interest and personal gain at the forefront of moral decision-making. It encourages individuals to prioritize their own well-being above all else. This emphasis on self-interest can lead to a distortion of moral judgments, as one’s egoistic desires may cloud their ability to objectively assess ethical situations. 🌪️💼</p><p>2️⃣ Ignorance and the Quest for Happiness: Socrates believed that humans are inherently driven by the pursuit of happiness and fulfillment. However, he also argued that true happiness can only be achieved through knowledge and wisdom. He believed that individuals who act in their own self-interest without a genuine understanding of what constitutes true virtue might unknowingly contribute to moral relativism. 🌈🎓</p><p>3️⃣ The Dangers of Relativism: Socrates was critical of moral relativism, as he believed it undermined the pursuit of truth and justice. By placing personal desires above universal moral principles, Socrates argued that ethical egoism inadvertently paves the way for moral relativism. This relativistic perspective, according to him, hinders the development of a just and flourishing society. ⚖️🚀</p><p>It’s worth mentioning that Socrates’ views on this topic are part of a broader philosophical discourse, and his stance is not without criticism. Many scholars and thinkers have offered alternative perspectives and interpretations of moral relativism and its origins. The beauty of philosophy lies in its diversity of thought and the continuous exploration of ideas! ✨💭</p><p>#SocraticPerspective #MoralRelativism #EthicalEgoism #PursuitOfHappiness #UniversalPrinciples #PhilosophyMatters #InstaDebate</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb1eea6f259b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey of Enlightenment: Exploring the Allegory of the Cave]]></title>
            <link>https://medium.com/@codelipenghui/journey-of-enlightenment-exploring-the-allegory-of-the-cave-405c9d19678c?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/405c9d19678c</guid>
            <category><![CDATA[philosophy-of-life]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[philosophy-of-mind]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Sun, 26 Nov 2023 12:57:20 GMT</pubDate>
            <atom:updated>2023-11-26T13:16:07.043Z</atom:updated>
            <content:encoded><![CDATA[<p>🔍 Dive into the depths of philosophical contemplation with exploring Plato’s timeless Allegory of the Cave! 📚✨</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*60beXRJi0kSLM2dIfTlDtA@2x.jpeg" /></figure><p>💡 In this allegory, Plato paints a vivid picture of individuals confined within a dark cave, only able to see shadows projected on the wall in front of them. These shadows are their perceived reality, their limited understanding of the world. 🌑</p><p>🌟 However, the Allegory of the Cave teaches us that there is a higher truth beyond the shadows. It encourages us to question, to seek knowledge, and to break free from the chains of ignorance. It challenges us to embark on a journey of enlightenment, to discover the true essence of reality. 🌈</p><p>🔓 As we unlock our minds and venture outside the cave, we encounter the blinding light of the sun. At first, it may be uncomfortable and overwhelming, but it brings us closer to the truth, to the ultimate source of knowledge and understanding. ☀️</p><p>🌱 This allegory reminds us of the importance of constant growth and self-reflection. Just like the prisoners in the cave, we have the power to break free from our own mental limitations and expand our horizons. 🌌</p><p>🌎 Let us question our own beliefs, challenge societal norms, and strive for a deeper understanding of the world. Let us encourage one another to step out of our comfort zones and embrace the light of knowledge. 💡</p><p>#JourneyOfEnlightenment #AllegoryOfTheCave #SeekingTruth #Philosophy #ExpandYourMind #EmbraceTheLight #QuestionEverything #Wisdom #Enlightenment #Plato</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=405c9d19678c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use Apache SkyWalking to trace Apache Pulsar messages]]></title>
            <link>https://medium.com/streamnative/use-apache-skywalking-to-trace-apache-pulsar-messages-b543ac253053?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/b543ac253053</guid>
            <category><![CDATA[apache-pulsar]]></category>
            <category><![CDATA[apache-skywalking]]></category>
            <category><![CDATA[tracing]]></category>
            <category><![CDATA[tech-blog]]></category>
            <category><![CDATA[message-queue]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Thu, 10 Oct 2019 13:01:01 GMT</pubDate>
            <atom:updated>2019-10-20T04:38:03.415Z</atom:updated>
            <content:encoded><![CDATA[<h3>Use Apache SkyWalking to Trace Apache Pulsar Messages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Td4tKrrV00wxI3kLW-yabw.jpeg" /></figure><p>Apache Pulsar is a distributed messaging platform and a fast-growing alternative to Kafka. Apache SkyWalking is a popular application performance monitoring tool for distributed systems, specially designed for microservices, cloud-native, and container-based (Docker, K8s, and Mesos) architectures.</p><p>Message tracing is a very useful feature which helps engineers troubleshoot problems related to message publishing and receiving.</p><p>This tutorial shares how to track Pulsar messages by using SkyWalking.</p><h3><strong>PREREQUISITE</strong></h3><p>Before getting started, make sure you have installed Git, JDK 8, Maven 3, and Pulsar (cluster or standalone). If you do not have an available Pulsar, follow the <a href="http://pulsar.apache.org/docs/en/standalone/">instruction</a> to install.</p><h3>BUILD PULSAR AGENT FROM SKYWALKING SOURCE</h3><p>The Apache Pulsar agent will be officially released in the SkyWalking 6.5.0, since it has not been released yet, you need to build a Pulsar agent from the source of SkyWalking.</p><p>1. Download the SkyWalking source and build the Pulsar agent plugin.</p><pre>$ git clone <a href="https://github.com/apache/skywalking.git">https://github.com/apache/skywalking.git</a></pre><pre>$ cd skywalking</pre><pre>$ git submodule init</pre><pre>$ git submodule update</pre><pre>$ ./mvnw clean package -DskipTests</pre><p>2. Decompress the file <strong>apache-skywalking-apm-bin.tar.gz</strong>.</p><p>After the decompression, all packages are in the directory <strong>apm-dist/target</strong>.</p><pre>$ tar -xf apache-skywalking-apm-bin.tar.gz</pre><p>You can find the Pulsar agent plugin is in the directory <strong>agent/plugins</strong>.</p><p>Congratulations, you have successfully built the Pulsar agent plugin.</p><h3><strong>START A SKYWALKING BACKEND</strong></h3><p>If you already have an available SkyWalking backend, you can skip this step. If not, here is a <a href="https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/backend-ui-setup.md#deploy-backend-and-ui">quick start</a> for running a SkyWalking backend locally.</p><p><strong>Tip</strong>: if you run the SkyWalking backend and Pulsar broker on the same machine, you need to change the web service port of SkyWalking or Pulsar.</p><ul><li>For how to <strong>change the web service port of SkyWalking UI,</strong> see <a href="https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/ui-setup.md">here</a>.</li><li>If you want to<strong> change the web service port of Pulsar broker</strong>, edit the file <strong>conf/broker.conf</strong>.</li></ul><h3>DOWNLOAD TEST PROJECT AND SET UP</h3><p>1. Download the SkyWalking integration test for Apache Pulsar.</p><pre>$ git clone <a href="https://github.com/SkyAPMTest/agent-auto-integration-testcases.git">https://github.com/SkyAPMTest/agent-auto-integration-testcases.git</a></pre><p>In this repo, you can find a project named <strong>pulsar-scenario</strong>.</p><p>2. Import the project pulsar-scenario to your IDE.</p><p>Here takes Intelli IDEA as an example.</p><p>As shown in the image below, the project pulsar-scenario is a spring boot application and has a CaseController.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jqgw5wFwd_cDvsHb" /></figure><p>3. Set up the Pulsar agent plugin.</p><p>Before starting the spring boot application, you need to set up the Pulsar agent plugin.</p><p><strong>Tip</strong>:</p><ul><li>For how to set up a Java agent and its properties, see <a href="https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/README.md">here</a>.</li><li>By default, the project pulsar-scenario uses the <strong>8082</strong> port.</li><li><strong>Detail of VM options </strong>as shown in the image below: -javaagent:&lt;your-skywalking-home&gt;/apm-dist/target/apache-skywalking-apm-bin/agent/skywalking-agent.jar -DSW_AGENT_COLLECTOR_BACKEND_SERVICES=&lt;skywalking-backend-host&gt;:11800 -DSW_AGENT_NAME=pulsar-demo -Dservice.url=pulsar://&lt;your-pulsar-broker-ip&gt;:6650</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TJcIDUXVcHtCR1rX" /></figure><h3><strong>TEST AND VIEW IN SKYWALKING</strong></h3><p>After performing the steps stated previously, you have prepared all the environments.</p><p>Next, you can simulate some requests and view them in Skywalking UI.</p><p>Download the <strong>pulsar-case</strong>.</p><pre>$ curl <a href="http://localhost:8082/pulsar-scenario/case/pulsar-case">http://localhost:8082/pulsar-scenario/case/pulsar-case</a></pre><p>By executing the HTTP request above, some traces are created in SkyWalking. Let’s go to the SkyWalking UI to check them.</p><h4>Dashboard view</h4><p>It shows there are 2 endpoints, 1 service, and 1 MQ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qGT7Esi_lRQmAh29" /></figure><h4>Topology view</h4><p>It shows that a user sends a request to the web service (that is, your test web application) and the web service sends to and receives messages from a Pulsar broker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1YppW5PvDwTvS-HB" /></figure><h4>Trace view</h4><p>It shows the trace details of each request.</p><p>Currently, the Pulsar agent plugin has 3 types of spans as below:</p><ul><li><strong>Producer span</strong>, which records messages sent by producers.</li><li><strong>Producer callback span</strong>, which records messages are already sent.</li><li><strong>Consumer span</strong>, which records messages are received by consumers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*42B5GrfASIdVmsT5" /></figure><h3>SUMMARY</h3><p>As you can see, SkyWalking UI is pretty cool! If you are still worried about how to track Pulsar messages, try this integration of Pulsar and SkyWalking.</p><p>Thanks for the SkyWalking community who gives me a lot of help for the integration of Pulsar and SkyWalking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b543ac253053" width="1" height="1" alt=""><hr><p><a href="https://medium.com/streamnative/use-apache-skywalking-to-trace-apache-pulsar-messages-b543ac253053">Use Apache SkyWalking to trace Apache Pulsar messages</a> was originally published in <a href="https://medium.com/streamnative">StreamNative</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Zhaopin’s Event Center with Apache Pulsar]]></title>
            <link>https://medium.com/@codelipenghui/simplifying-zhaopins-event-center-with-apache-pulsar-9784b73bead1?source=rss-39390b884dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/9784b73bead1</guid>
            <category><![CDATA[streaming]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[apache-pulsar]]></category>
            <category><![CDATA[messaging]]></category>
            <dc:creator><![CDATA[Penghui Li]]></dc:creator>
            <pubDate>Wed, 05 Dec 2018 07:46:19 GMT</pubDate>
            <atom:updated>2018-12-05T07:46:19.511Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Description</strong></p><p>In this blog, we will describe the event processing use cases at Zhaopin and the issues that we faced using two different systems, RabbitMQ and Apache Kafka. After a detailed analysis and evaluation of the requirements, we present our rationale for choosing Apache Pulsar and explain how it simplified our event processing and streamlined our operations.</p><p><strong>Blog</strong></p><p>With a user base of over 100+ million users, and a database of 200+ million resumes, <a href="https://www.zhaopin.com/">Zhaopin</a> is one of the largest online recruiting and career platforms in China. As a bilingual job board, it provides one of the largest selections of real-time job vacancies in China.</p><p>A key part of the software supporting Zhaopin is our event center system. This system, which is responsible for all of the intra-service messaging within Zhaopin, supports mission-critical services such as resume submission and job search. The event center system needs to handle more than 1 billion messages per day under normal conditions, scaling to multiple billion messages per day during the peak recruiting season.</p><p>Our previous technology to support the pub-sub messaging and message queuing needs for our event center consisted of two separate systems. Our work queue use cases were implemented with RabbitMQ, while our pub-sub messaging and streaming for use cases used Apache Kafka.</p><p>We use work queues throughout our microservices architecture as an intermediate layer to decouple front-end services and backend systems, allowing our systems to run reliably even in the event of traffic spikes. At Zhaopin, our typical work-queue use cases have the following characteristics:</p><ul><li>Each message is consumed by multiple independent services.</li><li>Each service must consume a full replica of all messages.</li><li>Each service has multiple consumers consuming messages concurrently.</li><li>Each message should be guaranteed to be delivered at-least-once.</li><li>A tracing mechanism is required for tracing the lifecycle of messages for mission-critical services.</li></ul><p>For instance, when a user submits a résumé, the service handling resume submission will first enqueue a message into the messaging system. All the other services (such as database updates, sending notifications, and recommendations) will then consume the messages from the messaging system and process them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XNaHtdJDGry5m_SG" /></figure><p><strong>Figure 1: Resume submission service work flow.</strong></p><h3>Our Challenges</h3><p>Although we did have technology in place to support our event center system, we saw that we faced a number of growing challenges and limitations with that technology as we grew.</p><h3>Cost &amp; Complexity</h3><p>One of our primary problems with our previous approach was the hardware cost and administrative burden of deploying and managing multiple messaging technologies side by side just for the sake of serving different use cases.</p><p>Several additional problems arose from having to publish the same event data into dual data pipelines as well. First, the same data needed to be stored in two separate systems, which doubled our storage requirements. Second, it was very difficult to keep the copies consistent across the two different systems. Lastly, having two different technologies introduced additional complexity because our developers and DevOps team had to be familiar with both messaging platforms.</p><h3>Missing Important Capabilities</h3><p>In addition to the operational overhead of running two messaging systems, there were architectural shortcomings within each of our previous technologies, making the decision to switch even more compelling.</p><p>While RabbitMQ supports work queue use-cases very well, it does not integrate well with popular computing frameworks. It also has several limitations such as scalability, throughput, persistence and message replay. We attempted to overcome by implementing our own distributed message queue service based on Apache Zookeeper and RabbitMQ. However, we found this decision also came with a large, ongoing maintenance burden that we felt was unsustainable.</p><h3>Inadequate Performance and Durability</h3><p>During our peak usage periods, we were unable to meet our service level SLA without increasing the number of consumers on some of our Kafka topics. However, we found that the ability to parallelize consumption in Kafka is tightly coupled with the number partitions on a given topic. Therefore, in order to increase the number of consumers on a particular topic required us to increase the number of partitions, which was not an acceptable approach for us for these reasons:</p><ul><li>The newly created partitions did not contain any data, resulting in no real increase in consumption throughput. In order to remedy this, we had to also force partition reassignment on the topic to distribute the backlogged data onto these new partitions.</li><li>Both of these steps were not easy to automate, forcing us to monitor the topics for backlog, and manually correct the issues.</li></ul><p>Although we had deployed Kafka for our pub-sub messaging use cases, Kafka does not provide the data durability guarantees that were increasingly a must-have requirement for our mission-critical business services.</p><p>For these reasons, in early 2018 we decided to simplify our entire messaging technology stack by selecting a technology that would support both our work queue and streaming use cases, thereby eliminating all of the cost and complexity of hosting separate systems.</p><h3>Requirements</h3><p>With this in mind, we compiled the following list of capabilities that we required from our messaging platform:</p><ul><li><strong><em>Fault Tolerance and Strong Consistency: </em></strong>Events stored within our messaging system are used for mission-critical online services, therefore the data must be stored reliably and in a consistent fashion. Events cannot be lost under any circumstances, and it must be possible to guarantee at-least-once delivery.</li><li><strong><em>Single Topic Consumer Scalability: </em></strong>We must be able to easily scale the throughput of a single topic by increasing the number of consumers of the topic on-the-fly as the traffic pattern changes.</li><li><strong><em>Individual and Cumulative Message Acknowledgement: </em></strong>The messaging system should support BOTH acknowledgement of individual messages, which is often used for work queue use cases, and cumulative acknowledgement of messages, which is required for most streaming use cases.</li><li><strong><em>Message Retention and Rewind: </em></strong>We need to be able to configure different topics with different retention policies, either time-based or size-based. Consumers should be able to rewind their consumption back to a certain time.</li></ul><p>Based on these requirements, we started investigating the open source technologies available in the market. During our initial research, we were unable to find any open source messaging products that satisfied all of our requirements, particularly when it came to no data loss and strong consistency.</p><p>Unable to find a better solution among the technologies we knew about, our initial plan was to build our own platform on top of the strongly-consistent distributed log storage platform <a href="https://bookkeeper.apache.org/">Apache BookKeeper</a>, which offers an excellent log storage API and has been deployed at internet scale by Twitter, Yahoo, and Salesforce. However, after getting touch with the BookKeeper community, they pointed us to <a href="https://pulsar.apache.org/">Apache Pulsar</a> — the next generation pub-sub messaging system built on BookKeeper.</p><h3>Why Apache Pulsar?</h3><p>After working closely with the Pulsar community and diving deeper into Pulsar, we decided to adopt Pulsar as the basis for Zhaopin’s event center system for following reasons:</p><ul><li>By using BookKeeper for its storage layer, it offers strong durability and consistency, guaranteeing zero data loss.</li><li>It provides a very flexible replication scheme, allowing users to choose different replication settings per topic to suit their requirements for throughput, latency, and data availability.</li><li>Pulsar has a segment-centric design, that separates message serving from message storage, allowing independent scalability of each. Such a layered architecture offers better resiliency and avoids complex data rebalancing when machines crash or a cluster expands.</li><li>Pulsar provides very good I/O isolation, which is suitable for both messaging and streaming workloads.</li><li>It provides a simple flexible messaging model that unifies queuing and streaming. So it can be used for both work queue and pub-sub messaging use cases, thereby allowing us to eliminate the need for dual messaging systems and all the associated issues.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*flWC3rzzhjL0aFmD" /></figure><p><strong>Figure 2: Pulsar Supports Pub-Sub Messaging and Message Queuing</strong></p><p>In addition to these key architectural features, Apache Pulsar also offers many different enterprise-grade features that are critical for supporting our business critical applications, such as multi-tenancy, geo-replication, built-in schema support and tiered storage. Recently added features such as serverless compute with Pulsar Functions and Pulsar SQL are essential for building event-driven microservices here at Zhaopin.com</p><h3>Summary</h3><p>We are very happy with our choice of Pulsar and the performance and reliability it provides, and are committed to contributing many great features back to the Apache Pulsar community, such as a Dead Letter Topic, Client Interceptors, and Delayed Messages just to name a few.</p><p>If you are running multiple messaging platforms just for the sake of serving different use cases, you should consider replacing them with Apache Pulsar to consolidate your messaging infrastructure into a single system capable of supporting both queuing and pub-/sub messaging.</p><p>We are very pleased to be hosting the next Apache Pulsar meetup on 12/15 at our offices in Shanghai. Please stop by to hear from our engineers at @Zhaopin_com on their experiences and best practices for running Pulsar in production and using Pulsar + @ApacheFlink to power their recommendation system. More info: <a href="http://buff.ly/2BFYrBy">buff.ly/2BFYrBy</a></p><p>We would like to especially thank all the committers to the Apache Pulsar project, as well as the technical support we received from members of its large and growing community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9784b73bead1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>