Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Support a LitmusChaos Java SDK #4871

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions proposals/java-sdk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
| title | authors | creation-date | last-updated |
|---------------------|--------------------------------------|---------------|--------------|
| add litmus java sdk | [@jemlog](https://github.com/jemlog) | 2024-09-07 | 2024-09-07 |

# Adding Litmus Java SDK

- [Summary](#summary)
- [Motivation](#motivation)
- [Goals](#goals)
- [Non-Goals](#non-goals)
- [Proposal](#proposal)
- [Use Cases](#use-cases)
- [Implementation Details](#implementation-details)
- [Risks and Mitigations](#risks-and-mitigations)
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
- [Drawbacks](#drawbacks)
- [Alternatives](#alternatives)
- [References](#references)

## Summary

The purpose of litmus-java-sdk is to provide a client that can easily access to auth and backend server of litmus.

## Motivation

Litmuschaos’ backend server uses graphQL as an API communication method.
Graphql is not as familiar to developers as REST API, so it is difficult to call backend server directly.
Therefore we planned to add a Java-based SDK that makes developers to communicate easily with litmus backend server.
The SDK also provides an interface to communicate with the auth server to wrap the entire litmus control plane.

### Goals

- Add client calling the API for Auth Server
- Add client calling graphQL for Backend Server


### Non-Goals

- Changing APIs that auth server and backend server already provide is non-goal
- Add auto configuration for SpringBoot is non-goal

## Proposal

### Use Cases

In organization, litmusChaos administrators can call java SDK to manage multiple users and projects.

### Implementation Details

```java
public void call(){
// create client
LitmusClient litmusClient = new LitmusClient("test_user");
// method call
CreateProjectResponse response = litmusClient.createProject("sample_project");
}
```

## Risks and Mitigations

## Upgrade / Downgrade Strategy

## Drawbacks

It will be a great opportunity for administrators of litmusChaos to manage users and conduct experiments more conveniently.

## Alternatives

This is the first java sdk we created in Litmus. No other alternatives exist.

## References