<?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 Hossein Bakhtiari on Medium]]></title>
        <description><![CDATA[Stories by Hossein Bakhtiari on Medium]]></description>
        <link>https://medium.com/@hbpro2001?source=rss-634595f582a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*553Iyz9Jv75XRLik.jpg</url>
            <title>Stories by Hossein Bakhtiari on Medium</title>
            <link>https://medium.com/@hbpro2001?source=rss-634595f582a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 12:10:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hbpro2001/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[Making The Entire User Analytics Solution — Part I]]></title>
            <link>https://medium.com/swlh/making-the-entire-user-analytics-solution-part-i-d0be38f2807c?source=rss-634595f582a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0be38f2807c</guid>
            <category><![CDATA[apache-kafka]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[kibana]]></category>
            <category><![CDATA[clickstream]]></category>
            <category><![CDATA[ksql]]></category>
            <dc:creator><![CDATA[Hossein Bakhtiari]]></dc:creator>
            <pubDate>Sat, 30 May 2020 03:54:05 GMT</pubDate>
            <atom:updated>2020-06-03T21:41:53.404Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T5_odnVQc5sQ9k2_-6Jqtw.png" /><figcaption>Clickstream and Signals Visualized by Kibana</figcaption></figure><h4>A Robust Way To Explore Clickstreams And Perform Analytics</h4><h3>Making The Entire User Analytics Solution — Part I</h3><h4>An Opensource Solution For Data Gathering And Analytics</h4><p>I have been working for or providing consulting services to different E-Commerce companies from growing startups to big enterprises. One thing they have in common is the requirement to track their users’ behavior in order to optimize their services or maximize their profit.</p><p>Most of the time I have encountered two scenarios: The first one is to generate a high-level exploration by making dashboards based on users’ clickstream and page-views, and the second one is to build some advanced analytics like recommendation engines based on the <strong>gathered</strong> and also <strong>transactional</strong> data (located on the OLTP). We are going to cover the first one here and the latter in the next article.</p><p>One thing to mention is, this article is not intended to go through the details because it might get too verbose, instead it is going to provide the big picture and some references. It is also worth mentioning, all of this solution can and honestly should be deployed on a cloud platform, and managed services should be used as much as possible to reduce maintenance efforts and costs.</p><h3>Isn’t Google Analytics Good Enough?</h3><p>Before we continue, we need to answer one obvious question: Why bother implementing another analytics system when we already have Google Analytics?</p><p>When your company grows and there is a huge number of users on your website, the free Google Analytics is no longer an option, because it makes insights based on a few amount of data (sometimes less than 0.1% of data). It means the sample population in which insights are derived from, sometimes are less than 0.001 of your data and then, have been generalized using statistical techniques. So there is one more option left: Google Analytics Premium. Here are some demerits of GA Premium for our application:</p><ol><li>Cost of the solution: GA Premium starts from $150,000/year USD.</li><li>Integrability with our transactional data — OLTP (You may say there is a solution to gather and query data using GCP services, but what if your entire stack is on AWS, Azure, or other cloud platforms?)</li><li>On-Premise Solution — Sometimes as an architect, you have no choice but to collect data inside your company’s private data center and integrate with In-house data</li></ol><p>So it makes sense that in some applications, you might build your own opensource data gathering and analytics pipeline because of cost, portability, and flexibility of components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XAZG2OZaMwyU1wmCIQY8Jw.png" /><figcaption>The Clickstream Ecosystem (Divolte-Collector, Apache Kafka, KSQL, Kafka-Connect, Elasticsearch, Kibana, Apache Cassandra)</figcaption></figure><h3>The Pipeline</h3><p>We are going to make use of a handful of well-known opensource projects: Divolte Collector, Apache Kafka and KSQL, Elasticsearch, and Kibana, and Apache Cassandra.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*rC5J-U60HgVjl5psyfvFKg.png" /><figcaption>Divolte Collector</figcaption></figure><h3>Placing Divolte Collector</h3><blockquote>Divolte Collector is a scalable and performant server for collecting clickstream data in HDFS and on Kafka topics. It uses a JavaScript <em>tag</em> on the client side to gather user interaction data, similar to many other web tracking solutions. Divolte Collector can be used as the foundation to build anything from basic web analytics dashboarding to real-time recommender engines or banner optimization systems. Definition by <a href="https://divolte.io/">divolte.io</a></blockquote><p>After hosting Divolte server (downloadable from Divolte website) on your company’s servers (maybe behind a load-balancer), you can simply put the script inside the webpages:</p><pre>&lt;script src=&quot;//yourWebsite.com/divolte.js&quot; defer async&gt; &lt;/script&gt;</pre><p>And for any customized signal like E-commerce purchases, you can signal this way: (you need to provide the mapping of customized signals and any other fields added to the default page views)</p><pre>divolte.signal(&#39;purchase&#39;, {<br>    products:[<br>    {<br>        productId<strong>:</strong> 12345,<br>        price<strong>:</strong> 100,<br>    },<br>    {<br>        productId<strong>:</strong> 23451,<br>        price<strong>:</strong> 20,<br>    },<br>    {<br>        productId<strong>:</strong> 34512,<br>        price<strong>:</strong> 15,<br>    }],<br>    custom_sessionId: bc970981-3b44-4a58-8954-35bc42135ab6</pre><pre>})</pre><p>A well-engineered behavior of Divolte.js is that it gathers page views and signals for a configurable amount of time, and then push them to the server as a batch. This will reduce the number of attempts making the connection to the server, consequently will reduce the load. It gives you the ability to do the trade-off between how realtime the system you want to be and how much load you want to enforce to the server. If you wanted to develop your own data collector (e.g. for your native mobile apps) it is worth bringing this concern into your design and implementation.</p><p>Divolte.js makes a client-side autogenerated session_id per session. So this raises a problem identifying which user is sending the clickstream. To solve this, we need to somehow generate and embed a reference to OLTP User_Id:</p><h4>Embedding The Custom Session_Id</h4><p>As we know, Divolte generates a random session_id per client per session. So how we can identify which user is visiting our website and generating footprints and signals?</p><p>A straightforward solution is to generate a server-side <strong>custom</strong> <strong>Session_Id</strong> based on the User_Id which is known in our OLTP in order to track the user according to their identity. We are looking for some tabular data structure like this:</p><pre>User_Id | Session_Id | generated_datetime  | expiration_datetime<br>123     | bc970981...| 2020-05-30 00:31:03 | 2020-07-30 00:31:03<br>124     | a340fc43...| 2020-05-30 11:24:55 | 2020-07-30 11:24:55</pre><p>There are different ways to obtain server-side Session_id:</p><ol><li>Saving a server-side generated temporary Session_id which is connected to the corresponding User_Id on the server persist and saving it on browser local storage during page load. After that, reading and placing it in the divolte.js as an added field.</li><li>Extracting access token to get the Session_id or even User_id and reading and placing it in the divolte.js as an added field. This approach is not always possible because most of the time the access token is encrypted. Besides, it is obviously not recommended due to security reasons.</li><li>Obtaining the Session_id by making an XHR call to a REST API to get the Session_Id and reading and placing it in the divolte.js as an added field.</li></ol><p>All these approaches work and you may find the best per your scenario. My favorite is the last one. So we can easily configure Divolte server to put the clickstream on an Apache Kafka topic:</p><pre>divolte {<br>  global {<br>    kafka {<br>      // Enable Kafka flushing<br>      enabled = true<br>      producer = {<br>        bootstrap.servers = &quot;10.200.8.55:9092,10.200.8.53:9092,10.200.8.54:9092&quot;<br>      }<br>    }<br>  }<br>  sinks {<br>    kafka {<br>      type = kafka<br>      topic = divolte-data<br>    }<br>  }<br>}</pre><p>You can take a look at the <a href="http://divolte-releases.s3-website-eu-west-1.amazonaws.com/divolte-collector/0.9.0/userdoc/html/getting_started.html">Divolte manual</a>.</p><h3>Apache Kafka Cluster</h3><p>We all know how amazing and robust Apache Kafka is and what it is capable of, especially when dealing with big data. But still, I want to point out some tips:</p><h4>Calculating The Number of Brokers</h4><p>Kafka is capable of processing millions of events per second per node, but how many exactly? The answer depends on many factors like the number of partitions per node, the throughput between producers/consumers and brokers, the number of CPU cores and their speed, the amount of RAM, the type of storage (HDD/SSD) and the read/write speed, the size of each message on the topic, and the number of messages, especially during the worst-case scenario.</p><p>There is not a simple method to identify the number of brokers. You can start with a based-on-calculation guess, and then execute some stress tests, making sure to cover the worst-case scenarios.</p><p>If you are considering Kafka managed service on cloud providers, that will be a huge optimization.</p><h4>Joining Clickstreams and Session-User Map Stream Using KSQL</h4><p>First of all, we need to populate <strong>&lt;Session_Id: User_Id&gt;</strong> couples as a key-value stream or a key-value table called <strong>User_Session</strong>. To do that, we can use higher-level abstraction on top of Kafka:</p><blockquote><a href="https://ksqldb.io/">KsqlDB </a>is an event streaming database purpose-built for stream processing applications. It is Kafka native, meaning it leverages your existing Apache Kafka infrastructure to deploy stream-processing workloads.</blockquote><p>One of its applications is to join different streams. We already have one stream which is our clickstreams produced and delivered to Kafka by Divolte server. The footprints have the session_id, but they still don’t contain the corresponding User_Id. One way to do that is to use<strong>&lt;Session_Id: User_Id&gt;</strong> entities as U<strong>ser_Session stream</strong> on KsqlDB and then join them to form the enriched stream:</p><pre>CREATE STREAM pageviews_enriched AS <br>SELECT user_id, page_id, region_id, age, gender FROM pageviews <br>INNER JOIN user_session WITHIN 60 DAYS<br>ON pageviews.session_id = user_session.session_id;</pre><blockquote>When you join two streams, you must specify a WITHIN clause for matching records that both occur within a specified time interval. by <a href="https://docs.ksqldb.io/en/latest/developer-guide/joins/join-streams-and-tables/">Ksql documents.</a></blockquote><p>However, letting the window be opened for 60 days it is against best practices. The <strong>User_Session</strong> seems to be a stream, because after a 60-days period or when a new user is generated, there will be another couple of <strong>user-session</strong> generated. However, it can be also thought of as a constantly updated table. So a better approach is to define the <strong>user_session</strong> key-value as a table. This way, when an <strong>&lt;Session_Id: User_Id&gt;</strong> gets updated (the previous session_id gets expired and a new one issued), that specific row, will be updated with new session_id value. There is an interesting article about <a href="https://docs.confluent.io/current/streams/concepts.html#duality-of-streams-and-tables"><strong>The duality of streams and tables in KSQL</strong></a><strong> </strong>by Confluent<strong>.</strong></p><h4>An Alternative Approach: Session-User On Cassandra</h4><p>Another way is to persist <strong>&lt;Session_Id: User_Id&gt;</strong> on an Apache Cassandra table. This is a more reliable approach, especially when dealing with an enormous amount of data (a lot of users and a high frequency of updates on sessions). We can then join these entities using Spark Structured APIs.</p><h4>The Two Sinks</h4><p>Now we are going to write on Elasticsearch for visualization and reporting purposes and on Apache Cassandra for further use and advanced analytics which will be covered in the next article.</p><p>It can be done simply using Kafka-connect. The quick start for <strong>kafka-connect-elasticsearch</strong> and <strong>kafka-connect-cassandra</strong> can be found <a href="https://docs.confluent.io/current/connect/kafka-connect-elasticsearch/index.html">here</a> and <a href="https://docs.confluent.io/current/connect/kafka-connect-cassandra/index.html">here</a> respectively.</p><h3>Elasticsearch + Kibana</h3><p>Now that we have our footprints gathered on Elasticsearch, we can make different visualizations and dashboards using Kibana.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0be38f2807c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/making-the-entire-user-analytics-solution-part-i-d0be38f2807c">Making The Entire User Analytics Solution — Part I</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Apache Spark Application In Microservices Ecosystems]]></title>
            <link>https://medium.com/swlh/an-apache-spark-application-in-microservices-ecosystems-e6553bcadde1?source=rss-634595f582a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6553bcadde1</guid>
            <category><![CDATA[structured-streaming]]></category>
            <category><![CDATA[apache-spark]]></category>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[apache-spark-streaming]]></category>
            <dc:creator><![CDATA[Hossein Bakhtiari]]></dc:creator>
            <pubDate>Sat, 11 Apr 2020 00:14:55 GMT</pubDate>
            <atom:updated>2020-04-15T18:25:16.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Utilizing Spark Structured Streaming as a Middleware to Connect Microservices" src="https://cdn-images-1.medium.com/max/1024/1*sa5keMDzFfg2MGmRxlP3vQ.png" /><figcaption>Utilizing Spark Structured Streaming as a Middleware to Connect Microservices</figcaption></figure><p>Articulating a problem reflects our knowledge about its domain. In the software and data world, we almost always encounter problems that have been there for years and a lot of contributions have been made by different teams around the globe, each of them resulting in a production of a unique approach. In this article, I want to show you one of these problems and two possible solutions, one of them by using pure Java and the other more robust one by leveraging Scala on top of Apache Spark.</p><h3>Problem Definition</h3><p>This is a common need in a microservices ecosystem when we want to connect different microservices in a manner that some of their outcomes generate others’ input. For this scenario, there are different approaches, considering functional and nonfunctional requirements and architectural constraints.</p><p>Suppose we have some microservices that generate some messages on an Apache Kafka cluster, writing them as a couple of key-values on a specific topic. We call these generator microservices, <strong>sources</strong>. On the other hand, there are some microservices that we want to update based on some calculations on the corresponding messages. We call these guys, <strong>destinations</strong>. Now we are going to design and implement a <strong>middleware </strong>microservice to serve as a <strong>bridge </strong>between these sources and destinations. It is obvious that one approach is changing the sources in a way that they calculate the request and call the destinations themselves. But note, if we make the sources do that, our ecosystem will end up in complete chaos. Of course, it is an antipattern. Besides, this is not a source’s responsibility to do the transformation and calling destination. This is not their business (Separation of Concerns). Consequently, building another component to work as a bridge between them is highly recommended.</p><p>Here is the scenario we are supposed to develop:</p><ol><li>Reading messages generated by sources from the topic</li><li>Classifying messages based on their keys</li><li>Extracting their JSON messages</li><li>Calculating the required request fields to update destinations</li><li>Calling destination microservices REST APIs</li></ol><h3>High-Level Architecture</h3><p>The high-level overview of the proposed solution is shown below:</p><figure><img alt="High-Level Architecture of the Bridge (Processing Unit) and Source and Destination Microservices" src="https://cdn-images-1.medium.com/max/1024/1*P0eg6-mgP4jKF-kI4IQzlA.png" /><figcaption>High-Level Architecture of the Bridge (Processing Unit) and Source and Destination Microservices</figcaption></figure><p>Now the <strong>Processing Unit</strong> is needed to be designed and developed.</p><h3>Solution 1: A Multiple Multithreaded Java Apps</h3><figure><img alt="High-Level Architecture of the Bridge Using Multiple Java Apps" src="https://cdn-images-1.medium.com/max/1024/1*WfEjBbbSQ6MYpaFJTpqJhw.png" /><figcaption>High-Level Architecture of the Bridge Using Multiple Java Apps</figcaption></figure><p>This solution concentrates on what we and our technical team know for years: <strong>Java ExecutorService</strong>! The idea behind that is, it is simple to develop and easier to deploy. The only thing we need to do is to implement our version of the <strong>Runnable</strong> interface to connect to the Kafka topics that we are interested, and then, submit our threads to <strong>ExecuterService</strong> under the same Kafka <strong>ConsumerGroup</strong>. (As we need our messages to be processed just once, so if one thread consumes the message, the message must not be delivered to other threads)</p><figure><img alt="The Architecture of the Multiple MultiThreaded Java Apps Bridge" src="https://cdn-images-1.medium.com/max/1024/1*CJzqnw-4-AJxtPJwPWgRLA.png" /><figcaption>The Architecture of the Multiple MultiThreaded Java Apps Bridge</figcaption></figure><p>After the development, the only thing we need is to dockerize the solution and deploy it on some VMs manually or just submit it to our Kubernetes cluster. It’s a piece of cake, isn’t it?</p><p>So do we have a unified cluster here? Is the solution fault-tolerant? How to check the health of our Java applications? What if some threads get stuck for no obvious reason?</p><p>With this solution, we cannot guarantee the immunity of the bridge because of the bad possible cases that we all know they may happen especially during the long run.</p><h3>Solution 2: An Apache Spark Structured Streaming Application</h3><blockquote><em>“Structured Streaming provides fast, scalable, fault-tolerant, end-to-end exactly-once stream processing without the user having to reason about streaming.” — Spark Structured Streaming </em><a href="https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html"><em>docs</em></a></blockquote><p>Here is our beloved Spark! Since version 2.3, Spark provided a new feature called Structured Streaming which is extremely compatible with Apache Kafka as one data source. The trick here is to see the messages as rows of data. The proposed solution looks like this:</p><figure><img alt="High-Level Architecture of the Bridge Using Spark Structured Streaming" src="https://cdn-images-1.medium.com/max/1024/1*v6ZXWJXzn_w0-MlprhUf3g.png" /><figcaption>High-Level Architecture of the Bridge Using Spark Structured Streaming</figcaption></figure><p>As we are going to use <strong>Append mode</strong>, the size of the input and the intermediate table is none of our concerns.</p><blockquote>“<strong><em>Note that Structured Streaming does not materialize the entire table</em></strong><em>. It reads the latest available data from the streaming data source, processes it incrementally to update the result, and then discards the source data. It only keeps around the minimal intermediate state data as required to update the result.</em>”<em> — Spark Structured Streaming </em><a href="https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html"><em>docs</em></a></blockquote><p>As we need to implement our customized flow, we need to skip integrated data sources as the output sink and develop our version of the data destination. So here is handy <strong>Generic Abstract Class ForeachWriter</strong> that we need to implement three of its functions: <strong>open</strong>, <strong>process</strong> and <strong>close</strong>.</p><h4>abstract class ForeachWriter[T] extends Serializable</h4><blockquote><em>“The abstract class for writing custom logic to process data generated by a query. This is often used to write the output of a streaming query to arbitrary storage systems. Any implementation of this base class will be used by Spark in the following way.</em></blockquote><blockquote><em>A single instance of this class is responsible for all the data generated by a single task in a query. In other words, one instance is responsible for processing one partition of the data generated in a distributed manner.</em></blockquote><blockquote><em>Any implementation of this class must be serializable because each task will get a fresh serialized-deserialized copy of the provided object. Hence, it is strongly recommended that any initialization for writing data (e.g. opening a connection or starting a transaction) is done after the open(…) method has been called, which signifies that the task is ready to generate data.” — Spark Structured Streaming </em><a href="https://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.sql.ForeachWriter"><em>docs</em></a></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d113ae188e2e19b53723d2c8b50b249e/href">https://medium.com/media/d113ae188e2e19b53723d2c8b50b249e/href</a></iframe><p>One thing to keep in mind is, as of now, Spark 2.4.5 cannot guarantee exactly-once message delivery using ForeachWriter, because deduplication cannot be achieved with the couple of <strong>partitionId</strong> and <strong>epochId</strong>. (To have this guarantee we can use <strong>ForeachBatch</strong> instead. The reason that we are using ForeachWriter is that I have assumed for some cases you cannot run a batch job so you only can do operations one by one, e.g. when a REST API is needed to be called per each row). So you need to do that yourself using a logging mechanism if the at-least-once guarantee is not a fit for your situation.</p><h3>High Availablity and High TPS (Transaction Processing System)</h3><p>There are vast amounts of articles about Spark high availability and TPS on the web. Spark is fast and tunable because of Project Tungsten, SQL Catalyst (especially if you can transform and enrich your data in a batch way using Spark SQL engine), Memory Management and Tunning(where you can decide how to dedicate memory fractions for your data and calculations), Garbage Collector Tuning (sometimes people decide to take responsibility for the garbage and get rid of garbage collector :D), etc. You may take a look at <a href="https://spark.apache.org/docs/latest/tuning.html">some tips</a> about tunning and optimization by its creators.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6553bcadde1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/an-apache-spark-application-in-microservices-ecosystems-e6553bcadde1">An Apache Spark Application In Microservices Ecosystems</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Turning Point During Coronavirus Time]]></title>
            <link>https://medium.com/@hbpro2001/a-turning-point-during-coronavirus-time-90ecc85e1774?source=rss-634595f582a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/90ecc85e1774</guid>
            <category><![CDATA[success]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[failure]]></category>
            <category><![CDATA[coronavirus]]></category>
            <category><![CDATA[change]]></category>
            <dc:creator><![CDATA[Hossein Bakhtiari]]></dc:creator>
            <pubDate>Thu, 02 Apr 2020 02:18:04 GMT</pubDate>
            <atom:updated>2020-04-17T16:36:01.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gweQYZ-FJCIs3Epg2NMSzQ.jpeg" /></figure><p>This whole Coronavirus outbreak has made a huge impact on our lifestyles. A lot has changed from the moment of its initial spreading and its fear has infected societies at the speed of light. Most of us are working from home with limited contact with the people we love. We will hopefully pass this critical time, but can we prepare to be a better version of ourselves after this crisis?</p><h3>Success — The Achievement of The Desired Result</h3><p>It seems the spirit of success is having a dream. Can we become successful without having any dream or vision about that? I guess it is not impossible, but the opposite is more probable, statistically speaking. It means we mostly know which direction we are going and when becoming successful, we have already known which direction we have been going to achieve success. We have actually been implementing a dream, a vision. Now the question is what we will find if we decompose the road to success? In other words, do we instantly achieve success or it comes after some unpleasant results? The answer is, most of the time, the unpleasant results are inevitable. We call these painful outcomes, failures.</p><h3>Troubleshooting the Failure</h3><p>What is the cause of failure? I guess it is somehow rooted in hope, potential, vision, and progress. The same elements needed to form the desired result, the success. Without a motive and some progress, failure cannot be generated or regenerated. The difference between failure and success is external, the outcome which is generated by the environment. And the common thing between these two is, trying to achieve, which is internal, under our authority and power. What is the vision? I also guess it is somehow related to a dream. A dream about us, but in better shape, a better situation, or a better possible existence of us. But what does a dream represent? Do we set it consciously or it is the reflection of what appeals to us unconsciously? Are there conflicts between our dreams? How to know which dream to follow and build your life based on it?</p><p>And one more question: How do we tolerate our failures and then start over to achieve our dreams? I guess the answer lies in one big potential: The potential to change. The characteristic called resilience. Being changed, but still the same person. Improvement. Resilience cannot be imagined in the absence of time. Around us, everything is capable of change. This forms the meaning of time. What prevents us not to think that we are changing from inside especially after each failure?</p><p>We all fail. We fail from time to time, but still, some of us win, or at least we sometimes win. What is the needed quality for winning (supposing we can regenerate all the examination situation and try again)? The answer is, we need to repeat the experiment again and again and slightly change the parameters and strategies, and observe the outcome. In the meantime, compare the outcome to the previous outcomes to identify a winning strategy. But how can we repeat the experience? Persistence to pursue one’s dreams. We should gain the quality to meet obstacles, to fail, to learn the lesson and then to change some traits and strategies to eventually obtain the winning pattern and execute it for one last time, resulting in the achievement but more importantly resiliency, adaptiveness, and strength.</p><p>A chain of failures for a loser personage is just bad luck, however, the same thing for a winner, is a laboratory to research success. This is all the difference in attitudes. Failure is not what we seek, but the more failures we study, the clearer the path to success.</p><h3>Choose your dreams wisely</h3><p>An unreachable dream, costs years of life, a vast amount of money and a lifetime of heartbreaking memories. It is like an investment, select the most capable shares. It is definitely critical and can get extremely complicated to select which dream to actualize, but still possible given a rational amount of time and research. We almost know our strengths and weaknesses and we can still get help from professionals.</p><p>Next, we need to identify the alignment of the dreams. Sometimes dreams have inter-conflicts between themselves. It is a good practice to choose a dream for your professional life and another for your hobbies. Choose your most important dream(s), break it down to goals and define your strategic roadmap.</p><h3>Work wisely</h3><p>Work in a direction that you expect your dream will come true the fastest. Wear a consultant hat. Think outside the box. Ask yourself honestly if this job will bring you to your dream. A good job is a good academy to teach you how to follow your dream faster and get closer to it and sure, it pays your bills. But don’t let the only reason you are still in that position be paying the bills. Pursuing your dreams is not a side business, so if you are not leveraging your daily job to reach your dreams, at least one of them is not right.</p><p>If you are working properly for a long period of time doing the same job and nothing has been changed since you have been hired, this is for you. I have seen a lot of decent people, with strong working skills, extremely beneficial for their companies lacking essential skills to defend their own rights. Getting underpaid or working for years without a promotion. And even worse, sometimes they are victims of racism or sexism too. There is one solution to this problem, go out of your comfort zone and speak up for your sake. You deserve better people to work for or at least a better position with a higher salary. See your own interest, be your own advocate. Consider the effort you are making and the gain. Don’t waste your life for those who don’t deserve.</p><h3>The Circle of Yin and Yang: Have a routine, but not too tight!</h3><p>We all know following our roadmap is not possible without setting a well-defined routine. But what kind of schedule fits the best? Psychologists say it varies from person to person. Individuals are different in defining and implementing schedules but have one thing in common. We need to start living with our schedule and gradually improve it, to identify our true daily capacity which is the building block of our path to success.</p><p>The very important thing in designing the routine is obtaining the balance between Yang (known areas) and Yin (unknown areas). It means we need to program for both programmable things and unprogrammable ones. We need to embrace some randomness to amplify our creativity. Pay attention to your hobbies during the day. Change the physical and mental environment to decompress and to become more creative. The point is, the way to success is incremental. It is absolutely normal sometimes not to follow the routine and explore other aspects of life. You have every right to do so, you are a human being, after all.</p><p>The last part is, keeping an eye on your performance and revise your schedule periodically.</p><h3>The Presence of Luck</h3><p>Increase your chance by surrounding yourself with positive people, a positive attitude makes you a better version of yourself in terms of characteristics and performance.</p><p>Why I am using the term chance here? Most of the times we use the word chance to explain an unidentified or hard-to-explain parameter that facilitates reaching our desired result (goal). What we know is that there is a positive correlation between surrounding with positive people and getting happier and perform better. We can imagine a lot of reasons why that is, but in the end, it works, so why not use it?</p><h3>Pick Up New Skills, You Are Capable of More Than Who You Are Known For</h3><p>How long is passed since the last time you were a student or read a book? How you are expecting from yourself to make use of new techniques to solve new problems? What was the last time you paid to learn something new? Why social networks absorb most of your spare time?</p><p>Now we can learn more, especially using online content on our pocket phone. We can grow our skills faster compared to every other age of humans on earth. Following one’s dream almost always needs its prerequisites. Pick up the most relevant skills. If there is no preference, pick it up randomly, it doesn’t matter. We have a strong instinct to recognize what is beneficial and what is useless. Soon enough you will realize whether to continue building that specific skill or not. But the result is life-changing; you will learn you can obtain new skills regardless of how difficult it was in the first place.</p><h3>Change The Playground</h3><p>Have you ever considered your current occupation is not probably the only one for the rest of your life?</p><p><a href="https://www.sciencedaily.com/releases/2016/03/160325093732.htm">Research</a> by the University of California — Santa Barbara, shows people are more capable of change than they think they are. But this is mostly not activated unless by survival instinct. It means we often don’t want to change unless we have to. So, what if we frankly witness we cannot win in the current playground? It is a common mistake to try to win a false game. I mean changing your field of study is sometimes irritating but let’s take a look at historical outstanding individuals. Most of them had tried different fields to eventually find the most winning playground. Maybe the university field that we chose at 18 is not the best for a 40-year-old business person anymore, as an example. We are not that old to be unable to make changes.</p><h3>Represent Yourself as The Only Person You Are Advocating</h3><p>We are changing rapidly. We are obtaining new skills, both hard and soft. We are growing. Why our professional showcase still remains the same? Nowadays, the Internet is the most important medium. Update your LinkedIn, share your stories on Medium, share your knowledge on YouTube and write open books and publish them, have an active Instagram. Think global. Produce content and share and analyze what is your true potential. Soon you will have followers and you will find your way through their comments. Let other people know what you are capable of.</p><h3>Find The Right Person To love, Or Love Them Better</h3><p>It is quite famous that life is nothing without love. But who is the right person to love? How can we describe her or him? How many times did we go through a heartbreaking romance? Of course, the process of finding a truly loved one is near pseudorandom. But is it? I mean, after each relationship and breakup, we are experiencing the same thing, a failure. What is changed? Our understanding of who we are, and what kind of people we like more. We are developing our understanding of our desired one. We now have better preceptors to separate them we can potentially love and the people we know they will probably fail our love. So, it seems like a success problem. The only thing that makes this problem different from the other ones, is the degree of one’s subjective involvedness. It means impulsive reactions generated from biochemicals in the brain, prevent us to assess the person’s suitability as a match correctly.</p><p>Anyway, more important than who you love, is how you love and are loved back.</p><h3>Let It Go</h3><p>Recognize what is not important or relevant anymore!</p><p>We are all living a hectic life. We need to revise our to-do items in a periodic manner and reprioritize them. This is common to not give a damn about some pieces of strategy, roadmap, and goals because they are not relevant or effective anymore. Less active items mean more concentration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90ecc85e1774" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>