NoSQL matters in Catchoom Recognition Service
Upcoming SlideShare
Loading in...5
×
 

NoSQL matters in Catchoom Recognition Service

on

  • 5,880 views

NoSQL matters 2012: http://2012.nosql-matters.org/bcn/speakers/#david_arcos ...

NoSQL matters 2012: http://2012.nosql-matters.org/bcn/speakers/#david_arcos

Catchoom is a technology startup founded in 2011 in Barcelona. Our platform provides visual recognition as a service, it's designed for applications that need to search through a database of images. Catchoom is empowering leading Augmented Reality companies like Layar and Metaio with scalable and fast visual search.

This presentation will explain the architecture of the Catchoom Platform, emphasizing on the advantages of using NoSQL for the specific requirements of visual recognition.

1) Introduction
- David Arcos
- Catchoom
- Customers
- Visual Recognition
- Examples
- Catchoom Recognition Service
- Team

2) What did we need?
- Minimum requirements
- Flexible
- Reliable
- Fast

3) How we build it
- Technology stack
- The Panel
- Mobile apps
- Data models
- Components
- NoSQL features

4) Advantages of NoSQL
- Performance
- Scalability
- Unstructured data: query
- Unstructured data: metadata
- Availability

5) Cool uses of NoSQL
- Real time calculations (stats, monitoring, rate limiting)
- Sorted sets (indexing)
- Cache
- Volatile data
- Messages (pub/sub, push/pop)

6) Limits
- Django apps compatibility

7) Conclusion
- Summary
- Recommendations
- Thanks for attending
- Q&A

http://catchoom.com

Statistics

Views

Total Views
5,880
Views on SlideShare
3,795
Embed Views
2,085

Actions

Likes
3
Downloads
21
Comments
0

18 Embeds 2,085

http://davidarcos.net 1562
http://www.davidarcos.net 339
http://82.196.8.205 108
http://lanyrd.com 32
https://twitter.com 22
http://www.linkedin.com 3
http://plus.url.google.com 3
http://translate.googleusercontent.com 2
http://webcache.googleusercontent.com 2
http://localhost 2
https://si0.twimg.com 2
http://twitter.com 2
http://tweetedtimes.com 1
http://qqq.davidarcos.net 1
http://s2.davidarcos.net 1
http://feeds.feedburner.com 1
http://feedly.com 1
http://www.google.es 1
More...

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Looks easy?
  • (timestamps, the image index, debug info...)
  • Efficiency Totals, per month, per day, per image, per item, per collection Response times, queue size Redis is compatible with memcached API Avoid hitting the db
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate
  • Efficiency No need to consolidate

NoSQL matters in Catchoom Recognition Service NoSQL matters in Catchoom Recognition Service Presentation Transcript

  • NoSQL matters in Catchoom Recognition ServiceDavid Arcos http://catchoom.com catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Hi! Im David Arcos - Python/Django developer (>4yr) - Web backend, distributed systems, databases, scalability, security - Team leader at Catchoom - You can follow me at @DZPMDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Catchoom technology recognizes an object by searching through a large collection of images in a fraction of a second. Catchoom targets application developers and integrators.David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Our customers are leaders in Augmented RealityDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Visual Recognition: “Identify an object in front of the camera by comparing it to a huge collection of reference images”David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Examples of recognized objects: - CD/DVD and book covers - Newspapers and magazines - Logos and brands - Posters - Packaged goods - Monuments and placesDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Catchoom Recognition Service: - Cloud-based Visual Recognition (SaaS) - RESTful API to integrate - “Add VR features to your app/platform”David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service - Small team of 4 developers, doing SCRUMDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Minimum requirements: - a public API for the final users to perform Visual Recognition - a private API for the customer to manage the Collections and get statistics - a nice website for the customer, providing the functionality of both APIsDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Must be flexible: - A customer who does Augmented Reality, and needs a 3D model (binary format) in the item - Another one who needs just the item id - Our data model needs to allow everything (structured and unstructured data)David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Must be reliable: - Images or data should never be lost - Avoid single points of failure - We need redundancyDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Must be very fast: “Layar has been using Catchoom’s Visual Search technology since the launch of Layar Vision, allowing users to quickly view the AR content placed on top of images by just pointing their camera to the image. We’ve benchmarked Catchoom’s technology in 2011 against 3 of their main competitors and found they had the best results both on speed and on successful matches (including lowest false positives)” Dirk Groten – CTO of LayarDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Technology stack: - Development: Python, Django, Tornado, Gevent - Deployed using: Supervisord, Nginx, gunicorn, Fabric - AWS: EC2, S3, ELBDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service The Panel: - typical customer portal: - manage your Collections, run Visual Recognition - get usage statistics - and configure the payment method :)David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition ServiceDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition ServiceDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Mobile apps: - for Android, iOS - use the Visual Recognition API - the code will be publishedDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Data models: - Collection: a set of items. Has at least one token. - Item: has at least one Image. Has metadata. - Image: you want several images if the item has different sides, logos, flavours... - Token: for authenticating the requests.David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Components: - the platform is highly modular - “Do one thing, and do it well” - they pass json messages - optimized hardware settingsDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service - Frontend: gets the API request - Extractor: extracts the visual points - Collector: message exchange - Searcher: looks for matchesDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Required NoSQL features: - key-value storage - cache - message lists - message pub/sub - real-time analysis What servers have we chosen?David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Required NoSQL features: - key-value storage - cache - message lists - message pub/sub - real-time analysisDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Required NoSQL features: - key-value storage - cache - message lists - message pub/sub - real-time analysis - and Filesystem:David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Performance: - Cant afford writing to disk, or querying slow databases - Using Redis, everything stays on memory - One V.R. query takes just 300 msDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Scalability: - Need to scale different components, separately - Load balancing using Redis Lists: BLPOP: Remove and get the first element in a list, or block until one is available - But focus on the bottlenecks!David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Unstructured data: query - A query object has many optional parameters - each component can add/remove fields dynamically - schema change between versions - Cant fit in a SQL table - We model the query in Redis as a jsonDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Unstructured data: metadata - Metadata is optional and unstructed, can be from a json to a binary blob - Cant fit in a SQL table, and would be too slow - Serve the data from Redis, and use S3 as a backup - Warning: in the future, if we have huge metadata files, Redis will get out of memory. Well improve this approachDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Availability: - Avoid single points of failure. Replicate everything! - Replicating a SQL server is painful - Redis instances configured as Master/Slave - When the master dies: - promote a slave to be the new master - reconfigure the other slaves to use this new master - Redis Sentinel does this (beta)David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Do real-time calculations: - Usage statistics - total, monthly, daily, hourly - per image, item or collection - Metric monitoring for internal use - response times, queue size, etc - QoS: enforce rate limiting - max hits per minuteDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Sorted Sets: - To create indexes and filters - In example, “Most recognized images” (sorted by hits) - Updating the Sorted Set, no need to reconsolidate: ZADD Add one or more members to a sorted set, or update its score if it already existsDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Cache: - Redis is compatible with memcached API - Cache everything: - Sessions, metadata, etc - ...although the website is internal: no bottleneck here - Better focus on optimizing other stuff!David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Volatile data: - Redis can set an expiration time for a value - Very easy for: - implementing timeouts - removing old queries - adding temporary cappingDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Messages: - Redis implements pub/sub and lists. - Publish/Subscribe to a channel - all components get the message - use it for monitoring - List: push/pop messages - only one component gets the message - use the blocking versions for load balancingDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Django apps compatibility: - we use Django and several contrib and external apps. - (“Standing in the shoulder of giants”) - but no support for NoSQL in Django ORM - dropping SQL is not an option! - we use MySQL. South migrations.David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service 1) Introduction 2) What did we need? 3) How we build it 4) Advantages of NoSQL 5) Cool uses of NoSQL 6) Limits 7) ConclusionDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Summary: - We use a combination of SQL and NoSQL - Using NoSQL was necessary to meet the requirements - There are a lot of different uses for NoSQLDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Recommendations: - There is no silver bullet - Use the best tool for each task - But avoid unneeded complexity! - Try Redis. Dont do a migration, just add it to your stackDavid Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Thanks for attending! - Our beta will be ready soon. Get a free trial at http://catchoom.com - Contact me at david.arcos@catchoom.com - Questions?David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom
  • catchoom.com | @catchoom
  • NoSQL matters in Recognition Service Thanks for attending! - Our beta will be ready soon. Get a free trial at http://catchoom.com - Contact me at david.arcos@catchoom.com - Questions?David Arcos | @DZPM Catchoom | http://catchoom.com | @catchoom