Harmony is a content management system that uses MongoDB for data storage. It allows for flexible, custom data structures through embedded documents and inheritance. Content like pages, blog posts, images and files are all stored in MongoDB collections, allowing for simple querying. Activity streams provide quick access to user and item activity information by embedding full objects rather than just references. The talk emphasized taking advantage of MongoDB's flexibility through techniques like dynamic keys, embedding, and storing binary data to simplify relationships and queries.
Advanced Document Modeling Techniques from a High-Scale Commerce PlatformMongoDB
The Mozu Commerce Platform’s Content Management System empowers merchants to model, author, publish and query their commerce and website content. In this talk, we will discuss inventive techniques used to build a high-scale Content Management System on MongoDB. This presentation will explore tangible, real world examples of compensating actions, virtual joins and benign writes and wrongs. If you’re ready to move beyond simple document modeling and CRUD operations or if you’d just like to see what is possible with MongoDB, then this talk will provide you with advanced patterns and use cases that take advantage of them.
Make an object be searchable is difficult? Taking control of search result's ranking is even more challenging.
In BarCamp Bangkhen 2015 (Nov 22, 2015), Suparit Krityakien, Co-founder & Software Architecture of Wongnai (http://www.wongnai.com) shared his experiences on applying Wongnai ranking algorithm to take control of our search engine's scoring systematically as well as what can be tuned to make it smarter.
This presentation is to furnish you with fundamental knowledge required when tweaking ranking on your search.
Advanced Document Modeling Techniques from a High-Scale Commerce PlatformMongoDB
The Mozu Commerce Platform’s Content Management System empowers merchants to model, author, publish and query their commerce and website content. In this talk, we will discuss inventive techniques used to build a high-scale Content Management System on MongoDB. This presentation will explore tangible, real world examples of compensating actions, virtual joins and benign writes and wrongs. If you’re ready to move beyond simple document modeling and CRUD operations or if you’d just like to see what is possible with MongoDB, then this talk will provide you with advanced patterns and use cases that take advantage of them.
Make an object be searchable is difficult? Taking control of search result's ranking is even more challenging.
In BarCamp Bangkhen 2015 (Nov 22, 2015), Suparit Krityakien, Co-founder & Software Architecture of Wongnai (http://www.wongnai.com) shared his experiences on applying Wongnai ranking algorithm to take control of our search engine's scoring systematically as well as what can be tuned to make it smarter.
This presentation is to furnish you with fundamental knowledge required when tweaking ranking on your search.
In a real life almost any project deals with the
tree structures. Different kinds of taxonomies,
site structures etc require modeling of
hierarchy relations.
Typical approaches used
● Model Tree Structures with Child References
● Model Tree Structures with Parent References
● Model Tree Structures with an Array of Ancestors
● Model Tree Structures with Materialized Paths
● Model Tree Structures with Nested Sets
MongoDB, PHP and the cloud - php cloud summit 2011Steven Francia
An introduction to using MongoDB with PHP.
Walking through the basics of schema design, connecting to a DB, performing CRUD operations and queries in PHP.
MongoDB runs great in the cloud, but there are some things you should know. In this session we'll explore scaling and performance characteristics of running Mongo in the cloud as well as best practices for running on platforms like Amazon EC2.
Design Summit - Navigating the ManageIQ Object Model - Brad AscarManageIQ
Learn how the ManageIQ data and object models stack up. If you're trying to extend ManageIQ with customized applications, you will need to reference this talk.
More more on ManageIQ, see http://manageiq.org/
How I Learned to Stop Worrying and Love Email::: The 2007 PEP Talk!!Ricardo Signes
Ready? 250 OK! Everybody loves email, right? Right! What better language than Perl for handling all your email needs? None, right? Right! After all, with about nine hundred email modules on the CPAN, the only question is: which tool is right for the job?
This year, the Perl Email Project is going to tell you what's what. We'll see what modules solve what problems, how they differ, and how they (may or my not) work together.
We'll also show what problems aren't well-solved, what is in the works to make it happen, and how you can help.
Webinar: Data Modeling Examples in the Real WorldMongoDB
In this session, we'll examine schema design insights and trade-offs using real world examples. We'll look at three example applications: building an email inbox, selecting a shard key for a large scale web application, and using MongoDB to store user profiles. From these examples you should leave the session with an idea of the advantages and disadvantages of various approaches to modeling your data in MongoDB. Attendees should be well versed in basic schema design.
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...MongoDB
In this session, we'll examine schema design insights and trade-offs using real world examples. We'll look at three example applications: building an email inbox, selecting a shard key for a large scale web application, and using MongoDB to store user profiles. From these examples you should leave the session with an idea of the advantages and disadvantages of various approaches to modeling your data in MongoDB. Attendees should be well versed in basic schema design and familiar with concepts in the morning's basic schema design talk. No beginner topics will be covered in this session.
This talk examines four real-world use cases for MongoDB document-based data modeling. We examine the implications of several possible solutions for each problem.
In a real life almost any project deals with the
tree structures. Different kinds of taxonomies,
site structures etc require modeling of
hierarchy relations.
Typical approaches used
● Model Tree Structures with Child References
● Model Tree Structures with Parent References
● Model Tree Structures with an Array of Ancestors
● Model Tree Structures with Materialized Paths
● Model Tree Structures with Nested Sets
MongoDB, PHP and the cloud - php cloud summit 2011Steven Francia
An introduction to using MongoDB with PHP.
Walking through the basics of schema design, connecting to a DB, performing CRUD operations and queries in PHP.
MongoDB runs great in the cloud, but there are some things you should know. In this session we'll explore scaling and performance characteristics of running Mongo in the cloud as well as best practices for running on platforms like Amazon EC2.
Design Summit - Navigating the ManageIQ Object Model - Brad AscarManageIQ
Learn how the ManageIQ data and object models stack up. If you're trying to extend ManageIQ with customized applications, you will need to reference this talk.
More more on ManageIQ, see http://manageiq.org/
How I Learned to Stop Worrying and Love Email::: The 2007 PEP Talk!!Ricardo Signes
Ready? 250 OK! Everybody loves email, right? Right! What better language than Perl for handling all your email needs? None, right? Right! After all, with about nine hundred email modules on the CPAN, the only question is: which tool is right for the job?
This year, the Perl Email Project is going to tell you what's what. We'll see what modules solve what problems, how they differ, and how they (may or my not) work together.
We'll also show what problems aren't well-solved, what is in the works to make it happen, and how you can help.
Webinar: Data Modeling Examples in the Real WorldMongoDB
In this session, we'll examine schema design insights and trade-offs using real world examples. We'll look at three example applications: building an email inbox, selecting a shard key for a large scale web application, and using MongoDB to store user profiles. From these examples you should leave the session with an idea of the advantages and disadvantages of various approaches to modeling your data in MongoDB. Attendees should be well versed in basic schema design.
MongoDB San Francisco 2013: Data Modeling Examples From the Real World presen...MongoDB
In this session, we'll examine schema design insights and trade-offs using real world examples. We'll look at three example applications: building an email inbox, selecting a shard key for a large scale web application, and using MongoDB to store user profiles. From these examples you should leave the session with an idea of the advantages and disadvantages of various approaches to modeling your data in MongoDB. Attendees should be well versed in basic schema design and familiar with concepts in the morning's basic schema design talk. No beginner topics will be covered in this session.
This talk examines four real-world use cases for MongoDB document-based data modeling. We examine the implications of several possible solutions for each problem.
A talk from Washington Canvas User Group about using the Common Cartridge and QTI formats to import content into Canvas. Code up at https://github.com/drlippman/canvas-scripts
Stepping into theme development can be daunting. Sure anyone with a little PHP skill and a basic understanding of the loop can create theme templates, but there are a number of things you can learn which can take your theme development to the next level. We’ll discuss the skills that can take you from a beginner theme developer to a master.
A video of this talk given in Boston, MA can be seen at https://www.youtube.com/watch?v=IdMEOO0JmZA
(Updated for 2017)
21. class Page < Item
key :position, Integer, :default => 1
# more code here
end
22. class Blog < Item
key :position, Integer, :default => 1
key :labels_as, String, :default => 'tags'
key :custom_permalink_structure, String
# more code here
end
23. class BlogPost < Item
key :accepting_comments, Boolean, :default => true
key :labels, Set, :index => true
key :year_id, ObjectId
key :month_id, ObjectId
key :day_id, ObjectId
# more code here
end
39. items data
Item 1 Data 1
Data 2
Data 3
Item 2 Data 4
Data 5
Data 6
Item 3 Data 7
Data 8
Data 9
40. items templates
Item 1 Template 1
Data 1 Field 1
Data 2 Field 2
Data 3 Field 3
Item 2 Template 2
Data 4 Field 4
Data 5 Field 5
Data 6 Field 6
Item 3 Template 3
Data 7 Field 7
Data 8 Field 8
Data 9 Field 9
41. class Template
include MongoMapper::Document
key :filename, String, :index => true
key :theme_id, ObjectId, :index => true
key :contents, String
timestamps!
userstamps!
many :fields
# more code here
end
42. class Field
include MongoMapper::EmbeddedDocument
key :name, String, :required => true
key :key, String, :required => true
key :field_type_id, Integer, :required => true
key :help_text, String
key :settings, Hash
key :required, Boolean
embedded_in :template
# more code here
end
44. class Datum
include MongoMapper::EmbeddedDocument
key :key, String, :required => true, :length => 2..100
key :file_upload, Boolean, :default => false
key :value
embedded_in :item
# more code here
end
53. class Stylesheet
include MongoMapper::Document
include PageCacheable
key :filename, String, :index => true
key :contents, String
key :processor, String, :default => 'plain'
key :theme_id, ObjectId, :index => true
timestamps!
userstamps!
# more code here
end
54. class StylesheetsController < ApplicationController
caches_page :show
def show
render_not_found and return if params[:filename].blank?
filename = File.basename(params[:filename].first, '.css')
if stylesheet = Stylesheet.first(:filename => filename,
:theme_id => params[:theme_id])
if stale?(:etag => stylesheet,
:last_modified => stylesheet.updated_at.utc,
:public => true)
render :text => stylesheet.processed_contents, :content_type => 'text/css'
end
else
render_not_found
end
end
end
55. class Asset
include MongoMapper::Document
plugin Joint
def self.versions
@versions ||= {
:feature => [:resize, {:width => 640}],
:thumb => [:crop_resize, {:dimensions => [145, 75]}],
:square => [:crop_resize, {:dimensions => [75, 75]}],
:profile => [:crop_resize, {:dimensions => [100, 100]}],
:profile_small => [:crop_resize, {:dimensions => [50, 50]}],
}
end
key :title_tag, String
key :description, String # long description
timestamps!
userstamps!
attachment :file
# more code here
end
57. class RackAssets
OriginalRegex = /^/assets/(.*)/(.*)$/ # /assets/:id/name.ext
VersionRegex = /^/assets/(.*)/(.*)/(.*)$/ # /assets/:id/:version/name.ext
def initialize(app)
@app = app
end
def call(env)
case Rack::Request.new(env).path_info
when VersionRegex
id, version = $1, $2
serve_asset(id, version)
when OriginalRegex
id = $1
serve_asset(id)
else
@app.call(env)
end
end
def serve_asset(id, version=nil)
if asset = Asset.find(id)
asset.page_cache(version)
[200, {'Content-Type' => asset.file.type}, [File.read(asset.page_cache_path(version))]]
else
[404, {'Content-Type' => 'text/plain'}, ['File not found.']]
end
end
end
58. Things to Cover
1. What is Harmony?
2. Multiple Item Types
3. Completely Custom Data
4. Images and Files
5. Activity Streams
6. Wrap Up
65. class Activity
include MongoMapper::Document
key :user, Hash
key :source, Hash
key :source_type, String
key :action, String
key :count, Integer, :default => 0
timestamps!
end
66. class Activity
include MongoMapper::Document
key :user, Hash
key :source, Hash
key :source_type, String
key :action, String
key :count, Integer, :default => 0
timestamps!
def source=(value)
if value.is_a?(Hash)
super
else
self.source_type = value.class.name
super(value.to_mongo)
end
end
def user=(value)
if value.is_a?(User)
super :id => value.id, :name => value.full_name
else
super
end
end
end
67. class Activity
# code on previous slide
def self.article_created(article)
create(:source => article, :user => article.creator, :action => 'create')
end
def self.article_updated(article)
first_or_new(:action => 'update', :'source._id' => article.id,
:created_at.gt => Time.zone.now.beginning_of_day.utc).tap do |a|
a.count += 1
a.source = article
a.user = article.updater
a.save
end
end
def self.article_published(article)
create(:source => article, :user => article.updater, :action => 'publish')
end
def self.article_unpublished(article)
create(:source => article, :user => article.updater, :action => 'unpublish')
end
end
68. Things to Cover
1. What is Harmony?
2. Multiple Item Types
3. Completely Custom Data
4. Images and Files
5. Activity Streams
6. Wrap Up