Git Product home page Git Product logo

ospriet's Introduction

Ospriet — An example audience moderation app built on Twitter

Ospriet is a moderation tool that allows for audiences to post and vote on questions/comments for talks, presentations, and events. The application is written in node.js, uses MongoDB for database storage, and is designed for deployment on nodejitsu.

Motivations

Why open source it?

  • Several people asked for the source after SXSW 2012 to implement the application for their own use
  • The app serves as a good example of building upon the Twitter platform
  • Everyone can now use it and help improve the code base

You can view an example of the site powered by the application used at a 2012 SXSW panel at http://designfromthegut.com.

For more information on the origins of the application, read this post.

Overview

Ospriet allows anyone with a Twitter account to submit a question or comment, by posting an @-reply to a Twitter account dedicated for an audience-oriented event. The submission will be reposted to the event's account, with attribution. Audience members can vote up the best submissions by favoriting the submissions on the event account. Ospriet will then keep track of all of the favorites and provide the top submissions. Ospriet provides one single, simple interface for all of this that audience members can use on most devices.

As an example, let's take the event account of @dftg and submit a question.

@dftg: What are your thoughts on Apple’s approach to design?

This tweet will be reposted by the application to @dftg as an @-reply to your submission, and look like this:

From @couch: What are your thoughts on Apple's approach to design?

Anyone can then favorite that reposted tweet, and see the top favorited submissions on the site.

Setup

Please refer to these wiki pages to download, customize, and deploy your own instance of Ospriet.

Libraries

Server-side

  • Matador for MVC app structure
  • ntwitter node.js wrapper for Twitter API
  • mongoose node.js wrapper for MongoDB
  • socket.io for real-time updating of client-side UI

Client-side

Screenshots

Main index view
Ospriet primary view

Presentation view for projector/screens
Ospriet presentation view

Responsive layout for mobile
Ospriet mobile view

Issues and Contributions

Have a bug or contribution? Create an issue here on GitHub!

https://github.com/twitter/ospriet/issues

Versioning

For transparency and insight, releases will be numbered with the follow format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backwards compatibility bumps the major
  • New additions without breaking backwards compatibility bumps the minor
  • Bug fixes and misc changes bump the patch

For more information on semantic versioning, please visit http://semver.org/.

Authors

Bill Couch

Dustin Senos

License

Copyright 2012 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

ospriet's People

Contributors

caniszczyk avatar couch avatar cvrebert avatar kennethkufluk 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  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

ospriet's Issues

This Software not Working anymore!

We try every thing and hired many developers to get it running but its seems like the code is build on old repository and is not working anymore

Stream back off before reconnecting on end/destroy/error

Looking at the code that starts the Twitter stream I noticed that both end and destroy restart the stream immediately.

The documentation of the Twitter streaming API states:

Once a valid connection connection drops, reconnect immediately.

But also says:

When a network error (TCP/IP level) is encountered, back off linearly.
When a HTTP error (> 200) is returned, back off exponentially.

Something I don't understand completely (and is difficult to test because I don't know how to manually get a Twitter stream to emit these events) is the relationship between the end, destroy and error stream events. If end and destroy only ever get emitted if the connection drops in a valid way, then the code in StreamService.js is fine. But if those are sometimes emitted due to network or HTTP errors, code should be added to back off the stream restart as necessary.

Also code could be added to the error method to restart the stream with an appropriate back off, if a stream restart after an error is desired (which I think is a good idea).

I've experimented quite a bit with the ntwitter module and there is an open issue in the repo about this very same thing where the maintainer said that code to follow Twitter's back off suggestions could make its way into ntwitter soon. That issue also references an ntwitter commit that makes ntwitter emit error when the status code is >200, but I believe that didn't land until v0.3.0.

I would be willing to submit a pull request on this if that's OK. I've been very interested in using ntwitter to come up with something as bulletproof as possible to watch a Twitter stream through errors, possible rate limiting, random destroys, etc. and this seems like a great project to see that happen.

We cant install it

Hi everybody

We try to install this software many times at Herku & nodjistu hosting service but unfourntully we didn't success, as per my team they got these errors:

I configure it properly and now when it starts i am getting error with the
application:

2012-10-30T20:11:23+00:00 heroku[web.1]: Starting process with command
node server.js
2012-10-30T20:11:24+00:00 app[web.1]: Warning: express.createServer() is
deprecated, express
2012-10-30T20:11:24+00:00 app[web.1]: applications no longer inherit from
http.Server,
2012-10-30T20:11:24+00:00 app[web.1]: please use:
2012-10-30T20:11:24+00:00 app[web.1]:
2012-10-30T20:11:24+00:00 app[web.1]: var express = require("express");
2012-10-30T20:11:24+00:00 app[web.1]: var app = express();
2012-10-30T20:11:24+00:00 app[web.1]:
2012-10-30T20:11:24+00:00 app[web.1]: info - socket.io started
2012-10-30T20:11:24+00:00 app[web.1]:
2012-10-30T20:11:24+00:00 app[web.1]: /app/server.js:86
2012-1 0-30T20:11:24+00:00 app[web.1]: app.register('.html',
matador.engine)
2012-10-30T20:11:24+00:00 app[web.1]: ^
2012-10-30T20:11:24+00:00 app[web.1]: TypeError: Object function app(req,
res){ app.handle(req, res); } has no method 'register'
2012-10-30T20:11:24+00:00 app[web.1]: at Function.
(/app/server.js:86:7)
2012-10-30T20:11:24+00:00 app[web.1]: at Function.configure
(/app/node_modules/express/lib/application.js:400:61)
2012-10-30T20:11:24+00:00 app[web.1]: at Object.
(/app/server.js:19:5)
2012-10-30T20:11:24+00:00 app[web.1]: at Module._compile
(module.js:446:26)
2012-10-30T20:11:24+00:00 app[web.1]: at Object..js (module.js:464:10)
2012-10-30T20:11:24+00:00 app[web.1]: at Module.l oad (module.js:353:31)
2012-10-30T20:11:24+00:00 app[web.1]: at Function._load
(module.js:311:12)
2012-10-30T20:11:24+00:00 app[web.1]: at Array.0 (module.js:484:10)
2012-10-30T20:11:24+00:00 app[web.1]: at EventEmitter._tickCallback
(node.js:190:38)
2012-10-30T20:11:25+00:00 heroku[web.1]: Process exited with status 1
2012-10-30T20:11:25+00:00 heroku[web.1]: State changed from starting to
crashed
2012-10-30T20:11:25+00:00 heroku[web.1]: State changed from crashed to
starting
2012-10-30T20:11:28+00:00 heroku[web.1]: Starting process with command
node server.js
2012-10-30T20:11:28+00:00 app[web.1]: Warning: express.createServer() is
deprecated, express
2012-10-30T20:11:28+00:00 app[web.1]: applications no longer inherit from
http.Server,
2012-10-30T20:11:28+00:00 app[web.1]: please use:
2012-10-30T20:11:28+00:00 ap p[web.1]:
2012-10-30T20:11:28+00:00 app[web.1]: var express = require("express");
2012-10-30T20:11:28+00:00 app[web.1]: var app = express();
2012-10-30T20:11:28+00:00 app[web.1]:
2012-10-30T20:11:29+00:00 app[web.1]: info - socket.io started
2012-10-30T20:11:29+00:00 app[web.1]:
2012-10-30T20:11:29+00:00 app[web.1]: app.register('.html',
matador.engine)
2012-10-30T20:11:29+00:00 app[web.1]: ^
2012-10-30T20:11:29+00:00 app[web.1]: /app/server.js:86
2012-10-30T20:11:29+00:00 app[web.1]: TypeError: Object function app(req,
res){ app.handle(req, res); } has no method 'register'
2012-10-30T20:11:29+00:00 app[web.1]: at Function.
(/app/server.js:86:7)
2012-10-30T20:11:29+00:00 app[web.1]: at Function.configure
(/app/node_modules/express/lib/applicat ion.js:400:61)
2012-10-30T20:11:29+00:00 app[web.1]: at Object.
(/app/server.js:19:5)
2012-10-30T20:11:29+00:00 app[web.1]: at Module._compile
(module.js:446:26)
2012-10-30T20:11:29+00:00 app[web.1]: at Object..js (module.js:464:10)
2012-10-30T20:11:29+00:00 app[web.1]: at Module.load (module.js:353:31)
2012-10-30T20:11:29+00:00 app[web.1]: at Function._load
(module.js:311:12)
2012-10-30T20:11:29+00:00 app[web.1]: at Array.0 (module.js:484:10)
2012-10-30T20:11:29+00:00 app[web.1]: at EventEmitter._tickCallback
(node.js:190:38)
2012-10-30T20:11:30+00:00 heroku[web.1]: Process exited with status 1
2012-10-30T20:11:30+00:00 heroku[web.1]: State changed from starting to
crashed
2012-10-30T20:12:21+00:00 heroku[router]: Erro r H10 (App crashed) -> GET
xxxx.herokuapp.com/ dyno= queue= wait= service= status=503
bytes=
2012-10-30T20:12:22+00:00 heroku[router]: Error H10 (App crashed) -> GET
xxx.herokuapp.com/favicon.ico dyno= queue= wait= service=
status=503 bytes=
2012-10-30T20:21:44+00:00 heroku[slugc]: Slug compilation started
2012-10-30T20:21:46+00:00 heroku[slugc]: Slug compilation failed: failed to
compile Node.js app
2012-10-30T20:21:54+00:00 heroku[web.1]: State changed from crashed to down
2012-10-30T20:23:47+00:00 heroku[slugc]: Slug compilation started
2012-10-30T20:24:12+00:00 heroku[slugc]: Slug compilation finished

They said the app is broken and not working anymore, i need help from any one to get it work properly

Thanks

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.