Application Question

This problem requires you to implement a log watching solution (similar to the tail -f command in UNIX). However, in this case, the log file is hosted on a remote machine (same machine as your server code). The log file is in append-only mode.You have to implement the following:1. A server side program to monitor the given log file and capable of streaming updates that happen in it. This will run on the same machine as the log file. You may implement the server in any programming language.2. A web based client (accessible via URL like http://localhost/log) that prints the updates in the file as and when they happen and NOT upon page refresh. The page should be loaded once and it should keep getting updated in real-time. The user sees the last 10 lines in the file when he lands on the page.Problem ConstraintsThe server should push updates to the clients as we have to be as real time as possible.The server should not retransmit the entire file every time. It should only send the updates.The server should be able to handle multiple clients at the same time.The web page should not stay in loading state post the first load and it should not reload thereafter as well.You may not use off-the-shelf libraries or tools that provide tail-like functionalities.testability, modularity, corner cases will be evaluated as well.

Be the first one to answer
Add answer anonymously...
BrowserStack Software Developer Intern Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter