Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature: C Client #1140

Open
2 tasks done
rupurt opened this issue Jul 18, 2023 · 5 comments
Open
2 tasks done

Feature: C Client #1140

rupurt opened this issue Jul 18, 2023 · 5 comments
Assignees
Labels
💟 Community involvement A feature that the community is invloved with epic: SDK Feature Request New feature or request

Comments

@rupurt
Copy link

rupurt commented Jul 18, 2023

Current behavior

Add an officially supported C client. This would enable any language that supports the C ABI to create bindings e.g. C++, Zig, ...

Suggested solution

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@rupurt rupurt added Feature Request New feature or request 💟 Community involvement A feature that the community is invloved with labels Jul 18, 2023
@yanivbh1
Copy link
Contributor

Hey @rupurt,
Thanks for the request.
Adding it to the "future discussion" board.

@g41797
Copy link

g41797 commented Nov 13, 2023

Hey @rupurt,
could you please add short description of required flows?
(this is also a check that you still need this functionality)

i am thinking about possibility to add gRPC access to memphis
it will allow to generate code of the client side and as far as i understand c++ is supported by gRPC
i am not sure regarding C :-(

@ChibangLW
Copy link

I am looking for a C++ SDK. gRPC would definitely solve produce and consume but would probably not work for other SDK functions like creating a station.

I started on compiling the go SDK as a c library and building a C++ wrapper around it. It worked for simple string consume and produce. I haven't had time to dive deeper into all functions, e.g. protobuf or json.

@g41797
Copy link

g41797 commented Nov 15, 2023

I'd like to clarify proposed solution:

  • proto files - definitions of structures and apis
  • generation of go code for client and server
  • implementation of go based gRPC server process (memphis bridge)
    • receive grpc "requests"
    • "translates" to memphis
    • this process runs as stand alone or as part of memphis containers
  • you can generate C++/PHP/etc client code and use it in own application

see grpcadapter repo

@g41797 g41797 mentioned this issue Nov 15, 2023
2 tasks
@g41797
Copy link

g41797 commented Dec 3, 2023

Supported APIs:

service AdapterService {
	rpc CreateStation(CreateStationRequest) returns (Status) {}
	rpc DestroyStation(DestroyStationRequest) returns (Status) {}
	rpc Produce(stream ProduceMessages) returns (Status) {}
	rpc Consume(stream ConsumeMessages) returns (stream ConsumeResponse) {}
}

see proto files

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
💟 Community involvement A feature that the community is invloved with epic: SDK Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants