Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Meteor: Full-Stack Web Application Development

You're reading from   Meteor: Full-Stack Web Application Development Rapidly build web apps with Meteor

Arrow left icon
Product type Course
Published in Nov 2016
Publisher Packt
ISBN-13 9781787287754
Length 685 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Fabian Vogelsteller Fabian Vogelsteller
Author Profile Icon Fabian Vogelsteller
Fabian Vogelsteller
Marcelo Reyna Marcelo Reyna
Author Profile Icon Marcelo Reyna
Marcelo Reyna
Arrow right icon
View More author details
Toc

Chapter 2. Publish and Subscribe Patterns

This is by far the most important chapter in this book. The way we control our publishers and subscribers is going to define how quickly our application responds in production. Publishers and subscribers are the link between our database and the client. The server uses publishers to publish information to the client, while the client requests information from the publishers by subscribing to them. This is all managed via the Meteor.publish and Meteor.subscribe functions. We should be able to produce the data that the client wants to see with two objectives in mind:

  • Reduce stress from the server
  • Send only the information that the client needs

This chapter will teach you the different patterns that you can use to attain these objectives for every template that you build. Here is an overview of the topics we will cover to understand these patterns:

  • Template-level subscriptions
  • Database relationships
  • Publishing with relations
  • Aggregation publishers...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image