Exodus.js






Agile, Seamless and Agnostic Client/Server Data Sync



What is Exodus.js?

Exodus.js is a javascript lightweight framework for using REST and web socket technologies together to get the best power out of both worlds.

Define your REST functions in a way that Exodus understands and Exodus will make sure that all your client app’s are updated in real time.

Why we built Exodus.js?

While working as on creating SPA application's that required a complicated inter-related server architecture (SQL) we struggled to keep our collection based front end's up to date. On the front end we wanted flat data structures that were easy to manipulate and present to our components local scope using libraries like Lodash. We wanted our components to 'just refresh' when their relevant collections / data items changed on the DB, but we didn’t want to have to write lots of boilerplate.

What makes Exodus.js special?



An opinionated nudge towards agile-like reusability

Agile principles sound great but software engineers often struggle to implement code that is truly agile and flexible. By using exodus (and it’s semi-opinionated structure) you’re going to get easy and flexible front end collections and reusable back end functions in your REST architecture.




Utilise REST and web sockets for performance

Use REST for updates to the server, and stick to original REST principles, but update your client data models with web sockets in the background.




One update to rule them all

Rather than returning data in your REST API’s, push this data through web sockets, this means when you’re developing and your current screen refreshes, you know it will refresh for all other uses - magic!




Make SQL manageable on the client

Map difficult relational server technologies like SQL to simple flat JSON-like collections that are easy to use and manipulate on the front end




Synced & updated clients

Data updated on all clients all of the time

How does it work?


  1. Client initiates a change
  2. REST update is sent to the server
  3. Node handles the request with a reusable function
  4. Database stores values in any format you like
  5. Websocket event is emitted to all clients
  1. REST API is returned with a success
  2. Original recipient recieves websocket data
  3. Next client recieves data in the exact same way as previous step
  4. Client updates component however it needs
  5. Next client updates it's components



Step 1: Creating your REST endpoints

Create your REST endpoints like X, Y, Z

var test = function(){ alert('test'); };



Step 2: Add your client code

Create your REST endpoints like X, Y, Z

Getting started

Head over to Github and X Y Z to get started

  1. `npm install Exodus.js`

Fork me on GitHub