简体   繁体   English

在流中将Websocket通信从服务器传输到客户端

[英]Transfer of Websocket communication from server to client in Streaming

I'm new websocket streaming application. 我是新的websocket流应用程序。 I'm trying to evaluate kaazing and solace streaming vendor products. 我正在尝试评估kaazing和慰藉流供应商产品。 I'm trying to put a layer or interface application infornt of kaazing publisher before it creates the socket connection. 我正在尝试在创建套接字连接之前将kaazing发布者的图层或接口应用程序信息插入。 The client would make request to the interface for the socket connection , the interface plays the role to authenticate and authorize and do some business changes before the creation of socket. 客户端向套接字连接的接口发出请求,该接口在创建套接字之前扮演验证和授权的角色,并进行一些业务更改。 The interface establish the secured socket connection with kazzing or streaming application and transfer the connection object to the client in response. 该接口与kazzing或流应用程序建立安全的套接字连接,并作为响应将连接对象传输到客户端。 The client use the established connection from the reponse and retains the connection for streaming the data to client from the streaming server. 客户端使用从响应建立的连接,并保留用于将数据从流传输服务器流传输到客户端的连接。

The objective is to hide the topic info and connection established from the client side for secured process. 目的是隐藏从客户端建立的主题信息和连接以进行安全处理。 So the infterace creates the secured connection and transfers the connection to authorized client which continue the streaming from the streaming server until the session expires. 因此,入侵者会创建安全连接,并将该连接转移到授权客户端,该客户端将继续从流服务器进行流传输,直到会话终止。 Please let me designing such an application is possible. 请让我设计这样的应用程序是可能的。

The client receives data but it doesn't establish connection of its own, its created from server side and transfered to client side after all necessary validation. 客户端接收数据,但它不建立自己的连接,而是从服务器端创建的,并在进行所有必要的验证后转移到客户端。

Guide me to proceed further with the design and I'm inneed of expert's valuable suggestion. 指导我进一步进行设计,我需要专家的宝贵建议。 Thanks in advance and appriciated for directing me to the right path in designing the streaming appliation. 在此先感谢并感谢您引导我设计流媒体应用程序的正确路径。

My aim is not to introduce a new layer between the gateway and client. 我的目的不是在网关和客户端之间引入新的层。 Altimate aim is to customize the gateway for my product, For example the user(client) connects to gateway and tries to access the topic say stock(eligible to subscribe) then he will be able to get the data streaming. 最终目的是为我的产品自定义网关,例如,用户(客户端)连接到网关并尝试访问主题(股票(可订阅)),那么他将能够获得数据流。 If he needs share he would register is some place and after approval only he will be eligible to view, So authorization would play a role and maintaince a session and loads the customized data and allows to stream. 如果他需要共享,则可以在某个地方注册,只有获得批准,他才有资格查看。因此,授权将起到作用并维持会话并加载自定义数据并允许流式传输。 Typically am trying to have a dashboard of data streaming. 通常,我试图建立一个数据流仪表板。 So only authorized streaming is allowed for user. 因此,仅允许用户进行授权的流传输。 Also he will be able to see all the topic name. 他还将能够看到所有主题名称。 whether its possible to use proxy name , example 1, or 2 might be the value he would use from client side, when it reaches the gateway it verify the authorization and replace the value with real topic name and establish the data. 是否可能使用代理名称(例如1或2)可能是他从客户端使用的值,当它到达网关时,它会验证授权并将该值替换为真实主题名称并建立数据。 Please let me know whether I've my question clear. 请让我知道我的问题是否明确。 Your valuable suggestions and guidance will be more helpful to continue with my research. 您的宝贵建议和指导将有助于继续我的研究。

Thanks Krish 谢谢克里希

in case you wonder how the world has changed over the last five year to address this kind of need, now you could give a try to streamdata.io, a proxy which uses SSE protocol (unidirectional) and is available in minutes. 如果您想知道过去五年中世界如何发生变化以解决这种需求,现在您可以尝试一下streamdata.io,它是使用SSE协议 (单向)的代理,可在数分钟内使用。 It would perfectly fit what's needed in the example given, because Im not sure WebSocket is the ideal answer here. 这完全适合给定示例中的需求,因为我不确定WebSocket是否是此处的理想答案。 Tho it should work, it's basically like buying a harvester to go get your kids at school. 它应该工作,基本上就像买收割机去让孩子上学一样。

As a disclaimer, I need to say that I work for Streamdata, and we see this kind of thing every day. 作为免责声明,我需要说我为Streamdata工作,我们每天都会看到这种事情。

WebSocket is great if you need bidirectional streams of data, like in chats or games. 如果您需要双向数据流(例如在聊天或游戏中),则WebSocket很棒。 Most of the time, when the clients mainly expect updated data from the server, instead of polling AF or deploying WebSocket, SSE is the best alternative as it's easier to deploy (http, etc.). 大多数情况下,当客户端主要希望从服务器获取更新的数据时,SSE是最佳选择,因为它更易于部署(http等),而不是轮询AF或部署WebSocket。 The rest of the settings (for security) can be done through the proxy interface. 其余设置(出于安全性考虑)可以通过代理界面完成。

Boom: it's available before you even realize it, it's secure, easy to maintain and more efficient than before. Boom:它甚至在您尚未意识到之前就已可用,它比以前更安全,易于维护且效率更高。 You have more time available to answer questions from the community over here; 您有更多时间来回答社区的问题。 your team is happy; 您的团队很高兴; your boss loves you more than before and might even give you a raise. 您的老板比以前更爱您,甚至可能加薪。 Life can be so simple sometimes! 生活有时可能是如此简单!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM