Hey steinar,
up in front, sorry for the long thread but as you only respond weekly, i had lots of time to think about it
great to get some response on this, i hope to get some more re-questions. In the end if i really go on developing this, it should be a good planned thing that you even might want to deliver along with your builds in future.
I'd like to serve packages and maintain the code on github as usual.
admin wrote: ↑Tue Dec 11, 2018 9:14 pm
How many methods are there of finding new files?
You have the rude "search-fo-new/changed-files-using-various-teqnikes" and the system notification which is nice but don't work on SMB-shares (as far as i know). I can see that scheduled monitoring would be a nice option and it's something I'm considering. But are there other ways of looking for files?
Well, it might not only be about a "File on the Filesystem" that is the event for starting a job. In my head it is just an event in programatical sense. To be honest, i might think of ffastrans in another way than you: for me it is more like just a job processor. Why dedicate to work with Files only.
On the other hand there are lots of different File events as well, just as you needed to implement the different P2 and other modes. This stuff can be pretty flexible, is hard to debug and does not really fit to any core software. It just should be outsourced into a module.
admin wrote: ↑Tue Dec 11, 2018 9:14 pm
I know that the current job history is not very good and I'm going to work on that in time, but is there a particcular reason why you want to keep your own history database? It seems like a database on top of a database.
Yeah, the reason for keeping my own history DB is that the History DB needs to be disconnected from the "working" DB in order to prevent that this optional UI stuff influences the mission critical processing itself e.g. processing gets slow or stops because too many history jobs are stored in the production DB. Users typically dont really like to have a short history; what they acutally deserve is to have all history to the very start.
Using a Database for history that is not connected at all to the "productive part" of the software (in your case to the cache i guess) makes production more stable and secure: In case the History database does not work, is overloaded due too many users etc.., production is not influenced.
admin wrote: ↑Tue Dec 11, 2018 9:14 pm
That said (written), FFAStrans really needs a better web-monitor but I have not got the head above water to make web-gui's....which I really is something I normally don't do. I'm hoping to provide a good enough api for other to create good monitors and other solutions. So I'm really keen to get feedback on what the api should be able to do.
No worries, that is why i offer my services here. I already opened a feature request topic here regarding what i need for start (jobid,workflowid), but to be honest i think users deserve more info about reasons for failure and so. In my head you could basically continue writing logs and ini's as you do now and i could just locate and parse them but it would of course not be very welcome if there are extremely frequent and deep logical changes in the way how the logs are written.
admin wrote: ↑Tue Dec 11, 2018 9:14 pm
Last, are you planning on just using the API or do you need to go "through the backdoor" in order to accomplish what you want?
See above-- and additionally i typically try to figure out what is most stable and use that, not matter if it is a backdoor or not. In most cases with professional transcoders i connected through the backdoor to their database which turned out to be most stable. They did a lot of changes in their public API's but they never changed their basic DB design.
A comment to that: ffastrans for example is assembling ffmpeg commandlines, in my head that was always like a backdoor; using the libavcodec would be like using the API in comparison. I always kept away from scripting ffmpeg commandlines because they change so fast...
I see there is a lot of potential for discussions, hopefully we can concentrate on the topic itself. What i like to try in general is to split off coding from old techniques into a new world, allowing more flexible and modern possibilities.
2 more things:
1) FileSystemNotifiers are in deed available on most SMB and similar Servers, in difference to Linux Inotify which only workso locally, on a SMB Server there is no difference between local and remote Filesys Notify subscribers. It is just a network communication that one can listen to. To be honest, i have never seen any SMB type of server that don't support it, maybe some very old and crappy linux SAMBA implementations do not implement it.
However, there are a lot of caveats just as with any very old technology like Sockets themselves. They suffer from reliability and documentation. So whenever one uses them you either go for a "best effort" approach or you find a workaround. Over time i learned that using Filesys Notify always comes with a fallback "dirlisting" in case something was missed or the connection got lost but the program was not notified about the error. This makes it pretty hard to implement filesys notifiers.
One might think: "why use Filesys Nofify when it is not at all reliable", well that is because it is best effort and only this makes a software really good. Imagine a full scan for new files on a (from a todays perspective) very large file repository takes 15 minutes to finish. One can reduce the storage load and response time dramatically when using Filesys notify.
2) How many methods are there of finding new files?
Basically indefinite. Just as P2 and Co, most users end up in a case where they want to "send the event of a new job needs to be started" in pretty complex cases, e.g. when file A, B and C arrived or when some metadata xml contains this and that value but not those values... i faced and already implemented lots of side cases - also i found a noticeable number of requests in that direction in this very forum.
Cheers!
emcodem