Saturday, 15 February 2014

ubuntu - Using AWS EC2 to maintain persistant connection to Twitter API? Even when closing terminal window? -



ubuntu - Using AWS EC2 to maintain persistant connection to Twitter API? Even when closing terminal window? -

i attempting pull info twitter streaming api, post statuses/filter.

the challenge i'm faced need persistent connection data, meaning computer cannot randomly restart or lose net connection. thought perfect chance aws ec2 ubuntu instance, , way, can rely on amazon's connection consistent info collection.

so that's did. created basic tier ec2 ubuntu instance, connected it, , started query created using curl , twitter oauth signing result generated twitter dev signature generator. allowed me collect info have , wanted to, however, if closed terminal window, query ended.

i know there other ways collect twitter data, work twitter dev signature generator avoid of other complications.

there couple of ways maintain process running in background after closed ssh session using screen , nohup.

nohup allows run command/process or shell script can go on running in background after log out shell:

nohup /path/to/command &

screen helpful in keeping session live after disconnecting it, improve screen allows reconnect disconnected session, might have install screen not installed default.

to start screen session:

screen -s sessionname

detaching screen:

"ctrl-a" "d"

reattach screen:

screen -r

more screen here

ubuntu twitter amazon-web-services amazon-ec2

No comments:

Post a Comment