<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2418067305199470972</atom:id><lastBuildDate>Tue, 07 Apr 2026 23:22:24 +0000</lastBuildDate><category>java sample code</category><category>java example</category><category>clean code</category><category>opends help</category><category>CompletableFuture example</category><category>Consumer</category><category>ExecutorService example</category><category>URLClassLoader example</category><category>how to get opends  export</category><category>java thread cpu usage</category><category>jgroups</category><category>kafka</category><category>leader election problem</category><category>sample ldap commands</category><category>urlclassloader remote jar</category><category>xstream example</category><category>xstream sample code</category><category>xstrem java sample</category><category>Adapter Pattern</category><category>Adapter Pattern VS Decorator Patter VS Facade Pattern VS Proxy Pattern VS Bridge Pattern</category><category>Are java constructors thread safe</category><category>AtomicInteger</category><category>Basic Drools example</category><category>BinaryOperator</category><category>BlockingQueue sample source code</category><category>Bridge Pattern</category><category>ClassLoader example</category><category>Completable Future example</category><category>CompletableFuture</category><category>CompletableFuture allOf example</category><category>Concurrency Tips</category><category>Cooperation</category><category>Date addition using date simple date format</category><category>Decorator Patter</category><category>Design Patterns</category><category>ExecutorService submit tasks</category><category>Facade Pattern</category><category>Failed to instantiate SLF4J LoggerFactory</category><category>FlameGraph java</category><category>FlameGraph java step by step</category><category>FlameGraph sample java</category><category>FlameGraph spring</category><category>FlameGraph step by step</category><category>Function</category><category>Generating Web Service using Axis2Java</category><category>How to Consume MediaType.APPLICATION_JSON with Jersey</category><category>How to analyse Out of Memory Error</category><category>How to get opends record count</category><category>How to get tcp dump and snoop</category><category>HuntMacllory Algorithm Java Implementation</category><category>Java 8 CompletableFuture parallel tasks and timeout example</category><category>Java 8 Lambda Building Blocks</category><category>Java8 streams and lambda expression GroupBy MaxBy MinBy Example</category><category>Jerset Json example</category><category>Kafka Basics</category><category>Line number information for SLF4J and LOG4J log messages</category><category>Marc Dacascos</category><category>Mastership Claim with jgroups</category><category>Microservice async communication rabbitmq</category><category>Offset</category><category>Opends record count</category><category>Optional example</category><category>Partitions</category><category>Predicate</category><category>Producer</category><category>Proxy Pattern</category><category>Redis Blocking List example</category><category>Redis Blocking Queue example</category><category>Redis as Message Queue example</category><category>ReentrantReadWriteLock example</category><category>Sample Simple Stupid Redis Message Queue Producer Consumer Example</category><category>Scalable System Design Patterns</category><category>ShutdownHook</category><category>SocketHandler</category><category>Software Architecture Patterns</category><category>Spring RabbitMQ example</category><category>Supplier</category><category>System Design Patterns</category><category>ThreadPoolExecutor</category><category>Topic</category><category>Watch Service Example</category><category>Watch Service Sample</category><category>XStream</category><category>XStream ConversionException</category><category>ai</category><category>amazon</category><category>async appender</category><category>asynchronous log</category><category>auto scp</category><category>axis web service generation</category><category>binary tree traversal</category><category>checked exceptions</category><category>class reload example</category><category>code convention</category><category>comman line send json</category><category>command line json</category><category>compact redis info</category><category>completableFuture timeout example</category><category>composition over class inheritance</category><category>curl send json</category><category>curl send json example</category><category>custom event handler</category><category>debug java</category><category>debug java threads with top command</category><category>deepseek</category><category>eclipse mat</category><category>english date</category><category>event listener java example</category><category>execute linux commands in java</category><category>eye detect</category><category>facebook</category><category>file copy without entering password</category><category>find triplet in array</category><category>future</category><category>generate Xstream classes</category><category>google</category><category>groupingByConcurrent sample</category><category>gs-consuming-rest</category><category>heimdall</category><category>hot deploy examaple</category><category>how to consume Json with jersey</category><category>how to get axis2 web service parameter</category><category>how to get record count opends</category><category>how to lock table in mysql</category><category>how to reload class</category><category>how to reload jar</category><category>how to vi</category><category>hp cpu info</category><category>hp serverinfo</category><category>huntMacllory</category><category>huntMacllory algorithm</category><category>huntMacllory algorithm java</category><category>intellij idea</category><category>intellij show spring beans near line number</category><category>interact</category><category>interview questions</category><category>jar file reload example</category><category>java  parallel execution sample</category><category>java 8 Optional</category><category>java 8 Optional example</category><category>java 8 comparator example</category><category>java 8 lambda comparator</category><category>java 8 lambda sample comparator</category><category>java 8 lamdbda functions</category><category>java Completable Future example</category><category>java CompletableFuture</category><category>java CompletableFuture example</category><category>java Optional example</category><category>java Watch Service Example</category><category>java async task execution</category><category>java avl tree rotations</category><category>java avl tree traversal</category><category>java binary tree traversal iterative</category><category>java binary tree traversal recursive</category><category>java chat application source code</category><category>java date formatter example with locale</category><category>java debug</category><category>java debugger</category><category>java debugging</category><category>java diagnotistic</category><category>java directory change listener</category><category>java file change listener</category><category>java help</category><category>java high cpu usage</category><category>java matrix shortest path solver</category><category>java maze solver</category><category>java mbean sample</category><category>java monitor</category><category>java puzzle</category><category>java semaphore</category><category>java semaphore example</category><category>java shortest path sample program</category><category>java stack trace</category><category>java stream groupingByConcurrent example</category><category>java stream sample aveage</category><category>java stream sample max</category><category>java stream sum sample</category><category>java task execution</category><category>java task execution sample</category><category>java thread high cpu usage</category><category>java thread local usage</category><category>java threadd</category><category>java threads</category><category>java tools</category><category>java wait notify example</category><category>java web service example</category><category>java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException</category><category>java.util.concurrent.Semaphore example</category><category>java.util.logging</category><category>java8 sample code</category><category>jaxws</category><category>jbuilder</category><category>jconsole plugin</category><category>jconsole thread plugin</category><category>jdb attach</category><category>jdb debugger example</category><category>jdb debugger usage</category><category>jdb example</category><category>jdb how to</category><category>jdb manual</category><category>jdb sample</category><category>jdb tutorial</category><category>jdk 1.7 WatchService Example</category><category>jersey</category><category>jersey  json example</category><category>jgroups Lock Service</category><category>jgroups lockService example</category><category>jgrups</category><category>jmap example</category><category>jmap heap</category><category>jmap heap permgen</category><category>jmap permgen</category><category>jmap sample</category><category>jmap tutorial</category><category>jmap usage</category><category>jmeter sample source code</category><category>jmeter test code</category><category>jmx agent</category><category>jmx command line connection</category><category>jmx example</category><category>jmx mbean</category><category>jmx query</category><category>joda time</category><category>jpa detach</category><category>jpa paging</category><category>jpa save merge persist</category><category>json send comman line</category><category>jvm heap</category><category>jvm options</category><category>jvm permgen</category><category>kafka springboot</category><category>kafka terminology</category><category>ldap</category><category>ldap hints</category><category>ldap null attribute search</category><category>ldap tutorial</category><category>linux</category><category>linux file copy</category><category>linux listen tcp port</category><category>linux sniff port</category><category>linux tcpflow example</category><category>load jar from net</category><category>load jar from web</category><category>load remote jar</category><category>lock mysql table</category><category>locking a table with mysql</category><category>log4j async logging</category><category>log4j performace</category><category>logback error</category><category>mbean query on command line</category><category>memcached example</category><category>memcached example with multiple server</category><category>memory  leak</category><category>memory leak fix</category><category>mockinh rest request</category><category>mongo export</category><category>mongo import</category><category>mongodb export</category><category>mongodb export example</category><category>mongodb export import example</category><category>mongodb import</category><category>mongodb import example</category><category>monitoring</category><category>monitoring the ExecutorService</category><category>multithreading</category><category>mysql locking table</category><category>mysql table lock</category><category>newFixedThreadPool</category><category>object composition over class inheritance</category><category>off grid ai</category><category>ollama</category><category>opends export</category><category>opends high cpu usage</category><category>opends performance tuning</category><category>opends problem</category><category>opends replication</category><category>openweb-ui</category><category>oracle get sql statistic between dates</category><category>out of memory error</category><category>pagination with jpa</category><category>permgen heap command line</category><category>python</category><category>rabbitmq</category><category>rabbitmq replyto</category><category>read from command line</category><category>redis bullshit</category><category>redis101</category><category>reliable multicasting</category><category>remote debugging</category><category>replace in vi</category><category>rest post method mock</category><category>rest post mocking</category><category>rmCvs.sh</category><category>run deepseek ai local computer</category><category>run deepseek ai locally</category><category>run deepseek local</category><category>russian date</category><category>rust</category><category>sample mbean</category><category>scheduling in java</category><category>semaphore example</category><category>send json curl</category><category>send rest from command line</category><category>shell web service</category><category>slf4j exception</category><category>soap call from shell</category><category>soap call from unix</category><category>soap command line</category><category>soapui</category><category>soapui  read from file</category><category>soapui  web service</category><category>soapui groovy</category><category>soapui load file</category><category>soapui load test</category><category>soapui test data file</category><category>spring boot kafka template</category><category>spring boot logback error</category><category>spring boot maven compile</category><category>spring boot maven compile error</category><category>spring boot maven dependecy error</category><category>spring boot maven error</category><category>spring boot slf4j error</category><category>spring example exeption</category><category>spring maven error</category><category>springboot</category><category>spymemcache client example</category><category>spymemcached and memcache example</category><category>spymemcached example</category><category>sqlplus connect</category><category>sqlplus connect remote</category><category>sqlplus other database</category><category>sqlplus remote database</category><category>sqlplus remote db</category><category>sqlplus remote ip</category><category>synchronization</category><category>task execution example</category><category>tcpdump and snoop example</category><category>tensorflow</category><category>tesla</category><category>thread cpu usage</category><category>thread cpu usage plugin</category><category>too many open files</category><category>top and jstack</category><category>top consumer java threads</category><category>transaction isolation level</category><category>tui</category><category>tui for sysadmin</category><category>ukrainian date</category><category>unchecked exceptions</category><category>unix listen port</category><category>unix recursive file deletion</category><category>unix sniff port</category><category>unix tcp port sniff</category><category>unix top command to find java thread</category><category>vi help</category><category>web service call unix command line</category><category>web service parameter</category><category>webassembly</category><category>wget multiple header command line example</category><category>ws call from command line</category><category>ws call from unix shell</category><category>xstream CannotResolveClassException</category><title>..JavaBendeR...</title><description>Copy, paste, run,  bye ...&#xa;&#xa;</description><link>http://javabender.blogspot.com/</link><managingEditor>noreply@blogger.com (Serkan Sunel)</managingEditor><generator>Blogger</generator><openSearch:totalResults>147</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-1165504802861673082</guid><pubDate>Thu, 05 Mar 2026 19:51:00 +0000</pubDate><atom:updated>2026-03-05T11:51:04.360-08:00</atom:updated><title>Daily life Linux problems..</title><description>&lt;p&gt;&amp;nbsp;## Confessions of a Distracted Linux Coder: How &quot;Port Already in Use&quot; Turned into Heimdall&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hey everyone,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You know those moments when you&#39;re deep in code on Linux and suddenly…&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;**&quot;Why can&#39;t I delete this file?&quot;**&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;**&quot;Which damn process is holding port 8080?&quot;**&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;**&quot;Wait, who just opened that socket?&quot;**&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;One minute you&#39;re writing a function, the next you&#39;re running `lsof`, `ss`, `fuser`, `ps aux | grep`, `journalctl -u`, and `iotop` like a madman.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;By the time you fix the tiny problem, you’ve completely forgotten what you were actually working on.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;**&quot;What was I doing again?&quot;** 😅&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Or worse — that paranoid feeling creeps in:&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&quot;Is everything okay? Why is systemd-journald eating CPU?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Who is scraping my disk like it&#39;s a frying pan?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Why are the modem lights blinking non-stop?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Who is sending all these packets?!&quot;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And the worst one:&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&quot;Did that innocent little package I just installed silently start talking to the outside world without telling me?&quot;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Switching between five different TUIs and terminals just to answer basic questions gets exhausting.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I got tired of it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;So… I ended up going down the rabbit hole.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What started as a quick hack to find &quot;who&#39;s using this port&quot; slowly grew into something bigger.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And because I can&#39;t help myself, I added way too many icons to make it feel a little more fun 😄&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ladies and gentlemen, meet **Heimdall** – my little terminal watchdog that&#39;s still very much in its crawling baby stage.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;https://github.com/sunels/heimdall&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It&#39;s nowhere near perfect, but it already saves me a surprising amount of time every day.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you ever feel the same frustration, give it a try.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Feedback, suggestions, or even a tiny PR would genuinely make me happy.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks for reading,&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKWrccrVFYYvt1BjSjnmm5e4Ux_PYSZIOxsAusD6ri6qQPpkKJ_878k3uue0g2gn_CUelD7ut-5_R_goHYYLI-CcAmQOa2CShbAWpjwn_9XvP-A1NpzjX_YB9U0MfFLVamC9Djwd93A9kZueKZbM1UD5PMYRjOZe72HEeLVoOK9kxWirgEadMzesqfLBWp/s1920/pp-1%20(4).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;998&quot; data-original-width=&quot;1920&quot; height=&quot;166&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKWrccrVFYYvt1BjSjnmm5e4Ux_PYSZIOxsAusD6ri6qQPpkKJ_878k3uue0g2gn_CUelD7ut-5_R_goHYYLI-CcAmQOa2CShbAWpjwn_9XvP-A1NpzjX_YB9U0MfFLVamC9Djwd93A9kZueKZbM1UD5PMYRjOZe72HEeLVoOK9kxWirgEadMzesqfLBWp/s320/pp-1%20(4).png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2026/03/daily-life-linux-problems.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKWrccrVFYYvt1BjSjnmm5e4Ux_PYSZIOxsAusD6ri6qQPpkKJ_878k3uue0g2gn_CUelD7ut-5_R_goHYYLI-CcAmQOa2CShbAWpjwn_9XvP-A1NpzjX_YB9U0MfFLVamC9Djwd93A9kZueKZbM1UD5PMYRjOZe72HEeLVoOK9kxWirgEadMzesqfLBWp/s72-c/pp-1%20(4).png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-7780372360702490563</guid><pubDate>Sun, 22 Feb 2026 10:47:00 +0000</pubDate><atom:updated>2026-02-22T02:50:06.330-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">heimdall</category><category domain="http://www.blogger.com/atom/ns#">linux</category><category domain="http://www.blogger.com/atom/ns#">monitoring</category><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">tui</category><title>Heimdall – How a Simple Port Error Turned into My Crazy Terminal Side Project</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Hey folks,&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Everything started because I got so tired of that classic Spring Boot error: &lt;strong&gt;“Port already in use”&lt;/strong&gt;. Every time I had to hunt down the PID in the terminal, kill it manually, and pray it didn’t happen again five minutes later… ugh.&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;I was fed up scrolling through &lt;span&gt;ss&lt;/span&gt;, &lt;span&gt;netstat&lt;/span&gt;, &lt;span&gt;lsof&lt;/span&gt;, &lt;span&gt;ps&lt;/span&gt; — all that noise just to free a port during a busy workday.&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Then things got out of hand (in a good way 😄).&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;I started building something small… and it kept growing. Now Heimdall is this beautiful curses-based TUI that watches ports, processes, files, risks — and even runs as a &lt;strong&gt;daemon&lt;/strong&gt; in the background.&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;The coolest parts right now are &lt;strong&gt;Sentinel&lt;/strong&gt; (it spots shady behavior like backdoors, masquerading processes, deleted binaries, suspicious listeners) and &lt;strong&gt;Daemon mode&lt;/strong&gt; (it quietly monitors suspicious outbound connections, suspends the process, and asks you to allow or kill — either via a popup modal if the TUI is open, or a notification + timeout if not).&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Whenever I think “hey, this would be cool to add”, I throw it at an AI agent while I still have tokens left 😂. Sometimes I just feel like the product owner who never stops adding features.&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;If you want to join the fun, check out the repo: &lt;a href=&quot;https://github.com/sunels/heimdall&quot; node=&quot;[object Object]&quot; rel=&quot;noopener noreferrer nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/sunels/heimdall&lt;/a&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;or &lt;a href=&quot;https://pypi.org/project/heimdall-linux/&quot;&gt;https://pypi.org/project/heimdall-linux/&lt;/a&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;
Give it a star, try it, break it, send feedback/PRs — I’d love to hear what you think (or what crazy feature I should add next).&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Thanks for reading, stay safe out there!&lt;/p&gt;
&lt;p dir=&quot;auto&quot; style=&quot;white-space: pre-wrap;&quot;&gt;Love,
Serkan ❤️

&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgCTFeREX_bGqeU3nToDVnSXeE5cnRKJkUdW21Rq_Gm2Wratq6u_u5BGiieF27gOhvzZft3zswON2SFBU6Xe3TMK8VegwewI78idoLrjkfQo4PCiFG08MlQ41Ux9SllBYeroZHTvzbgDM9DJ1UhRiDpY-MlCFoFlO5IwqaFie_zAj2wxeLhiX6-aNcDrH-d&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;936&quot; data-original-width=&quot;1906&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgCTFeREX_bGqeU3nToDVnSXeE5cnRKJkUdW21Rq_Gm2Wratq6u_u5BGiieF27gOhvzZft3zswON2SFBU6Xe3TMK8VegwewI78idoLrjkfQo4PCiFG08MlQ41Ux9SllBYeroZHTvzbgDM9DJ1UhRiDpY-MlCFoFlO5IwqaFie_zAj2wxeLhiX6-aNcDrH-d=w400-h196&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;



&lt;p&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2026/02/heimdall-how-simple-port-error-turned.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgCTFeREX_bGqeU3nToDVnSXeE5cnRKJkUdW21Rq_Gm2Wratq6u_u5BGiieF27gOhvzZft3zswON2SFBU6Xe3TMK8VegwewI78idoLrjkfQo4PCiFG08MlQ41Ux9SllBYeroZHTvzbgDM9DJ1UhRiDpY-MlCFoFlO5IwqaFie_zAj2wxeLhiX6-aNcDrH-d=s72-w400-h196-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-839979261646393539</guid><pubDate>Sat, 17 Jan 2026 22:46:00 +0000</pubDate><atom:updated>2026-02-08T01:27:15.751-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">tui for sysadmin</category><title>Linux terminal tool for port process open files</title><description>&lt;p&gt;&amp;nbsp;Interactive terminal-based port, process, file, and resource inspector for Linux&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;portwitr-interactive is a high-performance, curses-based Terminal User Interface (TUI) designed to give you instant visibility and control over your Linux system — all from a single, interactive view.&lt;/p&gt;&lt;p&gt;Tool for sysadmins and developers&lt;/p&gt;&lt;p&gt;✨ Features&lt;/p&gt;&lt;p&gt;🔍 Live port listing using ss&lt;/p&gt;&lt;p&gt;⚡ Shows CPU% / MEM% usage per process&lt;/p&gt;&lt;p&gt;🧠 Maps PORT → PID → PROGRAM&lt;/p&gt;&lt;p&gt;⛔ Firewall toggle for selected port (temporarily block/unblock traffic)&lt;/p&gt;&lt;p&gt;📂 Displays all open files of the selected process (/proc/&amp;lt;pid&amp;gt;/fd)&lt;/p&gt;&lt;p&gt;🧾 Deep inspection via witr --port&lt;/p&gt;&lt;p&gt;🖥️ Fully interactive terminal UI (curses)&lt;/p&gt;&lt;p&gt;⚡ Real-time refresh&lt;/p&gt;&lt;p&gt;🛑 Stop a process or systemd service directly from the UI (with confirmation)&lt;/p&gt;&lt;p&gt;📝 Warnings annotation (e.g., suspicious working directory is flagged but explained)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Checkout and Play:&amp;nbsp;&lt;a href=&quot;https://github.com/sunels/heimdall&quot;&gt;https://github.com/sunels/heimdall&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Installation:&amp;nbsp;&lt;a href=&quot;https://github.com/sunels/heimdall?tab=readme-ov-file#-installation&quot;&gt;https://github.com/sunels/heimdall?tab=readme-ov-file#-installation&lt;/a&gt;&lt;/p&gt;&lt;pre class=&quot;notranslate&quot; style=&quot;background-color: #151b23; border-radius: 6px; box-sizing: border-box; color: #f0f6fc; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; tab-size: 4;&quot;&gt;&lt;code style=&quot;background: 0px 0px transparent; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; tab-size: 4; word-break: normal;&quot;&gt;    wget https://github.com/sunels/heimdall/releases/download/v0.1.0/heimdall_0.1.0-1_all.deb
    sudo dpkg -i heimdall_0.1.0-1_all.deb
&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;code style=&quot;background: 0px 0px transparent; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; tab-size: 4; word-break: normal;&quot;&gt;&lt;div class=&quot;snippet-clipboard-content notranslate position-relative overflow-auto&quot; style=&quot;background-color: #151b23; box-sizing: border-box; color: #f0f6fc; display: flex; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; justify-content: space-between; margin-bottom: 16px; overflow: auto; position: relative;&quot;&gt;&lt;pre class=&quot;notranslate&quot; style=&quot;border-radius: 6px; box-sizing: border-box; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; tab-size: 4;&quot;&gt;&lt;code style=&quot;background: 0px 0px transparent; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: &amp;quot;Monaspace Neon&amp;quot;, ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; tab-size: 4; word-break: normal;&quot;&gt;    Run:
    sudo heimdall
    
    # or just
    heimdall
&lt;/code&gt;&lt;/pre&gt;&lt;div class=&quot;zeroclipboard-container&quot; style=&quot;animation: auto ease 0s 1 normal none running none; box-sizing: border-box;&quot;&gt;&lt;clipboard-copy aria-label=&quot;Copy&quot; class=&quot;ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center&quot; data-copy-feedback=&quot;Copied!&quot; data-tooltip-direction=&quot;w&quot; role=&quot;button&quot; style=&quot;align-items: center; appearance: none; background-color: transparent; border-radius: 6px; border: 0px; box-shadow: none; box-sizing: border-box; color: #4493f8; cursor: pointer; display: flex; font-size: 14px; height: 28px; justify-content: center; line-height: 20px; margin: 8px; padding: 0px; position: relative; text-wrap-mode: nowrap; transition: color 80ms cubic-bezier(0.33, 1, 0.68, 1), background-color 80ms cubic-bezier(0.33, 1, 0.68, 1), box-shadow 80ms cubic-bezier(0.33, 1, 0.68, 1), border-color 80ms cubic-bezier(0.33, 1, 0.68, 1); user-select: none; vertical-align: middle; width: 28px;&quot; tabindex=&quot;0&quot; value=&quot;    wget https://github.com/sunels/heimdall/releases/download/v0.1.0/heimdall_0.1.0-1_all.deb
    sudo dpkg -i heimdall_0.1.0-1_all.deb

    #If dependencies are missing (rare):

    sudo apt update
    sudo apt install -f

    Run:
    sudo heimdall
    
    # or just
    heimdall&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-copy js-clipboard-copy-icon&quot; data-view-component=&quot;true&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;/svg&gt;&lt;/clipboard-copy&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;markdown-heading&quot; dir=&quot;auto&quot; style=&quot;background-color: #0d1117; box-sizing: border-box; color: #f0f6fc; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; position: relative;&quot;&gt;&lt;/div&gt;&lt;/code&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjRIhQZGSdrQwP8aZ07j_f8_ZyqxhejstyDiy8P4b5LjlPjbjmlDSTNsTEa1fkFACNfDZx5tPEofrQxAXFLMt9gtIyosK32YQH9xIYRbwESqGv3MVa338imLgyP1gbWV-2MElRNcFuMGbUkg-toEm18Oce4htkLrVE8IFrqlifuO-IboXmMOpQu0QCe1DS7&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;936&quot; data-original-width=&quot;1906&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjRIhQZGSdrQwP8aZ07j_f8_ZyqxhejstyDiy8P4b5LjlPjbjmlDSTNsTEa1fkFACNfDZx5tPEofrQxAXFLMt9gtIyosK32YQH9xIYRbwESqGv3MVa338imLgyP1gbWV-2MElRNcFuMGbUkg-toEm18Oce4htkLrVE8IFrqlifuO-IboXmMOpQu0QCe1DS7=w400-h196&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQQTYe1WmnWAaMM0u4n6J_ztIO6aaIZTRRiVuwLG-ra8g9-F3Fm-I88qKTx3DIr36UjwOs-U12LnpjIO53V2ne-4xS5-m4XATEA4ZNtU_pFQsOHs-ox-g3suhE62ZAwsSL910Cm4Rey1ZKaBjkFFi41egrTaBpYbhDncpW78c_DSfuCp89E2tdndDpWxEH&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;925&quot; data-original-width=&quot;1907&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQQTYe1WmnWAaMM0u4n6J_ztIO6aaIZTRRiVuwLG-ra8g9-F3Fm-I88qKTx3DIr36UjwOs-U12LnpjIO53V2ne-4xS5-m4XATEA4ZNtU_pFQsOHs-ox-g3suhE62ZAwsSL910Cm4Rey1ZKaBjkFFi41egrTaBpYbhDncpW78c_DSfuCp89E2tdndDpWxEH=w400-h194&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjfKll57J0FqJS_oFwVyDGQI_iGFwMZ9uC90ATH7n17sPrbMlRgF-omOXhfbcHDwIGyp6dBlJYJLhT90MYfWOJGTZATadGQGOUvK9LuhMQ3pyyYVvdvHon1IqMnWc9HOiBD_ruh4pyuhlNKIOgk_eLMV9QiJONMKFwsJ6yT3b2i9UaCvPfRaYWrs5A0vEy2&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;933&quot; data-original-width=&quot;1908&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjfKll57J0FqJS_oFwVyDGQI_iGFwMZ9uC90ATH7n17sPrbMlRgF-omOXhfbcHDwIGyp6dBlJYJLhT90MYfWOJGTZATadGQGOUvK9LuhMQ3pyyYVvdvHon1IqMnWc9HOiBD_ruh4pyuhlNKIOgk_eLMV9QiJONMKFwsJ6yT3b2i9UaCvPfRaYWrs5A0vEy2=w400-h195&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiPZQoeePftD1m2Z-5YYGQJRA_qNMNohNVpsxOlyM3kUJObvlzE0BU6gCCwe56Nn7JubcbqEkb-q52akbpxGLFCkxl1YUGkaCutITF55LuzOlitsDfGezRBbUUPDWn8on17Tq8Xs2PsFAigzAnv2IFTlU39DsEWtAGVg2Ofjm9BpUmGTFEZwaI8LpNCmi9j&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;919&quot; data-original-width=&quot;1906&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiPZQoeePftD1m2Z-5YYGQJRA_qNMNohNVpsxOlyM3kUJObvlzE0BU6gCCwe56Nn7JubcbqEkb-q52akbpxGLFCkxl1YUGkaCutITF55LuzOlitsDfGezRBbUUPDWn8on17Tq8Xs2PsFAigzAnv2IFTlU39DsEWtAGVg2Ofjm9BpUmGTFEZwaI8LpNCmi9j=w400-h193&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjDegaLk8z39AvvBeyusfmuWRpun2Rvc-PRMyPSM7g4X0azQWnO16OKxXIsM3pclhL1vq7dbWscigMu9J3ckHkrVrGNShJwaZ9j9nyr9jvU3sgkAEVzlGDSLk9TsvB41u7gdniJ0iGni6MKzwpY65IKvs3VHeUSDtRZdX2xQ5cxsUXhuWDJ3EB-nQ92aV8r&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;925&quot; data-original-width=&quot;1907&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjDegaLk8z39AvvBeyusfmuWRpun2Rvc-PRMyPSM7g4X0azQWnO16OKxXIsM3pclhL1vq7dbWscigMu9J3ckHkrVrGNShJwaZ9j9nyr9jvU3sgkAEVzlGDSLk9TsvB41u7gdniJ0iGni6MKzwpY65IKvs3VHeUSDtRZdX2xQ5cxsUXhuWDJ3EB-nQ92aV8r=w400-h194&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2026/01/portwitr-interactive.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjRIhQZGSdrQwP8aZ07j_f8_ZyqxhejstyDiy8P4b5LjlPjbjmlDSTNsTEa1fkFACNfDZx5tPEofrQxAXFLMt9gtIyosK32YQH9xIYRbwESqGv3MVa338imLgyP1gbWV-2MElRNcFuMGbUkg-toEm18Oce4htkLrVE8IFrqlifuO-IboXmMOpQu0QCe1DS7=s72-w400-h196-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-1949850597140094580</guid><pubDate>Sun, 10 Aug 2025 19:22:00 +0000</pubDate><atom:updated>2025-08-10T12:22:07.504-07:00</atom:updated><title>TCP Socket: Accept, Buffer, 3 Ways Handshake Manim Animation Scripts</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;595&#39; height=&#39;495&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dz4kGg5mTv6W7_ITZwyZqjSBCZ77hlKLST8lBiZ9ESzbqKb2Wn5e-qEyrViS_KuAExZ6Y5dXNcOPU9FmrF2Ag&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2025/08/tcp-socket-accept-buffer-3-ways.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-7303080102963753241</guid><pubDate>Sat, 25 Jan 2025 19:28:00 +0000</pubDate><atom:updated>2025-01-26T11:28:07.119-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">deepseek</category><category domain="http://www.blogger.com/atom/ns#">off grid ai</category><category domain="http://www.blogger.com/atom/ns#">ollama</category><category domain="http://www.blogger.com/atom/ns#">openweb-ui</category><category domain="http://www.blogger.com/atom/ns#">run deepseek ai local computer</category><category domain="http://www.blogger.com/atom/ns#">run deepseek ai locally</category><category domain="http://www.blogger.com/atom/ns#">run deepseek local</category><title>Ollama - open-webui - deepseek - CPU - local run</title><description>&lt;p&gt;Conversations on it :&lt;/p&gt;&lt;p&gt;Let&#39;s build a mini-ChatGPT that&#39;s powered by DeepSeek-R1 (100% local):&lt;/p&gt;&lt;p&gt;Why do we need to run it locally when we can always run it from deepseek site?&lt;/p&gt;&lt;p&gt;Privacy mainly, You can run it from the site if you want but this is for companies or tech departments that want to run it locally and not worry about what data / info could be leaked&lt;/p&gt;&lt;p&gt;Okay, but why build your own front end when open webUI exists? I can build an identical local solution with 2 commands (ollama pull, docker run).&lt;/p&gt;&lt;p&gt;A company may want to incorporate it into their own site for specific purpose to incorporate their branding and feel&lt;/p&gt;&lt;p&gt;Various reasons, but yes if I was just messing with it I would just do what you mentioned&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgH1tIuN_cT9xR4tIcwf929krNBeBMikitpPmxG23DD_P3fsZqRS4GBOhu0hp1f1R-YsZ9EWEgjf4YXUHMTgXT-0vxvfvFujAsDNwEBilwCUjUqQfXNQUpceMJwPJRjTGhkIYvzdePHRSlr0Sp5IFajgIKvnA3iVu98hhqL9Oofu8B8e-2jhkq99pXWfmzL&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;108&quot; data-original-width=&quot;464&quot; height=&quot;74&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgH1tIuN_cT9xR4tIcwf929krNBeBMikitpPmxG23DD_P3fsZqRS4GBOhu0hp1f1R-YsZ9EWEgjf4YXUHMTgXT-0vxvfvFujAsDNwEBilwCUjUqQfXNQUpceMJwPJRjTGhkIYvzdePHRSlr0Sp5IFajgIKvnA3iVu98hhqL9Oofu8B8e-2jhkq99pXWfmzL&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhlIzwFwS3a-9j9UmA-faU8-BulyFgjuZhlNC0JnrNb5Hr7eR1rioYClfOGEoyM9rgE-Lait_HKOm7fp1qteqS1-ugzYuDUOd3Q1_wV0p0SzFgykxiDcnKqVspOTsIneQCjURdxeOureo6IDMZtNDPSytjaokPgyUwxrC7LJT-DlbnkSoIwc6u0jOt1Jw5S&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;174&quot; data-original-width=&quot;289&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhlIzwFwS3a-9j9UmA-faU8-BulyFgjuZhlNC0JnrNb5Hr7eR1rioYClfOGEoyM9rgE-Lait_HKOm7fp1qteqS1-ugzYuDUOd3Q1_wV0p0SzFgykxiDcnKqVspOTsIneQCjURdxeOureo6IDMZtNDPSytjaokPgyUwxrC7LJT-DlbnkSoIwc6u0jOt1Jw5S&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiJao3jbY2-iq7FRUYIYyZx_fUG628NShDHpUoRzxbK5fJ8Tt0Uofpo6IHU2xBZSlLkqKZPHbcYv58dEE8wo3nKrqKqnnZspCdTh2wLVRZgIH4t2yvzTsMb10dP1P1AbiGBTI0ffQu80otAxzNM_1450PqHyef6JjFJqwlKV_E5ZE2e2v88_nO15i1_tdXo&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;550&quot; data-original-width=&quot;1024&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiJao3jbY2-iq7FRUYIYyZx_fUG628NShDHpUoRzxbK5fJ8Tt0Uofpo6IHU2xBZSlLkqKZPHbcYv58dEE8wo3nKrqKqnnZspCdTh2wLVRZgIH4t2yvzTsMb10dP1P1AbiGBTI0ffQu80otAxzNM_1450PqHyef6JjFJqwlKV_E5ZE2e2v88_nO15i1_tdXo&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;sunels@sunels:~$ docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Unable to find image &#39;ghcr.io/open-webui/open-webui:ollama&#39; locally&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;http://localhost:11434/&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg311vA6t7RZQ0HyhcdC5LUl2ljV40b2GEFMft0RhtLdYjori3g0qTwrVIrkR3TBAMAr-jUvouBlDNhKaE0jNVhinyHibNsi9vlCFUnD-9dqBaGEh8MKoqMBWxrb3CBhPmdw0TMAZ53Gyb6_5-YKHOrHo9K-6wM3QpL5Q_1PHwIIQmw6dYwyUzYRMKnMWrR&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;157&quot; data-original-width=&quot;330&quot; height=&quot;152&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg311vA6t7RZQ0HyhcdC5LUl2ljV40b2GEFMft0RhtLdYjori3g0qTwrVIrkR3TBAMAr-jUvouBlDNhKaE0jNVhinyHibNsi9vlCFUnD-9dqBaGEh8MKoqMBWxrb3CBhPmdw0TMAZ53Gyb6_5-YKHOrHo9K-6wM3QpL5Q_1PHwIIQmw6dYwyUzYRMKnMWrR&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;http://localhost:3000/&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhkhZrwWP8EViEt8EL186T6v2BvK-aW-geg7PmoUaqiwJ9FGc8sU7Q_7uXREG_ZSNQHR8dtGSHC1MD9TfSPch-u9_inF4hoJRCfHlgSOM2c-Dq7wKj3JYC1PVJwYW7HxCfAIfvDAOd9EJkSx4eAmf65sqIABVa-zSEVqcxL4vwoezFtemC1rhNBj3SfSHsk&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;334&quot; data-original-width=&quot;281&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhkhZrwWP8EViEt8EL186T6v2BvK-aW-geg7PmoUaqiwJ9FGc8sU7Q_7uXREG_ZSNQHR8dtGSHC1MD9TfSPch-u9_inF4hoJRCfHlgSOM2c-Dq7wKj3JYC1PVJwYW7HxCfAIfvDAOd9EJkSx4eAmf65sqIABVa-zSEVqcxL4vwoezFtemC1rhNBj3SfSHsk&quot; width=&quot;202&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Settings&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgM3E55FxPrShg4sSUNoAVaNAySwXLnmZxgtu5f0fL0fMCdypLbQxYV4ja6NccSR23xTZq4vU-svwcnljFFd0xnY3FaLnLlFiHrddv8i6tGf9WM6MrST_7yOziyIpnb1GN7ljFzM7Op5VrF_l3luOE4QA9g90u3grY0lBW-rEQJSZc_muO2G5oSTfVkKmj5&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;621&quot; data-original-width=&quot;572&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgM3E55FxPrShg4sSUNoAVaNAySwXLnmZxgtu5f0fL0fMCdypLbQxYV4ja6NccSR23xTZq4vU-svwcnljFFd0xnY3FaLnLlFiHrddv8i6tGf9WM6MrST_7yOziyIpnb1GN7ljFzM7Op5VrF_l3luOE4QA9g90u3grY0lBW-rEQJSZc_muO2G5oSTfVkKmj5&quot; width=&quot;221&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhJ9v-MLDt5OqBbuyJulKixQnUJVhNxtJmoeBvsUM-3l2mgJqCBEds66IFOrlsFkGwXCkOU2iJryqoSJG4C1JWpM1DlUfq04gA-Zc02oI1L56ax9RhSmusvlnxy_Lz_x3jVnGgsWCiMv7HFj0TnMczT8kebvq41Ssse5j0KeAOGoq15TwcjB5s0ODuaCYQY&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;501&quot; data-original-width=&quot;1105&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhJ9v-MLDt5OqBbuyJulKixQnUJVhNxtJmoeBvsUM-3l2mgJqCBEds66IFOrlsFkGwXCkOU2iJryqoSJG4C1JWpM1DlUfq04gA-Zc02oI1L56ax9RhSmusvlnxy_Lz_x3jVnGgsWCiMv7HFj0TnMczT8kebvq41Ssse5j0KeAOGoq15TwcjB5s0ODuaCYQY=w452-h205&quot; width=&quot;452&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjaUN67aS-DA5_a2tAE2lU18fPWbeY1QeWEv0iQi_9cHhcNQQtIuGIOdoRC1d4r_ASjLlHm_nxMtb_leMeNS7k_rogNcPDD_fOxh7o3pppE4aOhs0pno7vzk7CEJEgT2mQXPGMb5DPSLSZkJaHeF-k22vLcujTUwSr_9ASv7Uwm1H_BKhi1y4z7UAeB3ZFu&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1924&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjaUN67aS-DA5_a2tAE2lU18fPWbeY1QeWEv0iQi_9cHhcNQQtIuGIOdoRC1d4r_ASjLlHm_nxMtb_leMeNS7k_rogNcPDD_fOxh7o3pppE4aOhs0pno7vzk7CEJEgT2mQXPGMb5DPSLSZkJaHeF-k22vLcujTUwSr_9ASv7Uwm1H_BKhi1y4z7UAeB3ZFu=w400-h208&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;run distilled model&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;ollama run yasserrmd/DeepSeek-R1-Distill-Qwen-1.5B&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjqL49Uz0ysPdEHrJEjP1e5qj_BRVi-zKCwIBL_ahAKWZ49gorEO6OKqIP7wlAZdbbFgSjo0DINCSpEAADABetWR1vleKUuqMA5OOuHjIWBOJlnm0BPVJz25xgmrUCOdHAJHeVaX5QJNyj48lCvR_66S2dSTWm0m8QprpAhFbI7Rtnx-UOVCF8tCg-Wkq3H&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;580&quot; data-original-width=&quot;1896&quot; height=&quot;98&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjqL49Uz0ysPdEHrJEjP1e5qj_BRVi-zKCwIBL_ahAKWZ49gorEO6OKqIP7wlAZdbbFgSjo0DINCSpEAADABetWR1vleKUuqMA5OOuHjIWBOJlnm0BPVJz25xgmrUCOdHAJHeVaX5QJNyj48lCvR_66S2dSTWm0m8QprpAhFbI7Rtnx-UOVCF8tCg-Wkq3H&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Download and use Distilled DeepSeek Model within open-webui&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhtXJh8T5_77sGJIJqoE99tKVmVCEgmRyShccyAP6q2n5mYFlXAE7ztGuXRoqEvUNaovmmTCI6svooak7co7oX88ljm6C-OUBR6Kfv4o1wVLpYvBrBLZr67huRfopXpCnVDfYFlStSl6u-IpG_F0vNdvPf68r7f7-ViY9vQELEDbs49RnRaZcP-U73BtC3r&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;670&quot; data-original-width=&quot;554&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhtXJh8T5_77sGJIJqoE99tKVmVCEgmRyShccyAP6q2n5mYFlXAE7ztGuXRoqEvUNaovmmTCI6svooak7co7oX88ljm6C-OUBR6Kfv4o1wVLpYvBrBLZr67huRfopXpCnVDfYFlStSl6u-IpG_F0vNdvPf68r7f7-ViY9vQELEDbs49RnRaZcP-U73BtC3r&quot; width=&quot;198&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Dont forget to fetch metadata from ollama before search/download&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Distilled model thinking duration 3 min (original model took 11 mins)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8_T0TZuLrs3cg7nkgZ0IYvikUrf7WF0dckvmIDTS_0-tuHnDGvoZr_TQcVjYpQjjOrtzR_uLiMjh20DWbFhsphWkzO4qwgHsA6FjPrdY7UQwYGuFhxax3Ntk5HVYLfhC0VPBBHZ5t2-k6HP6yvgml2_SgO2p26jwpvgz8_lt7Uc1VrogB-ubnGSz_JuRE&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;863&quot; data-original-width=&quot;1912&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj8_T0TZuLrs3cg7nkgZ0IYvikUrf7WF0dckvmIDTS_0-tuHnDGvoZr_TQcVjYpQjjOrtzR_uLiMjh20DWbFhsphWkzO4qwgHsA6FjPrdY7UQwYGuFhxax3Ntk5HVYLfhC0VPBBHZ5t2-k6HP6yvgml2_SgO2p26jwpvgz8_lt7Uc1VrogB-ubnGSz_JuRE&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2025/01/ollama-open-webui-deepseek-cpu-local-run.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgH1tIuN_cT9xR4tIcwf929krNBeBMikitpPmxG23DD_P3fsZqRS4GBOhu0hp1f1R-YsZ9EWEgjf4YXUHMTgXT-0vxvfvFujAsDNwEBilwCUjUqQfXNQUpceMJwPJRjTGhkIYvzdePHRSlr0Sp5IFajgIKvnA3iVu98hhqL9Oofu8B8e-2jhkq99pXWfmzL=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-1204390077409379843</guid><pubDate>Mon, 18 Mar 2024 11:18:00 +0000</pubDate><atom:updated>2024-03-18T04:19:36.942-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Microservice async communication rabbitmq</category><category domain="http://www.blogger.com/atom/ns#">rabbitmq</category><category domain="http://www.blogger.com/atom/ns#">rabbitmq replyto</category><category domain="http://www.blogger.com/atom/ns#">Spring RabbitMQ example</category><title>MicroService ASYNC Communication via Message Brokers [Spring, RabbitMQ, Microservice]</title><description>UserService is Communicationg with Balance Service using rabbitMQ.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Async communication microservices&amp;nbsp;&lt;br /&gt;&lt;br /&gt;RabbitMQ DynamicQueue Names + replyTO semantic&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;REPO : &lt;a href=&quot;https://github.com/sunels/RabbitSyncSpringDemo&quot;&gt;https://github.com/sunels/RabbitSyncSpringDemo&lt;/a&gt;&lt;br /&gt;

&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;USER SERVICE&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@RabbitListener&lt;/span&gt;(queues = &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;#{dynamicQueueNameResolver.resolveResponseQueueName()}&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;handleResponse&lt;/span&gt;(&lt;span style=&quot;color: #bbb529;&quot;&gt;@Payload &lt;/span&gt;UserBalanceResponse response&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;org.springframework.amqp.core.Message message) {&lt;br /&gt;    System.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;out&lt;/span&gt;.println(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;UserController Got a rabbit message = &quot; &lt;/span&gt;+ response)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;String correlationId = message.getMessageProperties().getCorrelationId()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;correlationIdResponseMap&lt;/span&gt;.put(correlationId&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;response)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;CountDownLatch latch = &lt;span style=&quot;color: #9876aa;&quot;&gt;correlationIdLatchMap&lt;/span&gt;.get(correlationId)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    if &lt;/span&gt;(latch != &lt;span style=&quot;color: #cc7832;&quot;&gt;null&lt;/span&gt;) {&lt;br /&gt;        latch.countDown()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@PostMapping&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;/get-user-balance&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public &lt;/span&gt;ResponseEntity&amp;lt;String&amp;gt; &lt;span style=&quot;color: #ffc66d;&quot;&gt;getUserBalance&lt;/span&gt;(&lt;span style=&quot;color: #bbb529;&quot;&gt;@RequestBody &lt;/span&gt;UserRequest userRequest) &lt;span style=&quot;color: #cc7832;&quot;&gt;throws &lt;/span&gt;InterruptedException {&lt;br /&gt;    &lt;span style=&quot;color: grey;&quot;&gt;// Generate a correlation ID for the request&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;String correlationId = UUID.&lt;span style=&quot;font-style: italic;&quot;&gt;randomUUID&lt;/span&gt;().toString()&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Setup latch to wait for the response&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;CountDownLatch latch = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;CountDownLatch(&lt;span style=&quot;color: #6897bb;&quot;&gt;1&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;correlationIdLatchMap&lt;/span&gt;.put(correlationId&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;latch)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Send request to the BalanceService with the correlation ID&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;rabbitTemplate&lt;/span&gt;.convertAndSend(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;user_balance_request_queue&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;userRequest&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;message -&amp;gt; {&lt;br /&gt;        message.getMessageProperties().setCorrelationId(&lt;span style=&quot;color: #b389c5;&quot;&gt;correlationId&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Set replyTo to a dynamic queue based on correlation ID&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;        &lt;/span&gt;message.getMessageProperties().setReplyTo(&lt;span style=&quot;color: #9876aa;&quot;&gt;dynamicQueueNameResolver&lt;/span&gt;.resolveResponseQueueName())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return &lt;/span&gt;message&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;})&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;System.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;out&lt;/span&gt;.println(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;UserController has SENT a rabbit message = &quot; &lt;/span&gt;+ userRequest)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Wait for response with a timeout&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;latch.await(&lt;span style=&quot;color: #6897bb;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;TimeUnit.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;SECONDS&lt;/span&gt;)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;correlationIdLatchMap&lt;/span&gt;.remove(correlationId)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;UserBalanceResponse userBalance = &lt;span style=&quot;color: #9876aa;&quot;&gt;correlationIdResponseMap&lt;/span&gt;.remove(correlationId)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    if &lt;/span&gt;(userBalance != &lt;span style=&quot;color: #cc7832;&quot;&gt;null&lt;/span&gt;) {&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;ResponseEntity.&lt;span style=&quot;font-style: italic;&quot;&gt;ok&lt;/span&gt;(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;User balance for user ID &quot; &lt;/span&gt;+ userRequest.getUserId() + &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot; is: &quot; &lt;/span&gt;+ userBalance)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;} &lt;span style=&quot;color: #cc7832;&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;ResponseEntity.&lt;span style=&quot;font-style: italic;&quot;&gt;status&lt;/span&gt;(HttpStatus.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;INTERNAL_SERVER_ERROR&lt;/span&gt;).body(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Failed to get user balance for user ID: &quot; &lt;/span&gt;+ userRequest.getUserId())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;}

&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;BALANCE SERVICE&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;@RabbitListener&lt;/span&gt;(queues = &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;user_balance_request_queue&quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public void &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;processBalanceRequest&lt;/span&gt;(UserRequest userRequest&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Message requestMessage) {&lt;br /&gt;    System.&lt;span style=&quot;color: #9876aa; font-style: italic;&quot;&gt;out&lt;/span&gt;.println(&lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;GOT userRequest = &quot; &lt;/span&gt;+ userRequest)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Simulate processing the balance request&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    // In a real scenario, this could involve querying a database or external service&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;String userBalance = &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;Balance for user &quot; &lt;/span&gt;+ userRequest.getUserId() + &lt;span style=&quot;color: #6a8759;&quot;&gt;&quot;: $123&quot;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Example balance&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    // Construct the response object&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;UserBalanceResponse response = &lt;span style=&quot;color: #cc7832;&quot;&gt;new &lt;/span&gt;UserBalanceResponse(userRequest.getUserId()&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;userBalance)&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;// Send the response back to the UserController using the replyTo queue specified in the request message&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #9876aa;&quot;&gt;rabbitTemplate&lt;/span&gt;.convertAndSend(requestMessage.getMessageProperties().getReplyTo()&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;response&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;message -&amp;gt; {&lt;br /&gt;        message.getMessageProperties().&lt;br /&gt;                setCorrelationId(&lt;br /&gt;                        &lt;span style=&quot;color: #b389c5;&quot;&gt;requestMessage&lt;/span&gt;.getMessageProperties().getCorrelationId()&lt;br /&gt;                )&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;        return &lt;/span&gt;message&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;})&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;</description><link>http://javabender.blogspot.com/2024/03/microservice-async-communication-via.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-9067117887168743433</guid><pubDate>Fri, 02 Feb 2024 13:03:00 +0000</pubDate><atom:updated>2024-02-02T05:03:29.495-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ai</category><category domain="http://www.blogger.com/atom/ns#">eye detect</category><category domain="http://www.blogger.com/atom/ns#">rust</category><category domain="http://www.blogger.com/atom/ns#">tensorflow</category><category domain="http://www.blogger.com/atom/ns#">webassembly</category><title>Got tired with Rust Borrow Checker ! Try WebAssembly instead :)</title><description>
I needed to give a break to the figh with &quot;Rust borrow checker&quot; :) 

Just had some fun with Rust &amp; Tensorflow &amp; Webassembly

- How ? 

- Ask to your favorite AI !



&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;400&#39; height=&#39;322&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dyNLY8jeFMntGEvVZRKKZLcgVrdsBzceJtfXLBsqwxuyvfYTLSrmOwsj98DTuN_TJ5X3r4UvutpwqihB8YGYQ&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://javabender.blogspot.com/2024/02/got-tired-with-rust-borrow-checker-try.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-1054862224248285373</guid><pubDate>Sat, 23 Apr 2022 19:21:00 +0000</pubDate><atom:updated>2022-04-23T12:21:50.576-07:00</atom:updated><title>Caching with Spring</title><description>&lt;p&gt;&amp;nbsp;&lt;b&gt;@Cachable&lt;/b&gt;: Runs before actual method invocation&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;@CachePut&lt;/b&gt;: Runs after the actual method invocation&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Unless&lt;/b&gt;: works for return value&lt;/p&gt;&lt;p&gt;&lt;b&gt;Condition&lt;/b&gt;: works for method parameter&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Cacheable(value = &quot;saveCache&quot;, key = &quot;{#a, #b, #c}&quot;, unless=&quot;#result.result.size() &amp;gt; 0&quot;)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@CachePut(value=&quot;defaultCache&quot;, key=&quot;#pk&quot;,unless=&quot;#result==null&quot;)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;@Cacheable(value=&quot;actors&quot;, key=&quot;#key&quot;, condition=&quot;#key == &#39;sean&#39;&quot;)&lt;/p&gt;</description><link>http://javabender.blogspot.com/2022/04/caching-with-spring.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-751334965460344279</guid><pubDate>Tue, 02 Mar 2021 19:02:00 +0000</pubDate><atom:updated>2021-03-02T11:02:38.164-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mockinh rest request</category><category domain="http://www.blogger.com/atom/ns#">rest post method mock</category><category domain="http://www.blogger.com/atom/ns#">rest post mocking</category><title>Rest Post Mock Intellij Mockoon</title><description>&lt;p&gt;&amp;nbsp;Easy test your endpoints within the Ide : there is a world icon on the rest controller click on it&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvvXD0DYf2F8t8tvTu_xlqt_fPU6SEPTKg6J8sJPyJD-T5bD3BCcRmeUnmMP8_f8B1ruw4FOtijsHavvcu5pAiAiRkQ_Fk_fpvwTlh9qygOX9It26aajQ-WrrMS_IV4dQ5XVpKUUFa5chH/s1032/WhatsApp+Image+2021-03-02+at+21.36.21.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;484&quot; data-original-width=&quot;1032&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvvXD0DYf2F8t8tvTu_xlqt_fPU6SEPTKg6J8sJPyJD-T5bD3BCcRmeUnmMP8_f8B1ruw4FOtijsHavvcu5pAiAiRkQ_Fk_fpvwTlh9qygOX9It26aajQ-WrrMS_IV4dQ5XVpKUUFa5chH/w400-h188/WhatsApp+Image+2021-03-02+at+21.36.21.jpeg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Here you can add your sample request and run easily&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMRDy9jMum35fzinvo48_6MPHouNyT4q3EMxvpKCkZHGmagi3u3N3hr0aa1LWO9xjukwvSFQdQQ3J6a0EOzCBniPPnAYMaAj_tJPySiTAjUcSjuwVSvMqCHGDcx3oh1w8L30BaaZGgBJLG/s851/WhatsApp+Image+2021-03-02+at+21.37.34.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;536&quot; data-original-width=&quot;851&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMRDy9jMum35fzinvo48_6MPHouNyT4q3EMxvpKCkZHGmagi3u3N3hr0aa1LWO9xjukwvSFQdQQ3J6a0EOzCBniPPnAYMaAj_tJPySiTAjUcSjuwVSvMqCHGDcx3oh1w8L30BaaZGgBJLG/w400-h253/WhatsApp+Image+2021-03-02+at+21.37.34.jpeg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;If you need to mock some requests &lt;a href=&quot;https://mockoon.com/&quot; target=&quot;_blank&quot;&gt;Mockoon&lt;/a&gt; is a very handy tool for it&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcnju3WVzx9q8ps3rTYCzTOkfyILyQSdCTy7VB8Iy97Iyc2XfR0RP-lVvkNe5xwyyqHZ9PRJf_r_eCRIgedJaTPdOjWG8eW3KVtgkjUbE1E7w_LerhCP4Yj7kTzA0s5geexDnHzc4aT5E/s1550/WhatsApp+Image+2021-03-02+at+21.35.51.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;639&quot; data-original-width=&quot;1550&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKcnju3WVzx9q8ps3rTYCzTOkfyILyQSdCTy7VB8Iy97Iyc2XfR0RP-lVvkNe5xwyyqHZ9PRJf_r_eCRIgedJaTPdOjWG8eW3KVtgkjUbE1E7w_LerhCP4Yj7kTzA0s5geexDnHzc4aT5E/w400-h165/WhatsApp+Image+2021-03-02+at+21.35.51.jpeg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2021/03/rest-post-mock-intellij-mockoon.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvvXD0DYf2F8t8tvTu_xlqt_fPU6SEPTKg6J8sJPyJD-T5bD3BCcRmeUnmMP8_f8B1ruw4FOtijsHavvcu5pAiAiRkQ_Fk_fpvwTlh9qygOX9It26aajQ-WrrMS_IV4dQ5XVpKUUFa5chH/s72-w400-h188-c/WhatsApp+Image+2021-03-02+at+21.36.21.jpeg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-1428228737763548589</guid><pubDate>Tue, 02 Feb 2021 20:10:00 +0000</pubDate><atom:updated>2022-08-02T03:40:45.040-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">amazon</category><category domain="http://www.blogger.com/atom/ns#">facebook</category><category domain="http://www.blogger.com/atom/ns#">find triplet in array</category><category domain="http://www.blogger.com/atom/ns#">google</category><category domain="http://www.blogger.com/atom/ns#">interview questions</category><category domain="http://www.blogger.com/atom/ns#">java puzzle</category><category domain="http://www.blogger.com/atom/ns#">tesla</category><title>Does given array contains a triplet (a^2 + b^2 = c^2) ?</title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://i.ytimg.com/vi/0nYhFj_lDkM/maxresdefault.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;450&quot; data-original-width=&quot;800&quot; src=&quot;https://i.ytimg.com/vi/0nYhFj_lDkM/maxresdefault.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJq9xSXrW1u4w8Uas9FgLNdjbWjatv8jgxdYt7B9iajVE966wzW_8nM7irX4EAh-BERYrIuHJeY8DmDgSB75hKbc2HzTJUj8m1iehelrr6TF1St7bDWdNh0lXZM5QgnXc6OyZ7k43t6WSKM5hLBeXwysV2q0OUS8N3bJh53rkiogEkLxio63b6M_EYjQ/s644/Screenshot%20from%202022-08-02%2013-37-45.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;644&quot; data-original-width=&quot;267&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJq9xSXrW1u4w8Uas9FgLNdjbWjatv8jgxdYt7B9iajVE966wzW_8nM7irX4EAh-BERYrIuHJeY8DmDgSB75hKbc2HzTJUj8m1iehelrr6TF1St7bDWdNh0lXZM5QgnXc6OyZ7k43t6WSKM5hLBeXwysV2q0OUS8N3bJh53rkiogEkLxio63b6M_EYjQ/s320/Screenshot%20from%202022-08-02%2013-37-45.png&quot; width=&quot;133&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/sunels/4709b0930e6aad404ecbc204d6bd3c8a.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2021/02/does-given-array-contains-triplet-a2-b2.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJq9xSXrW1u4w8Uas9FgLNdjbWjatv8jgxdYt7B9iajVE966wzW_8nM7irX4EAh-BERYrIuHJeY8DmDgSB75hKbc2HzTJUj8m1iehelrr6TF1St7bDWdNh0lXZM5QgnXc6OyZ7k43t6WSKM5hLBeXwysV2q0OUS8N3bJh53rkiogEkLxio63b6M_EYjQ/s72-c/Screenshot%20from%202022-08-02%2013-37-45.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-8058188583482116972</guid><pubDate>Thu, 28 Jan 2021 16:29:00 +0000</pubDate><atom:updated>2021-01-28T08:29:09.525-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">kafka</category><category domain="http://www.blogger.com/atom/ns#">kafka springboot</category><category domain="http://www.blogger.com/atom/ns#">spring boot kafka template</category><category domain="http://www.blogger.com/atom/ns#">springboot</category><title>SpringBoot StringKafkaTemplate Conductor Kafka Topic Producer Consumer</title><description>&lt;p&gt;Wanna produce and consume from K&lt;b&gt;afka&lt;/b&gt; topics with &lt;b&gt;SpringBoot&lt;/b&gt; ?&lt;/p&gt;&lt;p&gt;Wanna watch your Kafka Topics via &lt;a href=&quot;https://www.conduktor.io/&quot;&gt;&lt;b&gt;Conductor&lt;/b&gt;&lt;/a&gt; ?&lt;/p&gt;&lt;p&gt;Wanna send some rest request to produce data to send your Kafka topic ?&lt;/p&gt;&lt;p&gt;Don&#39;t wanna write code ?&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/sunels/springboot-kafka-template&quot; target=&quot;_blank&quot;&gt;Get The Code&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Just checkout and sit back :)&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwY9t_WNuPVNWLY52_9O773ds2OCn0PqcmPW9UCOY7nrCAgi6n3tRjPmiftlWxR7cmRhPHqJwbuOLYxmT6BL8ahZ09BzjtXDFrbTrIqGWQDErzQNVVBoE4dL3IoEhe1vs0Y_6G2axAWQdw/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;163&quot; data-original-width=&quot;310&quot; height=&quot;105&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwY9t_WNuPVNWLY52_9O773ds2OCn0PqcmPW9UCOY7nrCAgi6n3tRjPmiftlWxR7cmRhPHqJwbuOLYxmT6BL8ahZ09BzjtXDFrbTrIqGWQDErzQNVVBoE4dL3IoEhe1vs0Y_6G2axAWQdw/&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8U6u_JzfaGKMWDq4eojsHTSECDSKzrkN-NaAwNeFEjKs4LDKRK5pzuc_eFovSzlxwNmHakb4HHTYJX3nNRiUMJePAXTojwZM63Sgor9NON2lDNXBeidRJvvyQxbpXlR7xyqG5CUcXK64L/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;350&quot; data-original-width=&quot;700&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8U6u_JzfaGKMWDq4eojsHTSECDSKzrkN-NaAwNeFEjKs4LDKRK5pzuc_eFovSzlxwNmHakb4HHTYJX3nNRiUMJePAXTojwZM63Sgor9NON2lDNXBeidRJvvyQxbpXlR7xyqG5CUcXK64L/w200-h100/image.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8U6u_JzfaGKMWDq4eojsHTSECDSKzrkN-NaAwNeFEjKs4LDKRK5pzuc_eFovSzlxwNmHakb4HHTYJX3nNRiUMJePAXTojwZM63Sgor9NON2lDNXBeidRJvvyQxbpXlR7xyqG5CUcXK64L/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgztQTHZxkhQNdu2VCssGXOhwhyK9jRr5KOsuZy6ViNx2TpsWKu9RJMtClB7pTCTFXRItx3Tn0HdcUURn6WC_5D2g8Tdh9lTkKOvE1iKd_Z9W6v9Ws2D8i3nU7w4I4o__Ai2ot2nCcMi5GY/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;252&quot; data-original-width=&quot;556&quot; height=&quot;91&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgztQTHZxkhQNdu2VCssGXOhwhyK9jRr5KOsuZy6ViNx2TpsWKu9RJMtClB7pTCTFXRItx3Tn0HdcUURn6WC_5D2g8Tdh9lTkKOvE1iKd_Z9W6v9Ws2D8i3nU7w4I4o__Ai2ot2nCcMi5GY/w200-h91/image.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMiFVE4PKXJYpclqb9Fc3q3REykx49OMVONKPycXmzSjDv88Ft-4UgsCiYg3lYAqGn5rghOrzGFdgNT-_tNuucWD_adgdFbVspZtwaoExigcyAWAtDta0W0-02QxGLvxgHK8hbxgLBr35f/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;200&quot; data-original-width=&quot;200&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMiFVE4PKXJYpclqb9Fc3q3REykx49OMVONKPycXmzSjDv88Ft-4UgsCiYg3lYAqGn5rghOrzGFdgNT-_tNuucWD_adgdFbVspZtwaoExigcyAWAtDta0W0-02QxGLvxgHK8hbxgLBr35f/w200-h200/image.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMZomqo7LOJfiOe3qNQOuIEmDejPSZABPVgj-DvJe1YVAQm_jnCbA8llbc2qqipp4hihoKyrQyIBOU8sLXBptkYAUWWd3nI2cEe5aqdFrwEgyaWoWFk3qz5mt-o5jV1B1-snDXMcxULlqc/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;688&quot; data-original-width=&quot;890&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMZomqo7LOJfiOe3qNQOuIEmDejPSZABPVgj-DvJe1YVAQm_jnCbA8llbc2qqipp4hihoKyrQyIBOU8sLXBptkYAUWWd3nI2cEe5aqdFrwEgyaWoWFk3qz5mt-o5jV1B1-snDXMcxULlqc/w400-h310/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description><link>http://javabender.blogspot.com/2021/01/springboot-stringkafkatemplate.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwY9t_WNuPVNWLY52_9O773ds2OCn0PqcmPW9UCOY7nrCAgi6n3tRjPmiftlWxR7cmRhPHqJwbuOLYxmT6BL8ahZ09BzjtXDFrbTrIqGWQDErzQNVVBoE4dL3IoEhe1vs0Y_6G2axAWQdw/s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-4055955652995175365</guid><pubDate>Thu, 28 Jan 2021 16:02:00 +0000</pubDate><atom:updated>2021-01-28T08:02:09.888-08:00</atom:updated><title>Your custom java annotation and check for it on the classes with reflection</title><description>Just another copy paste run bye article !

&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;script src=&quot;https://gist.github.com/sunels/2afb2afa859a1f31309f2e822160f36c.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2021/01/your-custom-java-annotation-and-check.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-75796853966066955</guid><pubDate>Sun, 29 Nov 2020 16:13:00 +0000</pubDate><atom:updated>2020-11-29T13:36:28.309-08:00</atom:updated><title>Java Maze Solver </title><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://www.geeksforgeeks.org/wp-content/uploads/ratinmaze_filled_path1.png&quot; style=&quot;display: block; padding: 1em 0; text-align: center; &quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; width=&quot;400&quot; data-original-height=&quot;315&quot; data-original-width=&quot;353&quot; src=&quot;https://www.geeksforgeeks.org/wp-content/uploads/ratinmaze_filled_path1.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/sunels/6393812fbc3a3ebbae641467cc24f157.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2020/11/java-maze-solver.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-413444293456125826</guid><pubDate>Wed, 18 Nov 2020 20:46:00 +0000</pubDate><atom:updated>2021-02-02T12:25:46.279-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">binary tree traversal</category><category domain="http://www.blogger.com/atom/ns#">java avl tree rotations</category><category domain="http://www.blogger.com/atom/ns#">java avl tree traversal</category><category domain="http://www.blogger.com/atom/ns#">java binary tree traversal iterative</category><category domain="http://www.blogger.com/atom/ns#">java binary tree traversal recursive</category><title>AVL TREE LEFT RIGHT DOUBLE ROTATIONS, DEPTH FIRST SEARCHs, BREADTH FIRST SEARCH, RECURSIVE and ITERATIVE TRAVERSALS,  HEIGHT, DEPTH, SIZE, LEAF, NODE FINDERS, ROOT to LEAF NODE PATHS</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.cdn.geeksforgeeks.org/wp-content/uploads/Preorder-from-Inorder-and-Postorder-traversals.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;577&quot; data-original-width=&quot;800&quot; height=&quot;289&quot; src=&quot;https://www.cdn.geeksforgeeks.org/wp-content/uploads/Preorder-from-Inorder-and-Postorder-traversals.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://media.geeksforgeeks.org/wp-content/uploads/AVL_INSERTION2-1.jpg&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;800&quot; src=&quot;https://media.geeksforgeeks.org/wp-content/uploads/AVL_INSERTION2-1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;SINGLE ROTATION&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://algo.erdogan.dev/assets/images/rotation.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;241&quot; data-original-width=&quot;612&quot; src=&quot;https://algo.erdogan.dev/assets/images/rotation.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;DOUBLE ROTATION&lt;/b&gt;&lt;/div&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfcbt_JtJjMkD2zEusA7R2MUdaROIKfunOVUIVcx818tFhF2aUtaYgX5AGFFx4ih7loNVwdfI4AWJBaclsa-SotwbLHVL1EenKE8hzytMLd00XPF3v8zmKnEtNAgwm7LHlBYkguSijb3Z3/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;734&quot; data-original-width=&quot;1114&quot; height=&quot;264&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfcbt_JtJjMkD2zEusA7R2MUdaROIKfunOVUIVcx818tFhF2aUtaYgX5AGFFx4ih7loNVwdfI4AWJBaclsa-SotwbLHVL1EenKE8hzytMLd00XPF3v8zmKnEtNAgwm7LHlBYkguSijb3Z3/w400-h264/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Suppose the node to be rebalanced is X.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;There are 4 cases that we might have to fix (two are the mirror images of the other two)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;An insertion in the left subtree of the left child of X,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;An insertion in the right subtree of the left child of X,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;An insertion in the left subtree of the right child of X, or&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;An insertion in the right subtree of the right child of X.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;Balance is restored by tree rotations&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Case 1 and case 4 are symmetric and requires the same operation for balance.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Cases 1,4 are handled by &lt;b&gt;single rotation&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Case 2 and case 3 are symmetric and requires the same operation for balance.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Cases 2,3 are handled by &lt;b&gt;double rotation&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;

&lt;script src=&quot;https://gist.github.com/sunels/84de92a999c89d2f77ba4aa10de9b87a.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2020/11/avl-tree-resursive-and-iterative.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfcbt_JtJjMkD2zEusA7R2MUdaROIKfunOVUIVcx818tFhF2aUtaYgX5AGFFx4ih7loNVwdfI4AWJBaclsa-SotwbLHVL1EenKE8hzytMLd00XPF3v8zmKnEtNAgwm7LHlBYkguSijb3Z3/s72-w400-h264-c/image.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-6702205430787822211</guid><pubDate>Sun, 09 Feb 2020 21:58:00 +0000</pubDate><atom:updated>2020-02-09T14:14:24.113-08:00</atom:updated><title>REDIS STREAM - CLI</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;DOCKER&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
docker run -it --rm --net host --name redis1&amp;nbsp; redis&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
docker exec -it redis1 redis-cli&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;XREADGROUP&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XGROUP CREATE mystream mygroup $ MKSTREAM&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XADD mystream * message apple&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XADD mystream * message orange&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XADD mystream * message strawberry&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XGROUP CREATE mystream grp1 0&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XREADGROUP GROUP grp1 Bob COUNT 2 STREAMS mystream &amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XGROUP CREATE mystream grp2 0&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XREADGROUP GROUP grp2 Bobiy COUNT 2 STREAMS mystream &amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;The special ID&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; color: #333333; font-family: Menlo, Monaco, monospace; font-size: 16px; text-align: start;&quot;&gt;&amp;gt;&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;. This special ID is only valid in the context of consumer groups, and it means:&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, sans-serif; font-size: 16px; text-align: start;&quot;&gt;messages never delivered to other consumers so far&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXLnBGIbLnVMnVu3Ny00MI2TWBQiS1gmhOLLP7Pc6g_AmhXAaQb8ypqLgv6RGElgUZt-ILGc4cJT1AbeM6gFrz-_WamaAEMJd4DykFAgo4dEsOdIfRrKut0QYQzUD9gSo5TybQNKbsMIK8/s1600/Screenshot+from+2020-02-10+00-55-13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1103&quot; data-original-width=&quot;1306&quot; height=&quot;336&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXLnBGIbLnVMnVu3Ny00MI2TWBQiS1gmhOLLP7Pc6g_AmhXAaQb8ypqLgv6RGElgUZt-ILGc4cJT1AbeM6gFrz-_WamaAEMJd4DykFAgo4dEsOdIfRrKut0QYQzUD9gSo5TybQNKbsMIK8/s400/Screenshot+from+2020-02-10+00-55-13.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;XREAD&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XADD mystream * message newcoronavirus&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XADD mystream * message nextvirus&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
XREAD BLOCK 0 STREAMS mystream $&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;The special ID&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; color: #333333; font-family: Menlo, Monaco, monospace; font-size: 16px; text-align: start;&quot;&gt;$&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;. This special ID means that&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, sans-serif; font-size: 16px; text-align: start;&quot;&gt;XREAD&lt;/strong&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;should use as last ID the maximum ID already stored in the stream&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; color: #333333; font-family: Menlo, Monaco, monospace; font-size: 16px; text-align: start;&quot;&gt;mystream&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;, so that we will receive only&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;background-color: white; color: #333333; font-family: &amp;quot;Open Sans&amp;quot;, Helvetica, sans-serif; font-size: 16px; text-align: start;&quot;&gt;new&lt;/em&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;messages, starting from the time we started listening. &lt;b&gt;This is similar to the&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;code style=&quot;background-color: white; color: #333333; font-family: Menlo, Monaco, monospace; font-size: 16px; text-align: start;&quot;&gt;tail -f&lt;/code&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &amp;quot;open sans&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&amp;nbsp;Unix command in some way.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi18rTl70naWPAgDcgqEOAIYda78Hdc7U01scWs0BkqC8v7hBr5ww9qSwpq1VQbtCI55P-NHjpufDMo5qPEfwNZvUdxefq7Hk4_F-WUnwRCGxa7XA_xWvDYnkbSu3Ov6R00OP8xP_nanv0O/s1600/Screenshot+from+2020-02-10+01-09-19.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;759&quot; data-original-width=&quot;701&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi18rTl70naWPAgDcgqEOAIYda78Hdc7U01scWs0BkqC8v7hBr5ww9qSwpq1VQbtCI55P-NHjpufDMo5qPEfwNZvUdxefq7Hk4_F-WUnwRCGxa7XA_xWvDYnkbSu3Ov6R00OP8xP_nanv0O/s320/Screenshot+from+2020-02-10+01-09-19.png&quot; width=&quot;295&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Use ConsumerGroups for FANOUT&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Use XREAD for P2P&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javabender.blogspot.com/2020/02/redis-stream-cli.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXLnBGIbLnVMnVu3Ny00MI2TWBQiS1gmhOLLP7Pc6g_AmhXAaQb8ypqLgv6RGElgUZt-ILGc4cJT1AbeM6gFrz-_WamaAEMJd4DykFAgo4dEsOdIfRrKut0QYQzUD9gSo5TybQNKbsMIK8/s72-c/Screenshot+from+2020-02-10+00-55-13.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-6672208810400570382</guid><pubDate>Fri, 07 Dec 2018 13:47:00 +0000</pubDate><atom:updated>2018-12-07T05:47:23.496-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Redis as Message Queue example</category><category domain="http://www.blogger.com/atom/ns#">Redis Blocking List example</category><category domain="http://www.blogger.com/atom/ns#">Redis Blocking Queue example</category><category domain="http://www.blogger.com/atom/ns#">Sample Simple Stupid Redis Message Queue Producer Consumer Example</category><title>Sample Simple Stupid Redis Message Queue Producer Consumer Example</title><description>Just Copy &amp;amp; Paste &amp;amp; Run...And Then Customize &amp;amp; Enhance...

&lt;script src=&quot;https://gist.github.com/sunels/c51c1da066809de0c2683a6836c20d40.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://gist.github.com/sunels/b53bc488bfddbc884e8d1a2684c35a2f.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2018/12/sample-simple-stupid-redis-message.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total><georss:featurename>Esentepe Mahallesi, G-44. Sk. No:171, 34394 Şişli/İstanbul, Turkey</georss:featurename><georss:point>41.075986705231031 29.01214599609375</georss:point><georss:box>41.064018705231028 28.99197599609375 41.087954705231034 29.03231599609375</georss:box></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-6684244532589853619</guid><pubDate>Sun, 02 Dec 2018 19:53:00 +0000</pubDate><atom:updated>2018-12-03T05:10:40.539-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CompletableFuture example</category><category domain="http://www.blogger.com/atom/ns#">completableFuture timeout example</category><category domain="http://www.blogger.com/atom/ns#">Java 8 CompletableFuture parallel tasks and timeout example</category><title>Java 8 CompletableFuture parallel tasks and Timeout example</title><description>&lt;script src=&quot;https://gist.github.com/sunels/a2acf0a9b6d333b4ff83c4bf6bd96c3d.js&quot;&gt;&lt;/script&gt;


&lt;br /&gt;
Suppose that you have a list of item (id list referring to a table, url list to fetch page data from internet, customer keys for location query from a map service&amp;nbsp; etc...). And you will start some parallel tasks&amp;nbsp; for those ids.&amp;nbsp;But you don&#39;t want to wait&amp;nbsp;no longer than your threshold. Also you want to collect the data from the returned &quot;CompletableFutures&quot; which are not timed out.&lt;br /&gt;
&lt;br /&gt;
How can you achieve this while using a &lt;b&gt;CompletableFuture&lt;/b&gt; ?&lt;br /&gt;
&lt;br /&gt;
PS: There is no &lt;b&gt;.orTimeout ()&lt;/b&gt;&amp;nbsp; option in Java 8. It is included in Java10.&amp;nbsp; And other option is using &lt;b&gt;.get(N, TimeUnit.SECONDS)&lt;/b&gt; but it will not gave&amp;nbsp;you what you want.&lt;br /&gt;
&lt;br /&gt;
&lt;hr color=&quot;black&quot; /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;Outputs :&amp;nbsp;&lt;/b&gt;&lt;/h2&gt;
&lt;div&gt;
pool-1-thread-1 - - &amp;gt; will sleep for secs :0&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Duration here = 233&lt;/div&gt;
&lt;div&gt;
pool-1-thread-2 - - &amp;gt; will sleep for secs :1000&lt;/div&gt;
&lt;div&gt;
pool-1-thread-3 - - &amp;gt; will sleep for secs :2000&lt;/div&gt;
&lt;div&gt;
pool-1-thread-4 - - &amp;gt; will sleep for secs :3000&lt;/div&gt;
&lt;div&gt;
pool-1-thread-5 - - &amp;gt; will sleep for secs :4000&lt;/div&gt;
&lt;div&gt;
pool-1-thread-6 - - &amp;gt; will sleep for secs :5000&lt;/div&gt;
&lt;div&gt;
Collected Results = [0, 1000, 2000, 3000, 4000, 5000, null, null, null, null]&lt;/div&gt;
&lt;div&gt;
Total Duration = 5235&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
How did i&amp;nbsp;come here :) See below code pls&lt;br /&gt;
In this example your main thread will be waiting 2 seconds for each uncompleted future.&lt;br /&gt;
I guess N*2 seconds waiting is not the thing that you expect to see here&lt;br /&gt;
And yes..&amp;nbsp;There is 20 seconds duration job and it is cancelled You have a minimal gain at that point but !&amp;nbsp;But if you would have 20 tasks ...The picture would be very nagative&amp;nbsp;again .&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/sunels/f8c8e1f72a93dd679577559c558ef551.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;Outputs :&amp;nbsp;&lt;/b&gt;&lt;/h2&gt;
ForkJoinPool.commonPool-worker-1 - - &amp;gt; will sleep : 0&lt;br /&gt;
ForkJoinPool.commonPool-worker-5 - - &amp;gt; will sleep : 4&lt;br /&gt;
ForkJoinPool.commonPool-worker-3 - - &amp;gt; will sleep : 2&lt;br /&gt;
ForkJoinPool.commonPool-worker-4 - - &amp;gt; will sleep : 3&lt;br /&gt;
ForkJoinPool.commonPool-worker-7 - - &amp;gt; will sleep : 6&lt;br /&gt;
ForkJoinPool.commonPool-worker-1 - - &amp;gt; will sleep : 5&lt;br /&gt;
ForkJoinPool.commonPool-worker-2 - - &amp;gt; will sleep : 1&lt;br /&gt;
ForkJoinPool.commonPool-worker-6 - - &amp;gt; will sleep : 7&lt;br /&gt;
Tasks are created here, duration = 79&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
ForkJoinPool.commonPool-worker-2 - - &amp;gt; will sleep : 8&lt;br /&gt;
Getting results&lt;br /&gt;
ForkJoinPool.commonPool-worker-3 - - &amp;gt; will sleep : 9&lt;br /&gt;
Getting results&lt;br /&gt;
ForkJoinPool.commonPool-worker-4 - - &amp;gt; will sleep : 20&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Getting results&lt;br /&gt;
Total duration = 13080&lt;br /&gt;
CollectedResults = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, java.util.concurrent.TimeoutException]&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javabender.blogspot.com/2018/12/java-8-completablefuture-parallel-tasks.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-9126871336970888837</guid><pubDate>Wed, 25 Jul 2018 15:39:00 +0000</pubDate><atom:updated>2018-07-25T08:39:13.648-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">jmx command line connection</category><category domain="http://www.blogger.com/atom/ns#">jmx query</category><category domain="http://www.blogger.com/atom/ns#">mbean query on command line</category><title>weak wifi , remote jmx</title><description>&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Fira Code&#39;; font-size: 8.3pt;&quot;&gt;................HOW TO SEE CONNECTION POOL STATS ON COMMAND LINE VIA JMX ............................

Tool page : https://nofluffjuststuff.com/blog/vladimir_vivien/2012/04/jmx_cli_a_command_line_console_to_jmx

wget https://github.com/downloads/vladimirvivien/jmx-cli/jmxcli-0.1.2-bin.zip
unzip jmxcli-0.1.2-bin.zip
cd jmxcli-0.1.2
java -jar cli.jar
cp /usr/lib/jvm/java-8-oracle/lib/tools.jar lib/
chmod 777 lib/tools.jar 
list filter:&quot;com.mchange.v2.c3p0:type=PooledDataSource*&quot; label:true
desc bean:$0
exec bean:&quot;com.mchange.v2.c3p0:type=PooledDataSource&lt;span style=&quot;color: #cc7832; font-weight: bold;&quot;&gt;[z8kflt9w1cicerh10mnh44|20c29a6f]&lt;/span&gt;&quot; get:&quot;numBusyConnections&quot;
exec bean:&quot;com.mchange.v2.c3p0:type=PooledDataSource&lt;span style=&quot;color: #cc7832; font-weight: bold;&quot;&gt;[z8kflt9w1jggz5o1xv9pi5|2101f18a]&lt;/span&gt;&quot; get:&quot;numBusyConnections&quot;&lt;/pre&gt;
</description><link>http://javabender.blogspot.com/2018/07/weak-wifi-remote-jmx.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-2401599837908040248</guid><pubDate>Tue, 09 May 2017 07:55:00 +0000</pubDate><atom:updated>2017-05-09T00:55:24.216-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java 8 comparator example</category><category domain="http://www.blogger.com/atom/ns#">java 8 lambda comparator</category><category domain="http://www.blogger.com/atom/ns#">java 8 lambda sample comparator</category><title>Evolve ....</title><description>&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;Collections.&lt;span style=&quot;font-style: italic;&quot;&gt;sort&lt;/span&gt;(itemList&lt;span style=&quot;color: #cc7832;&quot;&gt;, new &lt;/span&gt;Comparator&amp;lt;Item&amp;gt;() {
    &lt;span style=&quot;color: #bbb529;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: #bbb529;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;public int &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;compare&lt;/span&gt;(Item o1&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Item o2) {
        &lt;span style=&quot;color: #cc7832;&quot;&gt;return &lt;/span&gt;o1.getItemId().compareTo(o2.getItemId())&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;    &lt;/span&gt;}
})&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;item&gt;&lt;/item&gt;
&lt;br /&gt;&lt;item&gt;&lt;/item&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;Collections.&lt;span style=&quot;font-style: italic;&quot;&gt;sort&lt;/span&gt;(itemList&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;(o1&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;o2) -&amp;gt; o1.getItemId().compareTo(o2.getItemId()))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;item&gt;&lt;/item&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;Collections.&lt;span style=&quot;font-style: italic;&quot;&gt;sort&lt;/span&gt;(itemList&lt;span style=&quot;color: #cc7832;&quot;&gt;, &lt;/span&gt;Comparator.&lt;span style=&quot;font-style: italic;&quot;&gt;comparing&lt;/span&gt;(Item::getItemId))&lt;span style=&quot;color: #cc7832;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #a9b7c6; font-family: &#39;Source Code Pro&#39;; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cc7832;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;item&gt;&lt;/item&gt;
&lt;br /&gt;&lt;item&gt;&lt;/item&gt;</description><link>http://javabender.blogspot.com/2017/05/evolve.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-8159669370301899763</guid><pubDate>Sun, 02 Apr 2017 12:16:00 +0000</pubDate><atom:updated>2017-04-05T08:47:07.553-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java8 streams and lambda expression GroupBy MaxBy MinBy Example</category><title>Java8 streams and lambda expression GroupBy MaxBy MinBy Example</title><description>
&lt;script src=&quot;https://gist.github.com/sunels/fe5fad4d13a140975d8f26c02509ae6b.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2017/04/java8-streams-and-lambda-expression.html</link><author>noreply@blogger.com (Serkan Sunel)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-7027470482817956789</guid><pubDate>Wed, 22 Mar 2017 12:17:00 +0000</pubDate><atom:updated>2017-03-22T06:47:24.351-07:00</atom:updated><title>How Hadoop works</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNc7ocplHXFYHGwpPk-P-VmycMAbtQFBFA1B83My1r5grj959M4aF62RwxQkZKS2qDkIfOh__H_fQHgQ2QPjCZlGknlG3c4Uanwl0GbB-OvyOn1JUYrQ5c6l4QWuMvJ27FxnIHK90Vd9TI/s1600/hadoop.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;154&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNc7ocplHXFYHGwpPk-P-VmycMAbtQFBFA1B83My1r5grj959M4aF62RwxQkZKS2qDkIfOh__H_fQHgQ2QPjCZlGknlG3c4Uanwl0GbB-OvyOn1JUYrQ5c6l4QWuMvJ27FxnIHK90Vd9TI/s320/hadoop.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;Hadoop divides the given input file into small parts to increase parallel processing. It uses its own file system called HDFS. Each spitted file is assigned to the mapper which works on the same physical machine with the given chunk.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;Mappers are processing small file chunks and passing their processing results to context.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;Mappers are processing splitted files (each chunk {piece of the main file} size = HDFS block size) line by line in the map function .&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;Hadoop supports different programming languages so it uses its own serilization/deseriliazation mechanism. That why you see IntWritable, LongWritable,etc types in the examples. You can write your own Writable classess by implementing the Writable interface according to your requirements.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;Hadoop collects all different outputs of the mappers and sort them by KEY and forwards these results to Reducers.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXlOPfq33ZZrLiJIAIxfENReVnBJllOMXKeaW3tSMlkhcriVKqXcHoCeQ81rmGz96twST1jFHI5qBTFjgU0pditYLyILeqbmd9NcVVkHKpqvgVLdUyT89PNqFL12LVOMh7b9EDtrRJQ582/s1600/mr.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXlOPfq33ZZrLiJIAIxfENReVnBJllOMXKeaW3tSMlkhcriVKqXcHoCeQ81rmGz96twST1jFHI5qBTFjgU0pditYLyILeqbmd9NcVVkHKpqvgVLdUyT89PNqFL12LVOMh7b9EDtrRJQ582/s400/mr.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;b&gt;&lt;u&gt;&quot;Book says all values with same key will go to same reducer&quot;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;map (Key inputKey, Value inputValue, Key &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;outputKey&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt;, Value &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;outputValue&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;reduce (Key &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;inputKeyFromMapper&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt;, Value &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;inputValueFromMapper&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt;, Key outputKey, Value output value)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfweEWqZx5rhTCvzY0kLQMZPnvrymkTzDW8GxG-Jfugy2Dh37gvj6YD9puLE-JVfNFYtTJhiKNZ2kcufkH0Sj0bjom4suuUnxpu-t4Y1VEKk0ReYQ2CBFqihBYotb2moX_3MvBtym2z6Z8/s1600/m2r.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfweEWqZx5rhTCvzY0kLQMZPnvrymkTzDW8GxG-Jfugy2Dh37gvj6YD9puLE-JVfNFYtTJhiKNZ2kcufkH0Sj0bjom4suuUnxpu-t4Y1VEKk0ReYQ2CBFqihBYotb2moX_3MvBtym2z6Z8/s400/m2r.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;Hadoop calls reduce function for the each line of given file.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;And finally writes the result of reducers to the HDFS file system.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;See the WordCount example for better understanding :&amp;nbsp;&lt;a href=&quot;http://www.drdobbs.com/database/hadoop-writing-and-running-your-first-pr/240153197&quot; target=&quot;_blank&quot;&gt;hadoop-wordcount-example&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://javabender.blogspot.com/2017/03/how-hadoop-works.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNc7ocplHXFYHGwpPk-P-VmycMAbtQFBFA1B83My1r5grj959M4aF62RwxQkZKS2qDkIfOh__H_fQHgQ2QPjCZlGknlG3c4Uanwl0GbB-OvyOn1JUYrQ5c6l4QWuMvJ27FxnIHK90Vd9TI/s72-c/hadoop.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-5024183511758150436</guid><pubDate>Fri, 10 Mar 2017 10:41:00 +0000</pubDate><atom:updated>2017-03-20T05:58:43.541-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Consumer</category><category domain="http://www.blogger.com/atom/ns#">kafka</category><category domain="http://www.blogger.com/atom/ns#">Kafka Basics</category><category domain="http://www.blogger.com/atom/ns#">kafka terminology</category><category domain="http://www.blogger.com/atom/ns#">Offset</category><category domain="http://www.blogger.com/atom/ns#">Partitions</category><category domain="http://www.blogger.com/atom/ns#">Producer</category><category domain="http://www.blogger.com/atom/ns#">Topic</category><title>Kafka Basics, Producer, Consumer, Partitions, Topic, Offset, Messages</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjwq31PDMhQulex36tOr8xiCqzA64jARmW7O1sgHLYT5lyRL9gK0XJvHCRcjSwA5UFPK8X_yUsNtgivvKiiq3gK1rbd6EBkv3hFk5HBYjOgXu5SRfU_-SPTWErHA8XIj1Tcuso5WMK5Or/s1600/kafka-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;95&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjwq31PDMhQulex36tOr8xiCqzA64jARmW7O1sgHLYT5lyRL9gK0XJvHCRcjSwA5UFPK8X_yUsNtgivvKiiq3gK1rbd6EBkv3hFk5HBYjOgXu5SRfU_-SPTWErHA8XIj1Tcuso5WMK5Or/s320/kafka-logo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Kafka is a distributed system that runs on a &lt;b&gt;cluster&lt;/b&gt; with many computers. &lt;b&gt;Producers&lt;/b&gt; are the programs that feeds kafka &lt;b&gt;brokers&lt;/b&gt;. A broker is a kafka server which stores/keeps/maintains incoming messages in files with &lt;b&gt;offsets&lt;/b&gt;. Each message is stored in a file with an index , actually this index is an offset.&amp;nbsp;&lt;b&gt;Consumers&lt;/b&gt; are the programs which consumes the given data with offsets. Kafka does not deletes consumed messages with its default settings. Messages stays still persistent for 7 days with default configuration of Kafka.&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgci6w3J0TJapzq4t4YoBxvX1ER7IlGFtOWJBrAwJ1LbQ-rq2dxtiROxoLmQoxvetma9hh2S2z9uTWnSr_s2BBvIL3GxqFQgfjS3llywxLh1wOefDKSuAME3iYNptId1ycWiPmM41tW9IsK/s1600/kafka-partition-04.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgci6w3J0TJapzq4t4YoBxvX1ER7IlGFtOWJBrAwJ1LbQ-rq2dxtiROxoLmQoxvetma9hh2S2z9uTWnSr_s2BBvIL3GxqFQgfjS3llywxLh1wOefDKSuAME3iYNptId1ycWiPmM41tW9IsK/s320/kafka-partition-04.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;Topics&lt;/b&gt; are the contracts between the producer and consumers. Producer pushes messages to a specific topic and consumers consumes messages from that specific topic. There can be many different topics and &lt;b&gt;Consumer Groups&lt;/b&gt; which are consuming data from a specific topic according to your business requirements.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUDgpfVz949PjbDY3vbo085fEz59x2bUhT3W4zcS8-Q1WsW-J9BOrFS-v81dKxlTGdsxoe_plc3gKFGPZedjvcU0Yb71yFnKkGIDYbrbEu_bBjBf_jFuUKH6kJWyoevAcg0HsH8ZHTCdwz/s1600/kafka-topic-partition-01.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;121&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUDgpfVz949PjbDY3vbo085fEz59x2bUhT3W4zcS8-Q1WsW-J9BOrFS-v81dKxlTGdsxoe_plc3gKFGPZedjvcU0Yb71yFnKkGIDYbrbEu_bBjBf_jFuUKH6kJWyoevAcg0HsH8ZHTCdwz/s320/kafka-topic-partition-01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If topic is very large (larger than the storage capacity of a computer) then kafka can use other computers as a cluster node to store that large topic. Those nodes are called as &lt;b&gt;partition&lt;/b&gt; in kafka terminology. So each topic may be divided in many partitions (computers) in the Kafka Cluster.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
So how kafka make decisions on storing and dividing large topics in to the partitions ? Answer : It does not !&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7DJ_QxCswvTyZzGr40q5qL0HKYtIjdVU0PYtLuvVX6SwtJuAYy6e7H8FZndMyv8eKwdXhdMDRikaBjMidYLPABtTVGqTL-lQ3lu7pkIqlzp9Jod0Ae7J3vY6T77Psn9ParOfUE7o2EgSx/s1600/kafka-partitions-02.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7DJ_QxCswvTyZzGr40q5qL0HKYtIjdVU0PYtLuvVX6SwtJuAYy6e7H8FZndMyv8eKwdXhdMDRikaBjMidYLPABtTVGqTL-lQ3lu7pkIqlzp9Jod0Ae7J3vY6T77Psn9ParOfUE7o2EgSx/s320/kafka-partitions-02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
So you should make calculations according to your producer/consumer load, message size and storage capacity. This concept is called as &lt;b&gt;partitioning&lt;/b&gt;. Kafka expect you to implement Partitioner interface. Of course there is a default partitioner (&lt;b&gt;SimplePartitioner implements Partitioner&lt;/b&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
As a result; A topic is divided into many partitions and each partition has its own &lt;b&gt;OffSet a&lt;/b&gt;nd each consumer reads from different partitions but many consumers can not read from same partition to prevent duplicated reads.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
If you need to collect specific messages on the specific partition you should use message keys. Same keys are always collected in the same partition. By the way those messages are consumed by the same Consumer.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #15202b; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 18px;&quot;&gt;&lt;b&gt;Topic partitioning is the key for parallelism in Kafka&lt;/b&gt;. On both the producer and the broker side, writes to different partitions can be done fully in parallel. So it is important to have much partitions for a better Performance !&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Please see the below use case which shows semantics of a kafka server for a &amp;nbsp;game application&#39;s events for some specifics business requirements. All the messages related to a specific game player is collected on the particular partition. UserIds are used as message keys here.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1YRZyUuBpgMBJ7iYVtjJzGvZiaRH82ByRJm84Oa-J5wSS-OWIAaA1sbdn-W2vCPjm7Borvy6AmLLwnxIz0CKmZEWty9SeVFSlZOQNF_dUO7yQBKBpaiKmwRkePFC5aRfJk-Glyx7R57D8/s1600/kafka-usecase.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1YRZyUuBpgMBJ7iYVtjJzGvZiaRH82ByRJm84Oa-J5wSS-OWIAaA1sbdn-W2vCPjm7Borvy6AmLLwnxIz0CKmZEWty9SeVFSlZOQNF_dUO7yQBKBpaiKmwRkePFC5aRfJk-Glyx7R57D8/s400/kafka-usecase.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
I tried to briefly summarize it... I am planning to add more post about &amp;nbsp;data &lt;b&gt;pipelining&lt;/b&gt; with:&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp;&lt;b&gt;Hadoop-&amp;gt;Kafka-&amp;gt;Spark | Storm &lt;/b&gt;&amp;nbsp;etc..&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Bye&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Images are taken from: &lt;a href=&quot;https://www.youtube.com/channel/UC8OU1Tc1kxiI37uXBAbTX7A&quot; target=&quot;_blank&quot;&gt;Learning Journal&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;http://blog.cloudera.com/&quot; target=&quot;_blank&quot;&gt;Cloudera&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://javabender.blogspot.com/2017/03/kafka-basics-producer-consumer.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcjwq31PDMhQulex36tOr8xiCqzA64jARmW7O1sgHLYT5lyRL9gK0XJvHCRcjSwA5UFPK8X_yUsNtgivvKiiq3gK1rbd6EBkv3hFk5HBYjOgXu5SRfU_-SPTWErHA8XIj1Tcuso5WMK5Or/s72-c/kafka-logo.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-4480566623153972626</guid><pubDate>Mon, 06 Mar 2017 12:36:00 +0000</pubDate><atom:updated>2017-03-06T04:36:39.281-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Design Patterns</category><category domain="http://www.blogger.com/atom/ns#">Scalable System Design Patterns</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture Patterns</category><category domain="http://www.blogger.com/atom/ns#">System Design Patterns</category><title>Scalable System Design Patterns</title><description>1)&amp;nbsp;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Load Balancer :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8wqXjHh5O_IEfkaDQ9iQpeqJPIG-QYlyPPz1d3kPrBmqZF9DjpTl7UwjQ1OSRgCWzEQ1e1_a_jO5mNhDm6O2eQiJg5Nr799qvguxAGm0pXU1Aq2zOYuH7xUYX21Zm_V3r35gh8aFqGBYe/s1600/lb.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8wqXjHh5O_IEfkaDQ9iQpeqJPIG-QYlyPPz1d3kPrBmqZF9DjpTl7UwjQ1OSRgCWzEQ1e1_a_jO5mNhDm6O2eQiJg5Nr799qvguxAGm0pXU1Aq2zOYuH7xUYX21Zm_V3r35gh8aFqGBYe/s320/lb.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
2)&amp;nbsp;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Scatter and Gather:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqRWwyBXHrYwvYER-ePo9eVGa3kU4hyphenhyphenVu2rgum2i7-dauQVCFYsghDH_dkp-1GtfBstLI_r_FhkZEDmmBNJpjl3vyWWL63suQnTAKoHgzULoi__jmEMG-qOI0zKkViPBMrXUhimKgbTyOl/s1600/sc.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: right;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqRWwyBXHrYwvYER-ePo9eVGa3kU4hyphenhyphenVu2rgum2i7-dauQVCFYsghDH_dkp-1GtfBstLI_r_FhkZEDmmBNJpjl3vyWWL63suQnTAKoHgzULoi__jmEMG-qOI0zKkViPBMrXUhimKgbTyOl/s320/sc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;3)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Result Cache :&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqA0dFAPfcFLHXrFaHChgffrCDo4396c2MJEt5W3TkekFh6Jx6o5btF_HHAZeRkLEME51-C6Vy7uhVV7pz38U-hYpbLsLqaf1n-890zzA6a57oUNSvMm4N1XnJU57wMhTQaeimsspnHSx9/s1600/rc.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;184&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqA0dFAPfcFLHXrFaHChgffrCDo4396c2MJEt5W3TkekFh6Jx6o5btF_HHAZeRkLEME51-C6Vy7uhVV7pz38U-hYpbLsLqaf1n-890zzA6a57oUNSvMm4N1XnJU57wMhTQaeimsspnHSx9/s320/rc.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;4)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Shared Space&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjLJXz6UERFhmL6Z15Rfm0944EThaOQObm9liNEWQGlRLbe7QE-F3rAA9UuiBO85CLaqvhmRdE3zqHw6F4nVdNQ6T9DGSZqThTMQixSrFp0alpAJYs8oQQEWCUeX-_hgThh0gnyoxb24Hn/s1600/ss.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: right;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjLJXz6UERFhmL6Z15Rfm0944EThaOQObm9liNEWQGlRLbe7QE-F3rAA9UuiBO85CLaqvhmRdE3zqHw6F4nVdNQ6T9DGSZqThTMQixSrFp0alpAJYs8oQQEWCUeX-_hgThh0gnyoxb24Hn/s320/ss.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
5)&amp;nbsp;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Pipe and Filter&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSzOy0eVkSjKQ5QJcJfghxFvz444iYJT5E1OTM9n1GSKHF7ZIETMoH3pud-Fe4n6zRXY5QOBAlJVMQMx0ZHSRxNvN1fxtic7Gsv013Vk7pTybjSEcpL25N4TXCk3Tbb7icUWR7g1nHB6bI/s1600/pf.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSzOy0eVkSjKQ5QJcJfghxFvz444iYJT5E1OTM9n1GSKHF7ZIETMoH3pud-Fe4n6zRXY5QOBAlJVMQMx0ZHSRxNvN1fxtic7Gsv013Vk7pTybjSEcpL25N4TXCk3Tbb7icUWR7g1nHB6bI/s320/pf.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;6)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Map Reduce&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4OPXvL61dFtHF6FQqONgE7Qje7X9tQ3H3r3IxqXIvPJURePcVC8w17xAP2wz0OxSFO9OkIckuQnnDHxM6uTG4pun0DPxEssh1C3yrobGdRqZkWvuva4XCLNJtYL3R1aEVXn8O9fvx8m6F/s1600/mr.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: right;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4OPXvL61dFtHF6FQqONgE7Qje7X9tQ3H3r3IxqXIvPJURePcVC8w17xAP2wz0OxSFO9OkIckuQnnDHxM6uTG4pun0DPxEssh1C3yrobGdRqZkWvuva4XCLNJtYL3R1aEVXn8O9fvx8m6F/s320/mr.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
7)&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Bulk Synchronous Parellel&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ko0MWo_ly4u5mK07WvbVa5CA6KBW77RshOMm8G49Z7j4DCgTTNJi04jwc6TsmzkvmhESKagyqj7Ap7K22zu2o4RUvx_3PdMQI_HbjG_Qqhlhl-c15YGidDffYyXK3VnxKoRAM0_1OqVJ/s1600/bs.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;219&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ko0MWo_ly4u5mK07WvbVa5CA6KBW77RshOMm8G49Z7j4DCgTTNJi04jwc6TsmzkvmhESKagyqj7Ap7K22zu2o4RUvx_3PdMQI_HbjG_Qqhlhl-c15YGidDffYyXK3VnxKoRAM0_1OqVJ/s320/bs.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
8)&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;Execution Orchestrator&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLOiKIN9QHxOdIMZ47dCQpa-WfCvJA6LOHPY6wYw2uv2whDcmmfCWhlhhOD2w3R2CBsOGOi_cYy1hJfmivnCWk2EqF0MK-Yb-m9CnaYFziEXxuAZwaUzmTj0rtOF_rhBzqVyg6nYeTkZg/s1600/eo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXLOiKIN9QHxOdIMZ47dCQpa-WfCvJA6LOHPY6wYw2uv2whDcmmfCWhlhhOD2w3R2CBsOGOi_cYy1hJfmivnCWk2EqF0MK-Yb-m9CnaYFziEXxuAZwaUzmTj0rtOF_rhBzqVyg6nYeTkZg/s320/eo.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , &amp;quot;verdana&amp;quot; , sans-serif; font-size: 17.16px; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://javabender.blogspot.com/2017/03/scalable-system-design-patterns.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8wqXjHh5O_IEfkaDQ9iQpeqJPIG-QYlyPPz1d3kPrBmqZF9DjpTl7UwjQ1OSRgCWzEQ1e1_a_jO5mNhDm6O2eQiJg5Nr799qvguxAGm0pXU1Aq2zOYuH7xUYX21Zm_V3r35gh8aFqGBYe/s72-c/lb.gif" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-3973742662137725940</guid><pubDate>Fri, 03 Mar 2017 09:54:00 +0000</pubDate><atom:updated>2017-03-03T03:17:30.921-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">compact redis info</category><category domain="http://www.blogger.com/atom/ns#">redis bullshit</category><category domain="http://www.blogger.com/atom/ns#">redis101</category><title>REDIS 101</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIO49f_54YB_1Ic8dlDNGzgSgcJHDcikoL0MS13k2cagEFSDnUG0FpJdwp7LEm5OfPKzkWsbwhGHA36eKwnqusr7uRpKXs8-xIYSL2OKb9nJvsEUpBPhkSVf4QB2MYNlT6OU5Z0yufhEFy/s1600/redis.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIO49f_54YB_1Ic8dlDNGzgSgcJHDcikoL0MS13k2cagEFSDnUG0FpJdwp7LEm5OfPKzkWsbwhGHA36eKwnqusr7uRpKXs8-xIYSL2OKb9nJvsEUpBPhkSVf4QB2MYNlT6OU5Z0yufhEFy/s200/redis.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;b&gt;Client Libraries&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;background-color: white; border: 0px none; color: #333333; list-style: none; margin: 0px 0px 25px 10px; outline: none; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px none; list-style: disc outside none; margin: 0px 0px 5px 10px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;JRedis:&amp;nbsp;&lt;a href=&quot;https://github.com/alphazero/jredis&quot; style=&quot;border: 0px none; color: #326693; list-style: none; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition: all 0.2s ease-in-out;&quot;&gt;https://github.com/alphazero/jredis&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;background-color: white; border: 0px none; color: #333333; list-style: none; margin: 0px 0px 25px 10px; outline: none; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px none; list-style: disc outside none; margin: 0px 0px 5px 10px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;b&gt;Jedis&lt;/b&gt;:&amp;nbsp;&lt;a href=&quot;https://github.com/xetorthio/jedis&quot; style=&quot;border: 0px none; color: #326693; list-style: none; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition: all 0.2s ease-in-out;&quot;&gt;https://github.com/xetorthio/jedis&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;background-color: white; border: 0px none; color: #333333; list-style: none; margin: 0px 0px 25px 10px; outline: none; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px none; list-style: disc outside none; margin: 0px 0px 5px 10px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;lettuce:&amp;nbsp;&lt;a href=&quot;https://github.com/wg/lettuce&quot; style=&quot;border: 0px none; color: #326693; list-style: none; margin: 0px; outline: none; padding: 0px; text-decoration: none; transition: all 0.2s ease-in-out;&quot;&gt;https://github.com/wg/lettuce&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://redis.io/topics/data-types&quot; target=&quot;_blank&quot;&gt;Data Types&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;b style=&quot;font-family: arial, helvetica, sans-serif; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: large;&quot;&gt;1) &lt;b&gt;Strings&lt;/b&gt; : BinarySafe: MAX 512 MB, you can even save images etc..&lt;br /&gt;2) &lt;b&gt;Set&lt;/b&gt; : Unique list of elements. Useful when operation on two different key with :&amp;nbsp;&lt;b&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;intersect,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;union,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;difference&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;3) &lt;b&gt;SortedSet&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: large;&quot;&gt;4) &lt;b&gt;List&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8; font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;5) &lt;/span&gt;&lt;span style=&quot;background-color: #f8f8f8; font-weight: bold;&quot;&gt;Hash : &lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Useful for storing objects with fields. name, surname etc...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: Open Sans, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: #f8f8f8;&quot;&gt;&lt;b&gt;Pipelining&lt;/b&gt; : Less blocking client code can be achived by means of it&amp;nbsp;: Send multiple request and get one answer as result. Consider:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333;&quot;&gt;&lt;b&gt;split them to multiple pipelines&lt;/b&gt; to reduce memory requirements on server side.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333;&quot;&gt;using pipelining Redis running on an average Linux system can deliver even 500k requests per second.Is not it enough ?&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: medium;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333;&quot;&gt;&lt;b&gt;Pub/Sub:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;code class=&quot;keyword&quot; style=&quot;background-color: #f8f8f8; background-image: none; border: 0px; bottom: auto; color: #006699; direction: ltr; display: inline; float: none; font-stretch: normal; font-weight: bold; height: auto; left: auto; line-height: 1.1em; list-style: none; margin: 0px; outline: 0px; overflow-x: visible; overflow-y: hidden; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;implements&lt;/code&gt;&lt;span style=&quot;background-color: #f8f8f8; font-family: &amp;quot;consolas&amp;quot; , &amp;quot;bitstream vera sans mono&amp;quot; , &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code class=&quot;plain&quot; style=&quot;background-color: #f8f8f8; background-image: none; border: 0px; bottom: auto; direction: ltr; display: inline; float: none; font-stretch: normal; height: auto; left: auto; line-height: 1.1em; list-style: none; margin: 0px; outline: 0px; overflow-x: visible; overflow-y: hidden; padding: 0px; position: static; right: auto; top: auto; vertical-align: baseline; width: auto;&quot;&gt;org.springframework.data.redis.connection.MessageListener&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;
&lt;code class=&quot;plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: #f8f8f8; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border: 0px !important; bottom: auto !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace !important; font-size: 15px; font-stretch: normal; height: auto !important; left: auto !important; line-height: 1.1em !important; list-style: none; margin: 0px !important; outline: 0px !important; overflow-x: visible; overflow-y: hidden; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;br /&gt;&lt;/code&gt;
&lt;br /&gt;
&lt;code class=&quot;plain&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: #f8f8f8; background-image: none !important; background-origin: initial !important; background-position: initial !important; background-repeat: initial !important; background-size: initial !important; border: 0px !important; bottom: auto !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace !important; font-size: 15px; font-stretch: normal; height: auto !important; left: auto !important; line-height: 1.1em !important; list-style: none; margin: 0px !important; outline: 0px !important; overflow-x: visible; overflow-y: hidden; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;br /&gt;&lt;/code&gt;
&lt;br /&gt;
&lt;ul style=&quot;background-color: white; border: 0px none; color: #333333; list-style: none; margin: 0px 0px 25px 10px; outline: none; padding: 0px;&quot;&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;</description><link>http://javabender.blogspot.com/2017/03/redis-101.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIO49f_54YB_1Ic8dlDNGzgSgcJHDcikoL0MS13k2cagEFSDnUG0FpJdwp7LEm5OfPKzkWsbwhGHA36eKwnqusr7uRpKXs8-xIYSL2OKb9nJvsEUpBPhkSVf4QB2MYNlT6OU5Z0yufhEFy/s72-c/redis.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2418067305199470972.post-2563915807911536261</guid><pubDate>Thu, 16 Feb 2017 10:55:00 +0000</pubDate><atom:updated>2017-02-16T08:24:43.850-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">java 8 Optional</category><category domain="http://www.blogger.com/atom/ns#">java 8 Optional example</category><category domain="http://www.blogger.com/atom/ns#">java Optional example</category><category domain="http://www.blogger.com/atom/ns#">java8 sample code</category><category domain="http://www.blogger.com/atom/ns#">Optional example</category><title>Java 8 Optional examples and usage</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzK6StMg2LZGjCBl8gDxLdjkggMRMuJNcOTD_PIu2HCXsULTxbEkHwhcVDfD-mbkpE75OuD_jPd5SgypbU0bSKShkzbXDnWWSPGWzT9-l-zv5s0TmwIKAbD2NcsvQvDLrdOEwrPptJpkG/s1600/optional.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzK6StMg2LZGjCBl8gDxLdjkggMRMuJNcOTD_PIu2HCXsULTxbEkHwhcVDfD-mbkpE75OuD_jPd5SgypbU0bSKShkzbXDnWWSPGWzT9-l-zv5s0TmwIKAbD2NcsvQvDLrdOEwrPptJpkG/s200/optional.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;u&gt;&lt;b&gt;Why Optional&lt;/b&gt;&lt;/u&gt; :&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;Use it with &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;streams &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;, use &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;it &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;in &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;your &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;types, &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;make &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;your &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;code &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;safer against to the &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;NPE&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;, make &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;your &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;code more readable...This allows the caller &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;to &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;continue &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;a chain of fluent method calls.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;And Note&lt;/b&gt;&lt;/u&gt;:&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;The key here is the focus on use &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;type. The &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;class &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;is definitively not intended &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;use &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;background-color: #e4e4ff; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;of &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;a Java Bean. Witness to &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;this &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;is that Optional does not implement Serializable, which is generally necessary &lt;/span&gt;&lt;span style=&quot;color: navy; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;for &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;widespread use &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;background-color: #e4e4ff; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt;property&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;dejavu sans mono&amp;quot;; font-size: 9pt;&quot;&gt; of an object.&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: &amp;quot;DejaVu Sans Mono&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
If you really wonder what will change in your life with this new &lt;b&gt;Stolen keyword (from Guava) &lt;/b&gt;you&#39;d better to read its&lt;b&gt; &lt;a href=&quot;http://mail.openjdk.java.net/pipermail/lambda-dev/2012-September/005952.html&quot; target=&quot;_blank&quot;&gt;origin&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
More code &amp;amp; less bullshit.. Lets see its usage then..&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/sunels/27d3b94df2794411d4b4a174ba5d19c5.js&quot;&gt;&lt;/script&gt;
&lt;div&gt;
And you can use in streams as follows
&lt;br /&gt;&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/sunels/7d6e5ffc218e03bb618fe6693f8eef2f.js&quot;&gt;&lt;/script&gt;</description><link>http://javabender.blogspot.com/2017/02/java-8-optional-examples-and-usage.html</link><author>noreply@blogger.com (Serkan Sunel)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzK6StMg2LZGjCBl8gDxLdjkggMRMuJNcOTD_PIu2HCXsULTxbEkHwhcVDfD-mbkpE75OuD_jPd5SgypbU0bSKShkzbXDnWWSPGWzT9-l-zv5s0TmwIKAbD2NcsvQvDLrdOEwrPptJpkG/s72-c/optional.jpg" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>