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

What specific kind of Lambda trigger did you use as its event and why C++? #6

Open
Lorisyy opened this issue Jun 10, 2022 · 2 comments

Comments

@Lorisyy
Copy link

Lorisyy commented Jun 10, 2022

Hi!
It's my pleasure to appreciate your great work and I'm curious about this project's implementation.

I'm wondering what specific kind of Lambda trigger did you use to start it? Thanks. (Specifically, AWS Lambda is an event-based system, the trigger could be HTTP requests and so on.)

On the other hand, why did you use c++ for Lambda computing? According to the link below, I did not find C++ as a programming language for Lambda. Could you please explain your idea of using C++ and how did you run C++ code on Lambda Threads? Thanks a lot.
https://aws.amazon.com/lambda/faqs/#:~:text=Q%3A%20What%20languages%20does%20AWS%20Lambda%20support%3F

Best.

@ivanium
Copy link
Contributor

ivanium commented Jun 13, 2022

Hi Lorisyy,

Thank you for your interest in Dorylus. I am glad to answer your questions.

How to trigger a Lambda?

You are right that AWS Lambda is an event-based system. We use the AWS CLI tool (refer to the wiki page for installation) and its c++ library bindings to invoke a Lambda. You can refer to the code here for details:
https://github.com/uclasystem/dorylus/blob/master/src/graph-server/commmanager/lambda_comm.cpp#L141

Why and how to use C++ for Lambda?

Dorylus is not fixed to C++ for its Lambda function implementations, so feel free if you want to try other languages like Python. We choose C++ mainly because it is easier to leverage C++ bindings of the cBLAS and zmq libraries. Otherwise, there is no specific reason to use C++.

You are right that C++ is not natively supported by AWS Lambda. I believe the reason is that C++ is a compiled language without any language runtime, which makes a key difference between C++ and the languages listed on the webpage you referred to. We upload the compiled binaries from the C++ source code to the AWS Lambda console with the help of the AWS CLI tool and AWS lambda-runtime support. You can refer to the wiki here for more details.
Here is the script we upload the function: https://github.com/uclasystem/dorylus/blob/master/src/funcs/gcn/upload-func
I hope these help. Let me know if you have further questions.

Good luck,
Yifan

@Lorisyy
Copy link
Author

Lorisyy commented Jun 17, 2022

Hi Lorisyy,

Thank you for your interest in Dorylus. I am glad to answer your questions.

How to trigger a Lambda?

You are right that AWS Lambda is an event-based system. We use the AWS CLI tool (refer to the wiki page for installation) and its c++ library bindings to invoke a Lambda. You can refer to the code here for details: https://github.com/uclasystem/dorylus/blob/master/src/graph-server/commmanager/lambda_comm.cpp#L141

Why and how to use C++ for Lambda?

Dorylus is not fixed to C++ for its Lambda function implementations, so feel free if you want to try other languages like Python. We choose C++ mainly because it is easier to leverage C++ bindings of the cBLAS and zmq libraries. Otherwise, there is no specific reason to use C++.

You are right that C++ is not natively supported by AWS Lambda. I believe the reason is that C++ is a compiled language without any language runtime, which makes a key difference between C++ and the languages listed on the webpage you referred to. We upload the compiled binaries from the C++ source code to the AWS Lambda console with the help of the AWS CLI tool and AWS lambda-runtime support. You can refer to the wiki here for more details. Here is the script we upload the function: https://github.com/uclasystem/dorylus/blob/master/src/funcs/gcn/upload-func I hope these help. Let me know if you have further questions.

Good luck, Yifan

Got it, very useful! Thanks a lot for your help!

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

No branches or pull requests

2 participants