Git Product home page Git Product logo

nullboard-agent's Introduction

Nullboard Agent

This is a repo with the source code for Nullboard Backup Agent - a small companion utility for Nullboard that lives in the Windows system tray and acts as a storage provider for making automatic backups of NB's boards.

See nullboard.io/backups for details.

Notes

The project file is for Visual Studio 2017, so if you are on something newer, it will require a conversion.

The UI is implemented using a couple of private UI libraries that are not the part of this repo. I currently have no plans to publish these, but their functionality should be pretty obvious from how they are used in ui.cpp.

Outside of ui.cpp and with few other exceptions the code should be reasonably portable. It was certainly written with portability in mind, so Windows-specific stuff will usally be clumped together.

Execution flow

The entry point is in entry.cpp. It installs various safety traps and calls wmain from wmain.cpp, which then loads the config, parses the args and spaws the engine and the UI, each running in its own thread. It then simply loops waiting for either to die.

The engine

The engine implements a simple web server that accepts new connections, reads inbound requests and answers to Nullboard's API calls and browser's CORS requests. See engine.cpp for details.

Web server is quite barebone, but it will fail unsupported and malformed requests gracefully.

The UI

The UI implements the system tray icon and the "New Backup" dialog. Again, the bare minimum to get Nullboard hooked up and backups rolling.

The asserts

Asserts are used extensively and they are compiled into Release builds. We really want those invariants to hold, because when they don't, there's no point in continuing. Release version or not. In fact, especially if it's a Release one.

That would be the __enforce macro.

License

The 2-clause BSD license.

Feedback

Spot a problem or got a question - phrase it eloquently and open an issue.

nullboard-agent's People

Contributors

apankrat avatar

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.