Lattice is an actor-based web framework for Ruby built on top of Celluloid, Reel, and Webmachine. Designed from the ground up for realtime applications, end-to-end streaming, and Websockets, Lattice provides solutions to some of the biggest pain points in web application development today.
- Resources: the main glue type between Lattice and the web, resources provide an HTTP endpoint which interfaces with other entities in the system. Lattice uses Webmachine as its base for its resource framework.
Vaporware Features (Coming Soon™!)
Cells: Lattice's go-to domain model object. Cells represent data dependencies of resources, or are resources themselves. All Cells are Celluloid actors and run in parallel. Cells map data dependencies into "slots" which can be computed in parallel while resources are rendering.
Renderers: translate data within the system, as fetched by cells, into a requested representation. Renderers handle the specifics of dynamically constructing output documents from components. Lattice comes with renderers that understand various template languages.
WebSockets: WebSocket connections back to individual clients. Lattice makes it simple to send and receive messages from any part of a distributed system, including background jobs.
Please see the Lattice Wiki for detailed documentation and usage notes.
YARD Documentation is also available.
Lattice provides a Rails-like experience for getting you up-and-running.
First, install the Lattice gem:
$ gem install lattice
Now create a new Lattice application using the CLI tool:
$ lattice new my_app
Unlike Rails we don't automatically run Bundler for you. You'll have to do that yourself:
$ cd my_app $ bundle
Your new Lattice app is ready to go! Run:
$ lattice server
...to launch your new Lattice app under a local web server. By default the appliaction will launch on http://127.0.0.1:3000/. If you visit this URL you should see:
Copyright © 2013 Tony Arcieri. Distributed under the MIT license. See LICENSE.txt for further details.