SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Supersonic image recognition
for your mobile apps
Cédric @deltheil
Paris Tech Talks #6
Moodstocks
Tech co-founder
Mobile Image Recognition
Your Mobile App
Reference Images + ID-s
Image Recognition Platform
query
match ID = 1234
index
user
developer
ID = 1234
The old way: thin client
Mobile App
Image Recognition API
client
server
reference images
send JPEG image
via HTTP
match ID or nil
Drawback: network latencies!
Our approach: thick client
Mobile App
Moodstocks API
client
server
reference images
up to millions images
Moodstocks SDK
image signatures
up to 10k images
query match ID or nil
server-side search
for large DB
sync
Benefit: speed
a typical search runs in a few ms
Moodstocks SDK
Mobile App
Wrapper
Core Library
Objective-C
Java
C
Moodstocks SDK
Mobile App
Wrapper
Core Library
we will now focus
on this part
Design Goal #1
Portability
• core library written in C99
• +99% code in common between iOS / Android
• e.g supporting Intel CPU-s on Android was… no effort!
Design Goal #2
Efficiency
• in-memory data structures for maximum speed
• leverage NEON capabilities (SIMD) where applicable
• a typical search runs in ~ 30 ms / 10k images (iPhone 5S)
Design Goal #3
Low footprint
• 100% home made, lightweight implementation
• implement & embed only what we need!
• around 800 kB for the iOS ARMv7s release build (-Os)
in 1/2 day
Our choices pay off
Core Library Architecture
Public Header File
Internal Modules
3rd Party Libraries
Image
Recognition
Pipeline
Public Header File
Internal Modules
3rd Party Libraries
Image
Recognition
Pipeline
Image Recognition Pipeline
• full-stack: the whole recognition occurs on-device!
• robust to camera noises (blur, lighting, …)
• supports 1D and 2D barcodes too
Image Recognition Pipeline
Public Header File
Internal Modules
3rd Party Libraries
Image
Recognition
Pipeline
Internal Modules (1/4)
• master-slave sync engine for image signatures
• efficient: works with diff-s & data bundles (less requests)
• fail-safe: retries + the client always stays consistent
Sync StorageLogs API client
Internal Modules (2/4)
Sync StorageLogs API client
• collects search results & metadata (OS, etc) along time
• a long-running thread posts batches every 30s
• tolerant to network errors -> HTTP 409 (Already Exists)
Internal Modules (3/4)
• persists image signatures on-disk
• persists search results events on-disk
• used as a temp on-disk buffer at sync time
Sync StorageLogs API client
Internal Modules (4/4)
• used for server-side recognition (send image via HTTP)
• includes a pool to re-use connections
• also used to post logs batches to the server (HTTP)
Sync StorageLogs API client
Public Header File
Internal Modules
3rd Party Libraries
Image
Recognition
Pipeline
3rd Party Libraries (1/4)
libcurl Tokyo Cabinet jpec msgpack
• the +500M users file transfer library
• multi API -> multiple transfers in the same thread
• we use it as the backend of our sync engine + HTTP reqs.
3rd Party Libraries (2/4)
libcurl Tokyo Cabinet jpec msgpack
• key / value embedded database (hash / table / B+tree)
• … and also a fantastic C library (see tcutil.h)
• we use it as the backend of our storage engine
3rd Party Libraries (3/4)
libcurl Tokyo Cabinet jpec msgpack
• our home-made, tiny JPEG encoder (600 LOC-s)
• we open sourced it -> github.com/Moodstocks/jpec
• we use it for server-side requests (send image)
3rd Party Libraries (4/4)
libcurl Tokyo Cabinet jpec msgpack
• efficient binary serialization format
• we use it to pack the data we synchronize
Thanks!
Questions? Comments? cedric AT moodstocks DOT com | @deltheil
Building
• we use simple Makefile-s and shell scripts
• we cross-compile w/ the iOS and Android toolchains
• we combine all the arch-s into a fat static lib (armv7, …)
Testing
• we write unit tests with ct (Easy Unit Testing) by @krarick
• we run them on device! e.g jailbreaked iPhone + openssh
• we use a mock to test the sync engine
Quality
• no warnings: we compile with -Wall -Werror
• static analysis with Clang Static Analyzer
• memory leak checks with Valgrind

Weitere ähnliche Inhalte

Andere mochten auch

Hpc Application List
Hpc Application ListHpc Application List
Hpc Application Listjstemler
 
The use of Spot imagery in support of crop area estimates in South Africa by ...
The use of Spot imagery in support of crop area estimates in South Africa by ...The use of Spot imagery in support of crop area estimates in South Africa by ...
The use of Spot imagery in support of crop area estimates in South Africa by ...Spot Image
 
Amazon Machine Learning im Einsatz: smartes Marketing - AWS Machine Learning...
Amazon Machine Learning im Einsatz: smartes Marketing  - AWS Machine Learning...Amazon Machine Learning im Einsatz: smartes Marketing  - AWS Machine Learning...
Amazon Machine Learning im Einsatz: smartes Marketing - AWS Machine Learning...AWS Germany
 
WebTomorrow - The marketer of the future in an algorithm driven world
WebTomorrow - The marketer of the future in an algorithm driven worldWebTomorrow - The marketer of the future in an algorithm driven world
WebTomorrow - The marketer of the future in an algorithm driven worldThe House of Marketing
 
Consumer Internet Insights - Jeyandran Venugopal
Consumer Internet Insights  - Jeyandran VenugopalConsumer Internet Insights  - Jeyandran Venugopal
Consumer Internet Insights - Jeyandran VenugopalLounge47
 
Machine Learning and Applications
Machine Learning and ApplicationsMachine Learning and Applications
Machine Learning and ApplicationsGeeta Arora
 
Predicting online user behaviour using deep learning algorithms
Predicting online user behaviour using deep learning algorithmsPredicting online user behaviour using deep learning algorithms
Predicting online user behaviour using deep learning algorithmsArmando Vieira
 
Machine learning for dummies - Azuges November 2016
Machine learning for dummies - Azuges November 2016Machine learning for dummies - Azuges November 2016
Machine learning for dummies - Azuges November 2016Carlos Landeras Martínez
 
Machine learning for dummies
Machine learning for dummiesMachine learning for dummies
Machine learning for dummiesAlexandre Uehara
 
Better ways of using Analytics in Agriculture in india
Better ways of using Analytics in Agriculture in indiaBetter ways of using Analytics in Agriculture in india
Better ways of using Analytics in Agriculture in indiaYagnesh Shetty
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Universitat Politècnica de Catalunya
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industryRefresh Annapolis Valley
 
Deep learning: the future of recommendations
Deep learning: the future of recommendationsDeep learning: the future of recommendations
Deep learning: the future of recommendationsBalázs Hidasi
 
NVIDIA CES 2016 Highlights
NVIDIA CES 2016 HighlightsNVIDIA CES 2016 Highlights
NVIDIA CES 2016 HighlightsNVIDIA
 

Andere mochten auch (17)

Hpc Application List
Hpc Application ListHpc Application List
Hpc Application List
 
The use of Spot imagery in support of crop area estimates in South Africa by ...
The use of Spot imagery in support of crop area estimates in South Africa by ...The use of Spot imagery in support of crop area estimates in South Africa by ...
The use of Spot imagery in support of crop area estimates in South Africa by ...
 
Smart farm initiative2
Smart farm initiative2Smart farm initiative2
Smart farm initiative2
 
Amazon Machine Learning im Einsatz: smartes Marketing - AWS Machine Learning...
Amazon Machine Learning im Einsatz: smartes Marketing  - AWS Machine Learning...Amazon Machine Learning im Einsatz: smartes Marketing  - AWS Machine Learning...
Amazon Machine Learning im Einsatz: smartes Marketing - AWS Machine Learning...
 
WebTomorrow - The marketer of the future in an algorithm driven world
WebTomorrow - The marketer of the future in an algorithm driven worldWebTomorrow - The marketer of the future in an algorithm driven world
WebTomorrow - The marketer of the future in an algorithm driven world
 
Consumer Internet Insights - Jeyandran Venugopal
Consumer Internet Insights  - Jeyandran VenugopalConsumer Internet Insights  - Jeyandran Venugopal
Consumer Internet Insights - Jeyandran Venugopal
 
Machine Learning and Applications
Machine Learning and ApplicationsMachine Learning and Applications
Machine Learning and Applications
 
Faster rcnn
Faster rcnnFaster rcnn
Faster rcnn
 
Predicting online user behaviour using deep learning algorithms
Predicting online user behaviour using deep learning algorithmsPredicting online user behaviour using deep learning algorithms
Predicting online user behaviour using deep learning algorithms
 
Machine learning for dummies - Azuges November 2016
Machine learning for dummies - Azuges November 2016Machine learning for dummies - Azuges November 2016
Machine learning for dummies - Azuges November 2016
 
Machine learning for dummies
Machine learning for dummiesMachine learning for dummies
Machine learning for dummies
 
Better ways of using Analytics in Agriculture in india
Better ways of using Analytics in Agriculture in indiaBetter ways of using Analytics in Agriculture in india
Better ways of using Analytics in Agriculture in india
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...
 
Predictive analytics in the agriculture industry
Predictive analytics in the agriculture industryPredictive analytics in the agriculture industry
Predictive analytics in the agriculture industry
 
Deep learning: the future of recommendations
Deep learning: the future of recommendationsDeep learning: the future of recommendations
Deep learning: the future of recommendations
 
Andrew Ng, Chief Scientist at Baidu
Andrew Ng, Chief Scientist at BaiduAndrew Ng, Chief Scientist at Baidu
Andrew Ng, Chief Scientist at Baidu
 
NVIDIA CES 2016 Highlights
NVIDIA CES 2016 HighlightsNVIDIA CES 2016 Highlights
NVIDIA CES 2016 Highlights
 

Kürzlich hochgeladen

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Moodstocks - Mobile Image Recognition - Paris Tech Talks #6

  • 1. Supersonic image recognition for your mobile apps Cédric @deltheil Paris Tech Talks #6 Moodstocks Tech co-founder
  • 2. Mobile Image Recognition Your Mobile App Reference Images + ID-s Image Recognition Platform query match ID = 1234 index user developer ID = 1234
  • 3. The old way: thin client Mobile App Image Recognition API client server reference images send JPEG image via HTTP match ID or nil
  • 5. Our approach: thick client Mobile App Moodstocks API client server reference images up to millions images Moodstocks SDK image signatures up to 10k images query match ID or nil server-side search for large DB sync
  • 6. Benefit: speed a typical search runs in a few ms
  • 7. Moodstocks SDK Mobile App Wrapper Core Library Objective-C Java C
  • 8. Moodstocks SDK Mobile App Wrapper Core Library we will now focus on this part
  • 9. Design Goal #1 Portability • core library written in C99 • +99% code in common between iOS / Android • e.g supporting Intel CPU-s on Android was… no effort!
  • 10. Design Goal #2 Efficiency • in-memory data structures for maximum speed • leverage NEON capabilities (SIMD) where applicable • a typical search runs in ~ 30 ms / 10k images (iPhone 5S)
  • 11. Design Goal #3 Low footprint • 100% home made, lightweight implementation • implement & embed only what we need! • around 800 kB for the iOS ARMv7s release build (-Os)
  • 12. in 1/2 day Our choices pay off
  • 13. Core Library Architecture Public Header File Internal Modules 3rd Party Libraries Image Recognition Pipeline
  • 14. Public Header File Internal Modules 3rd Party Libraries Image Recognition Pipeline
  • 15. Image Recognition Pipeline • full-stack: the whole recognition occurs on-device! • robust to camera noises (blur, lighting, …) • supports 1D and 2D barcodes too Image Recognition Pipeline
  • 16. Public Header File Internal Modules 3rd Party Libraries Image Recognition Pipeline
  • 17. Internal Modules (1/4) • master-slave sync engine for image signatures • efficient: works with diff-s & data bundles (less requests) • fail-safe: retries + the client always stays consistent Sync StorageLogs API client
  • 18. Internal Modules (2/4) Sync StorageLogs API client • collects search results & metadata (OS, etc) along time • a long-running thread posts batches every 30s • tolerant to network errors -> HTTP 409 (Already Exists)
  • 19. Internal Modules (3/4) • persists image signatures on-disk • persists search results events on-disk • used as a temp on-disk buffer at sync time Sync StorageLogs API client
  • 20. Internal Modules (4/4) • used for server-side recognition (send image via HTTP) • includes a pool to re-use connections • also used to post logs batches to the server (HTTP) Sync StorageLogs API client
  • 21. Public Header File Internal Modules 3rd Party Libraries Image Recognition Pipeline
  • 22. 3rd Party Libraries (1/4) libcurl Tokyo Cabinet jpec msgpack • the +500M users file transfer library • multi API -> multiple transfers in the same thread • we use it as the backend of our sync engine + HTTP reqs.
  • 23. 3rd Party Libraries (2/4) libcurl Tokyo Cabinet jpec msgpack • key / value embedded database (hash / table / B+tree) • … and also a fantastic C library (see tcutil.h) • we use it as the backend of our storage engine
  • 24. 3rd Party Libraries (3/4) libcurl Tokyo Cabinet jpec msgpack • our home-made, tiny JPEG encoder (600 LOC-s) • we open sourced it -> github.com/Moodstocks/jpec • we use it for server-side requests (send image)
  • 25. 3rd Party Libraries (4/4) libcurl Tokyo Cabinet jpec msgpack • efficient binary serialization format • we use it to pack the data we synchronize
  • 26. Thanks! Questions? Comments? cedric AT moodstocks DOT com | @deltheil
  • 27. Building • we use simple Makefile-s and shell scripts • we cross-compile w/ the iOS and Android toolchains • we combine all the arch-s into a fat static lib (armv7, …)
  • 28. Testing • we write unit tests with ct (Easy Unit Testing) by @krarick • we run them on device! e.g jailbreaked iPhone + openssh • we use a mock to test the sync engine
  • 29. Quality • no warnings: we compile with -Wall -Werror • static analysis with Clang Static Analyzer • memory leak checks with Valgrind