1 / 24

Who am I ? What am I doing here?

Who am I ? What am I doing here?. Twitter: @ mcwoods Email: chris.woods@mind-flip.com Mind-Flip Blog: www.mind-flip.com/theBlog Linked In: http :// www.linkedin.com/in/mindflip When I think I’m being profound, or funny: www.WithBigHair.com. Birth of an Idea…. Application Design.

malory
Download Presentation

Who am I ? What am I doing here?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Who am I ? What am I doing here? • Twitter: @mcwoods • Email: chris.woods@mind-flip.com • Mind-Flip Blog:www.mind-flip.com/theBlog • Linked In: http://www.linkedin.com/in/mindflip • When I think I’m being profound, or funny: www.WithBigHair.com

  2. Birth of an Idea…

  3. ApplicationDesign

  4. Application Design

  5. Data Structure Design • Resulting Structures • User Object • Feed Object • Story Object • Comment Object

  6. WWR: VocZie’s Object linking Feed Object User Object 1 * 0..1 1 1 1 Comment Object 1 Story Object 1

  7. VocZie’s REST API Examples: • /feeds/<feed_id> • /feeds/<feed_id>/stories • /feeds/<feed_id>/story/<story_id>/comments • /feeds/<feed_id>/story/<story_id>

  8. Selecting a Technology

  9. MongoDB Structures • Collections • Objects and their identity • The two ways of relating objects • Via pointers (aka _id) • Via embedding

  10. Transaction Problem? UpdateStoriesFromFeed( url ) if ( url is being updated ) then wait for notification else lock out everyone else from updating url fetch and parse stories from feed’s url for each story returned if ( story doesn’t already exist in DB) add story end if end for remove lock preventing anyone else from updating url end if End function

  11. Implementing a lock manually • update if current • Aka Compare and Swap • Atomic MongoDB actions allow for manual creation of locks • http://www.mongodb.org/display/DOCS/Atomic+Operations#AtomicOperations-TheABANuance

  12. Stumbling along

  13. Moment of Terror 500 – Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

  14. More Terror root@1310-1064-2283:~# mongod mongod --help for help and startup optionsMon Jul 23 14:38:35 [initandlisten] MongoDB starting : pid=26105 port=27017dbpath=/data/db/ 64-bit** WARNING: You are running in OpenVZ. This is known to be broken!!!

  15. The Technical Lesson • VMs change over time…

  16. More More Terror…. • Have I lost all my data ? • Can I back up now?

  17. cat Terror | less • The no backup – backup… • Check out /var/lib/mongodb

  18. Conclusions • Good • No SQL DB is great for avoiding the DAL translation pain • Aid development time • MongoDB Core Documentation is good • Bad • Small print – VM compatibility • MongoDB Driver Documentation isn’t as good as the core

  19. Questions ? • Twitter: @mcwoods • Email: woods.mc@gmail.com • Mind-Flip Blog:www.mind-flip.com/theBlog • Linked In: http://www.linkedin.com/in/mindflip • When I think I’m being profound, or funny: www.WithBigHair.com

  20. Application Design • User Functionality First • What data does the UI need? • What structure would best present that data?

More Related