# 4.2 – Plug-in The gateway is a multi-thread application, so make sure your plug-in is: - Thread safe. - Spawn a thread if the operation takes more than 5 seconds, otherwise, it could cause a network timeout exception and block the gateway. - Use Collections.synchronizedList(),Collections.synchronizedMap, ConcurrentHashMap etc. - Avoid anonymous class which could cause memory leak. - Make your plug-in stateless if possible. - Logging could be a bottle neck sometimes. Please refer to the related links: - [4.2.1 – Start gateway and the plug-in example project in Eclipse](https://docs.sparkview.info/books/sparkview-integration-guide/page/421-start-gateway-and-the-plug-in-example-project-in-eclipse) - [4.2.2 – Handshake plug-in](https://docs.sparkview.info/books/sparkview-integration-guide/page/422-handshake-plug-in) - [4.2.3 – Deploy your plug-in](https://docs.sparkview.info/books/sparkview-integration-guide/page/423-deploy-your-plug-in)