GSoC 2020: Coding is Official!
Community bonding period is over now, and from today onwards Coding is official. Even though the coding period officially starts today, I have already started with coding in the community bonding period as I mentioned in my prior articles. In the previous article, I explained about the Kubernetes service which I integrated to the Node Cloud AWS plugin. In this article, I will give you an update about the last week of the community binding period. Afterwards, I will explain an awesome idea which was suggested by my mentor Rajika Imal and the Proof of concept I created for it.
In the previous week, I integrated the Elastic Beanstalk service to the Node Cloud AWS plugin. Elastic Beanstalk aims to provide a platform as a service(PaaS). If you are new to cloud computing concepts you might wonder what PaaS actually means. Let me explain it to you in a simple way. In PaaS, the user does not need to worry about the computing infrastructure as it is handled by the cloud provider. It’s all about managing your application using the operating system, programming language and execution environment given by the cloud provider. After integrating Elastic Beanstalk service in Node Cloud I wrote some examples which helps to understand how to use the Beanstalk module through Node cloud. Currently, this task is under review, will let you an update on this after this gets merged.
In addition to integrating the Elastic Beanstalk, I was also working with the changes suggested on my previous pull requests. The integration tasks of the Elastic Kubernetes service and the Cloud AutoML service was merged in the previous week after it was reviewed by my mentor : )
As usual, we had our weekly sync up on Saturday morning and discussed the plans for the upcoming week. In the discussion, my mentor Rajika Imal suggested an awesome idea which is to automate the class creation that we manually do when integrating a new service to a plugin. At first, I had no idea how to automate a code generation process. Since I had no experience regarding this, he explained me what needs to be done using a diagram and suggested some libraries to look into. After the call, I straight away started looking into this and worked to build a proof of concept for this. By Sunday night I was able to complete my proof of concept for the AWS SDK. So here how it works. In the AWS SDK for each service, there is a “d.ts” file which provides typescript type information of the API that’s written in JavaScript. This includes function names, parameters and all the data that we need. First, this file is taken and the source code is converted to an AST(Abstract syntax tree) using the typescript parser. After traversing through the AST(depth-first search is used here), the data which needs to the code generation process is extracted. Then another AST is created using a dummy class. Finally, the Node Cloud plugin classes are generated after transforming the second AST with the help of data gathered from the first AST. The below diagram visualizes this process.
So, that’s pretty much what happened in the last week. See you again in the next article with more updates about the Node Cloud project :)
Good Bye…