1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MySQL and HBase integration?

Discussion in 'Databases' started by CG01, Mar 7, 2014.

  1. #1
    I plan to create a social network with a feed like tweeter's, I planed to use MySQL at first but knew I would need something more 'specialized' for big systems. I decided it would be HBase because of it's BigTable schema that best suits the tweeter-style feed I want.

    I want to know if there is a simplier or better solution than the one I came up with, please write your suggestions and the problems you might see in my approach.

    The Solution I came up with:

    I would have all the user's static information(data that doesn't change as often as a post for example) and the User relation with other entities(Groups & followers) in MySQL. The Feedback service in HBase.

    For example my system has a many-to-many relationship from 'users' to 'groups' table (One user might be subscribed to many groups and one group might have many subscribers); when new content is posted on a group I could rapidly retreive a list of users following that group from the intermediate table in the relationship and in HBase make the actual data insert in the feed with the corresponding user-key in a 'fan-out on write' manner. This way MySQL can handle what is best for(relationships), and HBase will only make the data delivery(and what it implies: comments, likes, etc.) based on a key list.

    This way if a relationship changes or it's deleted(User stops following someone) HBase doesn't receive the key and no information is written on that user's feed. If a user subscribes to a group a new relation is created, and consequently a key will be added to the list next time it's passed to HBase.
     
    CG01, Mar 7, 2014 IP