使用C仅分布式系统设计 [英] Distributed system design using only C

查看:120
本文介绍了使用C仅分布式系统设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

予有执行节点的分布式系统(像P2P节点)工作的每一个节点(可以说,A,B,C和D)执行特定功能,并且需要相互进行各种操作,例如同步交互操作和其他像15 A节点拥有一批5 B节点的交互,以进入负载最少的节点的队列中,并得到一个令牌数量,然后等待C至重定向到一个免费的节点D等。

I have the work of implementing a distributed system of nodes (like p2p nodes) each of these nodes (lets say A,B,C and D) perform certain functions and need to interact with each other for various operations such as synchronize operations and other things like 15 A nodes interact with a group of 5 B nodes to get into the least loaded node's queue and get a token number and thereafter wait for C to redirect them to a free node D and so on.

我有点我应该如何去设计丢失到:

I am a bit lost as to how should i go about the design:

  1. 这是我想到的协议封装操作和其他东西的类型的结构来发送。此外,这样做是使用确认方案,所以我可以肯定对方得到的消息。

  1. The protocol that i have thought of is to encapsulate a struct of the type of operation and other things to be sent. Also, this is done using an acknowledgment scheme so i can be sure the other side got the message.

我如何去分布式互斥方面,因为我没有一个中央服务器。我猜每个节点的复制数据,但是这听起来有点太贵了(更不用说愚蠢)。

How do i go about the distributed mutual exclusion aspect as I do not have a central server. I am guessing each node replicates the data, but this sounds a bit too expensive(not to mention stupid).

什么是基本的设计遵循的方法,同时实现P2P系统,即如何实现,使得它被阻止在节目接收,也可以发送进一步的更新等,并在同一时间得到别人的信息对整个系统的国家。

What is the basic design methodology followed while implementing p2p systems, ie how do i implement the program such that it is blocked on a receive but also can send further updates et al and at the same time get information from others about the 'state' of the whole system.

我如何确保请求的总排序?

How do i ensure total ordering of requests?

此外,什么是我需要看一下/面临的其他问题。我还要AP preciate如果你可以点我对一些很好的在线资源,对实现P2P和分布式系统。

Also, what are the other issues that I may need to look at/face. I also would appreciate if you could point me towards some good online resources on implementing p2p and distributed systems.

谢谢!

推荐答案

我不会试图给出一个整体的答案(因为问题的方式过大和放大器;模糊反正),但我可以为您指出了一个有趣的一块拼图:

I won't try to give a "whole" answer (because the question is way too large & vague anyways) but I could point you towards an interesting piece of the puzzle:

  1. 您可以使用一个消息队列系统(例如AMQP 的RabbitMQ :有一个实验C语言绑定可用)来实现你的节点之间的可靠的消息传递。

  1. You could use a Message Queuing system (e.g. AMQP RabbitMQ: there is an experimental C binding available) to implement reliable message delivery between your nodes.

互斥:你可以使用一个协议,如​​的Paxos

Mutual Exclusion: you can use a protocol such as Paxos

这篇关于使用C仅分布式系统设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆