Giter Site home page Giter Site logo

scalecube-configuration-service's Introduction

scalecube-services

Maven Central SourceSpy Dashboard

MICROSERVICES 2.0

ScaleCube is a library that simplifies the development of reactive and distributed applications by providing an embeddable microservices library. It connects distributed microservices in a way that resembles a fabric when viewed collectively. It greatly simplifies and streamlines asynchronous programming and provides a tool-set for managing microservices architecture. ScaleCube is built based on ScaleCube Cluster, which provides a built-in service discovery. The discovery uses SWIM protocol and gossip that scales better and has inherent failure detection and superior coherent understanding of the cluster state and cluster membership taking part in a swarm of services. ScaleCube cluster is a membership protocol that maintains membership amongst processes in a distributed system

An open-source project that is focused on streamlining reactive-programming of Microservices Reactive-systems that scale, built by developers for developers.

ScaleCube Services provides a low latency Reactive Microservices library for peer-to-peer service registry and discovery based on gossip protocol, without single point-of-failure or bottlenecks.

Scalecube more gracefully address the cross cutting concernes of distributed microservices architecture.

ScaleCube Services Features:
  • Provision and interconnect microservices peers in a cluster
  • Fully Distributed with No single-point-of-failure or single-point-of-bottleneck
  • Fast - Low latency and high throughput
  • Scaleable over- cores, jvms, clusters, regions.
  • Built-in Service Discovery and service routing
  • Zero configuration, automatic peer-to-peer service discovery using SWIM cluster membership protocol
  • Simple non-blocking, asynchronous programming model
  • Reactive Streams support.
    • Fire And Forget - Send and not wait for a reply
    • Request Response - Send single request and expect single reply
    • Request Stream - Send single request and expect stream of responses.
    • Request bidirectional - send stream of requests and expect stream of responses.
  • Built-in failure detection, fault tolerance, and elasticity
  • Routing and balancing strategies for both stateless and stateful services
  • Embeddable into existing applications
  • Natural Circuit-Breaker via scalecube-cluster discovery and failure detector.
  • Support Service instance tagging.
  • Support Service discovery partitioning using hierarchy of namespaces in a multi-cluster deployments.
  • Modular, flexible deployment models and topology
  • pluggable api-gateway providers (http / websocket / rsocket)
  • pluggable service transports (tcp / aeron / rsocket)
  • pluggable encoders (json, SBE, Google protocol buffers)
  • pluggable service security authentication and authorization providers.

User Guide:

Basic Usage:

The example provisions 2 cluster nodes and making a remote interaction.

  1. seed is a member node and provision no services of its own.
  2. then microservices variable is a member that joins seed member and provision GreetingService instance.
  3. finally from seed node - create a proxy by the GreetingService api and send a greeting request.
// service definition
@Service("io.scalecube.Greetings")
public interface GreetingsService {
  @ServiceMethod("sayHello")
	  Mono<Greeting> sayHello(String name);
	}
}
// service implementation
public class GreetingServiceImpl implements GreetingsService {
 @Override
 public Mono<Greeting> sayHello(String name) {
   return Mono.just(new Greeting("Nice to meet you " + name + " and welcome to ScaleCube"));
	}
}

//1. ScaleCube Node node with no members (container 1)
Microservices seed = Microservices.builder()
  .discovery("seed", ScalecubeServiceDiscovery::new)
	.transport(RSocketServiceTransport::new)
	.startAwait();

// get the address of the seed member - will be used to join any other members to the cluster.
final Address seedAddress = seed.discovery("seed").address();

//2. Construct a ScaleCube node which joins the cluster hosting the Greeting Service (container 2)
Microservices serviceNode = Microservices.builder()
  .discovery("seed", ep -> new ScalecubeServiceDiscovery(ep)
		.membership(cfg -> cfg.seedMembers(seedAddress)))
	.transport(RSocketServiceTransport::new)
	.services(new GreetingServiceImpl())
	.startAwait();

//3. Create service proxy (can be created from any node or container in the cluster)
//   and Execute the service and subscribe to incoming service events
seed.call().api(GreetingsService.class)
  .sayHello("joe").subscribe(consumer -> {
    System.out.println(consumer.message());
  });

// await all instances to shutdown.
Mono.whenDelayError(seed.shutdown(), serviceNode.shutdown()).block();

Basic Service Example:

  • RequestOne: Send single request and expect single reply
  • RequestStream: Send single request and expect stream of responses.
  • RequestBidirectional: send stream of requests and expect stream of responses.

A service is nothing but an interface declaring what methods we wish to provision at our cluster.

@Service
public interface ExampleService {

  @ServiceMethod
  Mono<String> sayHello(String request);

  @ServiceMethod
  Flux<MyResponse> helloStream();

  @ServiceMethod
  Flux<MyResponse> helloBidirectional(Flux<MyRequest> requests);
}

API-Gateway:

Available api-gateways are rsocket, http and websocket

Basic API-Gateway example:

    Microservices.builder()
        .discovery(options -> options.seeds(seed.discoveryAddress()))
        .services(...) // OPTIONAL: services (if any) as part of this node.

        // configure list of gateways plugins exposing the apis
        .gateway(options -> new WebsocketGateway(options.id("ws").port(8080)))
        .gateway(options -> new HttpGateway(options.id("http").port(7070)))
        .gateway(options -> new RSocketGateway(options.id("rsws").port(9090)))

        .startAwait();

        // HINT: you can try connect using the api sandbox to these ports to try the api.
        // https://scalecube.github.io/api-sandbox/app/index.html

Maven

With scalecube-services you may plug-and-play alternative providers for Transport,Codecs and discovery. Scalecube is using ServiceLoader to load providers from class path,

You can think about scalecube as slf4j for microservices - Currently supported SPIs:

Transport providers:

  • scalecube-services-transport-rsocket: using rsocket to communicate with remote services.

Message codec providers:

Service discovery providers:

Binaries and dependency information for Maven can be found at http://search.maven.org.

https://mvnrepository.com/artifact/io.scalecube

To add a dependency on ScaleCube Services using Maven, use the following:

Maven Central

 <properties>
   <scalecube.version>2.x.x</scalecube.version>
 </properties>

 <!-- -------------------------------------------
   scalecube core and api:
 ------------------------------------------- -->

 <!-- scalecube apis   -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services-api</artifactId>
  <version>${scalecube.version}</version>
 </dependency>

 <!-- scalecube services module   -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services</artifactId>
  <version>${scalecube.version}</version>
 </dependency>


 <!--

     Plugins / SPIs: bellow a list of providers you may choose from. to constract your own configuration:
     you are welcome to build/contribute your own plugins please consider the existing ones as example.

  -->

 <!-- scalecube transport providers:  -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services-transport-rsocket</artifactId>
  <version>${scalecube.version}</version>
 </dependency>

Sponsored by:

We Hire at exberry.io

https://exberry.io/career/

website

https://scalecube.github.io/

scalecube-configuration-service's People

Contributors

aharonha avatar artem-v avatar dependabot[bot] avatar dmytro-lazebnyi avatar io-scalecube-ci avatar pavlopetrina avatar ronenhamias avatar scooter72 avatar segabriel avatar snripa avatar stingion avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalecube-configuration-service's Issues

Exceptions have occurred while Couchbase pods are down for Configuration&Organization services

STR

1. Run the chaos bash script for Couchbase
#!/bin/bash while true do chaos run Pods-CouchBase-healthy.json sleep 15 done

Json

{ "version": "0.0.1", "title": "Terminate pods from couchbase app", "description": "We expect that the application should run fine even when pods are deleted", "tags": [ "kubernetes", "couchbase", "chaos" ], "steady-state-hypothesis": { "title": "Services are all available and healthy", "probes": [ { "type": "probe", "name": "couchbase-healthy", "tolerance": true, "provider": { "type": "python", "module": "chaosk8s.probes", "func": "microservice_available_and_healthy", "arguments": { "name": "couchbaseha", "ns": "couchbase", "label_selector": "" } } } ] }, "method": [ { "type": "action", "name": "terminate-pod", "provider": { "type": "python", "module": "chaosk8s.pod.actions", "func": "terminate_pods", "arguments": { "label_selector": "location=different", "rand": true, "ns": "couchbase" } }, "pauses": { "after": 25 } } ], "rollbacks": [] }

2. Wait up to 30 sec upon the script to be performed and start to execute some of the API calls for read or write operation for example:
/organizations/getOrganization and /configuration/save

3. Wait up to 1 min upon the script to be performed again and continue to execute some of the API calls for read or write operation

AR:
2.
{"sig":2,"q":"/io.scalecube.services.error/500","sid":2,"d":{"errorCode":500,"errorMessage":"java.util.concurrent.TimeoutException: {\"b\":\"organizations\",\"s\":\"kv\",\"t\":2500000,\"i\":\"0x44be\"}"}} {code}

3.
{"sig":2,"q":"/io.scalecube.services.error/500","sid":7,"d":{"errorCode":500,"errorMessage":"io.scalecube.configuration.repository.exception.TransientDataAccessResourceException"}} io.scalecube.configuration.repository.exception.TransientDataAccessResourceException: null at io.scalecube.configuration.repository.couchbase.CouchbaseExceptionTranslator.translateRuntimeExceptionIfPossible(CouchbaseExceptionTranslator.java:112) ~[app.jar:?] at io.scalecube.configuration.repository.couchbase.CouchbaseExceptionTranslator.translateExceptionIfPossible(CouchbaseExceptionTranslator.java:58) ~[app.jar:?] at reactor.core.publisher.Mono.lambda$onErrorMap$24(Mono.java:2991) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:88) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.Operators.error(Operators.java:181) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.Mono.subscribe(Mono.java:3694) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at reactor.core.publisher.MonoNext$NextSubscriber.onError(MonoNext.java:87) [reactor-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at rx.internal.reactivestreams.PublisherAdapter$1.onError(PublisherAdapter.java:87) [rxjava-reactive-streams-1.2.1.jar:1.2.1] at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153) [rxjava-1.2.2.jar:1.2.2] at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OperatorSerialize$1.onError(OperatorSerialize.java:52) [rxjava-1.2.2.jar:1.2.2] at rx.observers.SerializedObserver.onError(SerializedObserver.java:152) [rxjava-1.2.2.jar:1.2.2] at rx.observers.SerializedSubscriber.onError(SerializedSubscriber.java:78) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4$1.onError(OperatorOnErrorResumeNextViaFunction.java:122) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28) [rxjava-1.2.2.jar:1.2.2] at rx.Observable.unsafeSubscribe(Observable.java:10140) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142) [rxjava-1.2.2.jar:1.2.2] at rx.observers.Subscribers$5.onError(Subscribers.java:230) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73) [rxjava-1.2.2.jar:1.2.2] at rx.observers.Subscribers$5.onNext(Subscribers.java:235) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext(OnSubscribeDoOnEach.java:101) [rxjava-1.2.2.jar:1.2.2] at rx.internal.producers.SingleProducer.request(SingleProducer.java:65) [rxjava-1.2.2.jar:1.2.2] at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159) [rxjava-1.2.2.jar:1.2.2] at rx.Subscriber.setProducer(Subscriber.java:205) [rxjava-1.2.2.jar:1.2.2] at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102) [rxjava-1.2.2.jar:1.2.2] at rx.Subscriber.setProducer(Subscriber.java:205) [rxjava-1.2.2.jar:1.2.2] at rx.Subscriber.setProducer(Subscriber.java:205) [rxjava-1.2.2.jar:1.2.2] at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:103) [rxjava-1.2.2.jar:1.2.2] at com.couchbase.client.core.endpoint.AbstractGenericHandler.completeResponse(AbstractGenericHandler.java:508) [java-client-2.7.3.jar:?] at com.couchbase.client.core.endpoint.AbstractGenericHandler.access$000(AbstractGenericHandler.java:86) [java-client-2.7.3.jar:?] at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:526) [java-client-2.7.3.jar:?] at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) [rxjava-1.2.2.jar:1.2.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_212] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212] Caused by: com.couchbase.client.java.error.TemporaryFailureException at com.couchbase.client.java.subdoc.SubdocHelper.commonSubdocErrors(SubdocHelper.java:68) ~[java-client-2.7.3.jar:?] at com.couchbase.client.java.subdoc.AsyncMutateInBuilder$4.call(AsyncMutateInBuilder.java:1405) ~[java-client-2.7.3.jar:?] at com.couchbase.client.java.subdoc.AsyncMutateInBuilder$4.call(AsyncMutateInBuilder.java:1392) ~[java-client-2.7.3.jar:?] at com.couchbase.client.java.subdoc.AsyncMutateInBuilder$15$1.call(AsyncMutateInBuilder.java:1635) ~[java-client-2.7.3.jar:?] at com.couchbase.client.java.subdoc.AsyncMutateInBuilder$15$1.call(AsyncMutateInBuilder.java:1625) ~[java-client-2.7.3.jar:?] at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69) ~[rxjava-1.2.2.jar:1.2.2] Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.kv.subdoc.simple.SimpleSubdocResponse.class at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:109) ~[rxjava-1.2.2.jar:1.2.2]

ATTRIBUTES { contextMap { } date 2019-05-07T12:43:00.709Z endOfBatch false host ip-10-200-27-76.eu-west-3.compute.internal instant { epochSecond 1557232980 nanoOfSecond 709000000 } level ERROR loggerFqcn org.apache.logging.slf4j.Log4jLogger loggerName io.scalecube.configuration.ConfigurationServiceImpl service configuration-service thread cb-computations-3 threadId 24 threadPriority 5 thrown { cause { cause { commonElementCount 22 extendedStackTrace rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.kv.subdoc.simple.SimpleSubdocResponse.class at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:109) ~[rxjava-1.2.2.jar:1.2.2] localizedMessage OnError while emitting onNext value: com.couchbase.client.core.message.kv.subdoc.simple.SimpleSubdocResponse.class message OnError while emitting onNext value: com.couchbase.client.core.message.kv.subdoc.simple.SimpleSubdocResponse.class name rx.exceptions.OnErrorThrowable$OnNextValue }

ER: User should be able to write and read without long delay ( up to 10 sec )

Integration tests are not stable in Travis CI

Some of the integration tests (a random one) are failed because of an operation timeout.
The issue happens from time to time only on Travis CI environment.

Currently, integration tests are disabled by default. Set property skipITests as false to enable tests.

Also see logs
log.txt

Integrate Configuration Service with API for retrieving Public Key

Configuration Service has to call API to get "Public Key" which have to be cached and used to verify the signature without additional network call to Organization Service.

  1. Instead of getting the key from vault - use org-service new api
  2. cache keys from org service

Design / Renaming API

  • Rename repository to key/value store
  • Rename save, fetch, entries to set, get, getAll
  • Change request model for getAll : remove key

Integration tests are not stable in Travis CI

Some of the integration tests are failed because of an operation timeout.
The issue happens only on Travis CI environment.

Currently, integration tests are disabled by default. Set property skipITests as false to enable tests.

`Fixture` feature for selecting an environment to run the integration tests

Developing Fixture feature settings which allow developers to easily switch between the integration tests In-memory environment to develop (live) environment upon demand.

The difference between the environments for the configuration service :

In-memory - Vault and DB are mocked there
develop / live - Vault and DB aren't mocked there

API docs are missing, causing build to fail

find: ‘/home/travis/build/scalecube/scalecube-configuration-service/ApiDocs’: No such file or directory
{"message":"Please create an apidoc.json configuration file.","level":"warn"}
{"message":"apidoc-generator name: apidoc","level":"verbose"}
{"message":"apidoc-generator version: 0.17.7","level":"verbose"}
{"message":"apidoc-core version: 0.8.3","level":"verbose"}
{"message":"apidoc-spec version: 0.3.0","level":"verbose"}
{"message":"run parser","level":"verbose"}
{"Path":"/apidoc","level":"error","message":"No files found."}
cp: cannot stat '/tmp/docs-generated/*': No such file or directory
On branch develop
Your branch is up to date with 'origin/develop'.
nothing to commit, working tree clean
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Already up to date!
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Dropped refs/stash@{0} (06be1fc3e673e8ce69615cb390a220410b5d6113)
Script failed with status 1
failed to deploy

Add more logging

For now, we have scarce logging. Need to add them with different log levels (debug, info, warn, error).

Common Repository Name couldn't be created for different organization

Logic:

AR: Different organizations can't create the repos with the same name

  • ORG A & token-A > createRepository { "repository": "REPO-NAME-1"} > Success
  • ORG A & token-A > createRepository { "repository": "REPO-NAME-1"} > Fail
  • ORG B & token-B > createRepository { "repository": "REPO-NAME-1"} > Fail

ER: Different organizations able to create the repos with the same name but single organization can't duplicate the repos' names

  • ORG A & token-A > createRepository { "repository": "REPO-NAME-1"} > Success
  • ORG A & token-A > createRepository { "repository": "REPO-NAME-1"} > Fail
  • ORG B & token-B > createRepository { "repository": "REPO-NAME-1"} > Success

Versions in Key Management

As a configuration service consumer, I would like to keep all the data in the configuration service by having versions mechanism in the service.

Bug to fix:

Some Comments

@PavloPetrina

  1. Can you please add link to "organization Service" API doc?
  2. The end points are shown twise (under "Transport Protocols" and "Host Adresses"), can you keep only one ?
  3. can you remove the Datatypes section which has no content?
  4. regarding the HTTP:
  • should I use get or post to send the request?
  • I tryied this long end point and failed what headers are required?
  1. Can you apply the 3 tabs approach to all API calls?

update version of com.fasterxml.jackson.core:jackson-databind due to security alert

CVE-2018-19360 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.8
Patched version: 2.9.8
FasterXML jackson-databind 2.x before 2.9.8 might allow attackers to have unspecified impact by leveraging failure to block the axis2-transport-jms class from polymorphic deserialization.

CVE-2018-19362 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.8
Patched version: 2.9.8
FasterXML jackson-databind 2.x before 2.9.8 might allow attackers to have unspecified impact by leveraging failure to block the jboss-common-core class from polymorphic deserialization.

CVE-2018-14718 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.7
Patched version: 2.9.7
FasterXML jackson-databind 2.x before 2.9.7 might allow remote attackers to execute arbitrary code by leveraging failure to block the slf4j-ext class from polymorphic deserialization.

CVE-2018-19361 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.8
Patched version: 2.9.8
FasterXML jackson-databind 2.x before 2.9.8 might allow attackers to have unspecified impact by leveraging failure to block the openjpa class from polymorphic deserialization.

CVE-2018-14719 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.7
Patched version: 2.9.7
FasterXML jackson-databind 2.x before 2.9.7 might allow remote attackers to execute arbitrary code by leveraging failure to block the blaze-ds-opt and blaze-ds-core classes from polymorphic deserialization.

CVE-2018-14720 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.7
Patched version: 2.9.7
FasterXML jackson-databind 2.x before 2.9.7 might allow attackers to conduct external XML entity (XXE) attacks by leveraging failure to block unspecified JDK classes from polymorphic deserialization.

CVE-2018-14721 More information
high severity
Vulnerable versions: >= 2.9.0, < 2.9.7
Patched version: 2.9.7
FasterXML jackson-databind 2.x before 2.9.7 might allow remote attackers to conduct server-side request forgery (SSRF) attacks by leveraging failure to block the axis2-jaxws class from polymorphic deserialization.

Wrap the data parsing error for readEntry&readList methods

{
"q":"/configuration/readEntry",
"sid": 1,
"d":{
"apiKey": "API-TOKEN",
"repository": "specifiedRepoName",
"key": "specifiedKeyName"
"version": "sfosihfjoishfuishfuishiu"
}
}

{
"q":"/configuration/readList",
"sid": 1,
"d":{
"apiKey": "API-KEY",
"repository": "REPO-NAME"
"version": "TTRETETETTETE"
}
}

AR

Failed to decode data on message q=/configuration/readEntry
Failed to decode data on message q=/configuration/readList

ER >error message: Version must be a positive number

Cache Vault Client

Avoid creating new instance of vault client object on each vault access.

recently created keys and related values weren't returned upon 'readList' API call was done

Environment > develop
First path
STR

  1. createRepository > "repo-A"
  2. createEntry > repo-A, key-B, value: {"JSON-DATA":"new"}
  3. readList (without version)> repo-A

AR: empty array > https://take.ms/TvSAC
ER: d":[{"value":{"JSON-DATA":"new"},"key":"key-B"}]}

Second path

Precondition > entire data with old keys already stored in DB (look on First path)

STR:

  1. createEntry > repo-1, key-1, value: {val-1}
  2. createEntry >repo-1, key-2, value: {val-1}
  3. updateEntry >repo-1, key-2 > value: [{val-1}, {val-2}]
  4. readHistory > repo-1, key-2 > value: [{val-1}, {val-2}]
  5. readList > repo-1
  6. readList > repo-1

AR: step#5 > entire data (precondition) with old keys and values was returned without new keys and last versions of them. > https://take.ms/P2IKY Only in step#6 returned all the stored keys with last versions

ER: all the stored keys with last versions should be returned from the first api call readList (which been done in step#5)

Implement the new API 'deleteRepository'

The aim is to give the potential customer ability to delete the relevant repository with all the stored entries inside in one click

/configuration/deleteRepository

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.