merb + nanite
DESCRIPTION
This is my keynote from MerbCamp, where I talk about merb past and present as well as introduce nanite a self assembling cluster of ruby processesTRANSCRIPT
MerbThen
Sept 21st 2006http://pastie.org/14416
AKA Baby Merb
Merb Now
• merb-action-args
• merb-assets
• merb-auth
• merb-builder
• merb-cache
• merb-gen
• merb-haml
• merb-helpers
• merb-jquery
• merb-mailer
• merb-parts
• merb-slices
• merb-core
Core Tenets of Merb
Merb should be fast(no code is faster then no code)
Merb should be memory efficient
Merb code should be as simple as possible
Merb should be modular
Merb should be easy to grok and extend
(by hackers for hackers)
Merb should focus on the application server
as well as the web framework
Merb should get out of your way and be
*flexible*
Merb should be an experimentation
ground
Most Importantly
Why not just work on rails?
Monoculture is bad
Everyone wins when there is competition
Lot’s of merb’s lessons can be applied back to
rails
Huge thanks to the community and all
contributors
Merb-1.0RC drops tomorrow!
merb-stack: training wheels included
Now with that out of the way...
Introducing Nanite
Nanite is a new way of building scalable
backends for web apps
Built around RabbitMQ
• Written in erlang, clusterable, highly scalable, fast as hell.
• AMQP protocol provides many nice features
• Transient, Persistent and Transactional semantics
<3 RabbitMQ
Nanite agentsconsist of multiple Actors
Nanite agents advertisetheir services and status
Feeds#crawladvertises:/feeds/crawl
Load average is advertised as default status
Nanite Mappers
Track nanites and their advertised services and status
Can do dispatch based on a number of factors
Run inside your Merb or Rails app
State of all nanites is replicated across all mappers
Multiple Dispatch Styles
Least loaded dispatch and the fitness function
Agents ping the mapper exchange every @ping_time seconds.
Mappers track the state of all nanites and remove them from
mapping if they haven’t reported in within a timeout
Nanite gives us:
• Presence, we know when nanites are ready for requests or not.
• Self assembly, nanites can come and go and can run anywhere with zero configuration in the mappers.
• Dispatch based on load or any fitness function that suits your app
• Easily take advantage of cloud
File Streaming
Nanite makes it easy to scale web app backends
Git it on GitHub:http://github.com/ezmobius/nanite
Questions?