Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Krijger/weaviate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weaviate

A private Weave cloud

Weaviate is a REST API based software-as-a-service platform that is able to process the Google Weave protocol. It can be used in combination with all Google's Weave and Brillo libraries (link to the libs, link to Weave, link to Brillo).

You can use Weaviate on simple local machines, or complex distributed networks with Node in combination with a Cassandra database.

Note: Weaviate is not fully testable / production ready yet. You can follow the progress for the first release candidates here. Follow this repo or sign up for the mailing list to stay informed about the progress.

NPM

Table of contents

How does it work?

Google provides different libraries for interacting with the Weave protocol (more info). By changing the end-points to your own private cloud that runs Weaviate. You can use the complete Weave and Brillo software solutions within you own cloud solution.

Installation

  • Install Node version >5.0.0 (more info)
  • Install Weaviate from NPM: npm install weaviate --save
  • Install a Cassandra database (more info) and import the CQL file found in the Weaviate-Cassandra repo.
  • In your server Javascript file, add the following:
const weaviate = require('weaviate');
weaviate( CONFIGURATION OBJECT )
    .done((weaveObject) => { CALLBACK });

Using the weaviate() function

The weaviate function needs configuration objects and returns an optional promise with a weaveObject.

Configuration Object example:

{
	https		: false, // set to false = http usage, true = https usage
	https_opts	: {      // standard Express https options
        key: key,
        cert: cert
	},
	db_hostname : 'localhost', // Cassandra hostname
	db_port 	: 1000,        // Cassandra port
	db_name 	: 'test',      // Cassandra db name
	db_password : 'abc',       // Cassandra password
	hostname 	: 'localhost', // hostname for the service
	port 	 	: 8080,        // port for the service
	format_in 	: 'JSON',      // JSON or CBOR (note: experimental)
	format_out 	: 'JSON',      // JSON or CBOR (note: experimental)
	stdout_log 	: true         // log all usages via stdout
}

Promise weaveObject example:

The weaveObject contains information about the request that you can use for custom processing purposes.

  • params = the provided URL params
  • body = the provided body
  • response = the response generated by Weaviate
  • requestHeaders = the original request headers

Complete example:

weaviate({
	https		: false,
	db_hostname : 'localhost',
	db_port 	: 1000,
	db_name 	: 'test',
	db_password : 'abc',
	hostname 	: 'localhost',
	port 	 	: '8080',
	format_in 	: 'JSON',
	format_out 	: 'JSON',
	stdout_log 	: true
})
.done((weaveObject) => {
	/**
	 * The request is done
	 */
	console.log(weaveObject);
});

Related packages, products and repos

There are a few related packages. More will be added soon.

About different Weaviate versions

Weaviate comes in three versions.

For more information, please contact: [email protected]

Contributing and Gitflow

You can contribute to Weaviate by creating a pull request. Weaviate is built using the Gitflow method. You can do a pull request to an appropriate branch.

About Weaviate

Weave is a high quality, open source end-to-end communications platform for IoT that allows you to connect and manage devices in a generic way. We understand that sometimes you need to be in control over your complete dataset. This may depend on the nature of your business, on analytics and predictions you want to do, or because you want to extend the protocol. Weaviate works as a replicate of the Google Weave cloud and runs on your own cloud or datacenter solution.

Main contributors

More info

Please keep checking back this repo or the website, we will start publishing software soon.

About

Weaviate, a private Weave cloud solution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%