Hi,

See below:

 My first idea was to make some background process, which will scrape rooms 
> every 30 seconds, save the results *(in mongo, in cookies or somewhere 
> else, advise me please)*, match new scrape results with previous and save 
> differences (new rooms) in DB for future posting to user in some form 
> (email or list on html page).
>


if by scrape rooms  you mean having your program go to a website, fetch the 
html, parse it and extract data from them, going every 30 seconds may:
1. Break their term of use
2. Related to 1, they may mark your bot as spam and block it because you 
are going too often/generate too much load on their servers.

With the legal stuff aside, it would be better to store this info on your 
database, each user has have their locations in the database. Storing them 
in cookies would mean that using their cell phone browser will give them 
diff results than their computers.

Also store the new rooms data in your database, this allows you to resend 
them an email if they didn't get it, and/or render a page with all the 
listings when they go back to your site.

>
> 2) What is the best way to make that background process in go?
>
>
>
If you are just starting with Go, go simple and simply start the background 
process as a go routing, with a time.tick of x minutes

 

> 3) This would be great if you'd point me on some examples relating to the 
> case.
>
>
>

Don't have any.
 

> I appreciate your concern.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to