Git Product home page Git Product logo

phant's Introduction

phant Build Status

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and has been discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post on the topic for an overview and helpful links for each platform.

All secondary SparkFun repositories related to Phant have been archived and pulled in as a subtree in the main Phant GitHub repository.


phant is a modular logging tool developed by SparkFun Electronics for collecting data from the Internet of Things. phant is the open source software that powers data.sparkfun.com.

If you would like to learn more about phant, please visit phant.io for usage & API docs.

Getting Started

Vagrant

Vagrant is a headless virtual machine that can be run on many different systems. Vagrant is a safe and easy way to run phant without the need to greatly modify your current system (see Why Vagrant?).

Vagrant Setup:

  1. Install VirtualBox
  2. Install Vagrant
  3. Install Git
  4. git clone https://github.com/sparkfun/phant.git
  5. cd phant && vagrant up --provision
  6. phant is now available via http on port 8080 and telnet via port 8081

To restart phant use vagrant provision from inside the phant directory.

To stop the vagrant virtual machine use vagrant halt from inside the phant directory.

To restart vagrant use vagrant up --provision from inside the phant directory.

Local

phant is a npm package, and requires the latest version of node.js.

Once you have node.js installed, you can install phant by running npm install -g phant from your favorite terminal. Using the -g (global) flag will make the phant executable available in your PATH.

Now you can start phant:

$ phant
phant http server running on port 8080
phant telnet server running on port 8081

This launches a telnet server for stream creation, and a http server for data input & output. You can now open a separate window, and you should be able to create a stream by connecting to the local telnet server.

$ telnet localhost 8081
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
            .-.._
      __  /`     '.
   .-'  `/   (   a \
  /      (    \,_   \
 /|       '---` |\ =|
` \    /__.-/  /  | |
   |  / / \ \  \   \_\  jgs
   |__|_|  |_|__\
   never   forget.

Welcome to phant!
Type 'help' for a list of available commands

phant>

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2014 SparkFun Electronics. Licensed under the GPL v3 license.

phant's People

Contributors

bboyho avatar dpjanes avatar eiriksm avatar jaredforshey avatar pborreli avatar ptrks avatar thcipriani avatar toddtreece avatar zinefer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phant's Issues

Rate Limiter

Create a rate limiting system that can be used in output modules. The default rate limiting system can be memory based, or just always return true. The production module will most likely be memcached based, since multiple servers will need to check feed status.

404 for default http server

The default http server only responds to /input and /output, and currently hangs if any other path is requested.

Add ifttt.com support

Timothy (via email) requested that we make data.sparkfun.com a channel at ifttt.com. Look into if that's possible.

Hidden stream flag

Add a hidden flag to metadata so users can hide feeds from the main stream list.

Add tests

phant-keychain-hex & phant-throttler-memcache are the only modules with unit tests. add separate unit tests for all modules in the main phant repo.

HTTPS

Add support for HTTPS

Stream Location

Add an optional field or map to allow users to show where their feed is located.

Remove markdown from stream descriptions?

Can we simplify the stream schema and remove markdown from the stream descriptions? Is there a compelling reason to keep them formatted with markdown?

The advantage of a short text input are: less opportunity for spam and simplified layouts. The advantage of markdown is obviously increased flexibility.

If we keep it as markdown, I think we should only display a snippet in the stream/list and stream/view. And reveal the full description with a "more" link.

Thoughts?

Don't erase fields on failed create channel

When creating a feed, if there is a problem please don't clear all the info I've typed in. Please just indicate which box needs attention.

Today when creating a new stream I used a tag with a space in the name and got this code:

Creating stream failed - invalid tag name: event trigger. valid characters are _, a-z, A-Z, and 0-9

And lost all the description, etc I had inputted.

Consider changing license from GPLv3 to MIT?

GPL makes some folks slightly uncomfortable for a number of reasons. MIT and Apache2 are more common in the Node community.

A coworker just considered forking the project for use in other software. The GPL license could be a blocker for us down the road.

Would you consider a change?

Thanks!

Property 'length' undefined

Weird. Creating a channel with name 'Test', description of "lkj" and "temp" for the only field throws the following error:

Error
Cannot read property 'length' of undefined

Low-tech Bot Protection

Add a hidden blank field to the stream create form. If the field is populated on submit then it's a bot that's filling in all form fields, so fail.

Cheaper than a captcha but just as effective for all passive bots that come through, while not impacting user experience.

Stats are slow

Currently stream stats are split into separate calls, and it's incredibly slow when using GlusterFS. Move everything into one call so it only has to loop through the files once.

relation with apache storm / Samza / spark streaming?

Just so I know how where to place this in the playingfield: how is sparkfun related to Stream processing engines like Storm / Samza / Spark Streaming?

From my understanding Sparkfun gices you the tools to easily publish streams, whereas Storm, etc. enable you to subscribe to those streams and process them. Is that correct?

Better output from phant module

Currently when you run phant, the output looks like this:

$ phant
phant http server running on port 8080
phant telnet server running on port 8081

Add a bit more guidance on startup, and rework logging to support logging levels (info, debug, err, etc).

"Feed Disrupted" notifier

Wunderground has a really neat system that notifies the owner of the weather station when it has not reported data after 2 hours, then 24 hrs. It would be a 'nice to have' : an email when your feed has not been pushed new data after 2 hours have elapsed. The wunderground feature has been crucial when developing my station and is a great notification to get.

The user should probably enable or opt-in this feature.

Here's the email I envision:

Title: "Data Channel Alert: [name of channel] Disruption Detected"

Hi owner of [name of feed],

We noticed your feed traffic has been disrupted. Click here to see the latest log.

We want to let you know so that you can check your hardware if necessary. Click here to change your notification settings or unsubscribe.

-SparkFun

Here's the wunderground error email for comparison:

Title: Wunderground Alert: PWS ID #KCOBOULD115 Reporting Error Detected

ATTENTION: Weather Station Owner

The Weather Underground PWS network has detected that your personal weather station (ID #KCOBOULD115) has not reported to www.wunderground.com for more than 2 hours.

Please check that your station is operational by visiting your station's settings here: http://www.wunderground.com/personal-weather-station/mypws

For more details and information about troubleshooting visit our PWS wiki page: http://wiki.wunderground.com/index.php/PWS_-_Personal_Weather_Stations

We want to ensure that you are informed on the status of your weather station so you can continue to receive accurate data from Weather Underground.

Thank you,

  • The Weather Underground Staff

Support for CORS

In addition to (or in lieu of) jsonp, I was wondering if support could be added for CORS?

Delete instructions in email

I got the auto-email from phantworker with the delete key but I don't know how to use it - so I am going to create a new channel then delete them both once I have the link structure. Would be good to have the structure (or a link to a page that has it) in the email.

List streams by tag

Add a tag list method to metadata & a tag stream list responder to the http manager.

Clear storage

Add a route to http input or output that allows a user to clear their stream.

Consider MQTT input

MQTT (http://mqtt.org) seems to be an appropriate protocol for data transfer from small embedded machines. Client libraries for a wide range of languages are available. The broker of choice currently seems to be Mosquitto, but other MQ brokers also understand the mqtt protocol.
Would be nice, if phant could subscribe to a mqtt topic and collect data from there.

Trouble starting server

error

I try to start phant, and I'm getting these errors. I have no experience with Node.js, so I don't know if that is the issue.

Putting private key in HTTP post makes protocol vulnerable to man-in-the-middle attacks

I haven't perused the code (yet) but it seems to me that if an IoT device has to make a connection to Phant.io via HTTP (i.e. unencrypted) and has to put the private key into the POST command, this can be easily intercepted by a third party between the IoT device and the Phant.io server, and can be abused to post false updates, or do other Bad Stuff(TM).

Private keys (by nature) should remain private and shouldn't be shared over the network. That's what public keys are for :-)

Email users their keys

add an option to the creation step to email users the keys to their newly created stream

Delete stream

Add a route to the management modules that allows users to delete stream metadata and logged data.

GET request size limit

Set a sane limit to the size of a GET request and return HTTP 414 when over the limit.

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.