I don't understand very well the concept of a verticle in Vert.x, I saw it like a separated thread doing some work, I suposse that's because I new in Vert.x-land.
我不太了解Vert.x中Verticle的概念,我看到它像一个分离的线程做一些工作,我认为这是因为我在Vert.x-land中是新的。
For doing a simple websocket server, do I need verticles? Thanks in advance
为了做一个简单的websocket服务器,我需要Verticle吗?提前致谢
1 个解决方案
#1
3
Short answer: no.
简答:不。
Longer answer: still no :-) You can start developing with vert.x without using verticles at all. For that, you can use the main concepts of handlers and futures in a regular Java application.
更长的答案:仍然没有:-)您可以开始使用vert.x开发而不使用Verticle。为此,您可以在常规Java应用程序中使用处理程序和期货的主要概念。
The concept of verticles is especially useful in the following situations:
Verticle的概念在以下情况下特别有用:
- polyglot programming - every verticle can be developed in another programming language
- scaling - if you have some verticles which contain logic which takes longer or is invoked more often, then you can deploy more instances of that verticle
- distributed applications (aka 'microservices') - when you want to deploy the verticles on different machines.
多语言编程 - 每个Verticle都可以用另一种编程语言开发
缩放 - 如果你有一些包含逻辑需要更长时间或更频繁调用的Verticle,那么你可以部署更多的verticle实例
分布式应用程序(又名“微服务”) - 当您想在不同的机器上部署Verticle时。
More information with actual projects can be found in the fresh blueprint tutorials which detail some of the different ways of using vert.x.
有关实际项目的更多信息可以在新蓝图教程中找到,其中详细介绍了使用vert.x的一些不同方法。
#1
3
Short answer: no.
简答:不。
Longer answer: still no :-) You can start developing with vert.x without using verticles at all. For that, you can use the main concepts of handlers and futures in a regular Java application.
更长的答案:仍然没有:-)您可以开始使用vert.x开发而不使用Verticle。为此,您可以在常规Java应用程序中使用处理程序和期货的主要概念。
The concept of verticles is especially useful in the following situations:
Verticle的概念在以下情况下特别有用:
- polyglot programming - every verticle can be developed in another programming language
- scaling - if you have some verticles which contain logic which takes longer or is invoked more often, then you can deploy more instances of that verticle
- distributed applications (aka 'microservices') - when you want to deploy the verticles on different machines.
多语言编程 - 每个Verticle都可以用另一种编程语言开发
缩放 - 如果你有一些包含逻辑需要更长时间或更频繁调用的Verticle,那么你可以部署更多的verticle实例
分布式应用程序(又名“微服务”) - 当您想在不同的机器上部署Verticle时。
More information with actual projects can be found in the fresh blueprint tutorials which detail some of the different ways of using vert.x.
有关实际项目的更多信息可以在新蓝图教程中找到,其中详细介绍了使用vert.x的一些不同方法。