I need to add the ability for users to upload a file which contains
scheduling information in the form of a CSV or equivalent. I need to
process the data in the file and then send out notifications based on the
data in the file at a future time. I am thinking of two possible ways of
doing this and wanted to see what people suggest.

1. User uploads file and the contents are processed at that point with the
needed information being extracted and stored in the DB. File is deleted
after being processed. Then, when the time comes, the service acts based on
the information in the DB.

2. User uploads file and no processing is done at this time. Then, when the
time comes, the file is processed and the service acts on that information
as the data is processed. Once done, file is deleted. Nothing is added to
the DB.

I have not done anything like this and wanted to see if any had advice on
either of these.

Also, carrierwave is the way to go for uploading files?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/c_-Fcn_5mr8J.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Colin Law at Feb 13, 2013 at 9:24 am

    On 12 February 2013 22:22, tekram wrote:
    I need to add the ability for users to upload a file which contains
    scheduling information in the form of a CSV or equivalent. I need to process
    the data in the file and then send out notifications based on the data in
    the file at a future time. I am thinking of two possible ways of doing this
    and wanted to see what people suggest.

    1. User uploads file and the contents are processed at that point with the
    needed information being extracted and stored in the DB. File is deleted
    after being processed. Then, when the time comes, the service acts based on
    the information in the DB.

    2. User uploads file and no processing is done at this time. Then, when the
    time comes, the file is processed and the service acts on that information
    as the data is processed. Once done, file is deleted. Nothing is added to
    the DB.
    1 has the disadvantage that there is more work to do before the
    response is sent to the user so it will slow down the response. Does
    it have any advantages over 2?
    I have not done anything like this and wanted to see if any had advice on
    either of these.

    Also, carrierwave is the way to go for uploading files?
    Paperclip seems to be popular for this, but I cannot comment personally.

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tashfeen Ekram at Feb 13, 2013 at 5:51 pm
    I guess the advantage of the first would be is that I do not have to really
    store the file and can just delete it after I am done with it. perhaps, I
    can use a background process to do it so that the response is not that
    slow.

    I had assumed CarrierWave is more widely used now?

    On Wed, Feb 13, 2013 at 4:23 AM, Colin Law wrote:
    On 12 February 2013 22:22, tekram wrote:
    I need to add the ability for users to upload a file which contains
    scheduling information in the form of a CSV or equivalent. I need to process
    the data in the file and then send out notifications based on the data in
    the file at a future time. I am thinking of two possible ways of doing this
    and wanted to see what people suggest.

    1. User uploads file and the contents are processed at that point with the
    needed information being extracted and stored in the DB. File is deleted
    after being processed. Then, when the time comes, the service acts based on
    the information in the DB.

    2. User uploads file and no processing is done at this time. Then, when the
    time comes, the file is processed and the service acts on that
    information
    as the data is processed. Once done, file is deleted. Nothing is added to
    the DB.
    1 has the disadvantage that there is more work to do before the
    response is sent to the user so it will slow down the response. Does
    it have any advantages over 2?
    I have not done anything like this and wanted to see if any had advice on
    either of these.

    Also, carrierwave is the way to go for uploading files?
    Paperclip seems to be popular for this, but I cannot comment personally.

    Colin

    --
    You received this message because you are subscribed to the Google Groups
    "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 12, '13 at 10:22p
activeFeb 13, '13 at 5:51p
posts3
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Tashfeen Ekram: 2 posts Colin Law: 1 post

People

Translate

site design / logo © 2021 Grokbase