From a54173435f82ab91844939d2327ab200e3a366b7 Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 6 May 2017 14:33:05 +0200 Subject: [PATCH] Small improve github README.md file #RB-517 --- README.md | 80 +++++++++++++++++++++---------------------------------- 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 1174534..7ff9963 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,44 @@ -LAS2peer-ActivityTracker +las2peer-ActivityTracker =================== -Table of contents -------------- +Idea +------------------- +las2peer-ActivityTracker is a microservice to provide activity information for las2peer services. The service is generically to work with all kinds of microservices. -- [LAS2peer-ActivityTracker](#) - - [Table of contents](#) - - [Idea](#) - - [Technology](#) - - [Dependencies](#) - - [How to run using Docker](#) - - [How to set up the database](#) - - [Configuration](#) - - [Build](#) - - [How to run](#) +The activity tracker response to HTTP or p2p requests and can fetch activity objects from the origin microservice which created an activity. ---------- -Idea -------------- +Service Documentation +------------------- +We use **[Swagger](http://swagger.io/specification/)** for documenting this microservice. You can use **[Swagger UI](http://swagger.io/swagger-ui/)** to inspect the API. +In the future we want to deploy our own Swagger UI instance which you can use to check and use the API. Until then please use the **[Swagger petstore instance](http://petstore.swagger.io/)**. +Open the Swagger UI petstore demo, enter the APi endpoint you want to inspect and press explore. Of course the microservice instance you want to inspect needs to run. At the moment you can not authorize yourself, but we are working on this feature. -LAS2peer-ActivityTracker is a microservice to provide activity information for LAS2peer services. The service is generically to work with different other microservices. +API documentation endpoint: -The activity tracker answers long-polling HTTP requests to push new activities to a client. Later we will support additional websocket connections. + - `baseURL/activities/swagger.json` ---------- - Technology ------------------- - -The activity tracker is built on Java technologies. As a service framework we use our in-house developed **[LAS2Peer](https://github.com/rwth-acis/LAS2peer)** project. For persisting our data we use MySQL database and JOOQ to access it. User input validation is done using Jodd Vtor library and for serializing our data into JSON format, we use GSON library. +The activity tracker is built on Java technologies. As a service framework we use our in-house developed **[las2peer](https://github.com/rwth-acis/LAS2peer)** project. For persisting our data we use MySQL database and jOOQ to access it. User input validation is done using Jodd Vtor library and for serializing our data into JSON format, we use GSON library. ---------- Dependencies ------------------- - In order to be able to run this service project the following components should be installed on your system: - - JDK (min v1.7) + Java Cryptography Extension (JCE) - - MySQL 5 - - (Apache Ant) + - JDK (min v1.8) + Java Cryptography Extension (JCE) + - MySQL 5.7 + - Apache Ant to build - -How to run using Docker -------------------- - -Docker will be provided at a later point. - - How to set up the database ------------------- - - 1. `git clone this repo` + 1. `git clone` this repo 2. create a new database called `activitytracker`, possibly with UTF-8 collation 3. Run the SQL commands in the file `\etc\activitytracker_create.sql` This will create the tables and relations between them. @@ -64,35 +48,33 @@ How to set up the database Configuration ------------------- - Of course there are way to configure this service to your own specific environment. Here are the list of configuration files and their short description: -\etc\de.rwth.dbis.acis.activity.service.ActivityService.properties -: *dbUserName*: A database user's name, which will be used to access the database -: *dbPassword*: The database user's password -: *dbUrl*: JDBC Connection string to access the database. Modify it if you have changed the name of your database +`\etc\de.rwth.dbis.acis.activity.service.ActivityService.properties`: + - `dbUserName`: A database user's name, which will be used to access the database + - `dbPassword`: The database user's password + - `dbUrl`: JDBC Connection string to access the database. Modify it if you have changed the name of your database + - `land`: Default language setting + - `country`: Default country setting + - `baseURL`: Base URL this service runs on -For other configuration settings, check the **[LAS2Peer](https://github.com/rwth-acis/LAS2peer)** project. +For other configuration settings, check the **[las2peer](https://github.com/rwth-acis/LAS2peer)** project. Build ------------------- +For build management we use Ant. To build the cloned code, please using a console/terminal navigate to the `home` directory, where the `build.xml` file is located and run the following command: -For build management we use Ant. To build the cloned code, please using a console/terminal navigate to the home directory, where the build.xml file is located and run the following commands: - - 1. `ant install-ivy` - 2. `ant clean_all` - 3. `ant get_deps` - 4. `ant generate_configs` - 5. `ant jar` + - `ant` How to run ------------------- - 1. First please make sure you have already [set up the database](#how-to-set-up-the-database) 2. Make sure your [config settings](#configuration) are properly set. 3. [Build](#build) 4. Open a console/terminal window and navigate to the `\bin` directory - 5. Run the `start_network.bat` or `start_network.sh` - + 5. Run the `start_network.bat` or `start_network.sh` script +How to run using Docker +------------------- +Docker will be provided at a later point. \ No newline at end of file