Re: [tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-27 Thread Jeremy Ruston
Hi Mario

So yes a process watcher may be the right tool for your OP. The only
> problem is, that "how do you know, that the server failed"?
> The tw app can hang, but the process may be still alive. imo there is no
> hartbeat at the moment.
>

One approach would be to intermittently perform an HTTP HEAD operation on
/, and assume that the process is crashed if it doesn't respond in 30
seconds.

Best wishes

Jeremy.



>
> -mario
>
>
>
>
> -mario
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/8ea07c48-8d92-4bc4-9100-d8625e5f4186%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAPKKYJZS5gLRh84cv3PsyVfr-DHdbNPs6gKHi4_Ts064ctOJYw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread PMario
On Monday, May 25, 2015 at 11:11:34 PM UTC+2, Ron Poulin wrote:
>
> Mario,
> I agree. The solution to this would be an external monitoring process and 
> an internal responder.  I looked at process-watcher / monitor that look 
> promising as concepts.
>
> See: https://github.com/yahoo/process-watcher
>

uups, I think, I did misunderstand your OP a little bit. ... You want to 
auto-restart a failed server.

Since you were proposing a file watcher, I was thinking in the wrong 
direction.
We have several requests in other threads, that want to restart the server, 
if someone changed / added a tiddler by hand. .. So my responses my be 
"strange" for you. 

So yes a process watcher may be the right tool for your OP. The only 
problem is, that "how do you know, that the server failed"? 
The tw app can hang, but the process may be still alive. imo there is no 
hartbeat at the moment. 

-mario




-mario

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8ea07c48-8d92-4bc4-9100-d8625e5f4186%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread Ron Poulin
Mario,
I agree. The solution to this would be an external monitoring process and
an internal responder.  I looked at process-watcher / monitor that look
promising as concepts.

See: https://github.com/yahoo/process-watcher


On Mon, May 25, 2015 at 2:16 PM, PMario  wrote:

> I found a tool [1], that may have, the concept, that we need. ... but
> still more overhead as we want.
> TW already traverses all directories at startup, but it doesn't maintain
> additional events, that tell us, that something has changed outside the
> server.
>
> Watch itself can't be used with TW since it has the wrong license.
>
> -m
>
> https://github.com/mikeal/watch/blob/master/main.js
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/UIudjLqCrVw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/c09f22f5-20e7-4cb6-b48d-5ee9738dd446%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAJTVA-SO5d01zRbJ_MbU-R5L%3DVmB9f8B_%2B%2B4MAmJ_sbnaGSCtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread PMario
I found a tool [1], that may have, the concept, that we need. ... but still 
more overhead as we want.
TW already traverses all directories at startup, but it doesn't maintain 
additional events, that tell us, that something has changed outside the 
server. 

Watch itself can't be used with TW since it has the wrong license. 

-m 

https://github.com/mikeal/watch/blob/master/main.js

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c09f22f5-20e7-4cb6-b48d-5ee9738dd446%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread Ron Poulin
Hi Mario,
Yep, I see that as well. Thanks for helping out on this question. Much 
appreciated,

Ron

On Monday, May 25, 2015 at 2:41:02 AM UTC-6, PMario wrote:
>
> I had a closer look, to the TW boot mechanism. ... 
> There are more important things, that you may have missed. 
> TiddlyWiki allows you to include content from other wikis. Information is 
> stored in tiddlywiki.info and may also come from environment variables. 
>
> So imo the only place to add a file watching mechanism, that works is in 
> the TW filesystemadaptor. 
>
> -m
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d4bf882e-5f52-479b-a1b7-59e54c65ed98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread Ron Poulin
PMario,
Good point: wrong tool. I should be looking for a utility that would watch
the listener and restart the process if it fails.
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAJTVA-Snwk%3DhzKQc_ZpBoKTNOvC-dSsBcOjRTcZjiTtk%2BtjDOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread PMario
I had a closer look, to the TW boot mechanism. ... 
There are more important things, that you may have missed. 
TiddlyWiki allows you to include content from other wikis. Information is 
stored in tiddlywiki.info and may also come from environment variables. 

So imo the only place to add a file watching mechanism, that works is in 
the TW filesystemadaptor. 

-m

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/639be2ba-152d-46dd-ac17-4aebe4948bfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [TW5] Run Tiddlywiky wrapped in nodemon?

2015-05-25 Thread PMario
Hi Ron,

Did you try to start a simple nodemon test script, that just watches your 
tw edition tree and creates debug output. 

What happens if, TW server and nodmoen runs and a file was changed by the 
TW server. ... If nodemon fires, imo it is useless. Since it will restart 
TW server with every tiddler you create or modify. IMO those tools are 
designed for a completely different workflow and purpose. 

What we really want is a watcher, that only restarts TW server if tiddlers 
are created, modified or deleted from the user. If the server changes 
tiddlers nothing should happen. 

So imo what's needed is a new TW command eg: --watch, that initializes a 
file watcher and restarts TW simpleserver only if something was changed by 
hand. 

just my 2 cents
-mario





-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a911db7f-9511-4a61-92d7-6b15c4de7329%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.