多个应用程序的同步和计时

发布于 2024-12-18 07:39:54 字数 270 浏览 1 评论 0原文

我将如何实现一个系统,让 20 个应用程序在封闭网络上运行,以便在执行各种任务时保持同步?

每个应用程序在同一台机器上都是相同的。这些机器将与主应用程序建立套接字连接,主应用程序将向单元发出 TCP 命令,例如 Play:"Video1.mp4"。这些视频必须同时播放并保持时间间隔,这一点至关重要。

每个单元之间的唯一区别是窗口将在桌面上偏移,因此每个单元在应用程序上都有不同的视口 - 因为这将在多投影仪设置中使用。

任何解决方案/想法将不胜感激。

How would I implement a system that will keep 20 applications running on a closed network to stay synchronized whilst performing various tasks?

Each application will be identical, on an identical machine. These machines will have a socket connection to the master application that will issue TCP commands to the units such as Play:"Video1.mp4". It is vital that these videos are played at the same time and keep time with each other.

The only difference between each unit is that the window will be offset on the desktop, so that each one has a different view port on the application - as this will be used in a multi-projector set up.

any solutions/ideas would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回忆那么伤 2024-12-25 07:39:54

几年前我就这么做过。 5 台计算机运行同一 Flash 应用程序的 5 个实例。每个应用程序都显示同一个巨大应用程序的“切片”,所有内容都需要以几分之一秒的精度同步。

我使用了一个简单的 Python 脚本(在第六台机器上运行),该脚本在本地网络上发送 OSC 消息。 Flash 应用程序通过 FLOSC 侦听此数据包,并向 Python 脚本发送有关其状态的消息。

这些东西正在威斯尼博物馆(纽约)和东京宫(巴黎)运行,所以我对解决方案很有信心:)我希望它对你有帮助

I did it some years ago. 5 computers running 5 instances of the same flash app. Evey app was displaying a "slice" of the same huge app and everything needed to be synchronized at fractions of seconds precision.

I used a simple Python script (running on a 6th machine) that was sending OSC messages on the local network. the flash apps were listening through FLOSC to this packets, and were sending to the Python script message about their status.

The stuff was running at the Withney Museum (NY) and at Palais de Tokyo (Paris), so I'm quite confident about the solution :) I hope it helps you

木落 2024-12-25 07:39:54

您必须在主应用程序中不断跟踪和最新更新的数据。您必须将新更新的数据广播到所有连接的客户端才能提供更新的数据。在任何客户端进行任何更新后,您必须将更新的数据发送到所有连接的客户端。

在 FMS 中,远程共享对象用于通过 FMS 连接网络的应用程序集中维护数据。当任何客户端发送任何更新的 OnSync 事件时,所有客户端应用程序都会触发 OnSync 事件,并且数据与 FMS 远程共享对象同步。因此,您必须开发这种流程,以便跨网络正确同步数据。

您还可以使用 RPC 系统将所有连接的应用程序之间的数据同步到主应用程序。因为您必须向主应用程序的客户端发起 RPC 以发送数据更新,并且主应用程序将 RPC 发送到连接到主应用程序的所有其他客户端。

You have to keep tracking and latest updated data in your master application. you have to broadcast your newly updated data to all connected client to deliver updated data. after any update from any client you have to send updated data to all connected clients.

In FMS remote shared object is used to maintain data centrally across the network connected application via FMS. when any client is sending any updated OnSync Event is fired to all client application and data is sync with FMS Remote Shared Object. So this kind of Flow you have to develop for proper synchronization of data across network.

you can also use the RPC system to sync data between all connected application to the Master application. in that you have to init RPC to the client to Master application to send data update and Master application send RPC to all other client which are connected to the Master application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文