Skip to content

Commit

Permalink
Update read me
Browse files Browse the repository at this point in the history
  • Loading branch information
saflin hussain committed May 16, 2016
1 parent 5df3b3a commit 5861f8e
Showing 1 changed file with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# prime-generator
# prime-generator

A simple restful webservice based prime generator.

Presently support three implemenations

1) Trial by division

2) Eratosthenes Sieve

3) Parallel version of Eratosthenes Sieve



# Building the project

Requires Java 1.8 and maven to build this project


1) Clone the project to your local directory

2) Go inside the local directory and execute below command

mvn clean package


# Running the application

After building the project execute the below command

java -jar target/prime-generator-1.0-SNAPSHOT.jar

This should start the spring boot application.

# Testing the application

Project presently expose below rest endpoints

1) Get all the supported prime generation algorithms

http://localhost:8080/generator/algorithms

2) Get all prime number upto 'n' using TRIAL_DIVISION algorithm

http://localhost:8080/generator/prime?algorithm=TRIAL_DIVISION&ceiling=n

3) Get all prime number upto 'n' using ERATOSTHENES_SIEVE_SEQUENTIAL algorithm

http://localhost:8080/generator/prime?algorithm=ERATOSTHENES_SIEVE_SEQUENTIAL&ceiling=100

4) Get all prime number upto 'n' using ERATOSTHENES_SIEVE_PARALLEL algorithm

http://localhost:8080/generator/prime?algorithm=ERATOSTHENES_SIEVE_PARALLEL&ceiling=100





0 comments on commit 5861f8e

Please sign in to comment.