SlideShare une entreprise Scribd logo
1  sur  32
11/7/12 Real Time and MVC with GeddyJS
1/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
RT-MVC
Real Time Model/View/Controller Applications
/Daniel Erickson qConSF
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/Real-Time-MVC-Geddy
Presented at QCon San Francisco
www.qconsf.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
11/7/12 Real Time and MVC with GeddyJS
2/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT'S GOING TO
WIN
REAL TIME OR MVC?
11/7/12 Real Time and MVC with GeddyJS
3/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
REAL TIME?
11/7/12 Real Time and MVC with GeddyJS
4/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
YEAH!
'CUZ SOME PEOPLE SAY:
MVC doesn't scale well
MVC is dead
11/7/12 Real Time and MVC with GeddyJS
5/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
BUT MVC IS HERE TO STAY
Gives teams structure to get things done
Allows new people to jump into your project
Easy to get started with
11/7/12 Real Time and MVC with GeddyJS
6/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT'S GOING TO
WIN
REAL TIME OR MVC?
11/7/12 Real Time and MVC with GeddyJS
7/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
MVC?
11/7/12 Real Time and MVC with GeddyJS
8/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
TOTALLY!
'CUZ PEOPLE THINK:
Real Time is hard
Maintain a new stack
Event Machine and Tornado suck
Front end code is messy
11/7/12 Real Time and MVC with GeddyJS
9/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
BUT REAL TIME IS ALSO HERE TO STAY
Use WebSockets to get updates on the front end
Instant feedback for your users
Works really well on mobile
11/7/12 Real Time and MVC with GeddyJS
10/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT'S GOING TO
WIN
REAL TIME OR MVC?
11/7/12 Real Time and MVC with GeddyJS
11/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
BOTH!
11/7/12 Real Time and MVC with GeddyJS
12/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
REAL TIME AND MVC
ACTUALLY MIX PRETTY WELL
11/7/12 Real Time and MVC with GeddyJS
13/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
YOU CAN:
Define your model once and use it all over the place
use your templates on both sides of HTTP
Mirror events from the backend to the frontend
instance created
instace updated
instance removed
11/7/12 Real Time and MVC with GeddyJS
14/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
HOW WE SOLVED THE
REAL TIME PROBLEM
WITH GEDDY
11/7/12 Real Time and MVC with GeddyJS
15/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WAIT,
WHAT'S GEDDY?
11/7/12 Real Time and MVC with GeddyJS
16/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
THE ORIGINAL MVC
FRAMEWORK FOR NODE.JS
Very familiar if you know Rails
Awesome noSQL and SQL ORM
Many different templating languages
11/7/12 Real Time and MVC with GeddyJS
17/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
AND NOW IT
SUPPORTS REAL TIME
RIGHT OUT OF THE BOX
11/7/12 Real Time and MVC with GeddyJS
18/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
SO LETS MAKE AN MVC APP
THAT SUPPORTS REAL TIME
11/7/12 Real Time and MVC with GeddyJS
19/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
GENERATE AN APP
$ npm install -g geddy
$ geddy app -rt demo
$ cd demo
$ geddy scaffold -rt thing title description
$ geddy
11/7/12 Real Time and MVC with GeddyJS
20/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
TEST IT OUT
Open up
and
http://localhost:4000/things
http://localhost:4000/things/add
11/7/12 Real Time and MVC with GeddyJS
21/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
FOR THOSE OF YOU FOLLOWING
ALONG AT HOME
1. add a thing
2. watch it show up in the other window
3. update the thing
4. watch it change in the other window
5. remove the item
6. watch it get removed from the other window.
11/7/12 Real Time and MVC with GeddyJS
22/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT JUST HAPPENED?
geddy app -rt demo
Generated a demoapp with realtime enabled
11/7/12 Real Time and MVC with GeddyJS
23/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT JUST HAPPENED?
geddy scaffold -rt thing ...
Generated a thingresource
thingmodel
made that model available on the front end
thingscontroller
routes
views that subscribe to the realtime events
11/7/12 Real Time and MVC with GeddyJS
24/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
HOW DOES IT WORK?
ON THE SERVER SIDE:
geddy sees the realtimeflag in your config file
copies your models over to a public js file
sets up listeners for each model's lifecycle events
proxies those lifecycle events to socket.io
11/7/12 Real Time and MVC with GeddyJS
25/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
HOW DOES IT WORK?
ON THE CLIENT SIDE:
registers listeners for all model related events
proxies them to the appropriate models
scaffolds some code that hooks into real time events
11/7/12 Real Time and MVC with GeddyJS
26/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
THATS PRETTY COOL,
BUT IS IT EASY TO CHANGE?
modify your model once and you get it everywhere
emit custom events on your models
all generated code can be modified
11/7/12 Real Time and MVC with GeddyJS
27/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WHAT'S NEXT ON THE ROADMAP?
Create an AJAX adapter for the front-end ORM
Real time queries
Per instance real time events
A better way to share templates
11/7/12 Real Time and MVC with GeddyJS
28/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
WANT TO HELP OUT?
CHECK OUT GEDDY AT
Join the mailinglist
open bugs on github
send us pull requests
http://geddyjs.org
11/7/12 Real Time and MVC with GeddyJS
29/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1
ANY QUESTIONS?
11/7/12 Real Time and MVC with GeddyJS
30/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1

Contenu connexe

Plus de C4Media

Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No KeeperC4Media
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like OwnersC4Media
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideC4Media
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 

Plus de C4Media (20)

Understand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java ApplicationsUnderstand the Trade-offs Using Compilers for Java Applications
Understand the Trade-offs Using Compilers for Java Applications
 
Kafka Needs No Keeper
Kafka Needs No KeeperKafka Needs No Keeper
Kafka Needs No Keeper
 
High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 

Dernier

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

RT-MVC: Real Time Model/View/Controller Applications

  • 1. 11/7/12 Real Time and MVC with GeddyJS 1/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 RT-MVC Real Time Model/View/Controller Applications /Daniel Erickson qConSF
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /Real-Time-MVC-Geddy
  • 3. Presented at QCon San Francisco www.qconsf.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  • 4. 11/7/12 Real Time and MVC with GeddyJS 2/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT'S GOING TO WIN REAL TIME OR MVC?
  • 5. 11/7/12 Real Time and MVC with GeddyJS 3/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 REAL TIME?
  • 6. 11/7/12 Real Time and MVC with GeddyJS 4/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 YEAH! 'CUZ SOME PEOPLE SAY: MVC doesn't scale well MVC is dead
  • 7. 11/7/12 Real Time and MVC with GeddyJS 5/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 BUT MVC IS HERE TO STAY Gives teams structure to get things done Allows new people to jump into your project Easy to get started with
  • 8. 11/7/12 Real Time and MVC with GeddyJS 6/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT'S GOING TO WIN REAL TIME OR MVC?
  • 9. 11/7/12 Real Time and MVC with GeddyJS 7/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 MVC?
  • 10. 11/7/12 Real Time and MVC with GeddyJS 8/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 TOTALLY! 'CUZ PEOPLE THINK: Real Time is hard Maintain a new stack Event Machine and Tornado suck Front end code is messy
  • 11. 11/7/12 Real Time and MVC with GeddyJS 9/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 BUT REAL TIME IS ALSO HERE TO STAY Use WebSockets to get updates on the front end Instant feedback for your users Works really well on mobile
  • 12. 11/7/12 Real Time and MVC with GeddyJS 10/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT'S GOING TO WIN REAL TIME OR MVC?
  • 13. 11/7/12 Real Time and MVC with GeddyJS 11/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 BOTH!
  • 14. 11/7/12 Real Time and MVC with GeddyJS 12/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 REAL TIME AND MVC ACTUALLY MIX PRETTY WELL
  • 15. 11/7/12 Real Time and MVC with GeddyJS 13/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 YOU CAN: Define your model once and use it all over the place use your templates on both sides of HTTP Mirror events from the backend to the frontend instance created instace updated instance removed
  • 16. 11/7/12 Real Time and MVC with GeddyJS 14/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 HOW WE SOLVED THE REAL TIME PROBLEM WITH GEDDY
  • 17. 11/7/12 Real Time and MVC with GeddyJS 15/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WAIT, WHAT'S GEDDY?
  • 18. 11/7/12 Real Time and MVC with GeddyJS 16/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 THE ORIGINAL MVC FRAMEWORK FOR NODE.JS Very familiar if you know Rails Awesome noSQL and SQL ORM Many different templating languages
  • 19. 11/7/12 Real Time and MVC with GeddyJS 17/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 AND NOW IT SUPPORTS REAL TIME RIGHT OUT OF THE BOX
  • 20. 11/7/12 Real Time and MVC with GeddyJS 18/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 SO LETS MAKE AN MVC APP THAT SUPPORTS REAL TIME
  • 21. 11/7/12 Real Time and MVC with GeddyJS 19/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 GENERATE AN APP $ npm install -g geddy $ geddy app -rt demo $ cd demo $ geddy scaffold -rt thing title description $ geddy
  • 22. 11/7/12 Real Time and MVC with GeddyJS 20/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 TEST IT OUT Open up and http://localhost:4000/things http://localhost:4000/things/add
  • 23. 11/7/12 Real Time and MVC with GeddyJS 21/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 FOR THOSE OF YOU FOLLOWING ALONG AT HOME 1. add a thing 2. watch it show up in the other window 3. update the thing 4. watch it change in the other window 5. remove the item 6. watch it get removed from the other window.
  • 24. 11/7/12 Real Time and MVC with GeddyJS 22/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT JUST HAPPENED? geddy app -rt demo Generated a demoapp with realtime enabled
  • 25. 11/7/12 Real Time and MVC with GeddyJS 23/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT JUST HAPPENED? geddy scaffold -rt thing ... Generated a thingresource thingmodel made that model available on the front end thingscontroller routes views that subscribe to the realtime events
  • 26. 11/7/12 Real Time and MVC with GeddyJS 24/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 HOW DOES IT WORK? ON THE SERVER SIDE: geddy sees the realtimeflag in your config file copies your models over to a public js file sets up listeners for each model's lifecycle events proxies those lifecycle events to socket.io
  • 27. 11/7/12 Real Time and MVC with GeddyJS 25/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 HOW DOES IT WORK? ON THE CLIENT SIDE: registers listeners for all model related events proxies them to the appropriate models scaffolds some code that hooks into real time events
  • 28. 11/7/12 Real Time and MVC with GeddyJS 26/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 THATS PRETTY COOL, BUT IS IT EASY TO CHANGE? modify your model once and you get it everywhere emit custom events on your models all generated code can be modified
  • 29. 11/7/12 Real Time and MVC with GeddyJS 27/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WHAT'S NEXT ON THE ROADMAP? Create an AJAX adapter for the front-end ORM Real time queries Per instance real time events A better way to share templates
  • 30. 11/7/12 Real Time and MVC with GeddyJS 28/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 WANT TO HELP OUT? CHECK OUT GEDDY AT Join the mailinglist open bugs on github send us pull requests http://geddyjs.org
  • 31. 11/7/12 Real Time and MVC with GeddyJS 29/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1 ANY QUESTIONS?
  • 32. 11/7/12 Real Time and MVC with GeddyJS 30/30file://localhost/Users/derickson/dev/presentations/2012/qconsf/index.html?print‑pdf#/1