Giter Club home page Giter Club logo

parallec-samples's Introduction

Parallec-logo

##Parallec Sample Applications

Sample Applications demonstrate how to use parallec.io library, such as aggregate APIs and publish to Elastic Search and Kafka.

Each file is independent with a main function and can be run directly. (TCP/HTTP Async API requires the sample HTTP/TCP servers to start in advance. Sample servers included here are independent executable files too).

More comprehensive examples are available in the test cases. Such as cancel tasks. Capacity aware scheduler and etc.

Sample App Location Overview
HTTP Basic Http. Handle Async APIs with auto progress polling. Asyn run Parallel Task with progress polling. Result aggregation. Provided a sample HttpServer will async job submission/polling API to test with. Send to elastic search. Request template with variable replacements.
SSH Sample Parallel SSH. Need to input the userName, ip, then [password / keyfile path]. Tested with EC2 instance in AWS.
PING Sample Parallel Ping App.
TCP Sample Parallel TCP app. Includes a sample TCP Echo Server to test with.

####HTTP

####Set Target Hosts Please refer to the documentation to set target hosts differently.

###Usage

You may simple fork the project, or copy and paste indivisual files after getting the correct dependencies

Maven

<dependency>
	<groupId>io.parallec</groupId>
	<artifactId>parallec-core</artifactId>
	<version>0.9.3</version>
</dependency>

Gradle

compile 'io.parallec:parallec-core:0.9.3'

#####Screenshots

Executing Http3WebAgrregateToElasticSearchMinApp.java, visualized in Kibana.

With elasticsearch-1.3.4 and kibana-3.1.2

Screenshot

##Sample Spark Server


Sample Single File Web Server in Spark with Parallec . Require JDK 1.8+ due to Spark server.

####Build & Run ######Build:

Fork the project and run:

mvn clean compile assembly:single

######Run: In folder: parallec-samples/sample-spark-server/target: (if not conduct ping, no need of sudo)

sudo java -jar parallec-sample-spark-server-0.9.0-jar-with-dependencies.jar

Server APIs

The APIs tries to get target hosts from a local file in the same path.

 get("/http/:filename"
 get("/ssh/:filename/:concurrency/:showDetail"

targetHostFile location:

  • If in IDE, put into the same folder as the pom.xml.
  • If run as jar. just same folder as the executable jar file.

APIs:

  • localhost:4567/ssh/targetHostFile/200/true (require update login user/password)
  • localhost:4567/ping/targetHostFile ; need root
  • localhost:4567/http/targetHostFile : use elastic search

######Sample Output

http://localhost:4567/http/targetHostFile

Parallec: completed HTTP and sent to elastic search 
:3 Servers in 0.575 seconds. Results:  Results: [200 OK COUNT: 3 ]:
	www.parallec.io
	www.jeffpei.com
	www.ebay.com
###################################

At 2015.11.01.10.15.47.398-0800

Thanks for trying Parallec.io. Please submit a git issue for any questions you have.

Author and Contributors

Original Author

Yuanteng (Jeff) Pei

Contributors

Your name here

Licenses

Code licensed under Apache License v2.0

© 2015 eBay Software Foundation

parallec-samples's People

Watchers

 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.