• Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Community

M

miksago

@miksago
About
Posts
35
Topics
3
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    [nodebb-plugin-s3-uploads] Store your uploads in AWS S3
  • M miksago

    Hi all,

    Here's a new plugin to NodeBB from the guys behind Kano — we've recently overhauled our NodeBB install, and as part of an upgrade to our infrastructure, we've decided to try and not sort any images locally on instances, but instead use shared storage. We'll be battle testing this plugin over the next few days, but so far, it seems like it'll work.

    Give it a whirl, let me know.

    https://github.com/KanoComputing/nodebb-plugin-s3-uploads

    This will require NodeBB >=0.3.2 or anything after 695891ffd7192a2c92d239950e2db095ce948274 in master.

    Cheers,
    Micheil Smith


  • NodeBB's Usage of Realtime Communication
  • M miksago

    Something that interested me when I first started hacking on NodeBB was how the platform uses realtime communication through socket.io (and websockets). This interest stems from work I did whilst working as a realtime engineer at Pusher several years ago. One of my research projects whilst there was to look into how websockets get used in production, and other use cases for websockets besides the standard "subscribe to a channel and receive events".

    In 2011, I gave a talk at Keeping It Realtime conference in portland about some of my findings, you can watch it here: http://2011.krtconf.com/videos/micheil_smith (long hair and all) or check out the slides here: https://speakerdeck.com/miksago/krtconf-websockets-sub-protocols

    How NodeBB currently seems to use realtime communication:

    1. RPC: Request data from the server, get a response back, present that data to the user (or send data to a server like you would POST to a HTTP server)
    2. Channels: Used for user to user chat messages
    3. Events: Used for online/offline states of users.

    I may have missed something here, so, let me know if I have.

    Most of the websocket usage appears to be in RPC style messages: Get this piece of data do something with it. At present, all realtime communication for NodeBB is built on top of Socket.io, which uses a protocol more tailored for event type packets, rather than for RPC style packets. For this, something like JSON RPC may be more appropriate.

    Refactoring this deep internal of NodeBB would make the platform more resource efficient on the wire, and also allow for better logging and handling of data. You'd know exactly what has failed on the client-side or server-side and be able to give an appropriate response. In the code, refactoring this level of things would make the code far cleaner, and give option to provide all HTTP Verbs over WebSocket or vica-verse (meaning if you wanted to, you could make 90% of NodeBB standard HTTP. You'd end up with an "api" module internally that is everything that can be exposed, which simple returns back standard javascript objects.

    For user-to-user chat messaging you could still multiplex that onto the same actual websocket / socket.io connection (although it's arguable if this is actually beneficial).

    Why do any of this writing or work? Interest more than anything else, but it may make the code to NodeBB cleaner, and improve maintainability.


  • Shared Authentication between two node apps when using mongodb
  • M miksago

    There's also a relevant Github issue open for disabling local logins: https://github.com/designcreateplay/NodeBB/issues/1263


  • [nodebb-plugin-s3-uploads] Store your uploads in AWS S3
  • M miksago

    Aside: Many thanks to @barisusakli and @julianlam on supporting the development of this plugin from the NodeBB side, which required various changes to the internals of NodeBB.


  • What framework do NodeBB use ?
  • M miksago

    NodeBB doesn't use an MVC framework as such. For database access, majority of calls are just direct to Redis, or abstracted through lightweight objects. For websockets, it's using a custom "event" based RPC over Socket.io, and for serving the http parts, it's using Express. It's a weird conglomerate of systems, but they seem to work alright together.


  • PLUGIN+THEME WEEKEND V4
  • M miksago

    Without knowing this was on, I was going to build a plugin for storing uploads in S3 (or other cloud storage) rather than locally on the machine's storage. However, it looks like in order for me to do that, I'd need to change the internals of NodeBB a bit heavily.. 😞


  • [nodebb-plugin-finder] The plugin that finds and manages other plugins (Deprecated)
  • M miksago

    I'm pretty sure you can do require('npm') and then execute things like installs and uninstalls, which may be way nicer than shelling out to the npm process.

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.