Almost midway of the HPCC internship

Hello, I hope everyone is doing well, I started making some progress finally for the project and I hope it will speed up soon as well in upcoming weeks

  1. Package is pushed to pypi as a bundle
  2. License field is updating in various ML bundles to correct license link
  3. Created pull request for adding readme under the table of content
  4. Created pull request for see tag
  5. Created some issues in the repository for upcoming week

Thanks Lili and Roger for all the help

Next week the hope is to be able to start working more with existing pull request and merge all of them.

See you next week.

Struggles midway but cleared

Hello hope you are all doing well, its been few weeks the internship is started, I am learning lot of things but there are some hurdles on the way too, for last few weeks I was unable to setup the project on my machine due to some compatibility error but finally it passed with the help of Lili and Roger. They are quite supportive and patient through all the process.

From now my focus will be on

  1. Pushing the ecldoc as package to pypi server
  2. Improve the generator to have a feature to add readme under the table of content
  3. Add link to see tag in documentatioN

LexisNexis Internship

My name is Shivam Singhal and I am a new Intern for the summer of 2021 with LexisNexis. My background is in Open Source and Computer Science. I am doing my Masters in Software Engineering at Oulu University, Finland with the department of Faculty of Information Technology and Electrical Engineering. I did my bachelors in Computer Science at Guru Gobind Singh Indraprastha University, Delhi India. I originally moved to Finland last year in September 2021.

For my intern project, I will be working on improving ECL code documentation generator. This will provide us with a greater ability to improve the doc generator and it will serve the whole HPCC Ecosystem and community better. As we know the documentation is most important part of Software Engineering. This project will serve the community with better documentation

I will be working with Lili and Roger as my mentor during this project and I am very excited to see what we are able to accomplish over the course of this internship period!

Hyperledger Fabric “Building Your First Network” Tutorial 2

In part 1 of this tutorial set, I was introducing the files in BYFN. In part 2, I am going to introduce the remaining files.

Recap the File List

Let’s recap our list of files:

  1. docker-compose-cli.yaml (Part 1)
  2. base/docker-compose-base.yaml (Part 2)
  3. base/peer-base.yaml (Part 2)
  4. channel-artifacts/ (Part 2)
  5. crypto-config.yaml (Part 2)
  6. configtx.yaml (Part 2)
  7. byfn.sh (Part 2)
  8. scripts/script.sh (Part 2)
  9. scripts/utils.sh (Part 2)

We will finish all the remaining files in this part.

2.2 base/docker-compose-base.yaml

In part 1, we have introduceddocker-compose-cli.yaml, which is to define our (virtual) Fabric network. We review a part of docker-compose-cli.yaml:

The base file is similar to docker-compose-cli.yaml.

Lines 3 to 28 define a template node called orderer.example.com, and docker-compose-cli.yaml extends it and add some extra configurations based on this template.

Line 5 specifies which image this node uses. In our case, the node uses an image from Hyperledger official — hyperledger/fabric-orderer. That $IMAGE_TAG is the image version, such as 1.4.

Other keywords and configurations are similar to docker-compose-cli.yaml. The point of having a base file is just to group common configurations to a base file to make them reusable.

Notice that in line 32, there is also an extends keyword, that is, again, to extend or reuse another base file,base/peer-base.yaml, which we will quickly take a look.

The syntax of this file is more or less the same as docker-compose-cli.yaml and base/peer-base.yaml. Again, why do we need these base files? Because of reusability, though it is not mandatory.


2.4 channel-artifacts/

Notice that this is an empty directory currently. This directory will be used to store some configuration transactions and a genesis block. More details later.


2.5 crypto-config.yaml

This is a file to define certifications and keys to be generated and used in the network.

In Hyperledger Fabric, we have a set of certifications and keys for users and nodes. For example, Peer needs to have a set of certificates and keys to perform endorsement, prove itself as a member in the Blockchain network, do signing, etc.

Line 4 OrdererOrgs is defining certificates and keys generation for organization related to Orderer nodes.

Line 22 Template > Count specifies how many nodes in Org1 (organization 1), while 29 Users > Count specifies how many users in Org1.


2.6 configtx.yaml

This is a file to define the configurations of the Blockchain network, though later they could be updated.

This is a long file, so I don’t embed into the blog post. You could refer to it here.

Let’s look at some parts of this file:

So, overall, there are three organizations, OrdererOrg, Org1, and Org2. You may refer to here for more details of configtx.yaml.


2.7 byfn.sh

This is a convenient script file by Hyperledger Fabric to start the network.

We use it this way to bring up the network (we will run together later):

Basically, it does the followings:

  1. Generate certificates and keys based on crypto-config.yaml
  2. Generate channel artifacts based on configtx.yaml, outputs will be stored in channel-artifacts/
  3. Bring up the (virtual) Fabric network based on docker-compose-cli.yaml
  4. Create Hyperledger Fabric channel, mychannel
  5. Join Peer nodes into the channel
  6. Install the Smart Contract (Chaincode) in Peer nodes
  7. Instantiate the Smart Contract (Chaincode) in one of the Peer nodes

2.8 scripts/script.sh & scripts/utils.sh

  • scripts/script.sh is a script used by byfn.sh for steps 4 to 7 above.
  • scripts/utils.sh is a script used by scripts/script.sh. It contains some common utility functions, such as installing Smart Contract (Chaincode)

Starting from the next part, we will continue some practical steps.

./byfn.sh up

Hyperledger Fabric “Building Your First Network” Tutorial

Why “BYFN” Again? Isn’t there an official one?

Right, in Hyperledger Fabric document, there is a “Building Your First Network” Tutorial, but I think it is not detailed enough. This tutorial set is more or less the same as the official one, but with some more explanations on files.

In case you are not so familar with Blockchain, I recommend that you could take a look here. That covers what Blockchain, Hyperledger Fabric and Smart Contract (Chaincode) are conceptually.

But you might also read my short summary at the moment:

Basically, Blockchain is a cryptographically linked list of data blocks. Hopefully, it is unmodifiable and decentralised, following a certain consensus. In Fabric, Orderer is the consensus, Peer maintains the Blockchain data.

Hyperledger Fabric is one of implementations of Blockchain, and it is intended to use in business context, where there is a group of organisations joining in the Blockchain network (each organisation then contributes some nodes in the network).

Smart Contract (Chaincode) is a program that is interacting with the Blockchain following certain business logics. In Fabric, Peer is the node to run it.


Hyperledger Fabric — The Transaction Flow

Here is the simplified transaction flow in Hyperledger Fabric (how a transaction is submitted and written into the Blockchain ledger, I assume that there is no error):

  1. The client sends a transaction request to Backend with Hyperledger Fabric SDK. (Client → SDK)
  2. Backend forms a transaction proposal and sends it to the Peer Node. (SDK → Peer)
  3. Peer node executes smart contract (chaincode) and sends the result to Backend. (Peer → SDK)
  4. Backend sends the transaction to Orderer node. (SDK → Orderer)
  5. Orderer node will collect some number of transactions (or trigger timeout) and orders for those transactions. Then, it packs those transactions into a Block and broadcasts to Peer nodes. (Orderer → Peer)
  6. Peer nodes validate the transaction, commit the transaction into the Blockchain ledger, and send transaction committed notification to Backend. (Peer → SDK)
  7. Backend sends success notification to the Client. (SDK → Client)

Overall, the flow: Client → SDK → Peer → SDK → Orderer → Peer → SDK → Client. The path is kind of long…


1. Install Prerequisites

We use Hyperledger Fabric v1.4 in this tutorial.

First of all, you could install prerequisites by following the official instructions:

  1. Install prerequisites
  2. Install samples, programs, and docker images from Hyperledger Fabric

2. Files Structure

In this part 1 tutorial, I am going to introduce files in BYFN. I plan to introduce all files in 2 parts. Then, we continue some practical steps.

Let’s switch to BYFN directory (*supposed that you finish the prerequisite part, you should have all needed files and directories):

cd fabric-samples/first-network

This is the file or directory list that we will study:

  1. docker-compose-cli.yaml (Part 1)
  2. base/docker-compose-base.yaml
  3. base/peer-base.yaml
  4. channel-artifacts/
  5. crypto-config.yaml
  6. configtx.yaml
  7. byfn.sh
  8. scripts/script.sh
  9. script/utils.sh

There are other files in fabric-samples/first-network/, but they are not directly related to BYFN, we will ignore them.


2.1 docker-compose-cli.yaml

In order to develop Blockchain application, we need to have a Blockchain network first, right? This is a file related to setting up the network.

This is a Docker compose file, which defines your (virtual) Fabric network, such as what nodes are in the network, their internal use domain names, etc.

Below is docker-compose-cli.yaml

Line 1 defines our Docker network name, such that our nodes could have a “place” to talk to each other. And this “place” is named byfn.

Line 4 defines a list of nodes in the network.

Line 5 defines a node in our network — Orderer, which helps decide how transactions and blocks are ordered in the Blockchain network.

You see in line 6, there is an extends, which is to re-use another base Docker compose file. I could smell the odor of “Inheritance” in programming.

Line 9 defines this node’s name in the network. Finally, line 10 defines which network this node belongs to.

And line 13–43 are similar, but they define another type of nodes in our network — Peer, which is to maintain the Blockchain ledger, validate the transaction, execute smart contract (chaincode) in the Blockchain network.

Line 45 defines the cli, that is, command line interface, to control (send commands to) network nodes. Line 47 indicates the image of this cli, just like a Windows 10 image for a Windows 10 virtual machine.

Line 48 tty is to make sure that the cli keeps running. Line 50 we are defining some environment variables used by some programs for the cli, such as GOPATH — where the go library is.

Line 62 specifies what the default location is when we access the cli. Line 63 specifies that when the cli starts, executes this Linux command automatically.

Line 64 defines mount points for the cli. That is, we map some directories in our local machine, probably your Linux, to some directories in the cli (which is a virtual machine, called container in Docker).

Line 70 specifies that the cli depends on some other containers, like: without them, without me.


That’s all for part 1. Hopefully, I could finish introducing files and directories within 2 parts. Then we can continue some practical steps.

2018 Year in Review with AMO

Sibelius Monument, Finland

Each one of us have some goals to complete, things to learn, and places to visit. With the year getting ended, it is time to lock back and see what all did we do for the last 365 days.

Well, 2018 have been a phenomenal year for me. Working with Addons aka AMO Team is where the major part of 2018 was spent. I have learned how to work remotely with a cross-cultural team. I have met some super awesome people like Caitlin , Rebecca and many more. I fixed ~50 Bugs in AMO. I got to meet a lot of great people, built connections and learned things. I am really happy to see few of my goals getting completed. I failed of the things miserably too.

Here is everything I did in the last year.

January

  • Got the idea for create-web-ext — a scaffolding tool for browser extensions.
  • Talked to my mentor Trishul about it.

February

  • Pitched the idea of create-web-ext to Mozilla Addons team and asked to submit it as GSoC Project.
  • Declined as GSoC Project. Decided to go ahead to develop it.
  • Made team with my Mentor Trishul and Tushar to start working on the project.
  • First International Flight to Finland for Methane Hack. Won 1500 Euros.

March

  • Spent many sleepless nights with Trishul, Tushar to work on create-web-ext.
  • Made the prototype of create-web-ext. Trishul pitched it in Addons Show & Tell Meeting. Got good feedback about it 🌟.

April

  • My first code contribution to AMO, a small patch for amo-frontend.
  • Was working on another patch, sadly never completed it, huh.
  • Applied for the Featured Addons Advisory Board. REJECTED 😎

May

  • Fixed 8 bugs in addons-server and amo-frontend
  • Was working on twitter card implementation for addons, sadly never completed it. Felt demotivated so many times due to this bug.

June

  • Send 9 patches to addons-server and amo-frontend. Learned about the css property: word-wrap: break-word;
  • Went to Finland again to OuluHack Hackathon. Won 1000 Euros 💵

July

  • Sent 3 patches in amo-frontend.
  • Made the dropdown on AMO better. Learned about test assertions.

August

  • Fixed 6 bugs in addons-server and amo-frontend.
  • Deployed Static themes on production on AMO Frontend.
  • Learned that RTL means Right to Left and LTR Left to Right.
  • Wrote code in SQL for the first time ever for AMO Server.
  • Gave talk about browser extensions in DevConf
  • Met dgplug members Farhaan, Sayan and many others in DevConf’18.

September

  • Fixed 10 bugs in addons-server and amo-frontend.
  • First patch to Webextensions API.
  • Went through many sleepless night to setup Gecko on my laptop for the patch. Took more than 15 days. 🤓
  • Decided to dual boot with Fedora OS for Gecko.
  • Sat next through to Wifi router for ~8 Hours to setup Gecko.

October

  • Sent 5 patches to addons-server and amo-frontend.
  • Added developer policies in footer of AMO.
  • PyCon India, my 2nd time , which I attended as a volunteer.
  • Met dgplug members again in PyCon.
  • Applied for Mozilla Addons Reviewer. Rejected. Lesson learned — need to work on my JS Skills.

November & December

  • College Exams, practical and lot of college useless stuff.
  • Managed to solve 5 bugs in the mean time only.
  • Joined Featured Addons Advisory Board for next 6 months.

My plans for 2019

  • Helping beginners For 2019, I am looking to help few handful new code contributor to AMO Project because I feel while contributing in code you get to learn a lot of things like how to communicate, code is just one part of it .
  • More patches. I am looking to submit patches to Addon Manager and Webextensions API in Firefox.
  • Eat, sleep, code, gym, repeat. Being a software developer you are most likely to keep sitting on your chair for the major part of your day. This year I want to take out more time for physical activities.

MozAMU: Mozilla Addons Development at AMU

I am writing after a long time, have pending a lot of blogs, too 😦 Initially, I would like to tell you how the planning of this event took place. In Pycon India 2017, where Sanyam meets Rahul and his friends during Dev Sprints where Sanyam was sharing his journey and experience of FOSS. Rahul was asked to host Sanyam for a session on Open Source Contribution.

About one week after all this, Sanyam asked me to join him for this event, and give talk on Add-on Development in AMU. I said yes, but I was tensed as how to pitch and stage fear too 😦 . Even though I joined Shashank and Sanyam for it. My college exams were going on too so I get one of the bestest reason to ditch exams 😉 for Mozilla :P. So let’s talk about event.

Why you should contribute to FOSS?

Sanyam started the event with the concept of FOSS. He then further  explained the basics knowledge one needs and etiquette to contribute to FOSS. Moreover, he also focused on the problems faced by individuals in building community. The session was very much interactive in which we have two way talk.

Mozilla Rep Sanyam Khurana

Shashank on Mozilla Web Extension

After a small break,Shashank started his session about Mozilla Web Extension. He started with explaining Extension SDK and cross browser extension.Then he discussed manifest.json and it’s importance. Then we made  a simple addon — borderify, which displays a border across Mozilla pages. I helped students while they were developing this and got to learn about some new bugs and error we can face during development of Web Extension. The two way talks helped students as well as us in keeping the session interesting and grabbed new experience, too.

How do I start contributing to Open Source?

After the addons session , Sanyam explained  about how can a new bie start contributing to Open Source. He talked about how to find bugs on different projects through Bugzilla & Bugsahoy of Mozilla. At last, he introduced himself and discussed about his contribution to various Open Source projects.

During the session, we meet lot of buddies who themselves created addon and got huge responses. Even the beginners stood stunning and leave no stone unturned to prove them. A lot of them modified their previously created borderify addon to do more stuff and advanced it.

So its already 5 PM , we move to a nearby restaurent for Lunch with organising team.

moz-addons-amu-10.jpg

Before leaving Aligarh, we clicked a photograph 🙂

moz-addons-amu-6.jpg

Thanks to organising team for inviting us . All arrangements were awesome .

Hope to meet soon 🙂

 

Web extensions, Womoz and Privacy @IGDTUW

Hey guys!

So this time we were in Indira Gandhi Delhi Technical University for Women(IGDTUW) for Web Extensions, Womoz and Privacy awareness sessions.

Trishul started with a Web Extensions session by explaining what web extensions are and why they are useful. He showed some web extensions built by the community. All the participants were then asked to build, run and debug their own extension called borderify (A demo extension for participants new to Web extensions).

igdtu-trishul

Faye taking a session on women in mozilla, talking about improving women’s visibility and involvement in Free/Open Source and Mozilla, and to increase the number of women contributors.

faye-igdtu

Following it, Sanyam and Shashikanth talked about open source in general and importance of privacy respectively.

Here is a mandatory group photo:

igdtu-group

Thanks a lot to Tanya Vedi for such excellent arrangements.

Thanks for reading.

Cheers!

 

Moz Hack Day

Hello Everyone ,

This post is about a hackathon “ Moz Hack Day ” which was held in USIT for every student who was interested in A-Frame on 16 December 2017.

Agenda:-

  • Talking About VR, WebVR & A-Frame.
  • Demo of basic A-Frame scenes.
  • Basic concepts of A-Frame.
  • Addons Concepts & implementation.
  • Hands-On Addons development.

The event was started by the introduction speech, following with introduction of A-Frame and speaker also gave a look-up to attendees upon previously created ideas with A-Frame.

I, first of all, introduced myself and interacted with students by sharing my experience.I then started the event by introducing some basic stuff about WebVR like Mozilla and it’s mission of better and safe web,  Mozilla’s initiative on making web more approachable, later also told them about MozActivate initiative and then, explained virtual reality, hardware compatible headsets and their technology, friction of  VR ecosystem.

I also explained what is WebVR, and how amazing it’s development process and results could be by showing them some cool a-scenes stuff I developed before then, Explained A-Frame documentation and gave it’s website source which is (aframe.io), I requested attendees to have a view over A-Frame documentation but later explained it.

then explained and showed them the basic example “ Hello World ” of A-Frame, which helped them to understand the basics of A-Frame development. Some Students raised there questions and it was good to see their doubts and curiosity to know better and understand deeply the concepts and those doubts were cleared.

I then explained about languages we need with A-Frame.I explained then about entity component system, about a-painter, then about registry, and at last about community.Then, we had our first refreshment break which included Tea, cold-drinks and wafers (according to attendees), then we started our development process.

After Tea break now, attendees started coding and creating their ideas and imaginations. Few of the students were good with A-Frame development and were creating really good stuff, which includes 360 image and 360 video scenes which were great. Now it was the time for Lunch break.

Now after lunch attendees again started coding what they were left before lunch and developers and students who were creating some good stuff were coding faster for completing their project, and it was good to see students collaborating which feels like a hackathon or an informative session.

As the session was just getting finished and there were just 30 minutes left, most of the developers had finished their development process and they were getting ready for submitting what they had created.

Now session concluded and I thanked all the attendees and developers who were coding and created great stuff.

Thanks for reading 😀 .