In the real world, can there be a "smart filter machine" that can watch everything we do and theoretically stop any type of terrorist attack? Or has technology not developed enough for something this enormous?
The real question is not if it would be possible to construct a machine which could stop any type of terrorist attack but if you could construct a machine which will stop any attacks without impacting normal live, expected freedom... . If you don't include the second part stopping terrorism is easy already now: kill all people, which of course includes all possible terrorists.
Of course nobody wants this kind of severe side effects. But any technology you use will have some side effects, like tracking the movements of everybody, analyzing everything what you speak and put you in jail in case something you do looks even a bit suspicious. The question is which side effects are acceptable and which are not. How this question is answered depends on the society, on the (perceived and real) danger of attacks, on the impact of such attacks compared to other problems (like care accidents) etc. In short: it might be possible to have such technology but its side effects of reducing privacy and freedom will be considered too high and most people rather accept some risk.
It is demonstrably not possible.
To the best of publicly available knowledge, the nearest to this has been the data collated by the NSA. It is, however, very clear that the fantastically large amount of data that they do collect does them very little real-world use since terror attacks continue unabated.
Though perhaps that is a slight over-statement since there clearly have been some successes in some countries but the success comes from people analysing automatically sifted data and not from an all-seeing machine that is able to make its own decisions.
In the UK, we have thousands of automatic number-plate scanning camera's littering the whole country. It doesn't seem to help that much though since people still seem to be using vehicles for crime and there are still plenty of unlicensed, uninsured cars around.
No sign of any country-wide intelligence in these databases let alone globe-spanning.