Can long distance work?

I am going to work abroad for a year in two months, but of course I have met the nicest most genuine funny guy ever we're not even official yet but have gone on loads and loads of dates only met a couple of months ago but I already like him more than anyone I have been with. But we are both unsure as we know I will be going soon and I think we're both questioning, whether it's worth keeping in touch. Has anyone tried long distance or something like coming back and starting again after you got back from wherever you are? Did it work?