How to maintain ES connection in web application

Yeah, thanks, I just saw JEST on Github. Using HTTP client sounds like a good solution, but it also requires to rewrite everything about ES operation in the code, which is a lot of work. Wonder if there is any workaround using transport client.