agocorona / tcache-persistent

Make cached STM references work over data defined, stored and retrieved with persistent (from the Yesod web framework)
0 stars 0 forks source link

Active? #1

Open rehno-lindeque opened 9 years ago

rehno-lindeque commented 9 years ago

I was looking through the project and noticed that this package doesn't seem to have much activity and hasn't been published to Hackage either. I think this would be necessary in order to use TCache, Workflow on Heroku?

agocorona commented 9 years ago

The Yesod stuff seems to change from version to version in incompatible ways. and it is hard to keep compatibility from one version to another.

Currently it does not compile with the last version of Persistent. This is a proof of concept. I think that the best option to interface TCache with a SQL database is to target it directly instead of using an intermediate layer such is Persistent.

2015-07-09 7:29 GMT+02:00 Rehno Lindeque notifications@github.com:

I was looking through the project and noticed this package doesn't seem to have much activity and hasn't been published to Hackage either. I think this would be necessary in order to use TCache, Workflow on Heroku?

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1.

Alberto.

agocorona commented 9 years ago

It is not necessary for MFlow, but it is necesary for some MFlow examples that are linked together in the heroku demo.

Currently I'm implementing MFlow and hplayground over Transient, a new monad that have many advantages.

https://www.fpcomplete.com/user/agocorona/EDSL-for-hard-working-IT-programmers

That does not preclude the use the current version of MFlow.

2015-07-09 16:37 GMT+02:00 Alberto G. Corona agocorona@gmail.com:

The Yesod stuff seems to change from version to version in incompatible ways. and it is hard to keep compatibility from one version to another.

Currently it does not compile with the last version of Persistent. This is a proof of concept. I think that the best option to interface TCache with a SQL database is to target it directly instead of using an intermediate layer such is Persistent.

2015-07-09 7:29 GMT+02:00 Rehno Lindeque notifications@github.com:

I was looking through the project and noticed this package doesn't seem to have much activity and hasn't been published to Hackage either. I think this would be necessary in order to use TCache, Workflow on Heroku?

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1.

Alberto.

Alberto.

rehno-lindeque commented 9 years ago

Thanks for the detailed info. I haven't had time to properly evaluate Transient and Gabriel's mvc - I've been meaning to for use at CircuitHub. Transient looks very interesting!

For now I was mostly looking for a little light-weight method of saving the state of a running process if the server goes down mid way. An added bonus would be if the dynos could pick up interrupted jobs round robin.

agocorona commented 9 years ago

Hi Rehno,

To save the state I can suggest you the package workflow. It uses TCache for that purpose:

2015-07-09 19:39 GMT+02:00 Rehno Lindeque notifications@github.com:

Thanks for the detailed info. I haven't had time to properly evaluate Transient and Gabriel's mvc - I've been meaning to for use at CircuitHub. Transient looks very interesting!

For now I was mostly looking for a little light-weight method of saving the state of a running process if the server goes down mid way. An added bonus would be if the dynos could pick up interrupted jobs round robin.

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1#issuecomment-120082589 .

Alberto.

agocorona commented 9 years ago

http://hackage.haskell.org/package/Workflow

It is used also by MFlow for saving and restoring the session state of an user. Some people uses it for what you need.

It is a monad transformer however.

2015-07-10 9:32 GMT+02:00 Alberto G. Corona agocorona@gmail.com:

Hi Rehno,

To save the state I can suggest you the package workflow. It uses TCache for that purpose:

2015-07-09 19:39 GMT+02:00 Rehno Lindeque notifications@github.com:

Thanks for the detailed info. I haven't had time to properly evaluate Transient and Gabriel's mvc - I've been meaning to for use at CircuitHub. Transient looks very interesting!

For now I was mostly looking for a little light-weight method of saving the state of a running process if the server goes down mid way. An added bonus would be if the dynos could pick up interrupted jobs round robin.

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1#issuecomment-120082589 .

Alberto.

Alberto.

rehno-lindeque commented 9 years ago

Right... but I'll need to add a MySQL or Redis backend for TCache won't I? We are running on Heroku, so the filesystem wont persist between deployments.

agocorona commented 9 years ago

Ops...

unfortunately the Workflow state uses TCache with file persistence. But all depends of what you need the state for. the files are maintained for 24 hours in Heroku as far as I know. if you reboot the service within this time, the instance will recover the state. That is what I do in MFlow.

Otherwise it would be necessary another option. It is easy to create MySQL persistence for TCache records ( defining instance IResource) but not the Workflow state, since it is harwired fro file persistence, to allow fast reads and writes to the log file.

2015-07-10 19:08 GMT+02:00 Rehno Lindeque notifications@github.com:

Right... but I'll need to add a MySQL backend for TCache won't I? We are running on Heroku, so the filesystem wont persist between deploys.

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1#issuecomment-120462039 .

Alberto.

agocorona commented 9 years ago

Anyway, count with all my support if you want to use/test any of these packages

2015-07-10 23:16 GMT+02:00 Alberto G. Corona agocorona@gmail.com:

Ops...

unfortunately the Workflow state uses TCache with file persistence. But all depends of what you need the state for. the files are maintained for 24 hours in Heroku as far as I know. if you reboot the service within this time, the instance will recover the state. That is what I do in MFlow.

Otherwise it would be necessary another option. It is easy to create MySQL persistence for TCache records ( defining instance IResource) but not the Workflow state, since it is harwired fro file persistence, to allow fast reads and writes to the log file.

2015-07-10 19:08 GMT+02:00 Rehno Lindeque notifications@github.com:

Right... but I'll need to add a MySQL backend for TCache won't I? We are running on Heroku, so the filesystem wont persist between deploys.

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1#issuecomment-120462039 .

Alberto.

Alberto.

rehno-lindeque commented 9 years ago

Thanks a lot @agocorona I appreciate the support. I'll experiment with Workflow a bit this week/next week just to test it out - it's possible that we might be able to get away with the 24-hour window for our application. I'll let you know once I've made progress.

agocorona commented 9 years ago

Rehno:

This article is about TCache and Workflow. It can help:

https://www.fpcomplete.com/school/to-infinity-and-beyond/competition-winners/how-haskell-can-solve-the-integration-problem

The example code does not work online because the required libraries are not installed in the FPcomplete sandbox.

2015-07-11 1:36 GMT+02:00 Rehno Lindeque notifications@github.com:

Thanks a lot @agocorona https://github.com/agocorona I appreciate the support. I'll experiment with Workflow a bit this week/next week just to test it out - it's possible that we might be able to get away with the 24-hour window for our application. I'll let you know once I've made progress.

— Reply to this email directly or view it on GitHub https://github.com/agocorona/tcache-persistent/issues/1#issuecomment-120550790 .

Alberto.