Comments (7)
We get TokyoTyrant for free once Memcached storage is implemented (same protocol), but it would be nice to have a native interface as well.
from nchan.
Just MHO, but I think persistence should be handled by the server-side application. NHPM is a real-time event passing or message passing system. The client should load an initial data set from the server and then receive new items as they arrive in real-time. The only persistence that NHPM should implement should be to deal with slow clients. e.g. Guys internet connection dropped for 10 seconds because he's on wifi and then recovers and he needs to catch up. If you need persistence because you want an audit log or history, just CC each publish request via your back-end 1 Gbit ethernet switch to a local server running Tyrant or MySQL.
from nchan.
Your argument is sound. Maybe it wouldn't be so awesome for persistence after all.
But people might still want disk space use over RAM for message storage.
from nchan.
I can think of two reasons to use disk:
- A browser has fetched data and is expecting events to be passed via nginx. It is receiving events and the server goes down. Browser keeps retrying. Server comes back up and because events were stored in memory they were lost. So browser misses those events and only receives new ones. So for guaranteed delivery, disk may be a good option.
- For applications with very large queues running on servers with not much memory on slow links, disk may be a good option if the queues won't fit in memory.
In both cases there's a performance penalty when using disk and as far as I can guess it'll be O(2n) because there's 1 disk stat() for published events being written and another when they're read back for clients. So I can't say I'm super excited about using a 7200rpm disk in a highly concurrent environment. But I'm sure there's a little grey man in a little grey suit out there that's going to want to know where his data goes when the server dies. ;-)
from nchan.
Consider all the people running blogs on dedicated virtual hosts with very little RAM to play with. Should someone happen to write a neat little "every post gets its own chatroom" wordpress plugin, I wouldn't want those little bloggers to feel left out because their plan gives a puny amount of RAM.
Otherwise you're spot on.
from nchan.
True.
from nchan.
meh, redis has persistence. berkeleydb may be added for persistence support, if there's enough interest. Closing this for now.
from nchan.
Related Issues (20)
- Authentication via message HOT 1
- nchan_store_messages off is not working properly
- nchan.io down HOT 2
- Using invalid msgid for dos attacks? HOT 2
- nchan_subscriber_info no longer works with nchan 1.3.0 HOT 1
- nchan lock the files in client_body_temp HOT 1
- Incorrect "channels" stat when using multiplexed channels HOT 1
- WebSocket Closing HOT 1
- Memory leak when using EventSource ping interval HOT 3
- Worker process core dump: Assertion failed: spool->msg_status == MSG_INVALID HOT 20
- Explicitly specifying the client_body_temp_path to the path same as default results in a segmentation fault
- nchan_subscriber_type isn't accessible by lua access block
- worker process 107 exited on signal 11 (core dumped) set_real_ip_from with nchan_authorize_request HOT 8
- Unable to compile with Nginx 25.3 HOT 1
- Potential integer overflow in sds.c HOT 1
- ASSERT failure when nginx is starting up HOT 17
- Message IDs are not being forward to my upstream server
- supprt kvrocks to store message?
- Building nginx with nchan module changes its signature
- Missed message for websocket subscriber.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nchan.