DEV Community

Sohail Pathan
Sohail Pathan

Posted on

APIs in severless?

Since you can create your custom functionality using Cloud Functions and deploy it, is it more beneficial to rely on pre-existing third-party services instead of going through the process of building and implementing them yourself in a serverless environment?

Has anyone attempted this approach previously? If so, what were your findings in terms of development time and the effectiveness of the solution?

Top comments (1)

Collapse
 
ranjancse profile image
Ranjan Dailata • Edited

Suggestions

  • Do not build a wrapper service for the 3rd parties. Instead, leverage them as is or utilize the API Gateway to deal with.
  • Do not reinvent the wheel with the wrapper services, you won't be able to match the expectations and basically these wrapper services are not yours, hence no control on them. Any change happening to the 3rd parties will suffer your wrapper services.
  • Utilize the Cloud Functions to provide your own services using your data, or mix and match with other provider or vendor data.
  • Utilize the Cloud Functions along with the API Gateway for handling the secure and scalable services. Depending upon the use-cases, you need to carefully architect your solution. Hence, there is no silver bullet to deal with the serverless infrastructure based solution.
  • Utilize the Cloud Functions for easy scaling of your services. However, please do understand the cold start etc. these are very common and hence, you need to deal with it. There are some providers who make the functions available on Always Running mode. That would be a great option.
  • Understand the limitations of Cloud Functions, especially the memory and disk usage. Timeouts etc.