Hardest part
How do you think, how much changes you need to do to make your Swift service asynchronous? Do you afraid of it? You already scheduled a week for this refactoring? Oh, that's nice:)Now it's time to update your service implementation. Are you ready?
Hope you noticed this ScheduledExecutorService and 2 seconds delay. You shouldn't use it in your real application, this is just for example of promises (unless you want to simulate work for future optimizations like this guy: http://thedailywtf.com/articles/The-Speedup-Loop )
That's it, now your server is asynchronous. There is more - your clients can consume your service like before in non-async manner. How cool is that?
Full source code at GitHub: https://github.com/bsideup/spring-boot-swift/tree/async
Previous parts: