Saturday, May 4, 2013

DataStax Apache Cassandra Project-Fourth Post

Some words about Why Cassandra

My web development experience traces back to 10 years and I have been using MySql as a habit. The first time I read about Cassandra was last year when I was developing a website for a bio-hitech company called Antigene. Similar to social network, they have extremely large data of antibody stored in database. Not much complex deep relational search is needed but only light selection search. When data is growing really big, the query of traditional sql relational database is becoming really slow.

It was then I started an eye on NoSql. Thanks to the wonderful project opportunity offered by DataStax, I finally made up my mind to switch to Cassandra. At first, it gave me a hard time, in data modeling and database structure design. Think it as a dictionary not as a table, which gives me a better vision understanding of advantage of Cassandra.

Then I began to taste the sweetness of Cassandra and still now on the way to find more fun.


Some words about my summary of progress

I haven't yet upload much thing to Github yet. Instead, I am working on local machine and Amazon EC2. Starting from my most familiar grand, I first developed a web application for SmartGift(Almost Done, of coz using Cassandra, thanks to phpcassa) and then continue on naive app(which is one sitting on my Samsung Note Pad, still need much polishing)

Re-thinking of PHP Cassandra Connection

Previously I used phpcassa to let PHP directly connect with Cassandra. Now a question of stateless PHP caught my attention:(quoting below:)

How to solve the pain of "stateless" PHP with Cassandra?

PHP from itself is stateless, as in: a request comes in, the webserver starts a thread and starts parsing the PHP, returns it to the browser: DONE. Of course there are "states" in PHP with sessions, but those are to keep things in line for the client; not the server.



When you use a distributed backend like Cassandra you feel confident with failure of a couple of nodes. If your replication level is high enough, there will always last a replica of your data somewhere.



The challenge is to mix the both of this. When you use a Java application to render webpages it will be able to keep track of the states of the backend Cassandra nodes. With PHP that would be pretty hard and most of the options on the PHP-side will be slow, or just completely stupid if you think about it.



From my point of view the best is to use a TCP proxy to forward the requests from PHP to the available backends. 

So I am testing HAProxy now.



Saturday, April 13, 2013

DataStax Apache Cassandra Project-Third Post


1 Core Function
    User shall be able to see the upcoming birthday of his friends.
    User shall be able to create gift list by adding gifts.
    User shall be able to delete gift and transferring the money to other gifts.
    User shall be able to see his/her friends' birthday gift list.
    User shall be able to donate money to his/her birthday gift.
    User shall be able to choose which gift to donate.
    User shall be able to choose the amount to donate.
    User shall be able to access his/her friend's birthday discussion board.
    User shall be able to post on his/her friend's birthday discussion board


2 Non Functional Spec


3 Mockup



4 Database structure

     


5 Deploy Platform:

    Safari
    Chrome
    Firefox
    IE
    Android Device
    IOS

6 Development Platform
 
    NetBean
    Eclipse
    Ubantu
    Bugzilla

DataStax Apache Cassandra Project-Second Post

In the past few weeks, I was working on database table structure and organization, setting up github as SVN and sketching mockups.


Books and Resources completed this week:
2 Use Case
Kate has a birthday coming up this Friday. She wants a Burburry scarf rather than 50 papyrus birthday cards. So she created a gift list on smartgift and invited her friends to contribute. Since all her friends are  college students, the donation is limited as $5 per person only.

Jackie wants to surprise her BFF with a creative birthday party. So she invites all their common friends to join a discussion forum at smart gift. Mary offers to use her backyard as venue, Lucy brings linen and wine, and Jackie thinks up a party theme and in charging of contacting friends. Collaborating their intelligence and financial ability, they throw a fabulous birthday party.

Tim is busy full time employee and has a lot of social events that can not miss. Smart gift reminds him all the time: anniversary, boss's baby shower and colleague's fairwell party. Also he can send his blessing remotely to old friends living in other cities.



3  High Level System Architecture


   Front End: responsive design
          HTML5
          CSS3
          Bootstrap framework
          Javascript
          JQuery Library
   Backend: 
         Cassandra databases management system
         XML/JSON
         Thrift(PHP)
   Server:
         Amazon EC2
   SVN:
         github
  
    

Thursday, March 7, 2013

DataStax Apache Cassandra Project-First Post

"Smart Gift App"


1 Executive Summary

SmartGift is an online web application that allows people create events (like birthday, anniversary), generate wish list and invite friends to contribute. It guarantees saving people’s time and targeting at people’s most desirable gift. At its core, it combines person’s true heart-desired gift with his friends’ collective intelligence and budget. Inspired by wedding registry and Kickstarter, SmartGift is a unique service that offloads the time-consuming and random-goal gift picking efforts and transforms it into an interactive and constructive process for both recipients and givers.

Our target clients are two parts: 13 to 24 year old young people. They are technical savvy and have rather tight budget in gifts. For them, entry-level luxury and electronics are most desired. SmartGift can allow his large number of friends and schoolmates contribute very few amount, $10 dollars virtually the price for an e-card to give her that cashmere Burberry scarf always on her mind or that ipad he longs for months. Also, SmartGift allows friends/family the people know him/her best to discuss, reference other similar/past events on SmartGift to come up with creative gifts even no wish list is generated. The other group is 26 to 35 year old working folks. They are too busy to track and remember people’s special date and preference. Also they are more personal and professional events with gift involved like baby shower, colleagues’ farewell party. SmartGift reminds them about events and makes event planning never easier.  

I propose to first present the free trial application among target clients and then offer premium service, charge by event or membership. When the product reaches certain maturity and users basis, it can also generate revenue by placing retailers’ ad and allowing them to make gift suggestions. I plan to launch our free trial/demo version first, posting advertisement on social network websites, discussion forums and high traffic blogs. Currently there are not so many similar applications on market. Most gift-related applications are e-card creation and event reminder.

The biggest risk is early stage marketing.  People are not used to fund-raising gift picking process except wedding registry. I am addressing this risk by producing easy to use user interface and friends-inviting Mechanism. For one single event created, there are not only one person uses our service, but a great part of his networks are also users. 

2 Business Model



2 Some words about me

Hello, guys, first of all, I'd like to thank you for hosting such great event for us. I have and will have a lot of funs in it!

My name is Yuan Vivien Wang. Now I am a 3rd year grad student at San Francisco State University majored in Software Engineering. Grown up as the only girl in school interested in programming at Jr high school, I have already dreamed to build up something to change people's life. I got two B.As from Peking University, China, one in Hindi and the other in Economics. Then I got a MA in theological studies at Harvard Divinity School. Later I was admitted to PHD in religion at Harvard. But it was then I realized that my passion for IT can not wait. I became a freelance web developer at the age of 18 and I felt true happiness at SF State in acquiring abilities I am passion about in achieving my dream. 

Entering SF State, I completed all the undergrad level class and went on as a researching assistant for Prof Yang Hui, whose major focus is data-mining and cloud computing.

Here is a link to my linkedin profile:
www.linkedin.com/pub/yuan-vivien-wang/12/156/4b0/