Heroku progamming

T

thunk

http://en.wikipedia.org/wiki/Heroku


Hello,

We have a Ruby program that:

1. Is based on Wee + rack
2. Accepts input from a browser/client
3. Generates a text file, which is also a ruby class

Is this an appropriate 'Ruby' topic?

If so:

1 Does 'Heroku' seem like the best place for such a simple program?
2. There seemed to be issues with simple file saving but we have no
long term interest in RDMS (would use couchDB/JSON)

If it is, can anybody point to potential problems?

Respectfully,

gk
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

http://en.wikipedia.org/wiki/Heroku


Hello,

We have a Ruby program that:

1. Is based on Wee + rack
2. Accepts input from a browser/client
3. Generates a text file, which is also a ruby class

Is this an appropriate 'Ruby' topic?

If so:

1 Does 'Heroku' seem like the best place for such a simple program?
2. There seemed to be issues with simple file saving but we have no
long term interest in RDMS (would use couchDB/JSON)

If it is, can anybody point to potential problems?

Respectfully,

gk
3 will be a problem, you can't write to Heroku's file system. When we deploy
on Heroku, we use Amazon to store files (pictures, mp3s, etc).
 
T

thunk

[Note:  parts of this message were removed to make it a legal post.]



1.  Is based on Wee + rack
2.  Accepts input from a browser/client
3.  Generates a text file,  which is also a ruby class
Is this an appropriate 'Ruby' topic?
1  Does 'Heroku' seem like the best place for such a simple program?
2. There seemed to be issues with simple file saving but we have no
long term interest in RDMS (would use couchDB/JSON)
If it is, can anybody point to potential problems?

gk

3 will be a problem, you can't write to Heroku's file system. When we deploy
on Heroku, we use Amazon to store files (pictures, mp3s, etc).

Josh,

Your point, is what I remember not being clear about.

Thank you!

On a single user system we are using the following code to load
textfiles into the program as executable classes.

http://gist.github.com/358497

I remain unclear if this can be done on Heroku, and how.

Can the newly created text file be saved to Amazon?

If so, how is this done? (Normal File IO? somehow?)

If we stored the text files into a RDMS, can you think of a way to
become classes in the running program?

Is there a "work-around" to accomplish this somehow?

Thank you!

gk
 
J

John Barnette

On a single user system we are using the following code to load
textfiles into the program as executable classes.
=20
http://gist.github.com/358497
=20
I remain unclear if this can be done on Heroku, and how.
=20
Can the newly created text file be saved to Amazon?
=20
If so, how is this done? (Normal File IO? somehow?)
=20
If we stored the text files into a RDMS, can you think of a way to
become classes in the running program?

If you really want to do this (and you'll probably regret it later, =
honestly), you can store the scripts in a text column in a DB table and =
have them "become classes" using Kernel#eval.


~ j.
 
T

thunk

If you really want to do this (and you'll probably regret it later, honestly), you can store the scripts in a text column in a DB table and have them "become classes" using Kernel#eval.

~ j.

Thank you!

Understood. We have worked to remove all Evals as low performance,
and as "debugger unfriendly".

A work-around comes to mind using a couchDB type "document base" using
Jason that would seem to be faster and less dangerous. Are there any
of these types of document bases "approved" for Heroku? I see only
Amazon RDS mentioned directly.

The unique part of each class is a single method. This method could
be overwritten using a the define_singleton_method (as best I
remember).
This would only be in memory, but would seem to be a fast and
otherwise clean work-around (assuming of course the that text can be
safely stored somewhere)

(The text file being written would also be lost under circumstances.)

BTW I tried marshaling the object with Singleton methods to files -
and Ruby will not like this :) - but the pickAx book points out a way
to do it as I remember.

This all seems more involved than it should be.

Are there, perhaps, Heroku "semi-commercial" programs available where
this is not a problem?

Is this all for security reasons?



Respectfully,

gk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top