Processing log files and using Javascript

I have a dozen sites on the same server and would like to process the apache and nginx log files at night but on a few of the sites I would also like to have real time stats using Javascript. Is it possible to use both techniques on the same Piwik instances for the same sites? What would happen when the nightly processed logs encounter the same log entries that were already inserted via Javascript during the day?

Currently Piwik will not deduplicate records, so you need to send JS and Log file data in separate websites, not in the same Piwik website.

New issue to discuss this: Log Analytics could detect log lines that were already imported and skip them automatically · Issue #144 · matomo-org/piwik-log-analytics · GitHub