user-avatar
Today is Saturday
November 23, 2024

July 29, 2015

It is not the person, it is the act which needs to be condemned

by viggy — Categories: Uncategorized — Tags: , , , , , , , , Leave a comment

Thousands in India die everyday. Some in their comfortable home, peacefully. Some due to hunger and some due to cold. Some are killed in the road accidents or murdered for petty reasons like money or love. Some are also murdered for their caste or religion in the name of God. Some sadly kill themselves for bad marks, bad love or like the many farmers, just due to bad rains. Each of this death is sad. Each of it needs to be avoided. When each of it happens, we need to hang our heads in shame for not being able to avoid it. Better health care, better support system, better education and whatever is possible by the human kind. What else do we strive to achieve?

All this comes from the recognition of the value that life has, the power it yields to any human and the limitless possibilities that a human is capable of when he/she is filled with life. Often, I have joked that I live to eat and yes, I am a foodie and good food is a great inspiration for me to live. But it is just one inspiration and there are hundreds of other reasons to live your life fully. Places to visit, people to meet, adventures to live through and what not.

Between all this, how can we accept a planned murder, even if that murder is of the most heinous person in the world. The person here is just one actor in the whole circumstance. His/her life ends there and there is nothing more to it. Buried/burnt that body feels nothing. What is more important is the society this act leaves behind. What happens to the society? Should the society celebrate this planned murder? Does the society become more violent after this act or does it become more peaceful. What is the emotion that such an act generate? Does it unify the society or does it instigate people to do more such heinous acts? The killed person is now relieved of impact of any of this and it is the society which now has to come to term with this act.

Yakub Menon or Ajmal Kasab, each individual while committing their crimes had a choice to not do it. The results of their act was very deplorable, very heinous, very cruel. They made their choice mainly because they could not accept the vastness of humanity. Society while executing the person also has a choice to make. There is no glory in killing another human being, especially in cold blooded, planned execution. It tells us that we as humans have given up on the fact that the person can change, that we have nothing more to reason with him/her, that in the vastness of the humanity, we cannot find a single place for that particular life to fit in. I cannot agree to this hopelessness in humanity.

Following is an intriguing para from the George Orwell’s essay on Hanging:

It is curious, but till that moment I had never realized what it means to destroy a healthy, conscious man. When I saw the prisoner step aside to avoid the puddle, I saw the mystery, the unspeakable wrongness, of cutting a life short when it is in full tide. This man was not dying, he was alive just as we were alive. All the organs of his body were working — bowels digesting food, skin renewing itself, nails growing, tissues forming — all toiling away in solemn foolery. His nails would still be growing when he stood on the drop, when he was falling through the air with a tenth of a second to live. His eyes saw the yellow gravel and the grey walls, and his brain still remembered, foresaw, reasoned — reasoned even about puddles. He and we were a party of men walking together, seeing, hearing, feeling, understanding the same world; and in two minutes, with a sudden snap, one of us would be gone — one mind less, one world less.

 

June 23, 2015

Accumulo and Hbase – Differences in its API, classes

by viggy — Categories: tech — Tags: , , , , , , , , , Leave a comment

As part of my GSoC project, I am working on adding support of HBase in GeoWave. Currently Accumulo is already well supported. Hence one of my main task is to understand the existing tests and examples and add support for the same for a HBase store.
One of the main challenge I am facing is there is no easily available mapping of Accumulo Classes to HBase classes. So in this blog, I will try to do the same.

Basic Entity Classes
Accumulo HBase Remarks
Key KeyValue HBase doesnt have separate entity for Key and Value. It stores everything as byte[].
Value KeyValue
Mutation RowMutations Accumulo exposes put/putDelete method whereas HBase has Put and Delete classes to Put in and Delete a single row respectively.
Scanner/Writer Classes
Accumulo HBase Remarks
Scanner/ScannerBase Scan Accumulo has a structured class heirarchy for scanning where in HBase I have only used Scan as of now.

TODO: To add about establishing connection, authentication, Write to store, Iterators/Coprocessors

June 10, 2015

Simulation run time graphs of shadow-tor run with modified algorithm and default algorithm

by viggy — Categories: Uncategorized — Tags: , , , , Leave a comment

Following are the two graphs that we obtained for the modified algorithm and default algorithm in case of 50 relays- 180 clients and 100 relays-375 clients scenario. Interestingly, our modified algorithm performs linearly where as we see that for default algorithm, shadow almost stops execution for long intervals.

Graph for 50 relays and 180 clients.
simulation-run-time-50r-180c

Graph for 100 relays and 375 clients.

simulation-run-time-for100r-375c

June 6, 2015

Priviliged – Not by hard work but by chance

by viggy — Categories: experience, social — Tags: , , , , Leave a comment

I feel I am a very priviliged person. Born to Hindu parents in a country where majority is Hindu. Born to brahmin parents where the society is castiest and brahmins are considered the upper-caste. Born to educated parents in a country where being literate itself is an achievement and formal education still unreachable to many. Born as a son of government employee at a time when government still had some socialistic views and hence took good care of their employees and my education was taken care of.
With all that, I have one of the major priviliges something that close to 50% of our country’s population doesnt have. I was born as a boy. As you might have observed, all these priviliges were bestowed upon me even before I could stand on my own feet or before even earning a bead of sweat on my forehead. I was born into these priviliges just by chance. I could easily have been born in war-torn Libya or Iraq. As easily I could have been in one of the dalits family having to run from their homes thanks to the outrage by upper-caste men. Or could have been born to a Muslim family suffering the riots of Gujarat in 2002.
Today I mention this privilige of being a boy to share my experience of the evening. In a rare moment, me along with my professor and couple of his other research students decided to go out for the evening snacks. As we were walking towards the junction which was around 500m away, we saw a large crowd at a distance. This crowd had gathered for the results of a local gram panchayat election as just behind our college was the counting booth and people supporting various parties had gathered to get the results. As we walked, my prof noticed couple of girls who were his students returning back hesitant to pass through the crowd. Realizing why they were returning, my prof asked them to join us as we would also anyways be passing the crowd.
This was something that kind of struck me as it has never been in my life that I felt scared to pass through the crowd. Esecially this is an area just beside our college, something which we regularly pass through. And yet these students feared just passing the crowd which had peacefully gathered on both the sides of the street. I just snickered at them telling them that why they should fear passing through as someone who are about to become an engineer. They just kept quiet.
After reaching the junction and crossing the signal, my prof asked these students who were laughing amongst themselves casually what made them laugh. The girls innocently mentioned that at the other end of the signal, there was a boy who had been following them since afternoon. They did not know him at all but he was following them for close to 3 hours since afternoon when they had caught a bus to college from Majestic(the main bus terminus). My prof was shocked that the girls had not mentioned this to him earlier and he asked me to come along with him and we confronted the boy. It was evident that this boy was following the girls. My prof threatened the boy of consequences if dares to follow them again and he asked me to take a photo of the boy from my mobile. Just as I was about to do it, the boy got scared and ran away.
The girls were relived. But it was a strange experience to me. Something thanks to my priviliges will never have to go through myself. I am sure this experience will leave a mark on those girls too. May be add to their fear or hopefully remove some fear and encourage them itself to confront.
Born in a patriachal society has given me lots of privilege, but today’s incident reminded me that my priviliges which have been bestowed on my just by chance are also part of oppression on the someone else. The only way forward for the society is to remove this oppression and for that a major role would be of those priviliged to give up their priviliges, not as charity but because they never earned these priviliges.

May 5, 2015

When government is the oppressor, corruption is the way of living

by viggy — Categories: social, Uncategorized — Tags: , , , , , Leave a comment

As usual, I took a KSRTC bus to college today. As usual, I bought the ticket from the conductor and as usual he wrote the change that he owed me on the back of the ticket. After one stop from where I had boarded, the Ticket Checkers boarded the bus. These are people who do kind of surprise visit to the bus and check if the conductor has given tickets to all passengers and if there are passengers who are travelling without buying a ticket.
Generally, passengers and bus conductors have aversion towards each other. I used to think that this may be because the conductor doesnt give change properly, or may be rude in the way he/she talks to passengers. Conductor also doesnt sometime stop the buses on the stop. I had always thought that it was due to these daily friction that passengers dont like the conductor.
Today as usual, the Ticket Checkers checked all the tickets of the passengers. The conductor was very prompt and had given tickets to all the passengers. Hence the Ticket Checkers did not have any complain against him and hence he did not have to bear any penalty. Usually if any person is found travelling without tickets, the conductor has to pay the penalty of Rs. 300 from what I know.
After the Ticket Checkers left, conductor like a student who had just passed his exam, sighed. Some of the passengers started talking amongst themselves and with him, saying that Ticket Checkers were very disappointed, they did not get any reasons for penalty and during the discussion, I could see amazing solidarity of the passengers with the Conductor. He also was talking to them nicely and passengers were abusing the Ticket Checkers as people who always want to loot, etc.
This is when I realized that the reason why there is aversion between passengers and conductor is not because of bad behaviour or something. It is because for the passengers, he is the face of the oppressor called government. Everytime there is a hike in ticket prices, everytime they have to travel in fully packed buses, they blame the government and they see the conductor as the person representing government.
In that moment when Ticket Checkers came to check ticket, Conductor also became a part of the oppressed and hence they were easily able to show solidarity with him. This solidarity takes the form of corruption, when the government employee, to a large extent oppressed himself joins hands with the general public.
People blame the traffic police who catch them for violations as they see them as the face of the government. However the same police may becomes a friend when he gets the job done going against the rules as there is also on the side against the government.
Say politicians who earned crores of ruppee in Coal Scam may be corrupt but because they get the work done through the government for the local people, their corrupt acts are completely ignored because for people these are people just cheating the oppressor.

April 13, 2015

Wikipedia(0) – free first dose of the drugs

by viggy — Categories: FOSS, FSMK, internet — Tags: , , , , Leave a comment

Free First Dose of the drugs

Free First Dose of the drugs


Access to knowledge is one of the crucial factors for growth of a human being and internet has ensured that access to knowledge to any human across the globe is possible. However lot of the knowledge is still blocked behind artifical economic blockade. Wikipedia is one of the best example of how Internet has helped liberate knowledge from clutches of a few priviliged with resources to make it available for the commons. What makes this possible over internet which was not possible by traditional means of communication is the peer to peer nature of the internet along with free flow of data across different entities over the network without any discrimination. If a user intends to access Wikipedia site, the fact that his request to the server will be treated in the same way as millions of other request travelling over the internet ensures that he gets the same level of service like anyone else over the internet.

However sadly this is not the same anymore. The very essence of internet that “All Bits are Equal” is now being broken and sadly Wikipedia is in the forefront of breaking it. In their blog explaining their stand and viewpoint on NetNeutrality, they try to make a stand that since their agreement with Telecos is not a commercial program, they can be excused for breaking NetNeutrality.

AllBitsAreCreatedEqual
One of the fundamental problem in the Wikipedia’s approach in this case is the idea that Wikipedia is knowledge as an independent entity and hence giving access to it in places very there is lot of scarcity of the same is atleast some improvement. This is true only partially. Yes, Wikipedia is a great source of knowledge but it is also a small source of knowledge as compared to the whole internet and wikipedia alone cannot suffice. It is good to start with but can hardly be the sufficient enough. Wikipedia themselves ask users not to rely on their information and ask users to verify it by going through the references and looking at other sources also. This is why I believe Wikipedia Zero is the free first dose of the drug which is very convinient for the telecos, not so much for the users. There is no doubt that Wikipedia has real impact but so is also access to social networking site and messaging apps. In this case, being non-commercial does not necessarily matter. Imagine a class of students having free access to Whatsapp so that they can now all interact with class mates and teachers anytime. Imagine thousands of students interacting with each other across the world over Facebook and organizing a MOOC over it. Wonderful things are possible with access to different platforms but at the heart of it is access to internet, not one site, not few sites but all sites.

Infact Wikipedia Zero breaks Wikipedia itself as it sees its users only as readers and not as editors. The blog did give an example of a Nepali editor but how can someone edit Wikipedia articles without proper references pointing to other sites. If so, how does he access other sites on Wikipedia Zero? I am not clear on this.

Again heart of all this is the issue with access to internet and by leaving it in hands of for-profit entities, both government and private, we have just put one of the best creation of mankind into the merciless competition market. In my opinion, what Wikipedia actually needs to do is strive for more community owned infrastructure, either as community owned mesh networks like Guifi.net or as community owned fiber-network like Chattanooga. It is time Wikipedia works on liberating internet itself by making use of the power of the community like it did for the knowledge and this is something it is already good at.

Even if it wants to work with Telecos, the emphasize and the discussion has to be on giving limited access to whole of internet rather than unlimited access to few sites.

I understand that since I am not the student in far fledged town in Africa or someone with very poor internet penetration like in Nepal, I may not be able to appreciate what they would when they get even basic access to Wikipedia free of cost. However the fact that their understanding of internet will be very limited and restricted is also dangerous. It sets a very dangerous pathway in such regions as the logical next step to exploit the user is to start offering access to other limited services at very basic charges and so on. Hence the title I use here that Wikipedia Zero is the free first dose of the drugs.

April 8, 2015

Setting up Geowave and integrating it with GeoServer for the development environment

Geowave is a library used to store, index and analyze geospatial data on top of Accumulo which is a free software implementation of Google’s Big Table. Accumulo in turn makes use of Zookeeper to handle distributed synchronization and uses Hadoop FileSystem for distributed and scalable storage of the data. Geowave decomposes multi-dimensional data to single dimensional data using a transformation called as Space Filling Curves. GeoServer is a java based server which provides a platform to view and edit geospatial data. Hence at an abstract level, we can summarize that the data which is transformed by goewave and stored(ingested) in Accumulo can be extracted and viewed from geoserver.
Following article will explain how we can setup the system to have Geowave and Geoserver working with Accumulo for a development environment.

Part 1: (more…)

March 30, 2015

My mail to TRAI about NetNeutrality

by viggy — Categories: discussion, FSMK, internet — Tags: , , 1 Comment
Following is the content of that mail that I sent to TRAI(advqos@trai.gov.in) with my views on NetNeutrality.
I would encourage people to copy/paste and send the same content or improvise it and send it to TRAI and express their support for NetNeutrality.
Hi,

Last two-three decades have shown us the power of people communicating
to each other independently, peer to peer over the internet. The world
of Free Software, Wikipedia, Khanacademy, MOOCs(Massive Open Online
Courses), Arxiv.org, to name a few would not have been possible had
people not been able to express, share, and spread their views over
internet. Internet has made it possible to decentralize knowledge and
make it accessible to people across the world.

On similar lines, Facebook, Gmail, Whatsapp, are just few examples of
how corporates have made use of internet and made available platforms to
enable people to communicate easily with very little technical
knowledge. They have come up with own business models across this also.

But though all these are the major and well known players in the
internet world, they just form a very small part of the actual internet
world. Internet comprises of millions of websites, each trying to
communicate some idea to its viewers. Like Facebook provides a platform
to communicate with your friends, a blogger like Avijit Roy may use his
blog as a platform to spread his views on religion. Like Gmail provides
mailing service, Riseup.net may provide mailing list services to
activists organizations. Whatsapp may provide services for people to
chat using their mobile, where as TOR may be used by people to browse
internet anonymously.

All of these wide range of
entities(individuals/organizations/corporates) are making use of
internet in their own way. Calling only a few of them OTT(Over The Top)
Service would definitely be wrong as each entity provides some or other
service. Some may make money over donations, some others by displaying
ads and some by selling ads. However that should not be a reason to
differentiate their content or service over the internet.

All of the content over internet should be treated equally irrespective
of how they are accessed, used or monetized. I would request government
of India not to take steps towards breaking fundamental aspects of
internet which is one of the humanity's greatest invention. Net
Neutrality is a must for future of Internet.

Regards,

Vignesh Prabhu
Student, UVCE,
Volunteer, FSMK
Bangalore


March 13, 2015

Bigtable: snippets/notes from the original Google’s paper

by viggy — Categories: Uncategorized — Tags: , , , , , Leave a comment

Following are the lines that I made marked in the original Google’s paper on BigTable.

Introduction:

Bigtable has achieved several goals: wide applicability, scalability, high performance and high availability.
Bigtable does not suport a full relational data model; instead, it provides clients with a simple data that supports dynamic control over data layout and format, and allows clients to reason about the locality properties of the data represented in the underlying storage. Data is indexed using row and coloumn names that can be arbitary strings. Bigtable also treats data as uninterpreted strings, although clients often serialize various forms of structured and semi-structured data into these strings.

Data Model:
A Bigtable is a sparse, distributed, persistent multi-dimensional sorted map. The map is indexed by a row key, column key, and a timestamp; each value in the map is an uninterpreted array of bytes.
(row:string, column: string, time:int64) -> string

Row:
The row keys in a table are arbitary strings(currently up to 64KB in size, although 10-100 bytes is a typical size for most of our users). Every read or write of data under a single row key is atomic(regardless of the number of different columns being read or written in the row).
Bigtable maintains data in lexicographic order by row key. The row range for a table is dynamically partitioned. Each row range is called a tablet, which is the unit of distribution and load balancing. As a result, reads of short row ranges are efficient and typically require communication with only a small number of machines.

Columns:
Column keys are grouped into sets called column families, which form the basic unit of access control. All data stored in a column family is usually of the same type( we compress data in the same column family together). A column family must be created before data can be stored under any column key in that family: after a family has been created, any column key within the family can be used. It is our intent that the number of distinct column families in a table be small(in the hundreds at most), and that families rarely change during operation. In contrast a table may have an unbounded number of columns.
A column key is named using the following syntax: family:qualifier. Column family names must be printable, but qualifiers may be arbitary strings. Access Control and both disk and memory accounting are performed at the column-family level.

Timestamps:
Each cell in a Bigtable can contain multiple versions of the same data; these versions are indexed by timestamp, Bigtable timestamps are 64-bit integers.
The client can specify either that only the last n versions of a cell be kept, or that only new enough versions be kept.

API:

Bigtable suports single-row transactions, which can be used to perform atomic read-modify-write sequences on data stored under a single row key. Bigtable can eb used with MapReduce , a framework for running large scale parallel computations developed at Google.

Building Blocks:

Bigtable uses the distributed Google File System(GFS) to store log and data files.  Bigtable depends on a cluster management system for scheduling jobs, managing resources on shared machines, dealing with machine failures, and monitoring machine status.

The Google SSTable file format is used internally to store Bigtable. An SSTable provides a persistent, ordered immutable map from keys to values, where both keys and values are arbitary byte strings. Operations are provided to look up the value associated with a specified key, and to iterate over all key/value pairs in a specified key range. Internally, each SSTable contains a sequence of blocks (typically each block is 64KB in size, but this is configurable). A block index (stored at the end of the SSTable) is used to locate blocks; the index is loaded into memory when the SSTable is opened. A lookup can be performed with a single disk seek: we first find the appropriate block by performing a binary search in the in-memory index, and then reading the appropriate block from disk. Optionally, an SSTable can be com-
pletely mapped into memory, which allows us to perform lookups and scans without touching disk.

Bigtable relies on a highly-available and persistent distributed lock service called Chubby. A Chubby service consists of five active replicas, one of which is elected to be the master and actively serve requests. Chubby uses the Paxos algorithm to keep its replicas consistent in the face of failure. Chubby provides a namespace that consists of directories and small files. Each directory or file can be used as a lock, and reads and writes to a file are atomic. Each Chubby client maintains a session with a Chubby service. A client’s session expires if it is unable to renew its session lease within the lease expiration time. When a client’s session expires, it loses any locks and open handles. Chubby clients can also register callbacks on Chubby files and directories for notification of changes or session expiration.

Implementation:

The Bigtable implementation has three major components: a library that is linked into every client, one master server, and many tablet servers. Tablet servers can be dynamically added (or removed) from a cluster to accomodate changes in workloads.
Because Bigtable clients do not rely on the master for tablet location information, most clients never communicate with the master. As a result, the master is lightly loaded in practice.

Tablet Location:
We use a three-level hierarchy analogous to that of a B+ tree to store tablet location information.
With a modest limit of 128 MB METADATA tablets, our three-level location scheme is sufficient to address 2^34 tablets.
The client library caches tablet locations. If the client does not know the location of a tablet, or if it discovers that cached location information is incorrect, then it recursively moves up the tablet location hierarchy. If the client’s cache is empty, the location algorithm requires three network round-trips, including one read from Chubby. If the client’s cache is stale, the location algorithm could take up to six round-trips, because stale cache entries are only discovered upon misses.

<Need to go through Tablet Location, Tablet Assignment and Tablet Serving again>

Compactions:
When the memtable size reaches a threshold, the memtable is frozen, a new memtable is created, and the frozen memtable is converted to an SSTable and written to GFS. This minor compaction process has two goals: it shrinks the memory usage of the tablet server, and it reduces the amount of data that has to be read from the commit log during recovery if this server dies.
Every minor compaction creates a new SSTable.
We bound the number of such files by periodically executing a merging compaction in the background. A merging compaction reads the contents of a few SSTables and the memtable, and writes out a new SSTable. The input SSTables and memtable can be discarded as soon as the compaction has finished.
A merging compaction that rewrites all SSTables into exactly one SSTable is called a major compaction. A major compaction, produces an SSTable that contains no deletion information or deleted data.

Refinements:
Locality groups:

Clients can group multiple column families together into a locality group. A separate SSTable is generated for each locality group in each tablet.

Compression:

The user-specified compression format is applied to each SSTable block. Many clients use a two-pass custom compression scheme. The first pass uses Bentley and McIlroy’s scheme, which compresses long common strings across a large window. The second pass uses a fast compression algorithm that looks for repetitions in a small 16 KB window of the data.

Caching for read performance:

To improve read performance, tablet servers use two levels of caching. The Scan Cache is a higher-level cache that caches the key-value pairs returned by the SSTable interface to the tablet server code. The Block Cache is a lower-level cache that caches SSTables blocks that were read from GFS. The Scan Cache is most useful for applications that tend to read the same data repeatedly. The Block Cache is useful for applications that tend to read data that is close to the data they recently read.

Bloom Filters:

A read operation has to read from all SSTables that make up the state of a tablet. If these SSTables are not in memory, we may end up doing many disk accesses. We reduce the number of accesses by allowing clients to specify that Bloom filters should be created for SSTables in a particular locality group. A Bloom filter allows us to ask whether an SSTable might contain any data for a specified row/column pair.

Exploiting immutability:

Besides the SSTable caches, various other parts of the Bigtable system have been simplified by the fact that all of the SSTables that we generate are immutable.
The only mutable data structure that is accessed by both reads and writes is the memtable. To reduce contention during reads of the memtable, we make each memtable row copy-on-write and allow reads and writes to proceed in parallel.
Since SSTables are immutable, the problem of permanently removing deleted data is transformed to garbage collecting obsolete SSTables. Each tablet’s SSTables are registered in the METADATA table. The master removes obsolete SSTables as a mark-and-sweep garbage collection over the set of SSTables, where the METADATA table contains the set of roots.

January 13, 2015

Visit to Visvesvaraya Technological Museum

by viggy — Categories: experience, FSMK, social — Tags: , , , Leave a comment

On 11th Jan 2015,  FSMK organized a trip to Visvesvaraya Technological Museum for its community center students and also students from an orphange. Prakash, a volunteer from FSFTN who has recently moved to Bangalore has been visiting the orphange to teach computers to the students there. It was his initiative to take them to the museum. Our community center students also liked the idea of going to the museum and together a group of 40 visited the museum. IMG_20150113_140924 IMG_20150113_140856 IMG_20150113_140849 IMG_20150113_140838 IMG_20150111_112041 IMG_20150111_110147