1

I don't want to use polling technique or any library which underneath uses polling, things like Thread.sleep etc. Any suggestions? This is an open ended question I am just interested in approach.

Examples : Pulling up a file from FTP as soon as it lands up there, etc.

Gaurav Khare
  • 2,203
  • 4
  • 25
  • 23

1 Answers1

1

In principle, there's no way around

  • either you poll (proactive)
  • or "server" pushes event to you (reactive)

Obviously, there's ways to wrap polling into reactive-like interfaces.

Regarding ftp – the alternatives is making service-in-the-middle that does pushing, or using inotify (which may wrap it for you effectively)

Slam
  • 8,112
  • 1
  • 36
  • 44