Write your own mongoDB ORM (for fun and profit)
by Piyush Verma (speaking)
- Technical level
A take-home ORM written by you, ready-to-be-used in your current applications without having to bother about the lack of data sanitizations and data consistencies in MongoDB.
NoSQL databases like MongoDB are really a hot tool these days. The ease of usage and the speed of development make them the right choice of tool for most of application use cases. If you really do not have the luxury of developers who are comfortable with SQL, you might as well use it as your primary data source.
We at siminars.com have been using MongoDB for almost all of our needs like 1. Payments 2. User Data 3. Logs 4. Job Queue and have been using it well for over 4 years now.
The fact that you can dump any JSON (read BSON) data to databases is the real advantage over tight physical schemas. But the lack of data integrity and validations could mean that all the validations and datatype checks have to re-implemented at the application layer.
This session orients around implementing a really light weight ORM for Mongo in Python, all from scratch, which would ensure basic data valdiations like:
- Required fields
- Default values
- Datatype checks
- OnUpdate/ OnInsert / OnDelete triggers
and yeah a lot more.
- Working Laptop (running any flavor of Linux)
- Working MongoDB binary
- Prior experience with Python
Piyush Verma has been using Python for bread & butter for for over 7 years. He started out as a Summer Of Code student with KDE. Through out his career he has worked with small & successful startups & is currently the Director of Engineering at siminars.com (solves different problems with Python). He likes Coding, Coffee, Cycling and following logics & patterns.