FSOSS 2014@Seneca

As more and more people are involved in open source projects, open source software gains tremendous strength from the power of a network. At the first day of 2014 FSOSS, speakers demonstrate different ways in which open source is being used around the world to enhance various sectors of industry such as education, emerging hardware, and software.

In order to show what current open source world looks like, Professor David Humphrey,today’s keynote speaker, used a bunch of numbers to demonstrate how open source affect us as users, business owners, organizations, or government. I have been an open source software developer for about 2 years, but I didn’t realize that there are billions of people actually being involved in open source world. Now I can feel the power of open source. If you know Archimedes’ Law of the Lever, it’s not hard to understand how open source technologies can actually move the world.
Archimedes_lever_(Small)

Advertisements
Posted in open-source | Leave a comment

OSD600 Project 0.2 Release

Mozilla-Appmaker is a tool that helps anyone, not just developers, create mobile applications. Appmaker apps are composed of web components, custom/resusable HTML tags, connected with events and listeners.

In my Open Source Development course project release 0.2, I chose to work on the mozilla-appmaker issue#2253. At the very beginning, I had difficulty to set up my development environment, hopefully, people in the appmaker community are always very helpful. Thanks for all the help from #appmaker IRC channel and my CDOT colleagues.The following contents will briefly introduce how I accomplish this task:

  • Pick bug to work: Go through all the issues in the list, read the comments and ask questions to make sure I can work on the issue
  • Try to play with the appmaker in my local machine in order to reproduce the bug
  • Use my browser debug tools to find out which files I should look into, in this case, the file is “ceci-channel-menu.html”
  • Learn some basic knowledge about Polymer element so that I can understand the logic of original source code
  • Learn the Element Interface, this is completely new to be. For example, I have never heard about Element.shadowRoot before.
  • Finally, fix the issue and test it to make sure I am able to get desired result, then send my pull request to mozilla-appmaker:develop branch

Test Result:

1. There are 3 listener channels for a counter
Capture1
2. After channel C is disabled
Capture2
3. After channel A is disabled
Capture3
4. After all channels are disalbed
Capture5

Posted in open-source | Leave a comment

Setup Appmaker Development Envrionment

After playing around with Mozilla appmaker, I choose to work on issue #2253.  To be honest, I had a hard time to setup the development environment. Thanks Ali for pointing me to the right direction, now I am able to run appmaker locally.

Webmaker-suite is very helpful for new developer to install all webmaker components to get started. It is for the terminal-menu based package manager and task runner for the webmaker suite of tools; However, I was stopped by the Elasticsearch dependency. I have tried different installation methods, and Elasticsearch was working properly, but webmaker-suite just didn’t pick up that. It keeps telling me that dependency is not installed which almost drove me crazy! This morning, I went to IRC #appmaker channel and post my question. What a coincident, another developer got the same problem. He or she told me to ignore the issue and run Elasticsearch manually.

But I still can’t run the command “node run” which gave me error message about the Elasticsearch. Then I went to CDOT to seek some help from Ali. Finally, Ali helped me solve the problem which was that my Mongodb was running automatically before I do “node run”. I should kill the process before running command “node run”. If anyone wants to use webmaker-suite package manager to set up dev environment for appmaker, you only need “Login”,”MakeAPI”,”Make valet”,”Appmaker”,and “MongoDB”. Google around to find any relevant instruction is not enough, asking questions in the project community is the most direct way to get help quickly.

 

Posted in open-source | Leave a comment

OSD600 0.1 Release

The first project I worked in my open source development course is Filer which is a POSIX-like file system interface for Node.js and browser-based JavaScript. Filer is very much similar to node.js fs module, but Filer has some other features lacking in node.js. My task is to add “du” command to shell. The “du” would help user to know how much space a filesystem is occupying in storage. As we all know that Unix has a way to do this already with “du”.

By default, the du utility shall write to standard output the size of the file space allocated to, and the size of the file space allocated to each subdirectory of, the file hierarchy rooted in each of the specified files. By default, when a symbolic link is encountered on the command line or in the file hierarchy, du shall count the size of the symbolic link (rather than the file referenced by the link), and shall not follow the link to another portion of the file hierarchy.

How did I accomplish my task?
Step 1:
Log in my Github account, go to https://github.com/filerjs/filer, click the “fork” button on the top right of the page to fork this project to my account. Now I have the most up-to-date copy this project.
Step 2:
Clone the project to my computer:
git clone git@github.com:GaryDeng/filer.git

Step 3:
Set up my develop environment:

Step 4:
Read through all the documentation and try to understand the project, play around with the source code, and run the test.

Step 5:

Research, research, and research, if you are lucky enough, you would be able to find similar solution to solve your problem. At least, you could be inspired by other programmers’ approach to solve identical problem. I am lucky enough to find a very similar implementation in the same project. The “ls” command in this project is exactly what I need.

Step 6:

Create a new branch, start to write test cases and implement it

Finally, commit my codes and push to my Github account, and send pull request against my professor’s Github reopsitory.

Posted in open-source | Leave a comment

Get to know Redis in 10 minutes

Redis, Remote Dictionary Server,is an in-memory, key-value database, commonly referred to as a data structure server.It is open source software released under the terms of the three clause BSD license. Most of the Redis source code was written and is copyrighted by Salvatore Sanfilippo and Pieter Noordhuis. Many companies including Twitter, Stackoverflow, and Github use Redis. Common use cases are caching, pub/sub, queues,and counters.

Data types supported

  1. Strings:  contain any kind of data, for instance a JPEG image or a serialized Ruby object. A String value can be at max 512 Megabytes in length.
  2. Lists: lists of strings, sorted by insertion order.  You can add elements to a Redis List pushing new elements on the head (on the left) or on the tail (on the right) of the list.
  3. Sets: unordered collection of Strings, and not allowing repeated members
  4. Hashes: maps between string fields and string values, so they are the perfect data type to represent object
  5. Sorted sets: Similarly to Redis Sets, non repeating collections of Strings. The difference is that every member of a Sorted Set is associated with score, that is used in order to take the sorted set ordered, from the smallest to the greatest score.

Install Redis

Download, extract, and compile Redis with the following commands:

$ wget http://download.redis.io/releases/redis-2.8.17.tar.gz
$ tar xzf redis-2.8.17.tar.gz
$ cd redis-2.8.17
$ make

To check Redis server is working,send a PING command using redis-cli.

$ redis-cli
redis 127.0.0.1:6379> ping
PONG

Basic Redis Commands

  • DBSIZE: Return the number of keys in the currently-selected database.
  • EXISTS: Returns 1 if key exists, else return 0.
  • KEYS pattern: Returns all keys matching pattern
  • FLUSHDB: Delete all the keys of the currently selected DB. This command never fails.
  • SHUTDOWN SAVE: force a DB saving operation even if no save points are configured
  • GET key: Get the value of key. If the key does not exist the special value nil is returned.
  • SET key value: Set key to hold the string value, If key already holds a value, it is overwritten, regardless of its type.
Posted in open-source | Leave a comment

Introduction to Redis

Recently, NoSQL databases are increasingly used in big data and real-time web applications. There have been various approaches to classify NoSQL databases, and Redis is one of them. It is an open source, BSD licensed, advanced key-value cache and store. Redis is often referred to as a data structure server as keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. Most of the Redis source code was written and is copyrighted by Salvatore Sanfilippo and Pieter Noordhuis. Version 2.8.14 is current stable release. Project is available on GitHub: https://github.com/antirez/redis.

In my OSD600 class case study project, I will do more research on Redis project. In addition, I am going to start with the Filer project, and try to fix issue #227 as my 0.1 release for the class project.

Posted in open-source | Leave a comment

LGPL License VS. EULA

The GNU Lesser General Public License (LGPL) is a free software license published by the Free Software Foundation (FSF). LGPL allows you to use and distribute the open source software with your application without releasing the source code for your application.This allows the code to be used in otherwise proprietary software.The components developed by the BigBlueButton project are available under LGPL. End-user license agreement (EULA) or software license agreement is the contract between the licensor and purchaser, establishing the purchaser’s right to use the software.

Proprietary software providers usually create lengthy license agreement to protect their own rights and benefits, and fool their customers as most users won’t spend the time to read and understand all terms of the agreement. In addition, under EULA, users must pay, 100% agree to be bound by the terms, and take their own risk to use the software. For instance, I personally hate the termination term of MAC SDK AND XCODE AGREEMENT:

Apple reserves the right to terminate this License if a new version of Apple’s operating system software or the Developer Software is released which is incompatible with this version of the Developer Software. Upon the termination of this License,you shall cease all use of the Developer Software and destroy all copies, full or partial, of the Developer Software.

In order to increase business profits, proprietary software providers can take advantage of this term and keep releasing new version of the software with very little updated features.

On the contrary, I pretty much like LGPL because it’s easy to read. And there are absolutely no traps in the agreement.

Posted in open-source | Leave a comment