<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhik Banerjee on Medium]]></title>
        <description><![CDATA[Stories by Abhik Banerjee on Medium]]></description>
        <link>https://medium.com/@abhik99?source=rss-fa06b4689516------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mx5-n9g9mtGzdMmvrz4sjQ.png</url>
            <title>Stories by Abhik Banerjee on Medium</title>
            <link>https://medium.com/@abhik99?source=rss-fa06b4689516------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:08:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhik99/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Takeaways from Proof of Security Summit 2023]]></title>
            <link>https://abhik99.medium.com/takeaways-from-proof-of-security-summit-2023-db3a4c198b25?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/db3a4c198b25</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[india-blockchain-week]]></category>
            <category><![CDATA[summit]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Tue, 05 Dec 2023 15:33:14 GMT</pubDate>
            <atom:updated>2023-12-05T15:33:14.737Z</atom:updated>
            <content:encoded><![CDATA[<p>Proof of Security Summit 2023 took place in the Tech Capital of India — Bengaluru. The line-up of speakers and panel discussions from the start piqued my interest. I guess I did make a good choice coming to Bengaluru 1 day before the start of Indian Blockchain Week 2023. Do you know what would have been a better choice? Coming to Bengaluru 2 days before!</p><h3>The Context</h3><p>I had plans to attend the Indian Blockchain Week 2023 since I got the chance to attend EthIndia 2022 and the side events that year. So when Indian Blockchain Week 2023 was announced, I wasn’t late in buying a ticket (though I must say that the prices for tickets were too damn high by Indian standards). I wasn’t late either in applying for EthIndia 2023 when the applications opened and was selected for it as well.</p><p>My plan was to attend FIL Bangalore as well. But I guess fate had other plans. While reaching Howrah through Janshatabdi (2 hours late no less), I received a piece of news that SMVB Duronto was cancelled. Never before had I heard of a premiere train like Duronto getting cancelled. Call me a cheapskate but I like train travel and enjoy being economical.</p><p>This forced me to book a Spicejet on Monday (which, again was almost 2 hours late — a recurring theme in this journey till now). Finally, I reached Bengaluru and geared up to attend the next side event — Proof of Security Summit.</p><p>Thankfully, I didn’t reach the event 2 hours late, heh.</p><h3>Proof of Security Summit 2023</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qb3V4TqJSr8ZzhgID8Eoow.jpeg" /><figcaption>The good swag</figcaption></figure><p>The summit featured the participation of multiple Web3 players ranging from SolidityScan to Panther Protocol. The itinerary was mailed the night before to the participants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N75TlK-KUjqV_Tv6uXik_w.png" /><figcaption>The Line-up</figcaption></figure><h4>Main Takeaways</h4><p>I was able to summarize the following from the discussions and talks which took place at the summit. Unfortunately, I had to run before the end of the summit so I missed a couple of talks including the closing keynote. The takeaways recorded by me are:</p><ul><li>App-specific Chains with ZK Rollups are not coming, they are already here. They are what combine the two golden words in Web3 right now like QML (QC + ML) in machine learning a couple of years back.</li><li>While manual audits are irreplaceable, the process can be automated to an extent to reduce labour and improve overall quality. A manual auditor’s pathways to it:<br>- Map Privilege / Access Control of the contract<br>- Map the above to the contract functionality<br>- Check the edge cases<br>- Read the contract doc but with the intention to disprove it.</li><li>Scalability — more specifically, being compute intensive is currently an open challenge in the ZK sphere of Web3</li><li>Circuits being underconstrained is a major problem. These under-constrained circuit issues are quite often hard to catch.</li><li>From paper to implementation is often the place where the devil resides.</li><li>There is a high need for “reactive” and “zero-day” tooling — tools for formal verification, static and dynamic analysis of smart contracts are aplenty.</li><li>Compliance is still an open problem — especially compliance with Travel Rules &amp; VASPs. ZKP might hold an answer to providing compliance embedded protocols.</li></ul><p>From the panel discussions, a point came up which might not fall in the category of the list above but is worth discussing. The point was raised by <a href="https://www.linkedin.com/in/mads-u-pedersen/">Mads Pedersen</a>. He observed that there was a move of VC investments to the infra side of things in Web3 during Crypto Winter. This has left many VCs somewhat under-exposed. During the upcoming cycles, it might lead to investments to compensate for that. Special care needs to be taken to assess the feasibility, tech moat and quality of such investments to be made during the upcoming cycle.</p><h4>People I Met</h4><p>There were many people I had the opportunity to meet during the event. Some I might meet again during the upcoming events. While I cannot list out every person in this blog, a few of them were:</p><p><a href="https://www.linkedin.com/in/gandhi-kishor-addanki-a91a2b6/"><strong>Gandhi</strong></a><strong> from Blockchain Lab, Samsung R&amp;D:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GSQ9pXLQDZ6FZcDwDxsVbQ.jpeg" /><figcaption>Gandhi (right)</figcaption></figure><p><a href="https://www.linkedin.com/in/mudit4/"><strong>Mudit Gupta</strong></a><strong> from Polygon:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFkkwJxQ-0BnaJF3t2aLNg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pIVG4P1-2e8EnnKg4mgGlg.jpeg" /><figcaption>Mudit (left)</figcaption></figure><p><a href="https://www.linkedin.com/in/rao-pradeep/"><strong>Pradeep Rao </strong></a><strong>from Kyndryl:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2qimrBIIS1JoZXitwPiLQg.jpeg" /><figcaption>Pradeep (right)</figcaption></figure><p><a href="https://www.linkedin.com/in/kazuki-kohama-103368237/"><strong>Kazuki Kohama</strong></a><strong> from Coinpost Inc. and </strong><a href="https://www.linkedin.com/in/shauryasrivastava/"><strong>Shaurya Srivastava</strong></a><strong> from Aviram Studio:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k7V-kVRRutsvoTo3m_N6Xg.jpeg" /><figcaption>Kazuki (left), Sharuya (middle)</figcaption></figure><p><a href="https://twitter.com/saxenism"><strong>Rahul Saxena</strong></a><strong> from zkSync:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecxgWCv1YPYLI8FV0GQQLQ.jpeg" /><figcaption>Rahul (right)</figcaption></figure><p><a href="https://www.linkedin.com/in/shrikrishna-srinivasan-a56955a/"><strong>Shrikrishna Srinivasan</strong></a><strong> from Accelchain:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VrufufEhqdIv2Rr20SXh0w.jpeg" /><figcaption>Shrikrishna (left)</figcaption></figure><h3>Conclusion</h3><p>I must say that I enjoyed the event — especially the panel discussions and the people I met. The week is far from over and I am eagerly looking forward to having a great time. Afterall, it&#39;s a short break from my work combined with the thing I love the most — Web3. If any of you are attending IBW 2023, let’s hang out and have a chat! Until then, bye!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db3a4c198b25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get the most out of Upgradeable Smart Contracts]]></title>
            <link>https://abhik99.medium.com/get-the-most-out-of-upgradeable-smart-contracts-e0c05caf9b0e?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0c05caf9b0e</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[openzeppelin]]></category>
            <category><![CDATA[upgradable-contracts]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Wed, 20 Jul 2022 18:26:20 GMT</pubDate>
            <atom:updated>2022-07-20T18:26:20.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MgJ8cle5pshsrNV-" /><figcaption>Photo by <a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;utm_medium=referral">Olav Ahrens Røtne</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>Please Note:</strong> From here on out, I have migrated to Hashnode as my official Tech Blog and publish weekly. If you’d like more of such content on all things Web3, feel free to subscribe to my Blog <a href="https://abhik.hashnode.dev/"><strong>Bored on The Edge</strong></a>.</blockquote><p>It&#39;s been a long time since I last posted on Medium. If you have been following me on <a href="https://dev.to/abhikbanerjee99">Dev.to</a> or <a href="https://abhik.hashnode.dev/">Hashnode</a>, this is the fourth article in my series on Upgradeable Smart contracts. We have been through writing upgradeable smart contracts, testing them out and then deploying version 1 followed by version 2 on Polygon’s Mumbai Testnet. You can find those at any of the aforementioned tech blogs.</p><p>While the development cycle is complete at this point, things are still left to discuss. More specifically, points to note from all these exercises and recap them all at once. This article will aim to do that. We will go through most of the things one needs to remember while developing an upgradeable smart contract. Remember that the whole “upgradeability” paradigm is comparatively new, so these points are not de facto yet. If you feel like there are points I might have missed out on or would like to initiate a discussion on the contrary, feel free to drop a comment.</p><h3>UUPS vs Transparent</h3><p>Transparent and UUPS patterns are two of the methods of upgrading smart contracts. They were adopted by EIPs <a href="https://eips.ethereum.org/EIPS/eip-1538">1538</a> and <a href="https://eips.ethereum.org/EIPS/eip-1822">1822</a> respectively. Openzeppelin offers both options in upgradeable smart contracts. But over time, 1822 or the UUPS pattern has grown to be adopted by the community (and with good reason).</p><p>If you wish to understand the difference between the two then consider this — both standards have a proxy in front of another contract. <em>But while the Transparent pattern is changing the proxy for every upgrade, UUPS changes the implementation recorded and keeps the proxy contract constant.</em></p><p>While the Transparent proxy pattern takes less gas for deployment, <strong>UUPS has been proven to be more gas efficient in the long run</strong>. It is also easier to develop both smart contract-wise and frontend-wise. If you are considering upgradeable smart contracts, then the UUPS proxy pattern is the way in my opinion.</p><h3>Understand Initialization Phase</h3><p>The initialization phase of an upgradeable smart contract is one of the most important phases. If not properly handled, it can turn a smart contract with perfect business logic implementation into a hacker’s plaything.</p><p>Time and again in <a href="https://abhik.hashnode.dev/series/upgradeable-contracts">this</a> series, I have emphasized that the initialization phase of an upgradeable smart contract is different from a normal one. There are no constructors in most of the upgradeable smart contracts because of the proxy design.</p><p>The implementation cannot store any data. It is just pure business logic. This is why most of the stuff that goes into a constructor of a normal contract needs to go to the special “initializer” function. But unlike the constructor which only gets called during smart contract deployment, the initializer function needs an extra layer of security because at its core it is just another normal smart contract function. Hence all the fuzz.</p><h4>Initializer</h4><p>Most smart contracts use Openzeppelin/contracts. Those developers dabbling in Upgradeable smart contracts use its sister project <a href="https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable">Openzeppelin/contracts-upgradeable</a>. The two are the same albeit the constructor in the contract is replaced by the initializer.</p><p><a href="https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable">Openzeppelin/contract-upgradeable</a>’s <a href="https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/utils/Initializable.sol"><strong>Initializable.sol</strong></a> is a smart contract which I would recommend every smart contract developer to understand in-depth. It basically contains all the logic needed for the initialization of upgradeable smart contracts. The <strong>initializer</strong> modifier is the one we will be discussing in this sub-section.</p><p>If you want, you might just go ahead and implement the same stuff with a simple boolean variable. This variable will be set to true when the upgradeable smart contract is deployed. The logic is initializer function can only be invoked if this Boolean variable is false. And that’s it. This can actually prevent a niche hijacking attack on your upgradeable smart contract.</p><p>The modifier provided by Openzeppelin though goes beyond the call of duty. It checks the contract being deployed and provides a special functionality — invoking functions only DURING the initialization phase.</p><p>The initializer function in your contract is where you initialize other upgradeable contract’s _init() method like say the <strong>__UUPSUpgradeable_init()</strong>. All you need to secure your initializer is thus use the initializer modifier from Openzeppelin’s Initializable.sol.</p><h3>Re-initializer</h3><p>A re-initializer is invoked during upgrades. This is the initializer for your next versions. The initializer modifier can only be used once in the whole lifespan of your contract across all the versions. So, what happens if you want to add specific functionality in the second function?</p><p>That’s where the reinitializer(&lt;integer type version&gt;) modifier comes in. This too is supplied by Initializable.sol and can be thought of as a generalized version of the initializer. In fact, passing version number 1 in the modifier is the same as using the initializer modifier.</p><p><a href="https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/utils/Initializable.sol#L107">https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/utils/Initializable.sol#L107</a></p><p>Keep in mind this is only incremental. You can try to use reinitializer(2) after using reinitializer(3) and it won’t work. This is because when you inherit Initializable.sol, you also inherit the mechanism to incrementally upgrade and the checks associated with that. So, if you want to roll back, you will need to either change the record of the implementation contract from the proxy or deploy the older version contract as the next version.</p><p>Also, you need to note that when invoking the re-initializer, your contract will go through an “initializing” phase and that too is provided by this modifier.</p><h3>Disable Initializer</h3><p>The _disableInitializer() function prevents any further initialization. Keep in mind that when you upgrade your contract you need to follow a common convention of inheriting the previous version and then adding any modifications. It is not warranted that you will need to initialize something every time. So, you shouldn’t confuse this as preventing any upgrades.</p><p>Conventionally, this function is used inside the constructor of the implementation contract. Does this line ring an alarm? After all, upgradeable smart contracts cannot have any constructors, right?</p><p>The thing is upgradeable smart contracts cannot have any constructors which initialize any variable data. You can have a constructor that initializes an immutable (constants are initialized inline). This is pretty unsafe so you need the</p><blockquote>/// @custom:oz-upgrades-unsafe-allow constructor</blockquote><p>At this point, you also need to note that when you inherit an older version and then create a new version, all the initializer functions in the older versions will be executed during contract deployment. A quick way to test this out is to put events inside initializer functions across versions and then check the events which have been emitted right after the new implementation contract is deployed. We will discuss this in a later section.</p><p>This means if you have used the _disableInitializer() function in any of the previous versions, the storage state will be initialized up to that specific version in the current implement contract. Use it wisely.</p><h3>Transparent Storage EIP</h3><p>The <a href="https://eips.ethereum.org/EIPS/eip-1967">EIP-1967</a> is what brought the Transparent Storage pattern to the ecosystem. By now you should be aware that while you can upgrade your implementation contract, the storage space shared across all versions remains the same.</p><p>It is kind of like the backing up of storage disks attached to cloud VMs. The storage space gets incrementally changed as versions are deployed. This means that if you had a certain number of variables already declared in previous versions, that space will persist in the next version as well and you need to define those exact variables in the same order in newer versions.</p><p>While it is not mandatory to understand the complete EIP, I would recommend going through it at least once because it can immensely influence how you design your smart contracts.</p><h3>Inherit from Thy Ancestors</h3><p>This brings us to the current point — why you should practice inheritance in smart contracts. The answer is quite simple — because you need to declare the variables in the previous version in exactly the same way before you go about declaring new ones.</p><blockquote>Sometimes it might seem simple to just declare those variables and be done with it. This can prove to be a nuance if you are inheriting from a new contract in version 2 (for example to add functionalities). This is not that uncommon. In the non-upgradeable counterpart, you would need to inherit from Chainlink’s Contract to use its oracle services.</blockquote><p>The reason it is tricky is the space is allotted to the inherited contracts first and then any other variables in your main contract. So, while you might think you are still declaring the variables in the same order as the previous version you are actually re-declaring new variables and the inherited contract’s variables overlap with the variable storage space of the old contract.</p><p>This is why inheriting the previous version is the easiest thing to do. Keep in mind it is recommended you inherit the previous version first followed by any other contract(s). Otherwise, it might lead to problems in the inheritance tree (like linearization). Also, any functionality in the previous version is inherited in the new version. This includes any functionality from Initialization.sol contract or the OwnableUpgradeable.sol contracts.</p><h3>A healthy mix of Virtual and Override</h3><p>Upgradeability is not just aimed at introducing new functionalities in the smart contract, it is also aimed at changing existing ones. Inheritance facilitates this as well. You need to keep in mind while designing the initial version of your smart contract that the business logic might change in future versions.</p><p>A good design convention here in my opinion would be to create a document to list out all your smart contract methods and then go through them at least twice. This will give you the time to argue which of those might change in the future. The ones which might change in the future — mark them as virtual functions.</p><p>Marking any function as virtual will enable you to use the override keyword to override that function in future versions. A point to note here is that both of these keywords can be used at once in the function prototype. This would mean you are overriding the function from the previous version but also are keeping the scope for it to change in future versions.</p><h3>You can only upgrade so much…</h3><p>Upgrading your smart contracts will not solve all your problems. For one, it cannot fill in for lousy smart contract design. That catches up eventually. The only way to improve your design is to revise it before actually implementing it. If you are a part of a team, make sure to discuss every functionality before you go into code.</p><p>Furthermore, the Initializable.sol contract puts an upper bound on the number of versions a contract might be upgraded to 255. You can implement your own to increase that limit. But honestly, if you need to upgrade your contract that many times, it might just be better to write a new one. After all, if you keep adding to the contract over time and keep changing it ever so slightly… Will it be the same contract at the end?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K62rRHn2AvcG86rIb-Do9g.jpeg" /><figcaption>A WandaVision easter egg for those who like it….</figcaption></figure><h3>Conclusion</h3><p>This brings us to the end. Honestly, it wasn’t one of my longer articles but I wanted to get most of the things I could within this short article. If you think I might have missed anything, please feel free to start a discussion below. It’s always encouraging to see such engagement.</p><p>Also, keep in mind that the whole “upgradeable” smart contract is still a new thing at the time of writing and this article might grow as things line up in the future. If you like it, give it a like and a shoutout on <a href="https://twitter.com/abhikbanerjee0">Twitter</a> or <a href="https://www.linkedin.com/in/banerjee-1331/">LinkedIn </a>would make my day!</p><p>This also brings us to the end of my article series on upgradable smart contracts. Guess I will start on another interesting topic come next week. But until then, keep building awesome stuff on Web3 and WAGMI!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0c05caf9b0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[That time I spent my Summer on Bitcoin]]></title>
            <link>https://abhik99.medium.com/that-time-i-spent-my-summer-on-bitcoin-f226ff3227b8?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/f226ff3227b8</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[my-experience]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[summer-internships]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Sat, 18 Sep 2021 11:11:36 GMT</pubDate>
            <atom:updated>2021-09-18T11:11:36.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lIFkus2VLdRYs4OHiQ6hDg.jpeg" /><figcaption>Summer of Bitcoin 2021</figcaption></figure><p>The title’s catchy, ain’t it? Well, it&#39;s not going to be some juicy run-of-the-mill story about how some newcomer spent his summer investing his money on the token and got huge returns. For one, my summer wasn’t even spent on Bitcoin! It was spent contributing to this awesome project called <a href="https://github.com/rust-bitcoin/rust-lightning">rust-lightning</a> — the <a href="https://www.rust-lang.org/">Rust</a> implementation of <a href="https://lightning.network/">Lightning Network</a> (Bitcoin’s Layer 2 scaling solution).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9O-okDkNUCqUlZ2vYKFyMA.jpeg" /><figcaption>I thought it was a fitting pic.</figcaption></figure><p><strong>TL;DR:- </strong>It was an awesome experience to Learn And Earn while contributing to a major blockchain solution. Would love to do it again!</p><p>So in case you stuck around after that first paragraph and the <strong>Tl;DR</strong>, here’s my story.</p><h3><strong>The Short Acknowledgements</strong></h3><p>I guess first of all I need to thank <a href="https://medium.com/u/6ae9618bd963"><strong>Bhaskar Dutta</strong></a> for motivating me to apply for the program. It’s almost funny when you consider that I haven’t physically met him once even though we both live in Kolkata and I share most of my work <em>(publications, hackathon wins etc)</em> with him. It was thanks to him I came across this wonderful program and decided to apply.</p><p>Secondly, I would like to Thank <a href="https://twitter.com/jkczyz?lang=en"><strong>Jeffrey Czyz</strong></a><strong> </strong>— my mentor during my program. If I am coming clean, I was an absolute beginner in Rust and he patiently walked me through the nuances of being a Rust Dev and working on rust-lightning. On that note, I would also like to thank <a href="https://twitter.com/TheBlueMatt">Matt Corallo</a> for supporting me.</p><p>Finally a BIG Thanks to the organizers of the program — <a href="https://twitter.com/adamcjonas"><strong>Jonas</strong></a><strong>, </strong><a href="https://twitter.com/Caralie_C"><strong>Caralie</strong></a><strong> and </strong><a href="https://twitter.com/adibitcoin"><strong>Adi</strong></a>.</p><p>It may be mentioned here that it was Jonas who pushed me to explore the option of being a Rust Developer during my initial interview with him and 2.5 months later, I really am glad I listened to his advice.</p><p>Caralie was always there for us to guide us about the program as well as our lives and it was fun participating in those Game Nights. There can’t be enough said about her dedication to the program and it was Thanks to her that it became all that more awesome.</p><p>As for Adi, I really don’t know much about him but the hours he put into the program and being there for us while coordinating sessions (along with the fact that he loves Saitama) are the reasons why I have huge respect for him! He was kind of like Satoshi of SoB — concealing identity till the end.</p><p>I was in my fourth year of Engineering Studies when I did and I graduated while I was involved in the program which was an experience in and of itself.</p><h3>Getting Feet Wet</h3><p>The program started on July 5th, 2021 with a week of webinars from domain experts, program mentors and alumni of the Chaincode Labs Residency Program. The talks ranged from the basics of Bitcoin to Lightning Network and covered a lot of ground.</p><p>It may be worth mentioning that the participants of the program were in advance asked to familiarize themselves with Bitcoin and allied terminologies via the <a href="https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf"><strong>Bitcoin and Cryptocurrency Technologies</strong></a> book by Princeton University or the contemporary Coursera Course. We were also provided with Kalle Rosenbaum’s <a href="https://www.manning.com/books/grokking-bitcoin">Grokking Bitcoin</a> as additional reading material.</p><p>Week 1 concluded with Seminars and week 2 had in store for us one of the interesting parts of the program — A Crash Course on Bitcoin by none other than Kalle Rosenbaum himself! I have to say it was quite enjoyable and informative. It was also the first time I got the chance to have a proper exchange with the other participants in the programs via the breakout rooms in the middle of sessions.</p><p>Week 2 was quite elaborate covering the syllabus of the book ranging from an Intro to Bitcoin and Crypto, Wallets and then culminating into running a Bitcoin full node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*Ui3VLfq8XEyxuhmvcKvqaA.png" /><figcaption>Week 2 Day 5 in a nutshell.</figcaption></figure><p>At the end of week 2, I received a mail from Caralie that I had been assigned to the Lightning Track and I would be working under Jeff on rust-lightning.</p><h3>And then there were 2…</h3><p>Week 3 saw us getting categorized into 2 groups: -</p><ol><li>Lightning Track</li><li>Bitcoin Track</li></ol><p>The former was yours truly. Both track had track specific week 3–4 programs. With lightning track getting one week to cover the <a href="https://chaincode.gitbook.io/seminars/lightning-protocol-development">Lightning Seminars</a>. It was, in my opinion, a bit rushed but that’s also why it was one of my favourite segments. At the end of Week 3, the Lightning Track saw a few participants switch to the Bitcoin Core track.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7qes9-_YrEymkSgfcfpwDA.jpeg" /><figcaption>Week 3…</figcaption></figure><p>At this point, it should be mentioned that that whole endeavour was in the presence of <a href="https://www.derpturkey.com/author/brian/"><strong>Brian Mancini</strong></a><strong> </strong>who used to be present every day at the end of our learning and discussion sessions to help us clear our doubts. Adi was also a constant during these and previously mentioned week 2 sessions where he would be the technical coordinator.</p><p>At the start of it, it felt competitive. We used to be assigned a topic for discussion and a partner. Together we were supposed to explore the topic and learn more about it. In the evening session, both partners were assigned to separate Breakout Rooms on Zoom and they needed to discuss the topic they were assigned with others in that breakout room.</p><p>Given the typical Indian Student competitiveness, in hindsight, it wasn’t a surprise when we thought we were supposed to learn all the topics and then discuss just the one assigned when in reality it was a sort of a team-building exercise where the point (my guess) was to learn to rely on the others in the program to fulfil one’s own lacking. I guess most of us came to the conclusion by the week’s end. Every day concluded with everyone in the Lightning track coming together with Brian to discuss any lingering doubts.</p><h3>Week 4 and the Rest (Alternative Title — “Feet wet enough, Time for some action”)</h3><p>The program was basically reaching a mid-point and it was time for us to get our hands-on with the code and the projects. Each of us was assigned a mentor. My mentor was <a href="https://twitter.com/jkczyz?lang=en">Jeffrey Czyz</a>.</p><p>I was nervous (that’s normal I guess). I wanted to make the best impression (who doesn’t ?!). Jeff had already picked a few issues which he thought would be a good starting point for a beginner like me. There were 5 issues he had picked. <em>(I have to confess that if he had picked 10 issues I would have made a Lord of the Rings meme for this blog)</em></p><p>I went with Issue #945 titled <a href="https://github.com/rust-bitcoin/rust-lightning/issues/945">Allow multi-hop route hints</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*8LBRFSmVTYWHvllmpvxX8w.jpeg" /></figure><p>The remainder of the weeks were mostly focused on solving the issue. It was a comparatively simple one.</p><p>The issue required knowledge of <a href="https://bolt12.org/">Bolt 12</a>. It consisted of incorporating Multiple Last Hop Route hints from Lightning Invoice into rust-lightning.</p><p>The codebase is enormous but also intuitive. But most of all, it is very well documented. Every piece of logic contains an elaboration on why it is necessary.</p><p>I and Jeff used to have meetings every Monday where I would tell him about the problems I was facing on the Issue and overall and we would talk about it. These regular updates helped me to connect with my mentor and maintain that. I still remember when the PR of Issue #945 was merged and then we had another meeting where I picked Route Rebalancing — the issue I am working on at the time of writing.</p><p>While I would love to go on and on about it, I want to make this a bit short. My time in the program motivated me to do a lot of things — one of them revamping my portfolio website while the other starting writing short tech articles on what I know and I would love to get started on that.</p><h3>In Conclusion</h3><p>The program wasn’t just all work and no play. Caralie had specially arranged some fun Game Nights. Playing Scribble was fun. It brought together students from both tracks and we have a good time playing in groups.</p><p>I would consider the Summer of Bitcoin to be a monumental step in my early career. It wasn’t easy but that’s what made it that much more exciting. About 5k applied to the program and from them, an initial cohort of 55 was selected — and that’s just in the first run of the program limited only to India. I would love to see the stats grow as they plan to take it global.</p><p>The program offered a very good opportunity to learn about something that has kickstarted such a drastic change in the industry. About a couple of weeks into project assigning (after week 3) <a href="https://twitter.com/adityaa2011">Aditya Sharma</a> became only the second person to implement a Bolt from Scratch. There were many similar stories that were made in this specific iteration and suffice to say it is just a trailer for what’s to come in the successive years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DriCMfAKSAXAYidsUtHtKA.jpeg" /><figcaption>Ledger Nano S schwag</figcaption></figure><p>It would be an understatement to say I had a blast. We all received a <em>Ledger Nano S</em> and thanks to the idea from a fellow participant a groupie as memorabilia among other things!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AXLEb8kjoXC2NKmyORH4pA.png" /><figcaption>Groupie 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ypqh_mK_BnMJNrHbTCHg3Q.png" /><figcaption>Groupie 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GaFTM0teLmTxI3oNWT6A3A.png" /><figcaption>Groupie 3 <strong>(Yours Truly at the centre)</strong></figcaption></figure><p>So to conclude I would like to take this opportunity to thank everyone associated with the program for providing such a playground and I wish every one of them a very bright future.</p><p>Thank You!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f226ff3227b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockster — Going Central for the Decentralized!]]></title>
            <link>https://abhik99.medium.com/blockster-going-central-for-the-decentralized-8e46a0b4c700?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e46a0b4c700</guid>
            <category><![CDATA[blockster]]></category>
            <category><![CDATA[dlt]]></category>
            <category><![CDATA[digitex]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 18:46:48 GMT</pubDate>
            <atom:updated>2021-06-03T18:46:48.413Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blockster — Going Central for the Decentralized!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-V38Ds608BwwFbFaTxAxlg.jpeg" /><figcaption>Source: <a href="https://unsplash.com/photos/BW0vK-FA3eg">Unspash</a></figcaption></figure><p>So where do you go when you want to look up details about a specific crypto or blockchain platform?</p><p>If this was 2016 then perhaps the answer would have been something like BitcoinTalk or perhaps look up on Medium (though it would have been a rarity). Some really exceptional minds would have said that they would prefer to look up the documentation.</p><p>Be it 2016 or 2021, some things are still the same. There is no one specific place to find everything related to Distributed Ledger Tech. It’s all scattered. And while that does seem comically providence that information regarding a technology that brings decentralization would be scattered and not be found in one specific place, it does beg the question — How easy would it be for an average, non-tech-savvy new enthusiast to get “up and running”?</p><p>Well, that’s the question Blockster looks forward to answering. And so the article’s title. It’s not “going central” as in a centralized store of all things blockchain but rather consolidating everything and making a network out of fellow enthusiasts.</p><p>In the interest of not making this article sound like an 800-word sales pitch, let me get you “up and running” with what Blockster is and why I think it is something that every geek, developer and investor should pay attention to. It’s not really a secret that while the community of Blockchain developers and Crypto Holders is very much motivated and supportive, the resources are not exactly easy to find and understand.</p><h3>Blockster</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*w7of0MMqR66yP7uihnemog.png" /><figcaption>BXR</figcaption></figure><p>Many new projects don’t have good documentation. There are some platforms that many would consider giants in this field for how long they have been around. But even then, such giants suffer from not having documentation which a layman can comprehend. If you look at the AI/ML community and the popular frameworks like TF, Pytorch, ONYX and more, their docs are something even a grade-schooler might understand (and this is not really stretching too far). And you can really find tons of articles about every fundamental topic relating to AI/ML online. Be it <em>Medium</em> or <em>AnalyticsVidya</em> or <em>Kaggle</em>, one can always rest assured that there won’t be any scarcity of information and support.</p><p>While the same may not be necessarily true for Blockchain and allied topics, the problem still remains that there is no specific image or entity you can point to where you can get all the help. And that’s what Blockster aims to be. It’s not really trying to be just the next “Medium” for Blockchain and related niche topics or just the next BitcoinTalk or Telegram Group or your go-to YouTube Channel. It’s trying to become all of these aforementioned things. That might be a bit too ambitious you might say, but you also have to agree that it is required.</p><blockquote>The need of the time is a consolidated place where you can find like-minded developers as well as crypto enthusiasts and investors. A place where you can find everything related to Cardano Blockchain but at the same time be assured that there are similar articles that cover Polkadot. A network or a forum to address happenings and discuss the current state of Blockchain. And this comes from someone who has actually suffered a bit when trying to learn about this so-called ‘nascent’ tech.</blockquote><p>Believe it or not, I am a few of the rare ones in our whole college who knows about how the Blockchain works and which projects are getting reared up and the path would have been a lot easier if I had someone to rely upon while getting started. I had tried a lot to search for articles relating to Hyperledger Fabric (something that piqued my interest back then and still is one of my favourites). I looked up articles on Medium and tried to find forums and tech communities. While I did eventually learn how to develop using HF, the problem which I faced is still around.</p><p>You can throw a stone in any classroom of any undergraduate college in India and the chances are the student who gets hit would know about how to call modules from Scikit-learn, Keras and how popular clustering algorithms work. The same cannot be said for Blockchain though. And it is way past time to make it happen in my opinion.</p><h3>Yes, but what more?</h3><p>Well, this article is not meant to be the full guide to what <a href="https://digitex.io/blockfunder/bxr/1?c=60b922a9d2b95e0001934dfb"><strong>Blockster</strong></a> is (that should serve as a reason to check them out even more). But I would say that Blockster is a promising approach. It is trying to become an all-in-one space for all-things-Blockchain and also has plans to introduce an NFT marketplace. And with all that, it brings to the table its own token — <em>Blockster Utility Token (BXR)</em>. It is backed by <a href="https://digitex.io/"><strong>Digitex</strong> Ltd.</a> through Blockfunder and has plans to list the native token on Uniswap as well. All-in-all, I would say that Blockster is something we as a community need and therein lies its chances of success — a community of, for and by Blockchain enthusiasts (not just techies). Check them out <a href="https://dgtx.org/e4931c"><strong>here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e46a0b4c700" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Alibaba Cloud — Object Storage Service (OSS) for Static Files and GCP Compute…]]></title>
            <link>https://abhik99.medium.com/getting-started-with-alibaba-cloud-object-storage-service-oss-for-static-files-and-gcp-compute-f2e2030294cf?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2e2030294cf</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[multi-cloud]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[alibabacloud]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Sun, 28 Mar 2021 14:18:21 GMT</pubDate>
            <atom:updated>2021-03-28T14:18:21.305Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Getting Started with Alibaba Cloud — Object Storage Service (OSS) for Static Files and GCP Compute Hosting.</strong></h3><p>This article is a part of my “<a href="https://dconcloud.com/alibaba-ram-multi-factor-setup/">Getting Started with Alibaba Cloud</a>” series which features 5 articles published on Medium and <a href="https://dconcloud.com/">DConCloud</a>. This is the final article in the series. The list of articles published till now are:-</p><ol><li><a href="http://Getting Started with Alibaba Cloud – Resource and Access Management for Better Practices – 1">Getting Started with Alibaba Cloud — Resource and Access Management for Better Practices — 1</a></li><li><a href="https://dconcloud.com/alibaba-cloud-ram-part-2/">Getting Started with Alibaba Cloud — Resource and Access Management for Better Practices — 2</a></li><li><a href="https://abhik99.medium.com/getting-started-with-alibaba-alibaba-ecs-405ea3d087aa">Getting Started with Alibaba — Alibaba ECS</a></li><li><a href="https://dconcloud.com/alibaba-object-storage-service-oss-1/">Getting Started with Alibaba Cloud — Object Storage Service (OSS) — 1</a></li></ol><p>If you have been following the above blogs, by now you would already have a RAM User, an OSS Bucket and would know how to deploy an ECS instance in Alibaba Cloud. With this article, we finish our series of “Getting Started with Alibaba Cloud”. However, there’s a twist. We are not going to be using Aliyun ECS at this time. We will be delving into <strong>“multi-cloud”</strong> a little bit. <em>We will be using Alibaba Cloud and Google Cloud Platform for this particular tutorial.</em></p><p>If you are not aware of what “multi-cloud” is, then consider this — you are the client and you want your solution to always have the best. That “best” might not be necessarily limited to only one cloud vendor. For instance, Google Cloud Platform is one of the best (if not the best) place you’d want your Kubernetes Workloads to be working. Similarly, you’d want RAC on OCI. Perhaps you would like to use DynamoDB in your solution as well — that is where AWS comes in. So at the end of the day, you don’t have just one cloud vendor. Your solution is resting on multiple cloud providers’ services. That is “multi-cloud”. (Be wary that this is not “Hybrid-Cloud”. Hybrid Cloud is when you merge Private Cloud with any Public Cloud Provider)</p><p>We have our OSS bucket in Alibaba Cloud. We are going to use the RAM user’s Access Key that we generated to develop a NodeJS server that will use Signed URL to query the Images and will be hosted on a Compute VM Instance on Google Cloud Platform.</p><p>So without further ado.</p><h3>OSS Bucket Images.</h3><p>At this time, we have uploaded 3 images beforehand on the same bucket. We are now going to change the Access Control List to show you how your data can be made available from your bucket or keep it to yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_bw4hLDEXFkjaOQm7nh9A.png" /></figure><p>In the screen shown above, we have selected the 3rd object in the bucket (an image titled “abhik_banerjee.png”) and then click on “More” &gt; “Set ACL”. Then we have set the ACL of the image to “Public Read” which means that anyone can read it without authentication. To view the change, after clicking on “Ok” just click on the image to see its details. You will see something similar to what is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jbsfZD7J_vKSdT2bzt7pog.png" /></figure><p>Notice the “URL” field? It’s substantially shorter than what we have generally seen, right?</p><p>You can check the ACL of any other image in the Bucket. Since the bucket was made as a Private bucket, all the images or any objects uploaded inherit this ACL itself originally. You can manually set this ACL Value to any other one that you may want. To check this, just click on any other object and see the ACL in the same way. Here, we check the first image as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mr1z4IR_y5oPQoZgs9Sz4Q.png" /></figure><p>As you can see in the figure above, the image is “Private” by default. Close this blade and then click on the image name. You would see the Image details shown in a similar fashion. You should notice an immediate difference here. Look at the image below and refer to the second image in this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvLCGisIzZu_7fY8VgdDVA.png" /></figure><p>The “URL” is longer than before, right? That’s because this is a “Signed URL” we will discuss this later in the code section in better detail. Long thing short, this URL contains a “key” so to speak which is checked against the “lock” when you or someone else tries to access it. Next, we get down to the coding section. Let’s code a small NodeJS Server which uses the Alibaba Cloud OSS SDK to query the images and display them on the screen.</p><h3>Coding your NodeJS Server for OSS.</h3><p>The code for this demo is available on my GitHub. You can check it out at this <a href="https://github.com/abhik-99/dconcloud-OSS-Demo">link</a>. You can clone the repo at the link to get started with the Demo in a moment if you want to.</p><p>Here, we will be using ExpressJS to build a NodeJS server that serves Pages when visited. We have used Handlebars as the Templating engine here. Before beginning, you should do the following:-</p><p>1. Create a directory called “config” in the root of the project and create a file “access_key.json”. This directory will be ignored by default. It is a very important directory and must always be kept private.</p><p>2. Post the AccessKeyId and AccessKeySecret of the RAM User (you should have a CSV Downloaded for the same if you followed the previous article).</p><p>Next, let’s have a rundown of the basic things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2dlfWRfUfuyIzxX7UDUNQ.png" /></figure><p>This figure shows the Directory Structure of the Project. The “index.js” is the heart of our project. This is where the Express server is made. All the other modules are imported into this file. This file should be kept as short as possible in a real case. In lines 1 to 5, we import Express and then instantiate it. The port is defined as “3000”. We also import “controllers” which would be used as handlers for the routes.</p><p>From lines 7 to 17, we import Handlebars and set them as the view engine. We also set ‘public’ inside the ‘src’ directory as the place where express should look for static files like CSS and JS. The Layout directory for handlebars is set to ‘views’ inside ‘src’. Additionally, we also make it so that the files with the extension ‘.hbs’ are rendered. These ‘.hbs’ files are the substitute for your typical ‘HTML files.</p><p>Lines 20 to 23 define the routes and start the server. There are 2 routes — the root (‘/’) or the home where the browser is directed first. Here, the buckets that have been made by the RAM User are displayed. The ‘/image’ route is where the image from the bucket are displayed. Next, we shall have a look at the main.hbs file inside the ‘views’ directory as shown in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0fpFBFoGnwUS-UFN3PJDIQ.png" /></figure><p>We are just putting in a clever trick here. As you can note that this is mostly like your average HTML except for some special tokens like {{#each}} and {{#if}}. These are courtesy of Handlebar templating. We are checking here if the “image” property is sent as data during rendering and then choosing to render a section. Same for “buckets”. As you will see in the controller section, these are data that we get using the Aliyun OSS SDK.</p><p>If you would scroll up in the header section, you will notice that we have inserted the link to the image that we made public in our bucket in the previous section. That image is readily available through the link without the need to authenticate which is why during rendering on the browser, it is shown directly. Next, let’s have a look at the controllers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*24cbodTmFebN8MJjnbYIbg.png" /></figure><p>Browse to the “buckets.js” inside the “src/controller” directory. What we are trying for is to stick to the MVC architecture of yore. Though in such a dev scenario, you do not have any strict restriction, sticking to a convention helps organize your code files and keep your code clean.</p><p>The “buckets.js” is important in this demo for many reasons. First, it imports the Access Key ID and Access Key Secret from “config/access_key.json”. Next, it initializes the Alibaba Cloud OSS SDK with the credentials (Lines 3 to 9). Notice how we are passing in the bucket name as well. This is not a required parameter. The region parameter is not required as well but for the sake of the demo, we initialize using these.</p><p>Next from lines 12 to 20, we create the controller for the ‘/’ path of the site. What this does is that it uses the OSS client we made in lines 4 to 9 to get a list of the buckets. The name, region, owner and such details are returned in the “buckets” property of the “result” variable which we declare in line 14. Note that you need to have a basic understanding of Promise/Async-Await Syntax at this point. Next, we pass the data to the “main.hbs” which we looked at in the previous image. This gets rendered in the browser.</p><p>From Lines 23 to 40, we make another controller called “getImage” which handles the ‘/image’ route on the site. We generate a signed URL of “01_thumbnail.jpg” and “01.jpg” files which are in the bucket. Did you notice the long URL formats for the Private objects in the previous section? The thing is since they are private objects, you need an access key that expires in a limited time to be attached to the URL. This says that this request comes from you and it can be allowed. We pass these URL links to the “main.hbs” to get rendered.</p><p>Given below is the view of the package.json file. If you are new to NodeJS, package.json files keeps a track of the details about the project. It records things like which modules/libraries have been installed and are being used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NUm2HkDQ8YtsvZs6huoSsw.png" /></figure><p>You can run “npm i ali-oss” to install the Alibaba Cloud OSS SDK for NodeJS separately. However, if you wish to run the project locally, go to the root directory of the project and run:-</p><p>1. “npm install” — This installs the dependencies of the project. So all the libraries are installed in one go.</p><p>2. “npm test” — This starts the Dev Server using Nodemon.</p><p>You can open your browser and browse to “localhost:3000” to see the website. For now, stop the server using “Ctrl+C” as we are now going to host this on a GCP VM Instance.</p><h3>Hosting on VM Instance.</h3><p>You can go ahead and use Alibaba Cloud’s ECS if you want to. The steps are similar to the ones here. <strong>In this article, we will use Google Cloud Platform to host the NodeJS server on a Compute Instance</strong>. First, as shown below, we are creating a new project titled “alibaba-oss-demo”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Va5hsg0xaEVCA1C0neuv_Q.png" /></figure><p>This will take some time to create. Once the project is created, you will be directed to the project’s GCP Console. Which should look like something shown below. Click on the hamburger menu icon which appears at the top left corner and then select scroll down to the “Compute” section. Choose “Compute Engine” and then “VM Instances” as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pm7Pfb_pH29nVVSjCK3DMQ.png" /></figure><p>Since this might be the first time that you are trying to deploy a VM Instance, it will take some time. The Compute API is activated the first time you browse to this section. Click on “Create” (the blue button which appears around the centre of the screen). This will direct you to the New VM Instance. Notice this section is different from Aliyun’s ECS. You get to define all the parameters of the VM here to create the VM (refer to the image below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GSqHV0bMwnf39W1gz_1bBw.png" /></figure><p>As you can see, we are trying to create a VM named OSS Demo. Most of the options here are kept to default. Make sure to check the box which enables HTTP and HTTPS access for the VM. This tags the VM with 2 default network tags of “http-server” and “https-server” to which the Default Access Firewall Rules can act.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oV1FR2vtO4PItrnJGZzWyw.png" /></figure><p>While for this demo it is not relevant to pass any Metadata, keep in mind that the way we are passing the Access Key and the Secret is at all considered “best practice”. Consider the scenario when you have a managed group of VM Instances (autoscaling) behind a load balancer. Would you upload the keys into it every time? Would you keep the config directory inside the project? The option is inconvenient and the second is insecure. Metadata may be used where these values are passed in as an Environment variable. In NodeJS, you can access them using the “dotENV” library. A better practice would be to put these keys in a Private Cloud Bucket and then create an authorized Service Account User to access it. While there are even better practices, we won’t look into those in this beginner-oriented article.</p><p>Once you click on create, the VM will be created. SSH into it and install NodeJS by running the following:-</p><blockquote>sudo apt-get update</blockquote><blockquote>sudo apt-get install nodejs</blockquote><blockquote>sudo apt-get install npm</blockquote><p>After these complete, you can try out “npm -v” and “node -v” to make sure that these are installed. Next, clone the git repo into the VM Instance (you may need to install Git in the VM using a similar process). After this, browse into the project and make a “config” directory. Run</p><blockquote>cd dconcloud-OSS-Demo</blockquote><blockquote>mkdir config</blockquote><p>Upload the “access_key.json” inside your local copy of the project’s config to the VM and then move it into the config directory by the command below:</p><blockquote>mv access_key.json config</blockquote><p>Next, run “npm install” and “npm test” successively. This should show that the server is running on port 3000. Return to the GCP VM Console and click on the external IP allocated to the VM. It opens a new tab. However, you should see something similar to what is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCGqG7FzZ_NRNNgFeiJUhg.png" /></figure><blockquote>This is because the HTTP and HTTPS access to the VM is restricted to ports 80 and 443. We will create a new firewall rule here to allow access to port 3000 as well. For this, click on the hamburger menu on the top left corner and click on “VPC Network” in the menu. Then click on Firewall. Here you will see all the Firewall Rules listed here. Click on “Create” to create a new firewall rule.</blockquote><p>Refer to the image below for details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMV8V78qons-gMOhgKnjxg.png" /></figure><p>As you can see, we are defining a firewall rule called “default-allow-http-3000”. We specify the “Targets” in the section below as “Specified target tags”. This means that the rule does not apply to all compute type resources. Next we specify the “Target Tags” as “http-server”. Remember that this tag was automatically applied to the VM when we selected “Allow HTTP Access” during VM Creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E2SccUDGf4sos1CStv9xCg.png" /></figure><p>Next, we specify the Source filter to be IP Ranges and as the Source IP ranges we specify “0.0.0.0/0”. This is a CIDR Block notation for all the worldwide web. Then in the “Protocols and Ports”, we specify the “3000” port for the TCP protocol (designated as “tcp” in the figure above). Click on create to finish this process.</p><p>What we have done just now is that we have told GCP to allow traffic from the internet (the “source”) to have access to all the Compute Resources bearing the Network Tag “http-server” (the “target”) on port 3000 with the TCP protocol with HTTP.</p><p>Next, go to the external IP once more and change the protocol from HTTPS to HTTP and the link to direct at 3000. In my case, the external IP is 34.69.44.19 so the URL turns to be “<a href="http://34.69.44.19:3000/">http://34.69.44.19:3000</a>” (refer to your cloud console for your instance’s external IP). You should see something similar as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YuMm1GW1t01Sa_aZ5hndQ.png" /></figure><p>So my handsome face appears (XD) along with the details of the bucket we had created in the previous tutorial. This is the root “/” or home route. Next, clicking on the “Get Image” button should open something as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5JHJHvigl0muYoq2Zub5w.png" /></figure><p>You can verify that the image shown in the site is obtained from a “Signed URL” by clicking “F12” if you are on Chrome and browsing to the image element of my face (which is a public object) and then to the scenic image’s image element (which is a private object).</p><p>As is mentioned in the image above, this brings us to the end of our tutorial. This article also concludes the “Getting Started with Alibaba Cloud” series. While we did deploy the server on a GCP Compute Instance, the process for doing it on Alibaba Cloud’s ECS is similar. Hopefully, this also gives you a taste of the “best of all worlds” mantra of “multi-cloud”.</p><p>Before we end this article, we would like to say that if you have any suggestions or any requests on for a tutorial video or article on a specific cloud-related topic, feel free to send a mail to <strong>Chirag Nayyar at chirag@chiragnayyar.com</strong> and/or me at <strong>abhik@abhikbanerjee.com</strong>.</p><p>You get in touch with me on <a href="https://twitter.com/AbhikBanerjee99">Twitter</a> or <a href="https://www.linkedin.com/in/banerjee-1331/">LinkedIn</a>. Until then, Stay safe n’ well, keep your cloud fundamentals clear and as we say at <a href="https://dconcloud.com/">DC on Cloud</a> — <strong><em>Keep Calm n’ Cloud</em></strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2e2030294cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Alibaba — Alibaba ECS]]></title>
            <link>https://abhik99.medium.com/getting-started-with-alibaba-alibaba-ecs-405ea3d087aa?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/405ea3d087aa</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[hands-on-tutorials]]></category>
            <category><![CDATA[alibabacloud]]></category>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[elastic-compute-service]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Sun, 28 Mar 2021 12:52:21 GMT</pubDate>
            <atom:updated>2021-03-28T12:52:21.112Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting Started with Alibaba — Alibaba ECS</h3><p>This tutorial is a part of “Getting Started with Alibaba Cloud” Tutorial Series. Previous articles in this series include:-</p><ol><li><a href="https://dconcloud.com/alibaba-ram-multi-factor-setup/">Getting Started with Alibaba Cloud — Resource and Access Management for Better Practices — 1</a></li><li><a href="https://dconcloud.com/alibaba-cloud-ram-part-2/">Getting Started with Alibaba Cloud — Resource and Access Management for Better Practices — 2</a></li></ol><p>In this article, we shall delve into Alibaba Cloud (Aliyun for short) Elastic Compute Service or ECS. If you have been following our previous articles, by now you know how to create a RAM user for daily usage besides the Root Account provided by Aliyun. It is recommended that you use that User for this and future tutorials as well. Make sure to not give it all-out admin access since that should only rest with the Root Account.</p><p>We will go over the Elastic Compute Service offered by Alibaba Cloud. If you are coming from a different Cloud platform, this should be a walk in the park for you. For those coming from AWS, it would be EC2. For those coming from GCP, it would be Compute Instance and so on. Compute forms one of the foundational pillars of cloud computing. It is important for a beginner to understand the working of Compute Resources on a specific cloud platform since most offerings will essentially be an abstraction over the compute resource itself.</p><p>Here we will go over basic topics like how to deploy ECS instance on Alibaba Cloud, what are security groups in Alibaba Cloud, the different payment options and networking billing methods offered by Aliyun. We shall deploy a Linux ECS Instance and have some fun with it. In the next parts of the tutorial, we shall explore hosting on Alibaba Cloud’s ECS, deploying multiple Alibaba Cloud ECS instances behind a Load Balancer (SLB) and Autoscaling Groups on Alibaba Cloud. So, without further ado, let’s start with today’s objectives.</p><h3>Creating an Alibaba Cloud ECS Instance.</h3><p>First, log in using the RAM User into your Aliyun Console. Next, click on the hamburger menu which appears on the top left corner and select Elastic Compute Service (additionally, you may choose to start this as well for it to appear as a shortcut). This should lead you to the ECS console, something similar to the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEP_mrQpcwepQxIuky-f0g.png" /></figure><h4>Step 1.</h4><p>Next, click on “Create Instance” to start the process. It should lead you to a screen showing various fields under “Basic Configuration”. This is the section where we select stuff like which OS to use for the Virtual Machine we are about to deploy. The screen below should look familiar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qw1xfzP06CoKB7fZOmmypw.png" /></figure><p>There are a few things to consider here. We will go over each of the fields appearing on the screen one by one.</p><ol><li><strong>Billing Method.</strong> You can choose to buy an ECS instance from Alibaba Cloud. This wouldn’t really be “buying” in the sense that you will be paying rent up-front for a specific interval of time. During that time, that instance will be dedicated to you. The longer you choose to rent the ECS instance, the more discount you will get. This is the “Subscription” option. On the other hand, “Pay-As-You-Go” means that you will pay for the rent as you continue to commission (fancy word!) for the ECS instance. This is suited for short-term usage like this tutorial.</li><li><strong>Region</strong>. Next up is choosing where will you like Alibaba Cloud to allot you your ECS instance. At the time of writing, Aliyun has 21 regions in total from where you may choose. The easy logic to go with is that choose the region closest to you. It’s pretty convenient with AWS and Azure where you have well-known tools to measure the latency of each region with your location. I will be choosing Mumbai since it is closest to me.</li><li><strong>Instance Type</strong>. This is the type of ECS instance you want to provision. There are many task-specific instance types. The name of the instance signifies things like its main purpose, the generation it belongs to and also how powerful it is compared to the weakest instance in that family (family is a categorization of instances based on the main purpose of those). You can find a complete list of these on Alibaba’s official Documentation for ECS. I will choose to go with t5.micro since it is the smallest type available and this is just a tutorial. Burstable Instance types offer elevated levels of performance for a limited amount of time.</li><li><strong>Image</strong>. This basically is the operating system that will be used to make the virtual machine for you. Alibaba Cloud offers its own version of Linux called ‘Aliyun Linux’. However, here, we have gone with Ubuntu.</li><li><strong>Storage</strong>. Now you have your hard-disk on your PC right? Similarly, an ECS instance also has to have its disk. This is the option where you can select which kind of disk you want to launch your ECS with. Alibaba Cloud offers “Ultra Disk” and “Standard SSD” type disks. The more capacity of the disk you choose, the better IOPS you will get. However, it will cost you. The option “Release with Instance” makes sure that this disk is deleted when the ECS instance is deleted. You may choose to uncheck this option but be aware that when you delete or “release” your Alibaba Cloud ECS instance, the disk will be retained. You shall be charged for the disks you maintain.</li></ol><p>The nice thing about it all is that you get to see an estimated price that you will have to pay for provisioning this instance. In my opinion, this is pretty handy. With other cloud platforms, you may need to check with an external “Cloud Price Calculator” of some sort to get such an estimate which Aliyun offers right out of the box. The below screen also shows what happens when you select some alternative options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-TcIR44GqaqS4plBA26C_g.png" /></figure><h4>Step 2.</h4><p>Clicking on next will bring you to the Networking section of the ECS deployment. We will be discussing topics like Bandwidth Billing and Security Groups. Topics like Elastic Network Interface and VPCs will be covered in a future tutorial. The screen below should look familiar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0_wXiXfIjc_RE10Xge3Hw.png" /></figure><p>Here, we have the following options to discuss: -</p><ol><li><strong>Bandwidth Billing</strong>. It may be that you want to use this instance as just a private instance. In such a case, the option will not appear since you do not need to assign a Public IP to the instance. But in our case, we shall access the instance and we need it to have a public IP. Since this means there will be traffic incoming and outgoing from your instance, the network services of Alibaba Cloud will be used. For this reason, they will bill you. You have 2 options to pay. First, you can “Pay-By-Traffic”. This means that you will only pay for the amount of network traffic that comes into your instance. For a given bandwidth, you may have a very less amount of traffic coming in. So, you may opt for this. However, “Pay-By-Bandwidth” offers lower costs for short-term usage. Based on the bandwidth you selected, you just need to pay regularly for it. This means you will have a stable charge billed against you by Alibaba Cloud. Here, we choose to “Pay-By-Bandwidth” with 1 Mbps.</li><li><strong>Security Group</strong>. Security Groups are like a layer or envelope around your ECS instances. As an analogy, consider an apartment building. There are many families living in multi-storeyed apartment. Each flat in the multi-storeyed apartment is like an ECS instance. Now when someone from the outside comes into the apartment, the outsider is checked at the perimeter gate first to determine if he/she is allowed. This prevents anyone from just barging in and harming a resident, right? A Security Group is just like that. It houses ECS instances and determines which connections will be allowed into the instance. By default, every traffic going outside (outbound/egress) is allowed. But to be allowed in, there must be the rule. Aliyun, like most other Cloud Providers, provides a default Security Group right out of the box. That is selected here by default. For more discussions on Security Group, please skip ahead.</li></ol><p>The screen below shows our choices. Note that we have decreased our bandwidth to 1Mbps. This is not reflected in the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z49aY4-Od3VQutv7T7gLYg.png" /></figure><h4>Step 3.</h4><p>When you click on Next, you will be asked to set the instance’s system configuration. This is where you set stuff like the Login method. Generally, SSH is preferred with key pairs. However, for the sake of easiness, we have opted for a password. Some cloud providers might not offer the option of Logon using Password. The instance name has been set to “my-first-instance’ and a description has been added as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flU6gq5IlzhynUZjChtDxw.png" /></figure><h4>Step 4.</h4><p>At the next step, you will encounter the “Grouping” option. This is optional but pretty handy. Refer to the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msyJCcKUgbE_bcZMbIFwyg.png" /></figure><p>Basically, this is used for “Grouping” your instances. For beginners, this might seem confusing. After all, why do we need this if we already have “Security Groups”? Think of it this way, within a multi-storey apartment, you have a lot of families. Each family is like an ECS instance. Now, every family may have its speciality. One family may be a family of doctors, another might have lawyers or say, engineers or bankers. Basically, if you are Indian, these are the most “coveted” professions even though we are discussing IT stuff 😊. Isn’t it easy to recognise each flat at the door by the title of the family members?</p><p>Tags allow exactly that. You can tag your ECS instances and then use those tags to refer to the instances from Services like CloudMonitor. Once done, click on “Next: Preview”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r2joZPhuXL3botElTezrqw.png" /></figure><h4>Step 5.</h4><p>On this screen, you will be shown a summary of your choices. Also, you will be able to select an “Automatic Release” date and time. Basically, this means that the ECS instance will be automatically deleted at a specific time. I have chosen an approx. 30 minutes which is the least permissible time limit. Below you will be able to see the total cost per hour. Clicking on “Create Instance” completes the process and starts provisioning. You will be directed to the ECS console which should look similar to the screen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FFqAsoER66pbqh5ym81m3Q.png" /></figure><p>After the Aliyun ECS instance has been successfully created, let’s connect to it and check it out. Click on “Connect” and this will open a new tab where you will be prompted for a VNC password. Set it to something you can remember. Next, you will be shown the console where you first need to type in your root user credentials to log in (refer to Step 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tYXDkndZXowDHw1q7fR4uA.png" /></figure><p>At this step, the ECS instance has been successfully created. You can work on it. In our case, this instance will be deleted automatically along with the disks. Next, we shall discuss a few important terms related to Alibaba Cloud ECS. Please note that these are also general topics of discussion across other cloud platforms as well like AWS/GCP/OCI. So if you have gotten until this point, our main objective is over. The below sections are for beginners in Alibaba Cloud (or any cloud for that matter).</p><h3>Disks.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qT_bIJBFSa8cKuHOpzL1fg.png" /></figure><p>As of writing, Alibaba Cloud provides three types of disks:- Ultra Disks, Standard SSDs and Enhanced SSD. Each offering has varying levels of IOPS. The larger the disk capacity, the more IOPS you get. This essentially means that larger disks will be faster.</p><p>When you create an Aliyun ECS instance, the instance must have an Ultra Disk or Standard SSD attached to it. This disk is provisioned in the same datacenter as the ECS instance. If you think about it, it makes sense because you would want your boot disk to be as close to your CPU as possible.</p><p>You can also create disks that you can attach to your instances. However, one disk can be attached to only one instance in Alibaba Cloud. Also, you can resize an already created disk. The steps include unmounting the disk from the instance, shutting the instance down, resizing the disk as needed and then re-attaching and re-mounting it after power on.</p><p>Snapshots are like Disk Backups. This can be used to create other disks from your disk. One thing you will hear is that “Snapshots are incremental”. This means that suppose you create a snapshot out of a disk. The next time you try creating a snapshot, you will be actually only modifying the snapshot based on only the part of the disks that have changed.</p><p>The disks you have made can be accessed under the “Storage &amp; Snapshots” menu on the left side of the ECS console. Clicking on the disk shows the disk details as shown below. Notice that it has been mentioned that the Disk is already attached to an Alibaba Cloud ECS instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fy8t5ntfCnoYfVLLuo12wA.png" /></figure><h3>Security Groups.</h3><p>In this section, we will discuss Security Groups. You can access the security groups under the “Network &amp; Security” options in the left side menu of the ECS console. You shall see a screen similar to the one shown below which lists all the security groups. Note that there are other offerings like VPC which will be explored in future tutorials. Alibaba Cloud, like other cloud providers, gives you a default security group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fFpdgULDKA0JjnrBOB7VIQ.png" /></figure><p>Clicking on the security group name will show you the rules that are defined in the security group. Remember the apartment analogy? When there is incoming traffic to a specific instance in the security group, it is stopped at the security group level and checked if traffic from that source (usually a CIDR block or another security group) is allowed. If the destination matches in the security group, the “Action” is checked. Depending on the action, the traffic is either allowed or denied. The screen below depicts the rules in our default security group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Ij5jG6AH4ae2ljR2FLt9A.png" /></figure><p>Let’s try to add a rule to the security group. You do that by clicking on “Add Security Group Rule” on the upper right side. The options in the following screen need to be filled in before the rule is added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qD5WzmFu7dMUo85dC7ONfA.png" /></figure><p>First, you need to select the direction of traffic (Inbound/Outbound). All outbound traffic from the ECS instances is allowed while Inbound traffic is not. Security Group Rules are regarded as “Stateful” in the sense that if you create an Outbound Rule, an Inbound Rule is automatically created.</p><p>Next, you need to decide the Action. After this, you specify the Protocol Type and port range. In our case, we have chosen to allow TCP traffic directed at port 3999 of our ECS instances. The Priority of the rule determines the fashion in which it will be assessed. Rules having a lower priority are given more importance. A priority of 2 here means that this rule overrules any rule stating otherwise with priority &gt;2. It can be overruled only by a rule with priority 1. After this, you select the Authorization Type. By default, it is “IPv4 CIDR Block” but it can also be “Security Group”. Authorization Object denotes the outside source of the traffic. It can be a CIDR block or a security group name respectively. In our case, it’s the CIDR block 0.0.0.0/0 meaning any and all sources (basic networking knowledge is required to understand this). A brief description of the Security Group Rule follows. If you click on “OK”, the rule will be added as shown in the following picture. I must add at this stage that you shouldn’t allow all traffic from the internet at any port if you are not confident of the consequences. In short, it’s a bad practice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-uP0cuis9uJAxDQbkBfsg.png" /></figure><p>Clicking on the second option in the left menu shows the instances which are a part of the security group. Since we only have 1 instance, that instance is only shown. Clicking on the instance name will show you the instance details as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Cx3yn9a0QwzTAHuwCCPqQ.png" /></figure><p>A short discussion on Network Interfaces is in order at this point. Network Interfaces are attached to your Alibaba ECS instances. It is these network interfaces that allow you to instance to have IP addresses. You can access a list of Network Interfaces if you click on “ENIs” in the ECS console. ENI in Alibaba Cloud stands for Elastic Network Interface. Refer to the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EG4jB070sVFsRzzYjtGBQ.png" /></figure><h3>Conclusion.</h3><p>In this article, we discussed topics related to Alibaba Elastic Compute Service. We deployed an ECS instance and had a look at Disks and Security Groups. The understanding of computing resources in any cloud platform is essential to its mastery. In the next part, we shall see how you can host a simple web server on Alibaba ECS instance, the functions of Alibaba Cloud SLB and much more. Till then, stay safe and as we say at <a href="https://dconcloud.com/">DC on Cloud</a>, “Keep Calm n’ Cloud!”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=405ea3d087aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explaining Blockchain to a 5-year-old.]]></title>
            <link>https://abhik99.medium.com/explaining-blockchain-to-a-5-year-old-390fd6ee2e65?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/390fd6ee2e65</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[geek]]></category>
            <category><![CDATA[simplicity]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Wed, 22 Jul 2020 06:26:57 GMT</pubDate>
            <atom:updated>2020-07-22T06:26:57.446Z</atom:updated>
            <content:encoded><![CDATA[<h3>How will you explain ‘Blockchain’ to a 5-year old child?</h3><p>Today we are going to try to understand what blockchain is from the perspective of a child. Something like this would be really helpful when you are approached by your little sibling. You wouldn&#39;t really have to sit and think before explaining it to them and trying so very hard to not utter something complicated. This would also be an exercise in understanding Blockchain in the simplest of terms with real-life analogies.</p><p>So without further ado… Let’s Begin.</p><p>To start our journey, let’s take four friends — Ravi, Alice, Wasim, and Bob. Each of them has chocolates with them (1 Eclairs and 3 Gems, don’t get greedy now!). They love going on adventures and we’ll see how they have gone on 4 such adventures. We would also help them solve their problems and learn what Blockchain is. Sounds right? Let’s get started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*ceLubK-fDnMouFNgDoktmg.jpeg" /></figure><h3>The Mystery of the Missing Gem.</h3><p>Now Ravi decides to share his yellow gem with Alice. As you can see below, he has given her the gem already. Now, Alice has 1 Eclair, and 4 gems while Ravi has 1 Eclair and only 2 gems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*I63js9L-PtEp-5DOaBGyAQ.jpeg" /></figure><p>But Alice is a bit greedy. She is hungry and decides to eat the gem that Ravi had given to her. Ravi has shared his gem with her but there is no proof of it. She decides to tell Wasim and Bob that she did not get Ravi’s gem. Ravi, on the other hand, has clearly shared his yellow gem. (Turn to the next page to see the current result).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*mwqCfriwlOPOLrJaT3x4-g.jpeg" /></figure><p>Let’s take this as <strong>Problem 1.</strong></p><h3>Unknown Treasure Found!</h3><p>How great would it be if we could go on adventures, right? Well, Bob in this pic has already gone on one and has found a treasure!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*vK0ZyrfI45vsVQlp-DHNRA.jpeg" /></figure><p>Now, remember how everyone started out with 1 Eclair and 3 gems each? Bob too had the same number gems. But he went on a quest and found a treasure chest. He discovered an extra gem and decided to use that as well.</p><p>But is this even right? How can Bob be allowed to have an unfair advantage? If Bob has done it, what’s stopping Alice or Wasim from using extra Eclairs that they might have found? So, we come to the conclusion that this cannot be allowed. But how can we prevent this from happening?</p><p>Let’s call it <strong>Problem 2.</strong></p><h3>The Double Eclairs Dilemma.</h3><p>Again, let’s return to the initial point. Everyone had 1 Eclair and 3 gems. Now Alice and Wasim decide to strike a deal. In return for one Eclair from Alice, Wasim will help her complete her Maths homework which she has to submit tomorrow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*ROqE-oAwKsc_yQRvdVaIZw.jpeg" /><figcaption>(Here we can see Wasim with Alice’s eclairs.)</figcaption></figure><p>But Wasim doesn’t know that Alice has yet to complete her English homework as well. Without telling Wasim, Alice has also made a secret deal with Bob. In return for one éclair from Alice, Bob would help Alice with her English homework. This deal is not known to anyone except Alice and Bob. Not Wasim and certainly not Ravi. And so, Alice has sent the same eclairs to Bob as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*ubcYpHVbm2pD4afqb38GeA.jpeg" /><figcaption>(Here we can see Bob with Alice’s Eclairs.)</figcaption></figure><p>Clearly, this is something that is not possible, right? This is known as “Double Spending”. It means that Alice is using the same eclairs to strike two deals. After she has already exhausted her eclairs, she is taking advantage of the fact that no one really knows about it. Let’s take this as <strong>Problem 3.</strong></p><h3>Why so Unfair?</h3><p>Now then, we have three problems in our hands with no clear solution. Before we get to the solution, let’s look at one more story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*gRxVi160piwXupY5ebhutw.jpeg" /></figure><p>Let’s think of a place where we can keep the chocolates before sending them. Whenever someone wishes to send some chocolate to others, they have to send it to that place before it is sent to the intended person. This is actually how banks work. When Wasim send two gems to Bob, it would go first to the bank. Then the bank would send it to Bob.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*uQ7brgYCe7JqVRGOY1HRCg.jpeg" /><figcaption><strong>(</strong>Two Gems sent through the bank.)</figcaption></figure><p>But here’s the curious thing, note how only one gem reaches Bob. Wasim sent 1 green and 1 red gem. The gems were sent to the bank first from where the gems were sent to Bob. But the bank takes one cut (here the green gem) out of the gems for its services and then sends the remaining gems to Bob.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*b0EaLG_7tkNYtMsNnRVxSg.jpeg" /><figcaption>(Green gem remains with the Bank.)</figcaption></figure><p>If you look at the bank, it sounds fair, right? After all, they are giving Wasim this service so they are charging as well. But why should Wasim have to pay a charge out of the gems that he has earned? Could there not be a way to work around this? Let’s take this problem of the unfair cut as <strong>Problem 3.</strong></p><h3>Enter Blockchain — The Hero!</h3><p>We now have three problems. Let’s summarize,</p><ol><li><strong>Problem 1 </strong>— Ravi shared one gem with Alice, but there was no proof of it. Alice ate the gem and told everyone she never received any gems from Ravi!</li><li><strong>Problem 2 </strong>— Bob went on a quest and found an extra gem. He decided to use it unfairly and without anyone’s permission. According to him, he already had that gem from the beginning.</li><li><strong>Problem 3 </strong>— Alice made 2 separate deals with Wasim and Bob using the same eclairs. Who owns the eclairs now? Or better yet, how can Alice use the eclairs once she has already given it to Wasim?</li><li><strong>Problem 4 </strong>— Wasim sent two gems Bob with the help of Bank. But Bank kept one gem as payment for its services.</li></ol><p>When we start, let’s say, Ravi, Alice, Bob, and Wasim each have a book. This book contains a record of everyone’s chocolate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*0po4UCX49imk1JRI8q8fMg.jpeg" /></figure><p>Everyone has a record. So let’s proceed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*cX932SSL2gb7jFDfm_7tQQ.jpeg" /></figure><p>When Ravi sends a gem to Alice, it is recorded on everyone’s book. This means that there are 4 proofs that Ravi did actually share a gem with Alice. So, now even if Alice gets hungry and eats the gem, she cannot claim that Ravi had not sent any gem to her. <strong>This solves Problem 1.</strong></p><p>Next, Bob went on a quest and got 1 gem, right? He says that he had that from the beginning. But since everyone knows that was not the case, he is caught. Now, Bob can add this record to his book that he got this gem from a quest. This is also written in everyone’s books.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*b3baYxjSOEwV_68wOxJV_Q.jpeg" /></figure><p>Simple as that. Everyone knows that Bob now has four gems and 1 Eclair. <strong>This solves</strong> <strong>Problem 2.</strong></p><p>After this, we see that Alice did a “double spending” with the eclairs she had. How does this book solve that problem? Let’s see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*x0oPQ7R2hiTOYcniquk6hw.jpeg" /></figure><p>When Alice gives Wasim the eclairs she had in return for her homework, everyone records that their books. So, the next time Alice tries to send Eclairs to Bob in return for English Homework, everyone checks their books.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*K4FlE-PLfDT7vHH4y98G6Q.jpeg" /></figure><p>Bob, Wasim and Ravi find that Alice does not have an Eclairs she can send to Bob in the first place. Hence, she cannot make this deal. Thus, “double spending” cannot take place and <strong>Problem 3 is solved.</strong></p><p>This just leaves out Problem 4, right? Well, take a good look at where we are. The solution to Problem 4 is here already. Did you spot it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*wBd2Q48h5G-Y1ss-ubTcmQ.jpeg" /></figure><p><strong>Now,</strong> if you note, everyone is recording the gems and eclairs in their books. They all can see each other’s books. There is no need for a Bank in this case, right? The purpose of the bank is served. So the next time Wasim sends Bob 2 gems, no one will take any cut from it. <strong>This solves Problem 4.</strong></p><h3>But What is the Blockchain?</h3><p>Remember this little piece of thing? We were calling it a “book”. This is where everyone’s actions were being recorded. And every one of the friends, Ravi, Bob, Alice, and Wasim had a copy of it. Every action was being checked first and then recorded once every one of them reached a decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*z2JK11DZfTQWG-3DS1kErg.jpeg" /></figure><p>Turns out, this becomes a “block” and multiple such blocks make up the Blockchain which every participant has a copy of. Surprising, right?</p><p>One way to understand it is by taking every action in the list (“1 Eclairs, 1 Gem”, “1 Gem, Ravi -&gt; Alice” and so on) these can be thought of as blocks if you want to. And this whole list is like a chain of these blocks, right? You might think of it like this as well.</p><p>This is the Blockchain (well a trimmed down version of it at least). In the real world, this is used to record hundreds and thousands of such actions between two or more friends. As you can easily see, this makes it all <strong>“transparent”</strong> and <strong>improves “trust”</strong> between the friends (Ravi, Bob, Alice, and Wasim). Moreover, if say someone was trying to do something naughty, such as changing the list, he or she would have to change all the four copies of it at once. This is very difficult, wouldn’t you say? Which means the friends are safe and <strong>secure</strong>! (It might not seem so difficult here, but imagine a group of 100 or 1000 friends, each of them with their own copy)</p><p>And that’s it. That’s what Blockchain is and how helpful it can be. Hope you enjoyed it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*36uKFFUXl1Y-DbzMV6rDug.jpeg" /><figcaption>Take Care!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=390fd6ee2e65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginning your Blockchain Journey — A List of Projects you could do.]]></title>
            <link>https://abhik99.medium.com/beginning-your-blockchain-journey-a-list-of-projects-you-could-do-fa82848dbe4b?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa82848dbe4b</guid>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[supply-chain-management]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[projects]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Sun, 29 Sep 2019 16:22:42 GMT</pubDate>
            <atom:updated>2019-09-29T16:22:42.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beginning your Blockchain Journey — A List of Projects you could do.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*GZ3Km2IRbSy-LdKhOlqubA.jpeg" /><figcaption>Source: <a href="https://imgflip.com/i/234fg3">https://imgflip.com/i/234fg3</a></figcaption></figure><p>Blockchain has come a long way since being initially unveiled by Satoshi Nakamoto. And though it is still counted as a “nascent technology”, the developer community has quickly adapted to this tech and this has seen quite a few fascinating projects coming to fruition.</p><p>If you are a beginner in this field and wish to fill up your resume with a truckload of projects, you have arrived at the right place. Here’s a list of projects that you could make and build your skills.</p><p>But before you proceed, please make sure that you build a full end-to-end application and not just a piece of code which would demonstrate your familiarity with the subject. The reason is simple, a full-stack solution with a well-defined interface is more attractive than just seeing lines and lines of code. Case in point, writing Solidity smart contracts is easy and demonstrates your skills in the programming language as well as in Blockchain. But a more complete approach would be to make an interface using React or Angular and using Web3.js to communicate with the Blockchain Server.</p><p>So, without further ado, here is a list of projects that you could make on Blockchain and Distributed Ledger Technology in general.</p><h3>Supply Chain Management Projects:</h3><h3>1. Tracking Land Ownership via Blockchain.</h3><p>Land ownership is one of the most classical examples where Blockchain can be used. This can be done to not just display the current owner but also to keep a record of change over ownership of a plot of land. Being transparent and decentralized in nature, these records can easily be used to settle disputes as well as get the whole record of ownership of a land, thus, also settling tax claims. Design a Blockchain project which realizes this model.</p><h3>2. Design a Blockchain-based platform which checks for Counterfeit Medicine.</h3><p>It is estimated that more than 250,000 children die each year because of Fake Malaria Medicine. The statistics grow worse every year. This is a serious concern for Pharmaceuticals as it not only hampers their repute but also the overall trust of a Customer. Blockchain can address this by uniquely tracking the origin of not just the medicine but even the components of the medicine. If successfully designed, such a Blockchain platform could help eradicate Medicine Mafia and even Middlemen who sell fake medicine. Could you help in successfully building such an innovative and modern System and help in this fight?</p><h3>3. Secure Medical Data Records.</h3><p>Medical Records of a Person can tell the person’s life story. A seemingly boring Medical Record is enough resource for misuse as it can be used to administer the lethal dosage. At the same time, forged medical records are not unheard of. Because of its immense use in Supply Chain Management and use of Cryptography, this problem can be solved by designing a platform where</p><p>a) User Data would be encrypted. This would mean that even private data like User Medical Record can be uploaded without worry.</p><p>b) Medical Records can be tracked. This would essentially eliminate the risk of Forged Medical Records being presented to the Doctor by the patient with an ulterior motive.</p><h3>4. Blockchain-based verification for authenticity of Wine.</h3><p>“<em>A person is only as good as the company he keeps and the wine he drinks.”</em></p><p>The saying might seem comical but it’s true. In fact, just like the Pharmaceutical Industry, Wine Industry is plagued by Forgery. This could mean that a local brand might sell their wine illegally terming it as an “International or Imported Brand”. It could also mean that a locally made wine can be shipped with the name and tag of an International Brand (similar incidents have been reported in Pepsico and Leher Pvt. Ltd). Design a Blockchain System to address this problem and explain how it might be useful for the students living in Mess ;) ).</p><h3>5. Meat Tracking System with Blockchain.</h3><p>How often have you heard about meat from another animal being sold as edible meat? For people living in Kolkata, this is not so uncommon. “Bhagarer Mangsho” is a term used for Dog meat which was sold as Chicken Meat and this led to quite a situation in Kolkata.</p><p><a href="https://timesofindia.indiatimes.com/city/kolkata/20-tonnes-of-carcass-meat-found-in-rajabazar-factory-packed-ready-to-be-sold/articleshow/63932532.cms">Kolkata: 20 tonnes of carcass meat found in Kolkata factory, could be of dogs &amp; cats | Kolkata News - Times of India</a></p><p>Similar incidents have been reported around the World. Conversely, it can be detrimental to a Food Outlet selling food made from authentic meat to be accused of using the wrong meat. Examples can include Dominoes being accused of mixing Beef in their Chicken Pizza. These incidents have communal implications as well. By designing a Supply Chain Management Tracking System for Meat Industry, such problems can be alleviated as the source of the meat can be easily confirmed along with the preservation techniques and expiration date of the Meat.</p><h3>InterPlanetary File System Based Projects:</h3><h3>6. Build your Portfolio site and Host it on IPFS.</h3><p>IPFS or InterPlanetary File System has been for quite some time now and offers Decentralized Permanent Storage. The extensive use of Hashing of files also prevents unintentional duplicates from being stored. Study this storage system. Because this storage is free and permanent, this could essentially offer “Free-hosting” of Static Websites. Make your own Portfolio site and then host it on the IPFS. It counts as one of the easier projects to do but can demonstrate practical usage.</p><h3>7. Decentralized Renting for Hard Disk Space.</h3><p>The IPFS is a literal example of this. But can you design a DLT or Blockchain which would track which user is renting out which hard-disk space and what is being stored by observing the hashes (here a record of hashes is enough, you cannot really guess the content of a file using the hash of the file)?</p><p>Here’s a list of resources you can read-up on, Thanks to <a href="https://medium.com/u/2bfdd6540157">vasa</a> for the list!</p><p><a href="https://medium.com/swlh/10-resources-to-get-started-with-ipfs-5f429dc8a841">10+ Resources To Get Started With IPFS</a></p><h3>Intellectual Property Projects.</h3><h3>8. Tracking rights and shares of a Company.</h3><p>Shares of a Company being traded publicly or the rights of the Board of Directors can be tracked and maintained by the use of Blockchain. Though seemingly simple, this kind of system can help to settle disputes arising out of ownership of shares and rights given to the Board of Directors when they join. As the state of the Data in the Blockchain is immutable, the disputes can be settled without the evidence being in question.</p><h3>9. Blockchain-based tracking of Rights for Painting.</h3><p>Assume there is an Organization which acts as the maintainer of records for Painting and Sculptures. Any painting being sold would have to register with the organization which would recognize the copies in circulation and authenticity of the High-value Painting sold in auctions. This data can be visible to everyone and is easily auditable. Design a Private Blockchain Solution for this classic problem statement.</p><h3>10. Blockchain-Based Piracy Detection of Movies.</h3><p>Piracy is a serious concern for Movie Industry. Be it Hollywood, Bollywood or Tollywood — piracy causes losses which amount to Billions to this Industry. But what would happen if every third-party vendor would have to upload a hash of the movie they are selling or something on the lines of that which would be used to uniquely identify the movie and its origin? These decentralized records would be visible to the Original Rights Owner of the Movie and would help curb the sale of pirated movies. There can be more modifications to this basic idea. A <em>permissioned</em> Ledger would help address the problems.</p><p>A similar idea can be implemented to put a check on piracy in the Game Development Industry, Music Industry and other fields where Intellectual Properties are concerned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*62iWkHBPHswRpgyAcsBxiQ.png" /><figcaption>Source: <a href="https://me.me/i/what-if-we-used-blockchain-on-meme-to-stop-the-20861487">https://me.me/i/what-if-we-used-blockchain-on-meme-to-stop-the-20861487</a></figcaption></figure><h3>Ethereum Projects for Noobs:</h3><h3>11. Decentralized Election System.</h3><p>Voting and Crowdsourcing are the 2 most common applications of Blockchain. There have been many projects on it. It’s even used for introducing students to Solidity Programming for Ethereum (you can check it out on the official documentation page). This can be a good starting point but doesn’t really count that much. Either way, can you implement a similar system with a twist of your own?</p><h3>12. Simple Auction using Ethereum.</h3><p>Again, a very common application with huge resourcefulness. Auction on Blockchain is a basic example and many frameworks use it to ease new learners into the field. You can make an auction for Car (check out Hyperledger Fabric or Convector Suite for even easier way), Bidding (Ethereum Official Documentation) and more. The hard part is to bring in your own twist into it and making it more efficient.</p><h3>Conclusion.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*k6xlUdjWn8Pfz5hsaXshzg.jpeg" /><figcaption>Source: <a href="https://crypto-beginners-media-storage.s3-ap-southeast-2.amazonaws.com/static/img/blockchainmeme.jpeg">https://crypto-beginners-media-storage.s3-ap-southeast-2.amazonaws.com/static/img/blockchainmeme.jpeg</a></figcaption></figure><p>In conclusion, I would like to state that there is a lot of scope in this field but only if you have your basics clear. You need to have a solid grasp over Cryptography, Decentralized Databases and a sense of where implementing these solutions would bring the best results. You cannot just implement a Blockchain or DLT anywhere you want (also, understand the basic difference between a Blockchain and a DLT).</p><p>As mentioned before, whenever you try to make a solution, make sure you build a complete one. Writing smart contracts doesn’t count as complete. Show your skills as a developer by making a full-stack solution. That would give you an edge over others.</p><p>Last but not least, never be afraid of reaching out for help. There are great developer communities (not just Stack Overflow) and tons of resources from where you can learn. Good Luck!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa82848dbe4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Your Hyperledger Fabric Network Solution on Azure.]]></title>
            <link>https://abhik99.medium.com/deploying-your-hyperledger-fabric-network-solution-on-azure-8a4838f2a036?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a4838f2a036</guid>
            <category><![CDATA[hyperledger-fabric]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[blockchain-as-a-service]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Thu, 11 Jul 2019 16:52:45 GMT</pubDate>
            <atom:updated>2019-07-11T16:52:45.629Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*NQhh__BL6rrI__JkvuwIsw.png" /><figcaption>Azure and BAAS.</figcaption></figure><h3>Firstly, BAAS — What is it?</h3><p>You can skip these parts and go directly to “Steps to Set-up Fabric Environment on Azure” if you are already familiar with these topics and just want a quick tutorial.</p><p>So what is BAAS? Any guesses? You might have heard about PAAS which stands for Platform as a Service, SAAS which stands for Software as a Service and IAAS or Infrastructure as a Service. But what is BAAS? At this point, if you might be from a Web Development background, you might be thinking, “Is it Backend as a Service?”</p><p>You couldn’t be further from the answer if that’s what you are thinking. BAAS stands for Blockchain as a Service. The term might be new to you or might not. The thing is, BAAS has existed for quite a few years now. It started out when Projects like Hyperledger and Corda came into the limelight.</p><h3>Cloud Providers &amp; BAAS.</h3><p>One of the basic things you need to know about BAAS is that just like PAAS and IAAS, BAAS is also a managed service. Basically in BAAS, you do not need to configure the Blockchain to the extent you would have to when setting it up manually. You also do not need to have the infrastructure.</p><p>This is where Cloud Providers come in. When the hype for BAAS started, major cloud providers like AWS and Oracle sensed the potential in it all. Naturally, they made the decision of investing in this new technology which could prove to be one of the most important ones in revolutionizing many industries. After all, blockchain is not all about cryptocurrency. That is a common misconception. Equating blockchain and cryptocurrency would be like saying that DeepFake and Deep Learning are same. No, cryptocurrency is a use case of blockchain in the same way as DeepFake is to Deep Learning.</p><p>Coming back to the topic at hand, Cloud Providers invested in blockchain and that popularized BAAS. Today, you can find BAAS offerings by almost all popular cloud platforms. From AWS to Oracle, from Google Cloud Platform to Azure.</p><h3>Azure &amp; BAAS.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*PYeM2dj8dBshrdJ3ObCLfw.png" /><figcaption>Microsoft Azure</figcaption></figure><p>Coming to Azure, why would I choose Azure for blockchain? Some might say at this point that AWS has more market share and is more popular, it might be the ideal solution. I would like to disagree. While I would give AWS their fair share of credit, I believe that Azure is a better solution. Here’s why:</p><ul><li>Security Development Lifecycle — Microsoft makes sure that everything you development on Azure Cloud Platform remains safe by their security norms which are termed as top-of-the-line.</li><li>.Net — While I am not a .Net developer myself, I have acquaintances who are in fact quite satisfied with the .Net capabilities offered by Azure. This gives Azure an upper-hand over AWS.</li><li>…</li></ul><p>The list could go on and on. But these are not specifically why I chose Azure. You can find such reasons for plenty if you search for articles which compare such capabilities of Cloud Providers. The reason I chose Azure Platform over AWS, GCP and other providers is because:</p><ul><li>Microsoft invested in Blockchain and helped innovate BAAS with even more fervour than AWS or GCP. Microsoft even went on to develop Coco Blockchain Platform for Private Blockchain Solutions. Microsoft Azure made JPMorgan’s Quorum Blockchain as its preferred brand of Blockchains but at the same time provided customer with options like Ethereum — one of the most famous and oldest blockchain platforms for DApp development and Hyperledger Fabric — the go to blockchain platform, which according to Hyperledger is used by almost half of top 100 companies listed by Forbes. This is unlike AWS where there is support for just Ethereum and Fabric. At the time of writing this article, GCP had support for just Hyperledger Fabric via their Cloud Launcher.</li></ul><h3>Hyperledger Fabric on Azure.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlmZj5X0aKI9Bgo7iP-vag.png" /><figcaption>Hyperledger Fabric and Azure.</figcaption></figure><p>How would you develop Hyperledger Fabric Solutions on Azure? At this point, I am assuming that you have the basic knowledge about Fabric and its components and know your way around Azure. When you launch your Fabric solutions on Azure, most of the time, you would be using an Azure VM instance (or multiple, if you are running production environment). This is where you can follow two paths — the easy way or the hard way.</p><p>You can use the Hyperledger Fabric template available in the Azure Marketplace to launch your environment on Azure or you can take the hard way and manually commission VM Instances.</p><h3>Using Hyperledger Fabric Marketplace Template vs Manually Setting Up Environment.</h3><p>Using the template is obviously a faster solution. It is also the better solution. If you were to manually set up your environment, you would have to consider 2 cases — using multiple VM instances (usually in a production environment) or a single VM (for a development environment).</p><p>If we were talking in Cloud agnostic terms, in the second case, you would have to setup the communication rules between VM instances if you are using multiple ones. You would have to download and install the Fabric SDKs and configure the channels and peers and every other facet of a typical Hyperledger Fabric network. While that is easy to do for single, Dev mode VM instance, things get really complicated when you have to consider multiple running instances.</p><p>Hence, it is better to use the Hyperledger Fabric Template to set up your Fabric environment on Azure. And that is what I will help you to do in the following steps.</p><h3>Steps to set-up a Fabric Environment on Azure.</h3><p>Once you select the Hyperledger Fabric Template on Azure, you would be directed to a screen similar to the one below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUF5kSQVZox6Pyqig9DEVA.png" /><figcaption>Setting Up Username and Password.</figcaption></figure><p>This is essentially step 1. The resource prefix would be used to identify the instances you launch. You need to provide an username and the type of authentication that you would use. I prefer SSH over password, but can make your own choice here. Every Instance must belong to an Instance Group. Select the Location you want your instance(s) to live and of course, your subscription. I am on a Windows PC. So I am using Putty to generate my Public and Private SSH keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*a9Al688z62eCxlhr44Ad4g.png" /><figcaption>Using Putty on Windows PC for SSH Authentication to Azure instances.</figcaption></figure><p>After you have generated your keys, paste the required key in the field and click on “OK”.</p><p>You would be directed to select the password for the Certificate Authority(CA) of the Hyperledger Fabric Network. Recall that CA of the HLF network is responsible for issuing every participant of the network with a X.509 certification. This is used to identify that specific participant in the network.</p><p>You can leave the Organization setup to the default settings for the time being. As you can notice, you can also choose to have a VPN tunnel. Click on “OK” to setup your Network configurations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bv6pNJ2UyeDKdUM0D4vQ8g.png" /></figure><p>I had mentioned that you can choose a single VM instance for running your HLF network or even have a multi-node network. The former is good for dev mode while you can use the latter if you plan to deploy your HLF solution to production. For this, I am selecting single VM and clicking “OK”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tnjVKInp49_o20BjPqgryQ.png" /><figcaption>Single Node for this Tutorial.</figcaption></figure><p>Next, you will be directed to a summary of your choices. At this point, your network configuration is pretty much set-up from a infrastructure point-of-view. This page helps you review those choices. Once you have done that, you can go the next and final step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exSMpt6M7xSvaCq7RHsSXQ.png" /></figure><p>At this page, you will be shown the agreement and warnings, you may take your time to read through them. I recommend that you do. This option is labelled as “Buy” because you are essentially buying the solution from Azure at this point. Do review your prices and budget at this point and then feel free to click on “Create”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EOW2q6xmz-RMQ-2G4ptBPg.png" /><figcaption>Click on “Create” to start the process.</figcaption></figure><p>Your set-up is complete. It would take some time before your VM instance(s) are ready for use. You can view the status from the notifications on the top right corner of your console. Azure will take care of creating the necessary rules and setting up the VM(s).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BsBopTnTpwpf_Oya9x01Ig.png" /><figcaption>Azure Dashboard and Console. Notifications in the left panel.</figcaption></figure><p>Once this is done, you would see the VM instance(s) listed in your dashboard. If you have followed the same steps that I have, you need to use your SSH keys to connect to the instance(s). You do not need to install any SDK or run that scripts you would find on Hyperledger Documentation pages because all that has already been care for you.</p><p>You can even download a template zip which would contain the configurations you used to deploy your HLF network. You can either store this for future reference or backup or even use it to spin up similar networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1zSFTri6CnUiix74tIm4ZA.png" /><figcaption>Zip Template containing network artifacts.</figcaption></figure><h3>Conclusion.</h3><p>And there you have it! Your HLF network on Azure. The template is pretty handy, isn’t it? I hope this helped you in the way you intended. Before saying goodbye, I would like to mention that the subscription I used to do all this came from the $80 Azure Sponsorship I received when I attended the Global Azure Bootcamp held in Kolkata and I am grateful to the organizers of the event for providing the participants with such resources to help them get started.</p><p>So that’s it. Develop your solutions in the HLF network you just created courtesy of the Hyperledger Fabric BAAS model provided Azure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a4838f2a036" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[To Go or not to Go.]]></title>
            <link>https://abhik99.medium.com/to-go-or-not-to-go-af2f620c29a6?source=rss-fa06b4689516------2</link>
            <guid isPermaLink="false">https://medium.com/p/af2f620c29a6</guid>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python-vs-go]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[gocv]]></category>
            <dc:creator><![CDATA[Abhik Banerjee]]></dc:creator>
            <pubDate>Mon, 15 Apr 2019 06:36:20 GMT</pubDate>
            <atom:updated>2019-04-15T06:36:20.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*CLVTbw3yasYQpSzQwsbqUA.png" /><figcaption>Fear the Gopher!!</figcaption></figure><h3>GoLang from the Perspective of C and Python Programmer.</h3><h3>Introduction.</h3><h3>Why Python?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*yjgNWYZAFwkXPtCmPrcCVQ.jpeg" /><figcaption>Python</figcaption></figure><p>One of the most popular languages today is Python. And with good reason. You don’t need to have so much boilerplate code. The code itself can be semantically understood. The best of them all? There’s modules for every little thing.</p><p>With the release of Python 3.7, there’s even more that Python can do. It can be used for Asynchronous programming using ‘aync/await’ structure — something which was Javascript’s yard until now. The only disadvantage that you can have when using a language like Python is speed. It’s common knowledge that Python is almost 5 times slower than C++.</p><h3>C- the Granddaddy of Programming Language.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*6Db8bWa0zyFfCfxo0EcvYg.png" /><figcaption>The Grandfather</figcaption></figure><p>C is one of the oldest programming languages. It is still included in Course Curriculums for many Colleges (including my own). The best reason one can give for using a language like C is that it is close to the core. It provides portability, speed and more control over the programming construct.</p><p>Which is why, the importance of C when it comes to Operating Systems and Embedded Tech is second to none. Naturally, if you can master your way around a language like C, you can do it for any language. Any problems with C has been well sorted by its successors like C++ and Java.</p><h3>Where does Go fit into all This?</h3><p>Compared to languages like Python and C, the programming language Go is still very young. It was developed by Google and released back in 2009. That’s just 10 years ago. The fact that it was developed by the Legendary Ken Thompson along with Rob Pike should tell how much Google wanted to have a language more suited to its needs compete with the likes of C, Python, JavaScript and Java.</p><p>Make no mistake, I like Python, JavaScript and C. But it’s Go that I love. There are many reason for that. The one that influenced me the most was that when I code in Go, it made me feel comfortable. I didn’t have to write so much as “System.out.println()” for just printing a line. I didn’t have to worry about pesky “;”s or indentation in my code. It felt like a cross between Python, C and Java. And let’s face it, it’s the little things like this that make life perfect.</p><h3>GoLang or Go.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*zhce-QZ3-PYeuxTvNxk1qQ.jpeg" /><figcaption>The Go Gopher</figcaption></figure><p>There is a misconception of calling Go as GoLang. The former is the proper name for the language, the latter is just an abbreviation for Go+Language. With Go, you have to write a bit more code than your typical Python but not as much as C++ or C. The thing that makes Go so popular is the implementation of <strong>concurrency</strong> in Go. The only other popular programming with support for concurrency is Java. Please do not confuse <a href="https://eloquentjavascript.net/11_async.html">Asynchronous Programming</a> with <a href="http://web.mit.edu/6.005/www/fa14/classes/17-concurrency/">Concurrency</a>. They are different. You can read about it <a href="https://medium.com/swift-india/concurrency-parallelism-threads-processes-async-and-sync-related-39fd951bc61d">here</a>. There’s also a bit of a difference between Concurrency and Parallel Threading and you can get it at the aforementioned article.</p><p>I didn’t mean this article to be a full-on guide about every thing in Go. I do intend to write a series of articles on how you can get started in Go. This piece, however, was meant to give you a slight insight into why Go Is becoming so popular. <a href="https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted-wanted">Here’s</a> the result from the 2019 StackOverflow Developer Survey which lists Go as the third most wanted language right after Python and JavaScript.</p><h3>To Go, definitely.</h3><p>Here’s the list of reasons why Go has become so popular in that span of couple of years:</p><p>· Fast and Potable.</p><p>· Go code can be compiled to JS.</p><p>· Useful for Web Development.</p><p>· No need for Frameworks for Web Development. You can develop a simple REST server or even the complete backend.</p><p>· Implements Concurrency using Go Routines.</p><p>· Moderate Level of Boilerplate code.</p><p>· Extremely Useful for Chaincode development.</p><p>The last bit there won’t be understandable if you are not familiar with Blockchains and Hyperledger Fabric.</p><p>There are many more reasons why you can choose to switch to Go from other programming language. And I intend to explore them in the upcoming articles. They are meant to help you get started with the Go Programming Language. I would try to give analogies here and there to help you relate with constructs in other programming languages.</p><p>There are not many modules available for Go as is the case with Python. But the performance perks cannot be ignored here. Not to mention, the unavailability of modules and libraries should appeal to the open-source developer in you. It gives a unique opportunity.</p><p>The community of Go is not that large (compared to the Python and JS base), but it is rapidly growing and you can be a part of it.</p><h3>References:</h3><p>· <a href="https://eloquentjavascript.net/11_async.html">https://eloquentjavascript.net/11_async.html</a></p><p>· <a href="http://web.mit.edu/6.005/www/fa14/classes/17-concurrency/">http://web.mit.edu/6.005/www/fa14/classes/17-concurrency/</a></p><p>· <a href="https://medium.com/swift-india/concurrency-parallelism-threads-processes-async-and-sync-related-39fd951bc61d">https://medium.com/swift-india/concurrency-parallelism-threads-processes-async-and-sync-related-39fd951bc61d</a></p><p>· <a href="https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted-wanted">https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted-wanted</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af2f620c29a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>