kandi background
Explore Kits

piggymetrics | Microservice Architecture with Spring Boot, Spring Cloud | Microservice library

 by   sqshq Java Version: spring.version.2.0.3 License: MIT

 by   sqshq Java Version: spring.version.2.0.3 License: MIT

Download this library from

kandi X-RAY | piggymetrics Summary

piggymetrics is a Java library typically used in Architecture, Microservice, Spring Boot, Docker, Swagger, RabbitMQ applications. piggymetrics has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. However piggymetrics has 8 bugs. You can download it from GitHub.
Microservice Architecture with Spring Boot, Spring Cloud and Docker
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • piggymetrics has a medium active ecosystem.
  • It has 10766 star(s) with 5214 fork(s). There are 825 watchers for this library.
  • It had no major release in the last 12 months.
  • piggymetrics has no issues reported. There are 4 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of piggymetrics is spring.version.2.0.3
piggymetrics Support
Best in #Microservice
Average in #Microservice
piggymetrics Support
Best in #Microservice
Average in #Microservice

quality kandi Quality

  • piggymetrics has 8 bugs (0 blocker, 0 critical, 6 major, 2 minor) and 67 code smells.
piggymetrics Quality
Best in #Microservice
Average in #Microservice
piggymetrics Quality
Best in #Microservice
Average in #Microservice

securitySecurity

  • piggymetrics has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • piggymetrics code analysis shows 0 unresolved vulnerabilities.
  • There are 1 security hotspots that need review.
piggymetrics Security
Best in #Microservice
Average in #Microservice
piggymetrics Security
Best in #Microservice
Average in #Microservice

license License

  • piggymetrics is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
piggymetrics License
Best in #Microservice
Average in #Microservice
piggymetrics License
Best in #Microservice
Average in #Microservice

buildReuse

  • piggymetrics releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • piggymetrics saves you 4360 person hours of effort in developing the same functionality from scratch.
  • It has 9238 lines of code, 300 functions and 112 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
piggymetrics Reuse
Best in #Microservice
Average in #Microservice
piggymetrics Reuse
Best in #Microservice
Average in #Microservice
Top functions reviewed by kandi - BETA

kandi has reviewed piggymetrics and discovered the below as its top functions. This is intended to give you an instant insight into piggymetrics implemented functionality, and help decide if they suit your requirements.

  • Saves data point data .
  • Creates a new account .
  • Sends an email notification .
  • Send reminder notifications
  • Returns the current exchange rates .
  • Finds ready to notify of a given type .
  • Creates a new request from the map .
  • Configures this security .
  • Gets the limits for the currency .
  • Handles validation errors .

piggymetrics Key Features

Microservice Architecture with Spring Boot, Spring Cloud and Docker

Config service

copy iconCopydownload iconDownload
spring:
  application:
    name: notification-service
  cloud:
    config:
      uri: http://config:8888
      fail-fast: true

Auth service

copy iconCopydownload iconDownload
@PreAuthorize("#oauth2.hasScope('server')")
@RequestMapping(value = "accounts/{name}", method = RequestMethod.GET)
public List<DataPoint> getStatisticsByAccountName(@PathVariable String name) {
	return statisticsService.findByAccountName(name);
}

API Gateway

copy iconCopydownload iconDownload
zuul:
  routes:
    notification-service:
        path: /notifications/**
        serviceId: notification-service
        stripPrefix: false

Service discovery

copy iconCopydownload iconDownload
spring:
  application:
    name: notification-service

Load balancer, Circuit breaker and Http client

copy iconCopydownload iconDownload
@FeignClient(name = "statistics-service")
public interface StatisticsServiceClient {

	@RequestMapping(method = RequestMethod.PUT, value = "/statistics/{accountName}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
	void updateStatistics(@PathVariable("accountName") String accountName, Account account);

}

Distributed tracing

copy iconCopydownload iconDownload
2018-07-26 23:13:49.381  WARN [gateway,3216d0de1384bb4f,3216d0de1384bb4f,false] 2999 --- [nio-4000-exec-1] o.s.c.n.z.f.r.s.AbstractRibbonCommand    : The Hystrix timeout of 20000ms for the command account-service is set lower than the combination of the Ribbon read and connect timeout, 80000ms.
2018-07-26 23:13:49.562  INFO [account-service,3216d0de1384bb4f,404ff09c5cf91d2e,false] 3079 --- [nio-6000-exec-1] c.p.account.service.AccountServiceImpl   : new account has been created: test

How to run the shellscript with -z parameters?

copy iconCopydownload iconDownload
test -z "$MONGODB_PASSWORD"
MONGODB_PASSWORD="password" ./init.sh
-----------------------
test -z "$MONGODB_PASSWORD"
MONGODB_PASSWORD="password" ./init.sh

Caused by: java.lang.ClassNotFoundException: org.springframework.messaging.converter.MessageConverter in microservices

copy iconCopydownload iconDownload
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ monitoring ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\pc\Desktop\My_MicroServices\PPP\PiggyMetrics-master\monitoring\target\classes
[ERROR] error reading C:\Users\pc\.m2\repository\io\projectreactor\ipc\reactor-netty\0.7.8.RELEASE\reactor-netty-0.7.8.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\pc\.m2\repository\org\springframework\spring-messaging\5.0.7.RELEASE\spring-messaging-5.0.7.RELEASE.jar; invalid LOC header (bad signature)
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ monitoring ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ monitoring ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\pc\Desktop\My_MicroServices\PPP\PiggyMetrics-master\monitoring\target\test-classes
[ERROR] error reading C:\Users\pc\.m2\repository\io\projectreactor\ipc\reactor-netty\0.7.8.RELEASE\reactor-netty-0.7.8.RELEASE.jar; invalid LOC header (bad signature)
[ERROR] error reading C:\Users\pc\.m2\repository\org\springframework\spring-messaging\5.0.7.RELEASE\spring-messaging-5.0.7.RELEASE.jar; invalid LOC header (bad signature)

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing in Microservices

copy iconCopydownload iconDownload
spring:
  application:
    name: <name>
  cloud:
    config:
      uri: http://host:port
      fail-fast: true
      password: <password>
      username: <user>

Community Discussions

Trending Discussions on piggymetrics
  • How to run the shellscript with -z parameters?
  • Caused by: java.lang.ClassNotFoundException: org.springframework.messaging.converter.MessageConverter in microservices
  • java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing in Microservices
  • Feign Exception 403 after updating to Spring Boot 1.5.8 and Finchley/Edgware Spring Cloud
Trending Discussions on piggymetrics

QUESTION

How to run the shellscript with -z parameters?

Asked 2018-Sep-05 at 19:52

How to run below shell scripts which name is init.sh ? I am running this sheel script like this ./init.sh test123 and its giving me the message MONGODB_PASSWORD not defined. Being new to the shell-script, I am not aware what does this mean ?

-z   ==>
Checks if the given string operand size is zero; if it is zero length, then it returns true.    

Actual File details:

#!/bin/bash
if test -z "$MONGODB_PASSWORD"; then
    echo "MONGODB_PASSWORD not defined"
    exit 1
fi

auth="-u user -p $MONGODB_PASSWORD"

# MONGODB USER CREATION
(
echo "setup mongodb auth"
create_user="if (!db.getUser('user')) { db.createUser({ user: 'user', pwd: '$MONGODB_PASSWORD', roles: [ {role:'readWrite', db:'piggymetrics'} ]}) }"
until mongo piggymetrics --eval "$create_user" || mongo piggymetrics $auth --eval "$create_user"; do sleep 5; done
killall mongod
sleep 1
killall -9 mongod
) &

# INIT DUMP EXECUTION
(
if test -n "$INIT_DUMP"; then
    echo "execute dump file"
    until mongo piggymetrics $auth $INIT_DUMP; do sleep 5; done
fi
) &

echo "start mongodb without auth"
chown -R mongodb /data/db
gosu mongodb mongod "$@"

echo "restarting with auth on"
sleep 5
exec gosu mongodb /usr/local/bin/docker-entrypoint.sh --auth "$@"

EDIT-1: cat .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
export JAVA_HOME=/opt/jdk1.8.0_181
export M2_HOME=/usr/local/apache-maven-3.5.4
export MAVEN_OPTS=-Xms256m -Xmx512m
export M2=$M2_HOME/bin


# THIS IS SETTING TO RUN THE PiggyMetrix
export CONFIG_SERVICE_PASSWORD=test123
export NOTIFICATION_SERVICE_PASSWORD=test123
export STATISTICS_SERVICE_PASSWORD=test123
export ACCOUNT_SERVICE_PASSWORD=test123
export MONGODB_PASSWORD=test123

export PATH=$M2:$PATH:/opt/jdk1.8.0_181/bin/:$HOME/.local/bin:$HOME/bin

I am using

uname -a
Linux ech-10-XX-XX-11 4.1.12-61.1.18.el7uek.x86_64 #2 SMP Fri Nov 4 15:48:30 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux

EDIT-2:

[dc-user@ech-10-XX-XX-11 ~]$ whoami
dc-user
[dc-user@ech-10-XX-XX-11 ~]$ ls -ltra
total 8664
-rw-r--r--  1 dc-user dc-user     231 Oct  7  2016 .bashrc
-rw-r--r--  1 dc-user dc-user      18 Oct  7  2016 .bash_logout
drwxrwxr-x  3 dc-user dc-user      23 Sep  5 13:43 .m2
-rw-r--r--  1 dc-user dc-user     677 Sep  5 13:56 .bash_profile
-rw-------  1 dc-user dc-user    3478 Sep  5 13:56 .viminfo
drwx------  8 dc-user dc-user    4096 Sep  5 13:56 .

ANSWER

Answered 2018-Sep-05 at 19:52

With

test -z "$MONGODB_PASSWORD"

you are testing if the variable $MONGODB_PASSWORD is not empty.

Before running the script you will have to store your password in the variable:

MONGODB_PASSWORD="password" ./init.sh

Source https://stackoverflow.com/questions/52191934

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install piggymetrics

You can download it from GitHub.
You can use piggymetrics like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the piggymetrics component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

PiggyMetrics is open source, and would greatly appreciate your help. Feel free to suggest and implement improvements.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Reuse Pre-built Kits with piggymetrics
Consider Popular Microservice Libraries
Compare Microservice Libraries with Highest Support
Compare Microservice Libraries with Highest Security
Compare Microservice Libraries with Permissive License
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.