addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

Re: [ruby-99] How to proceed?

From: Mark
Sent on: Monday, July 26, 2010, 8:39 PM
Aaron, so I think what you suggested the first time might be correct. This will need to run on mac, windows and linux machines. Does distributing a complied binary (nix) and library (win) work at the root level on those machines? And is that the difference between those compiled as opposed to Ruby because Ruby has to be interpreted? Which then makes it more difficult to install and run on different machines like I am trying to do?

Mark

On Jul 26, 2010, at 8:12 PM, Aaron Blohowiak wrote:

Ah I assumed mark was talking about letting users or clients run the file notification thing.  If not, just look into script/runner and sleep(1) poll the file's mtime 



On Jul 26, 2010, at 7:59 PM, ambert ho <[address removed]> wrote:

I think Mark is just looking to do a file change check on the server locally?

I don't disagree with you disagreement, I'm just trying to suggest options to get his project up and running as simple as possible. Mark doesn't need to concern himself with implementing SOA at the moment :)

Remember how hard everything was when you were new at programming / *nix environments? When you'd go vi something in /etc/ and go "holy crap why does it say permissions denied?!"




On Mon, Jul 26, 2010 at 7:46 PM, Aaron Blohowiak <[address removed]> wrote:
This is a very ambitious beginning project that you are working on. I applaud you!

You are correct that you will need a native client.  File change notifications are tricky.  You are not going to find a solution that will work with windows, mac and linux.  I suggest focusing on one platform until you build the first version. 

Background stuff that always run is called a daemon (on mac or linux) or a service (on windows.)  You will need to learn a lot in order to successfully program one.

For mac and linux, you can get free libraries that will help you to ensure the daemon starts on boot, for windows you will likely have to pay someone a nominal fee for their code.  Please ask on a C# or .NET mailing list for more information.  

Ruby is not a suitable language for this kind of application, because ruby doesn't distribute well.  By that I mean, it is difficult to take your code and run it on an arbitrary machine.  The only safe way to do that when you are talking about client machines is to package the entire ruby runtime and all of the gem and library dependencies along with your code.  =(

So, for your client code, I recommend you look into distributing a compiled binary for mac/linux and a compiled library or .NET exe for windows.

Respectfully, I disagree with ambert about directly talking to the database.  1) you don't want to distribute the keys to the kingdom (database access) with your app 2) you are right to separate the concerns of the server from the client.. the client talks to a well-defined interface on the server so the client and server can change independently (ie: you can change the db schema without requiring a new client be downloaded.)

At this point, it should be clear that you are going to create 2 applications: a file monitoring / reporting application and a server / diff / emailing application. 

The latter is much much much easer than the former if you are distributing it out in the wild.

If you just want this for yourself, you can do it with cron and a shell script (like most things.)

- Aaron

On Mon, Jul 26, 2010 at 6:35 PM, Mark <[address removed]> wrote:
I am a fairly new member to RoR community and programming for that matter. I want to create a Rails app that pulls info from a file on a computer every time that file changes.
-So I'm thinking I need to have some code installed on the client computer?
-the installed code would have to be at the admin level incase any user causes the file to change?
-the installed code would then report back to a Rails application after each change of the file
-the program would need to run in the background no matter who is logged in.

Would a Ruby written program be the correct choice on the client computer or should that part of the equation be written in something else?
Anyone see in problems with trying to create this?

Thanks,

Mark



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/silicon-valley-ruby/
This message was sent by Mark ([address removed]) from Silicon Valley Ruby Meetup.
To learn more about Mark, visit his/her member profile: http://www.meetup.com/silicon-valley-ruby/members/4890954/
To unsubscribe or to update your mailing list settings, click here: http://www.meetup.com/silicon-valley-ruby/settings/

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]






--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Aaron Blohowiak ([address removed]) from Silicon Valley Ruby Meetup.
To learn more about Aaron Blohowiak, visit his/her member profile

To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by ambert ho ([address removed]) from Silicon Valley Ruby Meetup.
To learn more about ambert ho, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Aaron Blohowiak ([address removed]) from Silicon Valley Ruby Meetup.
To learn more about Aaron Blohowiak, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

People in this
group are also in: