Distributed system design using only C

给你一囗甜甜゛ 提交于 2019-12-01 00:58:18
jldupont

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. 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.

  2. Mutual Exclusion: you can use a protocol such as Paxos

The secret to prevent blocking is your end points must all be written as servers with threads for "protocol" processing that are separate from the threads for data processing.

As for line protocol, I've become enamored with JSON for line protocol. It is human readable. It is streamable without need for length bytes! It is easily extensible and mostly immune to protocol version change.

Yet another piece of software worth a look could be KadC!

http://kadc.sourceforge.net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!