-
Notifications
You must be signed in to change notification settings - Fork 0
Philosophy
The most important knowledge about Rambla is the condition in which you must not use it. Rambla removes the intermediate values. This is correct for state. This is not correct for events.
- State gives the answer to the question "what is the value now?". The intermediate values have no importance. If a price changes five times before the next flush, the UI needs only the last value. Rambla correctly removes the other four values.
- An event gives the answer to the question "what occurred?". Each event has importance. If five trades occur, your application must process five trades. If Rambla coalesces them, your application loses data.
Rambla is a state engine. If you give events to Rambla, Rambla removes data and gives no error.
Rambla does not make a notification less expensive. Rambla prevents the notification.
Rambla adds a small cost to each write operation. That cost is the synchronization and the mark operation. In exchange, Rambla removes a large quantity of subsequent work. This exchange is good only when the state changes more quickly than the UI can show it.
- market data, such as bid, ask, last and profit
- telemetry, and the status of a device or a program
- monitor dashboards and counters
- the state of a game or a simulation
- any application that a WebSocket or a timer drives at hundreds or thousands of updates in one second
- forms and settings pages, because the values change one time
- streams in which each value has importance, such as trades, fills and log lines
- a flush that touches thousands of different properties one time each
The advantage of Rambla decreases when the number of different properties in one flush increases:
- Many writes to a small number of properties in one flush: Rambla removes almost all the notifications. Rambla is much better.
- One write to each of many different properties in one flush: Rambla removes no notification. Rambla is only additional cost.
The repository publishes the unfavourable results with the favourable results. Refer to Benchmarks. A tool with a known limit is more useful than a tool that claims an advantage in all conditions.
Rambla — state for real-time .NET desktop applications · MIT · github.com/nicoseijas/Rambla · This wiki follows ASD-STE100.
Use Rambla
Reference