Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I were you, I’d write a little framework that abstracts these interactions. An HTTP call is an RPC call, and putting something onto SQS is just a queue.

You’re not testing that HTTP works, you’re testing that the two functions work together. If you can abstract a calling interface between them with different backends you’ll have a better time developing lambdas, while also not being tightly coupled to them.

Create an RPC container object that has method stubs for the other lambdas you want to call. When you deploy it on AWS configure it to make an HTTP call; when running it locally, configure it to just call the code as normal.

Just think of the HTTP call and JSON blob as the calling convention. The API is really simple.

I think one of the biggest mistakes people make when developing Lambadas is designing them differently to normal software.



> I think one of the biggest mistakes people make when developing Lambadas is designing them differently to normal software.

That's probably very true (and I'm probably quite guilty of it!).

Thanks for your suggestions, that does sound like a good approach.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: