datastax / astra-sdk-java Goto Github PK
View Code? Open in Web Editor NEWSet of client side libraries to help with Astra Platform usage
License: Apache License 2.0
Set of client side libraries to help with Astra Platform usage
License: Apache License 2.0
Proposed a security user details service when security is detected in classpath
The current implementation expects the developers to provide BEAN to be populated.
As the unmarshalling / deserialization could be customize allow to work with Raw Json or provide options to implement external mapper.
On 9/14 the multi region support has been introduced to Astra. On each region (datacenters) you will have:
As a consequence the drivers cannot failover on their own, they need the secure bundle. The fail-over has to be handle at the SDK level.
AstraClient client = AstraClient.builder()
.databaseId("astra_cluster_id")
.databaseRegion("eu-central-1")
.databaseFallbackRegions("us-east-1", "us-east-2")
.keyspace("ks1")
.token("AstraCS:......")
.clientId("TWRvjlcrgfZYfhcxGZhUlAAA")
.clientSecret("7xKSrZPLbWxDJ0WXyj..")
.build();
We could try add settings on the retry mechanism:
astra.retries.count: 3
astra.retries.healthcheckPeriod: 1min
Idea:
Register your listener on get notify for each call (audit, monitoring)
After the curl install, creating a new Terminal prints out: "/Users//.astra/cli/astra-init.sh:1155: command not found: complete"
In version 0.2.4
and 0.2.5
we used the jitpack version.
astra.http.connectTimeout=3
astra.http.readtimeout=3
astra.http.keep-alive=3
On the free tier, after 23H , Astra will put the database instance in hibernation state.
From there any call will wake up the database. The first call will return 503 coding for a Service not (yet) available. This make the SDK initialization failing.
Enhancement: At initialization, if the code return is 503 corresponding to an hibernated state (need to be confirmed with explict message, the SDK will log it and wait and retry until the DB is available to keep initializing.
Update documentation to 0.4
and move to Awesome Astra
On some systems (but not all; seems to depend on Maven repository configuration locally), build fails with:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.278 s
[INFO] Finished at: 2022-09-28T10:17:38-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project stargate-sdk: Could not resolve dependencies for project com.datastax.stargate:stargate-sdk:jar:0.3.5-SNAPSHOT: Failed to collect dependencies at io.grpc:grpc-netty-shaded:jar:1.49.1 -> io.grpc:grpc-core:jar:[1.49.1]: No versions available for io.grpc:grpc-core:jar:[1.49.1] within specified range -> [Help 1]
[ERROR]
which is somehow triggered by (rare) use of version-range dependency in grpc-netty-shaded
:
https://mvnrepository.com/artifact/io.grpc/grpc-netty-shaded/1.49.1
This can be worked around by forcing dependencies at main level.
I will provide a PR for that.
Spring boot starter need some breaking changes for the support in SB3
When running into Kubernetes Stargate will have its own service doing the load balancing for us.
When running in Astra, a load balancer is already in place.
When running Stargate on your own Cassandra installation you may leverage on a DNS load balancer or use the client side load balancing here.
StargateClient sc = StargateClient.builder()
// CQL
.withAuthCredentials("cassandra","cassandra")
.withLocalDatacenter("datacenter1")
.withContactPoints("127.0.0.1:9045")
.withKeyspace("ks1")
// API
.withApiNode(new StargateNode("localhost"))
.withApiNode(new StargateNode("127.0.0.1"))
.withApiNodeDC("datacenter1",
new StargateNode("node11", "http://localhost:8082", "http://localhost:8080", "http://localhost:8081"))
.build()) {
In application.yaml
you can define an extra set of properties
astra:
cassandra-driver:
basic.load-balancing-policy:
local-datacenter: Cassandra
For a quickstart create a maven archetype to have a read-to-go project
The application does not end properly when executed in a Main.
Hi Team,
Astra is using DSE which is based on TPC, a lower value of the local connection pool will cause more issues that benefit, can we bump this value to a higher say 8, and add it clearly in documentation to configure it correctly?
{ "name": "astra.cql.driver-config.advanced.connection.pool.local.size",
"type": "java.lang.Integer",
"description":"The number of connections in the pool.",
"defaultValue": "1" },
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.