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

Add ZIO clients for Maelstrom provided service nodes #3

Merged
merged 4 commits into from
Jul 12, 2023
Merged

Conversation

bilal-fazlani
Copy link
Owner

This PR adds zio clients for

  1. lin-kv
  2. lww-kv
  3. seq-kv
  4. lin-tso

more info here : https://github.com/jepsen-io/maelstrom/blob/main/doc/services.md

LinKv, LwwKv and SeqKv has the identical APIs

def read[Value]: PartiallyAppliedKvRead[?, Value]

def write[Key: JsonEncoder, Value: JsonEncoder](
      key: Key,
      value: Value,
      messageId: MessageId,
      timeout: Duration
  ): ZIO[?, AskError, Unit]

def cas[Key: JsonEncoder, Value: JsonEncoder](
      key: Key,
      from: Value,
      to: Value,
      createIfNotExists: Boolean,
      messageId: MessageId,
      timeout: Duration
  ): ZIO[?, AskError, Unit]

LinTso has only one API:

def ts(messageId: MessageId, timeout: Duration): ZIO[LinTso, AskError, Long]

@netlify
Copy link

netlify bot commented Jul 12, 2023

Deploy Preview for zio-maelstrom ready!

Name Link
🔨 Latest commit 1c04ab7
🔍 Latest deploy log https://app.netlify.com/sites/zio-maelstrom/deploys/64aeb415fad3b80008b788a1
😎 Deploy Preview https://deploy-preview-3--zio-maelstrom.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@bilal-fazlani bilal-fazlani merged commit 8ed81ff into main Jul 12, 2023
@bilal-fazlani bilal-fazlani deleted the services branch July 12, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant