Multi-language lambda functions within the same directory [closed] - node.js

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have few lambda written in Typescript and few other in Java.Should I place both the packages in a single directory or maintain a different directory based on the language.We use terraform for deploying Infra and Jenkins for CI/CD. Im also thinking about common code sharing between the lambda functions ,not sure how does that work if we keep all the lambda in the same directory

I would suggest few things here
Group your code in different repositories which will help you with better code management, less code size on lambda as lambda has limit on how much you can upload.
It is better to group different languages in different repo as they are different runtime and hence the settings will be different.
Also, if you make change to typescript code, there shouldn't be any need to touch the java functions and vice versa.
If you have some common code, I would suggest you to look for AWS Lambda layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). This gives you capability to share the code/bin/executable etc across multiple functions.
Hope this helps.

Related

Can i write all of my serverside inside nextjs? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 months ago.
The community reviewed whether to reopen this question 9 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
In nextjs u can write API routes using the api named directory inside the pages directory, thus i was wondering if i can write all of my server code(api endpoint,database queries...ect) inside of NextJS instead of having an actual nodejs app running elsewhere?
The short answer: Yes. Nextjs is in fact an Nodejs app itself.
The long answer:
Depending on your apps usage and scale and the size of your team there are some nuances to consider.
If you use Nextjs for both Server-side Rendering (SSR) and handling api calls, it will effectively have two responsibilities.
This is perfect for small teams because the stack is relatively uncomplicated and all in the same repository (and module).
At a certain scale you might want to optimise deployments to gear towards either rendering or handling api calls. It might become difficult to keep both extremely highly performing - at which point a separate, specialised, backend might become relevant.

Automating Azure Question for generating infrastructure [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to make sure I am taking the right approach.
I am building virtual environments in Azure on a regular anywhere from 3 to 5 servers at a time. Each server has 1 of 4 different resources (RAM/CPU/...) that it will need. Obviously I could script out each VM and just use powershell to deploy each individual VM each time.
More over what I want is a utility or webpage where I can say I need to create x servers and here are the specifications for them, how much will it cost and make it start building them.
Is there any tool like this or what would be the best approach to this?
You could automatically create Azure resources from a Resource Manager template. You create a template file that deploys the resources and a parameters file that supplies parameter values to the template.
Also, you could easily edit and deploy the template on the Azure portal. In this way, you could search Template----Deploy from a custom template---Build your own template in the editor. You could reuse the template after you save it. You could find multiple guidances and sample about the template what you want to deploy.

What is a "node project"? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What is a "NodeJs project"? How would you describe a node project to a person that is moving to learn nodeJs? Or, at a job interview, for example, if someone asked you this question, how would you reply? How would you describe a "node project"?
A node project is any program that is built to run on the node.js Javascript engine and use its built-in runtime library. It could be a simple one file script to carry out some sort of local scripting operation or it could be whole directory hierarchy of script files and installed modules designed to be a clustered server running a website at scale or anything in between.
node.js itself is a very flexible development environment that can be used to create a wide variety of programs. It's somewhat analogous to Python (though obviously a different language) in that it comes with a language interpreter, a runtime library of built-in functionality and a community of modules (most of which are open source) that you can add in to your project.
If you're hoping to seem node.js-proficient in an interview and don't even know the answer to this already, then you have a lot of additional studying to do because a few simple followup questions about the relevant strengths of node.js compared to other environments or a few quick programming questions about the node.js environment would likely quickly show the limitations of your knowledge.

Distributed file system for linux [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I've got a web app where I use plain file system for my custom logs - a lot of small files, I don't want to put that into db, that works for me quite well. But now I need to scale my app by using a load balancer in front, so I also need to keep those logs in sync between servers. Is there any reliable solution for such cases ? I know I could sync it by some OS means, or by scripting, but I'm thinking if there is any better solution for such scenarios? Is it the case for MongoDB usage or something more modern or is it better to keep it on file system as plain files ?
This questions is going to get you some heat since essentially your asking for our opinion. Ill be frank tho and wont argue with anyone since its just MY opinion. With web apps in my humble opinion, its always better to keep your data in a DB for scalability but also for analytical research. I know little about what your app does but its easier to write third party data apps that tell you how many of X or Y etc when its centrally stored in a DB. Since the app that gets said data can be anywhere. I know I probably wasted time with an argument but hey, hope I helped a bit.

Whether to use MEAN.js or not? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What advantages we will get if we use MEAN.js framework over our homegrown MEAN packaging? we are not going to use angular.js (A part of MEAN.js)
Will we face any API versioning issues? Will there be any issues related versioning of packages in MEAN?
Is it really complex to use MEAN.js as compared to creating own structure to use manage APIs, etc.
I was trying to create custom MEAN stack myself, but it was only a matter of time when i realized, that MEAN is not only MongoDB, Express, Angular and Node. Just look at node modules to see how many additional things there are. Authorization(passport.js), connectors, parsers, test libraries, mailer, promieses, etc. When i was starting I didn't find these tools useful, but now I would add most of them to my custom MEAN. Thats why I use MEAN.js stack
We can't possibly know whether your configuration will work better than MEAN.js because we know neither your needs, nor your configuration. MEAN.js provides an API out-of-the-box and supports scaffolding (via yeoman) which generates files and code with a single command. I am not a huge framework enthusiast in general, but I have to admit that development became much more easier and enjoyable since we switched to MEAN.js (ditching our own custom MEAN stack).

Resources