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

Write API for Scala seems to be missing #125

Closed
ioreskovic opened this issue Jun 19, 2020 · 4 comments · Fixed by #347
Closed

Write API for Scala seems to be missing #125

ioreskovic opened this issue Jun 19, 2020 · 4 comments · Fixed by #347
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@ioreskovic
Copy link

Write API for Scala seems to be missing. Is that a deliberate choice or an oversight?

I case of former, is it still in development, and if so, what is the Akka-friendly alternative?

@bednar
Copy link
Contributor

bednar commented Jun 22, 2020

Hi @ioreskovic,

We currently don't have implemented the write API in Scala. We want to have a Akka-friendly Write API and I hope so that we will have an enough time to implemented soon.

Could you describe your requirements? It will help us to implement what users want.

Regards

@bednar bednar added the question Further information is requested label Jun 22, 2020
@ioreskovic
Copy link
Author

ioreskovic commented Jun 22, 2020

Thank you for your response @bednar!

Well, looking at other use cases within alpakka connectors, I would like to see something along these lines:

  • A plain sink, which may or may not do under the hood batching:
    Sink[Point[T], Future[WriteResult]] where WriteResult would be an indicator of an operation, perhaps Done is a good starting candidate if no other information is to be transmitted

  • An explicit batched sink:
    Sink[Seq[Point[T]], Future[WriteResult]]

  • A simple flow:
    Flow[Point[T], WriteResult, Mat] where this WriteResult could be different from the one in sink, here perhaps carrying more information, such as input + response

  • Batched flow
    Flow[Seq[Point[T]], WriteResult, Mat] with "atomicity" guarantees with a batch, meaning if the input (Seq[Point[T]]) has passed through the flow, then all the elements have been written (or submitted to writing, depending on which delivery guarantees are used)

  • Flow with context
    FlowWithContext[Point[T], C, WriteResult, C, Mat]

  • Batched flow with context
    FlowWithContext[Seq[Point[T]], C, WriteResults, C, Mat]

Edit:
Looking at alpakka-kafka, a unifying type such as Envelope a = Single a | Multi [a] | PassThrough (and their corresponding responses) might be more ergonomic, and then simple and batched flow(withContext) and could be replaced with a "flexiFlow(withContext)": Flow[Envelope[T, PT], Results[T, PT], Mat]

@bednar
Copy link
Contributor

bednar commented Jun 23, 2020

@ioreskovic thanks for detail info. It is huge inspiration for us! Thanks again.

@bednar bednar added enhancement New feature or request help wanted Extra attention is needed and removed question Further information is requested labels Jun 25, 2020
@funston
Copy link

funston commented Aug 27, 2020

might consider changing the README to take out that write is supported?

"The reference Scala client that allows query and write for the InfluxDB 2.0 by Akka Streams."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants