Looking for a hosting provider for Twitter bot that tweets once per day - twitter

I'm building twitter bot that tweets once per day at a specific time. Code is written in JavaScript so it's basically one JS file that I need to invoke in Node.js everyday at that specific time.
I can't decide what hosting provider I should use. I was looking into Amazon WS and Google Cloud but both of them have very complicated documentation and I don't know what service I'm looking for (I don't have any experience with AWS nor GC yet).
Any guidance would be very appreciated. Thank you

You can put your code in an AWS Lambda with Scheduled event configured to execute the code at a given time of the day.
To deploy your code, the steps are straight forward since you only need to upload the zip of your code to a lambda function(Select Lambda after login into the AWS Console) or write the code using the inline editor. Make sure the callback and scheduled event is configured. If you need DevOps support to test the Lambda locally and deploy using command line you can use the serverless framework.
This way you only pays per execution and because the Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month, your usage scenario most probably fall within the free tier.

At the end I've figured out how to setup free hosting at Heroku and use their scheduler to run my script every day at a certain hour.

Related

serverless (sls) deploy specific resource

How to deploy a specific AWS resource using serverless framework?
I know it supports deploying specific lambda functions using sls deploy -f <function>. Wondering if there is similar option to target AWS resource?
In my use case, I have an API, ~50 Lambdas, Dynamodb, SQS, Cognito user pools etc. Each time I make a change to Cognito (or anything other than lambda code), I have to run complete sls deploy which takes ~10-15 minutes. Wondering if there is a way to skip complete deploy.
There is no way to skip full deployment, as Serverless Framework uses CloudFormation under the hood and it has to update the whole stack. The only resource that you can update separately are functions, as you mentioned, but it's only intended for development and it does not recognize all properties during an update.

Make the Web App on Azure portal only Available few hours in a Week

I am building a ASP.Net Core Web App which I am trying to host in the Azure portal. We have requirement that these Applications can be accessed only certain times in a week, those times are stored in the Azure Database. Is it possible to make the App Available/Accessible to the users upon looking at database
Here the Setting is that the application should be available only between 14:00 - 16:30 on TUESDAY. When I tried to research we can schedule tasks/workflows in the portal but couldnt find what I am looking for. All I wanted to know is this requirement possible, if so please share the idea.. I am new Web App development and Azure deployment, any help is greatly appreciated
This feature is not available in Azure out of the box. This is something you will have to handle yourself.
One obvious way to implement this would be to check if the application should be available on every request. If the request day and time falls between the available times set in the database, you show your users the website content otherwise show them some kind of not available message.
A more complicated way would be to make use of App_offline.htm file to make your site unavailable. You can dynamically add/delete App_offline.htm file to your WebApp based on the day/time when you want your site to be offline/online.
However please note that while your site is offline, you will still be charged for the WebApp as the resources keep remain provisioned.
You can use Azure Automation Service to orchestrate processes like this. You will have to create a runbook (script in python or powershell) that will query the DB and figure out the times when the Azure Website hosting your webapplication should be started or stopped.

send email automatically monthly using asp .net mvc

I am developing a tuition fee management system using asp .net MVC for a university assignment. I am quite new with asp .net just learn it this April 2021. One of the requirements is that the system automatically sends an email every month to every user as a reminder about the outstanding balance. So how do I start to develop this requirement since I've been searching and only found tutorials email send manually and to one user only?
There is not built-in functionality in .NET that runs your code once a month, but there are several tools to do this. If you are using Azure, AWS or GCP (or any other cloud platform), you’d might consider a serverless Function to do this. These Functions can be triggered once a month by the cloud provider.
If you’re not hosting it in the cloud (or want to avoid any provider-specific features), you can use for instance Quartz (https://www.quartz-scheduler.net) or Hangfire (https://www.hangfire.io). There are many libraries available, all with their pros and cons. Hangfire for instance has a dashboard built-in to monitor and debug any issues, but this also costs some server resources and might be an overkill if you have a single job to run.
You should however take into account that communication with an SMTP server is quite time-consuming. Sending thousands of emails could therefore take a lot of time. Especially if you are using serverless Functions, this will become an issue due to the time-limits that apply for these Functions. Also when you run these as jobs in Quartz or Hangfire, you want to take into account this job might be aborted halfway. Therefore, you usually insert those mails into a queue (or database) and then have a second process to actually send these mails. Maybe even via a specialized email delivery service?

Good way to get streaming Twitter data using Apache Storm?

I'm building a Twitter crawler system. Requirement is to crawl both Twitter Profile and Twitter Streaming. There's a project manager which puts all projects (1 project is a Twitter profile, or a keyword for Twitter Streaming) into Kafka. Then Storm will read from Kafka to get project metadata and start to run. The project manager will check all projects periodically and eventually restart the project (by putting data into Kafka), so every project has the latest data. I have a couple of questions:
Since we need to keep a connection to Twitter Streaming, we cannot let a Bolt run for a very long time for the Twitter streaming project. Can you suggest a good way to do this, like implement a separate process for crawling?
Another question is about tokens. We want each access token to run on one server only in order to improve stability and prevent reaching the rate limit too soon. When a project (tuple) starts to be processed in Storm, it would be assigned an access token of its supervisor IP. Is there any good solution for this? Someone recommends me to use Zookeeper to assign access token but I'm not sure if it's a good way and how to implement?

Test web services in rails

I need to check how much response time of a web service .Suppose a web service is being hit by 10000 users at same time so how much time it is taking both on local and production. I need to check for both get and post request.I have look on internet but I am getting jmeter which I think is for java.Can anyone suggest me tools for rails.
Try blazemeter. There are some restrictions on free tests but still it may help. Additionally maybe you can use native ruby benchmark command.

Resources