Coder Social home page Coder Social logo

tap's Introduction

tap

A multitenant realtime streaming framework.

“Tap” project which provides a cloud based real-time streaming using in-memory cloud hash(redis) and nodejs. This provides a powerful idea on streaming based on an URL.

This approach can be extend to cloud integration using our RESTful connector bed(deccanplato) which provides connectors for various Cloud Application(Salesforce, Google App..Zoho, Xero…).

Requirements

Node.js + Socket.io + [Express framework ]

Redis

Logstash

deccanplato[(Optional)]

Logstash Configuration file

input {
  file {
    type => "tomcat-access-log"
    path => "/home/ubuntu/tomcat/logs/localhost_access_log.2013-03-06.txt"
  }
}
 
output {
  stdout { debug => true debug_format => "json"}
  redis {
     key => "logstashTest"
     data_type => "channel"
     host => "redis"
  }
}

Logstash Agent will be run on every node using a configurable ”.conf” file which says “What log file to watch, and where to drop it in ?”.

Let us watch the following log location “/home/ubuntu/tomcat/logs/localhost_access_log.2013-03-06.txt” and dumps it to the output channel “logstashtest“.

Configuring app.yaml

The default contents of app.yaml is as follows:

default:
  server:
    port: 7000
    host: '127.0.0.1'
  redis:
    port: 6379                # redis server port
    host: '127.0.0.1'         # redis host
    password: ''              # to use with AUTH
    db: 1                     # the test db
    options: {}
test:
  redis:
    db: 12
production:
  server:
    port: 8000
    host: '127.0.0.1'
  redis:
    port: 6379                # redis server port
    host: 'redis-master.megam.co.in'         # redis host
    password: ''              # to use with AUTH
    db: 1                     # the test db
    options: {}

You can flip the switch in tap_cluster.js to (“–conf=development” or “–conf==production” when you start the tap_monitor.js)

You can "-conf=development" or "-conf=production" then check ~/public/javascripts/tap_client.js for connection address

For example switch on "-conf=development" then socket = io.connect('http://localhost:7000/')

###Sample run

###1. Clone Tap

$ git clone https://github.com/indykish/tap.git

###2. Start Tap

$ node tap_monitor.js

###3. Start Redis server

$ redis-server

###4. Run Logstash - type following command in your terminal

$ java -jar logstash-1.1.9-monolithic.jar agent -f test1.conf

###5. Start a Tomcat container in port 8080.

Ensure that you perform something on the tomcat container, just to make sure the logs get populated. You should notice some activity in your logstash console.

###6. Type the URL on your favorite browser and enjoy the live streaming http://localhost:7000/streams/logstashtest

We are glad to help if you have questions, or request for new features..

twitter email

License

Author: Rajthilak ([email protected])
Copyright: Copyright (c) 2012-2013 Megam Systems.
License: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

tap's People

Stargazers

Angus H. avatar

Watchers

Kishorekumar Neelamegam 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.