Keep in mind that the Heroku file system is a little "funky". Writing 
things there is not like you're used to with your local system or with a 
VPS or dedicated server. It's ephemeral and those files will disappear 
during certain events. I agree with the other Sean, that if the data is 
small and simple and you can just hold onto it in memory as Clojure data 
structures and serialize it to disk, that can be a fine approach (seems 
like an unusual case), but with Heroku, it's all about getting persistent 
data off the dyno and into external permanent storage. That's usually a 
hosted DB solution like Postgres, Redis, Mongo, CouchDB, etc. but if you 
don't have the complexity to justify a full DB, even a simple one like 
Mongo or Couch, then you should probably look into serializing your data 
structures as EDN into/out of redis key/values or an S3 bucket.

Cheers,
A different Sean

On Wednesday, January 1, 2014 4:07:11 AM UTC-5, curiousGuy wrote:
>
> I recently got started with Heroku and Clojure. They provide an optional 
> SQL database for handling data, but it is not enabled by default. I'm 
> wondering how much sense it makes to use SQL on a Clojure environment, vs 
> just using sequence types within the language to store data and backing 
> them up as writes out to a file, then reading them back in when necessary? 
> I suppose for very large data stores, this is not ideal as you'd have a lot 
> of data in memory.
>
> I'm coming from a PHP/MySQL background and am quite new to Clojure so I 
> don't want to shoot myself in the foot by quickly adopting old habits 
> rather than embracing more idiomatic approaches. Any advice, or anyone 
> actively using data in the cloud with Clojure care to comment?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to