在C,C ++的Linux程序中需要帮助 [英] need help in linux program in c, C++

查看:86
本文介绍了在C,C ++的Linux程序中需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用c/c ++在Linux中实现一个程序,以使用袖珍编程实现客户端服务器体系结构.应该是这样,当用户
在服务器上存储文件,服务器将文件分割并将其存储在2个或更多服务器上.每当用户检索文件时,服务器都会从另一台服务器再次检索文件,并将所有片段转发给用户,并将其显示在单个文件中.

I want to implement a program in linux using c/c++ to implement client server architecture using pocket programming. It should be such that when a user
Stores a file on server the server splits the file and stores it on 2 or more server. Whenever user retrieves the file, the server retrieves the file again from different server forwards all the fragments to the user and display it in single file.

推荐答案

基本上你是什么尝试做的事情是DDB(分布式数据库)所做的工作.
因此,最好的选择就是遵循这种方式.
#创建分割文件的算法
#具有中央服务器,该服务器存储的文件部分的索引使其他服务器无法使用.
#查询一旦到来,您就必须在侦听服务器上即时重新生成文件,但不必在此服务器上生成整个文件,为此,一种变通方法是使用一种行为类似于结点的算法并隧道化来自于此的数据其他服务器,同时保持与客户端的准确性.

我认为这不是一件很艰巨的工作,因为如今有太多可用的框架,如果您需要了解更多信息,请尝试寻找DDB的工作方式.
Basically what u are trying to do is sort of jobs a DDB(Distributed database) does.
So the best option is to follow this kind of skleton.
#Create an algorithm that splits up the file
#Have a central server that stores the index of file parts refrencing other servers.
#As soon as the query comes you have to regenerate the file on fly at listening server but its not necessary u generate the whole file at this server and a workaround for this is to use an algorithm that behaves like junction and tunnels the data coming from other servers while maintaining accuracy with client.

I think its not very tough job as so many frameworks are available these days and if u need to know more, try searching for the way a DDB works.


这篇关于在C,C ++的Linux程序中需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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