Giter Club home page Giter Club logo

Comments (7)

slact avatar slact commented on July 23, 2024

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.

mmaunder avatar mmaunder commented on July 23, 2024

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.

slact avatar slact commented on July 23, 2024

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.

mmaunder avatar mmaunder commented on July 23, 2024

I can think of two reasons to use disk:

  1. 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.
  2. 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.

slact avatar slact commented on July 23, 2024

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.

mmaunder avatar mmaunder commented on July 23, 2024

True.

from nchan.

slact avatar slact commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.