LogoLogo
ChangelogGitHubTwitterGitter
v3.x
v3.x
  • Marble.js
  • Getting started
    • Installation
    • Quick setup
  • HTTP
    • Effects
    • Middlewares
    • Routing
    • Errors
    • Output
    • Context
    • Advanced
      • Logging
      • Validation
      • Server Events
      • Streaming
      • Continuous mode
  • Messaging
    • Core concepts
      • Events
      • Effects
    • Microservices
      • AMQP (RabbitMQ)
      • Redis Pub/Sub
    • CQRS
    • WebSockets
  • Testing
    • HTTP routes testing
  • Other
    • How does it glue together?
    • Migration guides
      • Migration from version 2.x
      • Migration from version 1.x
    • API reference
      • core
        • bindTo
        • bindEagerlyTo
        • createEvent
        • createServer
        • combineRoutes
        • createContextToken
        • EffectFactory
        • r.pipe
        • httpListener
        • operator: matchEvent
        • operator: use
        • operator: act
      • messaging
        • eventBus
        • messagingClient
        • createMicroservice
        • reply
      • websockets
        • webSocketListener
        • operator: broadcast
        • operator: mapToServer
      • middleware-multipart
      • middleware-cors
      • middleware-joi
      • middleware-jwt
        • Token signing
      • middleware-io
      • middleware-logger
      • middleware-body
    • Style Guide
    • FAQ
Powered by GitBook
On this page
  • Philosophy
  • Previous articles
  • Examples

Marble.js

Marble.js is a functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.

NextInstallation

Last updated 4 years ago

Philosophy

For those who are curious about the framework name - it comes from a popular way of visually expressing the time-based behavior of event streams, aka marble diagrams. This kind of domain-specific language is a popular way of testing asynchronous streams, especially in RxJS environments.

Previous articles

Examples

If you would like to get a quick glimpse of a simple RESTful API built with Marble.js, visit the following link:

The core concept of Marble.js assumes that almost everything is a stream. The main building block of the whole framework is an Effect, which is just a function that returns a stream of events. With the big popularity of Observable, you can create a referential transparent program specification made up of functions that may produce side effects like network, logging, database access, etc. Using its monadic nature we can map I/O operations over effects and flat them to bring in other sequences of operations. RxJS is used as a hammer for expressing asynchronous flow with monadic manner.

Marble.js doesn't operate only over basic protocol but can be used also for general MDA (Message-Driven Architecture) solutions, including , or , where the multi-event nature fits best. Don't be scared of the complexity and abstractions β€” Marble.js framework, in general, is incredibly simple. For more details about its specifics, please visit the next chapters that will guide you through the framework environment and implementation details.

πŸ‘‰ If you have ever worked with libraries like , or other libraries that leverage functional reactive paradigm, you will feel at home.

πŸ‘‰ If you don't have any experience with functional reactive programming, we strongly recommend to gain some basic overview first with or with written by .

RxJS
HTTP
WebSocket
microservices
CQRS
Redux Observable
@ngrx/effects
ReactiveX intro
The introduction to Reactive Programming you've been missing
@andrestaltz
How does it glue together?
LogoAnnouncing Marble.js 3.0β€Šβ€”β€Ša marbellous evolutionMedium
LogoMarble.js πŸ”₯β€” when Node.js meets RxJSMedium
LogoMarble.js 2.0 πŸ”₯β€Šβ€”β€Šreactive, better, functional, strongerMedium