GithubHelp home page GithubHelp logo

solidbot's Introduction

Solidbot Logo

Join the chat at https://gitter.im/solid-live/solidbot NPM Version Stories in Ready

Solidbot

Solidbot is a framework for running different kind of robots as a background daemon

This is a very early working prototype and work in progress

Features

  • It is extensible in a similar way to express handlers
  • It is modular so that many different robots can run in one framework
  • It is highly robust working on the kue framework, to prioritize jobs
  • It is highly scalable using a redis database backend
  • It has a UI front end to monitor jobs
  • It has APIs, via command line, javascript and HTTP REST

Installation

Prerequisite it to install redis database and run that service

npm install solidbot

In the bin directory there is an executable

bin/solidbot.js

Adding a job

There are a number of ways to add a job based on the API of the kue framework

Default bots

A few default bots are included in the package that will be described below

Cmd

Is of type "cmd" will run arbitrary commands in a queue.

  • data.cmd = the command to run

Crawler

Is of type "crawler" and will crawl given URIs and optionally convert them to linked data

Currently this is implemented as a cmd type module above, but will evolve to pure JS

Inbox

Inbox processing is a job of type "inbox" and follows the W3C LDN Consumer Specification.

An inbox processor can be started using the command

bin/inbox.js

A convenience method is included to ping an inbox (pingbox)

bin/pingbox.js <uri> [cert]
  • data.uri = the uri of the inbox
  • data.cert = optionally a certificate to use for authentication

The consumer will go the the inbox and display all the items in that inbox.

Further work will be to process inbox items according to their content.

Extending solidbot

Bot extensions are stored in the

lib/bots

Directory.

A bot takes two parameter, a job which is a kue job, and a function done which is called when the job is completed. It is possible to throttle jobs by delaying when done() is called.

New bots are then added to the daemon with the simple line:

    queue.process('crawler', crawler.bots.crawler)

Where crawler here is the name of the job type.

solidbot's People

Contributors

melvincarvalho avatar waffle-iron avatar

Watchers

Andrew Kidoo avatar  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.