String serializer and Kryo serializer change to thread safe
Add some context interfaces