数据传输问题 - 需要的想法/解决方案(请) [英] Data transfer problem - ideas/solutions wanted (please)

查看:101
本文介绍了数据传输问题 - 需要的想法/解决方案(请)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个有趣的问题。我有一组(大)历史数据

我想要保存在中央服务器上,作为几个单独的文件。我希望客户流程能够通过指定文件名,开始日期/时间和结束日期/时间来请求特定文件中的数据

。 />

文件采用二进制格式,以节省服务器空间(以及增加处理时间的
)。每个文件中的数据可能非常大,包括数年的数据。新数据将通过(PHP)脚本每天附加到

这些文件中。服务器机器很可能是一台Unix机器,而我的客户机将在windows上运行

机器。我的客户程序是用C ++编写的。


我的两个主要问题/问题如下:


1)。转账方法问题:

将数据从服务器传输到客户端的最佳(即最有效和最快捷的方式)是什么?我认为SOAP可能太慢了,因为数据的庞大规模,所以很可能只需要b
$ b 2)。跨平台问题:

我怎样才能确保从Unix服务器发送的(二进制?)数据

可以在客户端正确解释?


2)。安全问题:

如何防止客户端直接访问文件(以防止恶意或意外损坏数据文件)?

Hi,

I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My two main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?

推荐答案

ET Gray写道:
E.T. Grey wrote:


我有一个有趣的问题。我有一个(大) )我想保留在中央服务器上的历史数据集,作为几个单独的文件。我希望客户端进程能够通过指定请求特定文件中的数据
文件名,开始日期/时间和结束日期/时间。

文件采用二进制格式,以节省服务器空间(以及增加处理时间)。每个文件中的数据都非常大,涵盖了几年的数据。每天都会通过(PHP)脚本将新数据附加到这些文件中。服务器机器很可能是一台Unix机器,而我的客户将在Windows机器上运行。我的客户p rogram是用C ++编写的。

我的两个主要问题/问题如下:

1)。转移方法问题:
从服务器向客户端传输数据的最佳(即最有效和最快捷的方式)是什么?我认为SOAP可能太慢了,因为数据的庞大规模

2)。跨平台问题:
我怎样才能确保从Unix服务器发送的(二进制?)数据可以在客户端正确解释?

2)。安全问题:
如何防止客户端直接访问文件(以防止恶意或意外损坏数据文件。?
Hi,

I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific file
by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as well
as to increase processing time). The data in each file can be quite
large, covering several years of data. New data will be appended to
these files each day, by a (PHP) script. The server machine is likely to
be a Unix machine, whereas my clients will be running on windows
machines. My clients program is written in C++.

My two main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to prevent
malicious or accidental corruption of the data files.?




由于这将是在Unix机器上,我可以建议一个

Unix / Linux组吗?除了事实这将被附加到

by一个PHP脚本(这不是你的问题的一部分),我没有看到任何表明涉及PHP的东西,更不用说PHP问题。


-

==================

从我的电子邮件地址中删除x br $>
Jerry Stuckle

JDS计算机培训公司
js ** *****@attglobal.net

==================



Since this is going to be on a Unix machine, might I suggest one of the
Unix/Linux groups? Other than the fact this is going to be appended to
by a PHP script (which isn''t part of your question), I don''t see
anything indicating PHP in involved, much less a PHP question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================




Jerry Stuckle写道:


Jerry Stuckle wrote:
ET Gray写道:
E.T. Grey wrote:


我有一个有趣的问题。我有我想要保存在中央服务器上的一组(大)历史数据,作为几个单独的文件。我希望客户端进程能够通过指定文件名,开始日期/时间和结束日期/时间来请求特定
文件中的数据。

文件是二进制格式,以节省服务器上的空间(以及增加处理时间)。每个文件中的数据可能非常大,涵盖了数年的数据。每天都会通过(PHP)脚本将新数据附加到这些文件中。服务器机器可能是Unix机器,而我的客户机将运行在
Windows机器上。我的客户程序是用C ++编写的。

我的两个主要问题/问题如下:

1)。转移方法问题:
从服务器向客户端传输数据的最佳(即最有效和最快捷的方式)是什么?我认为SOAP可能太慢了,因为数据的庞大规模

2)。跨平台问题:
我怎样才能确保从客户端正确解释从Unix服务器发送的(二进制?)数据?

2)。安全问题:
如何防止客户端直接访问文件(以防止恶意或意外损坏数据文件。?
Hi,

I have an interesting problem. I have a (LARGE) set of historical data
that I want to keep on a central server, as several separate files. I
want a client process to be able to request the data in a specific
file by specifying the file name, start date/time and end date/time.

The files are in binary format, to conserve space on the server (as
well as to increase processing time). The data in each file can be
quite large, covering several years of data. New data will be appended
to these files each day, by a (PHP) script. The server machine is
likely to be a Unix machine, whereas my clients will be running on
windows machines. My clients program is written in C++.

My two main problems/questions are as follows:

1). Transfer method issue:
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?. I think SOAP is likely to be too slow,
because of the sheer size of the data

2). Cross platform issue:
How can I insure that that the (binary?) data sent from the Unix
server can be correctly interpreted at the client side?

2). Security issue:
How can I prevent clients from directly accessing the files (to
prevent malicious or accidental corruption of the data files.?



要在Unix机器上,我可以建议一个Unix / Linux组吗?除了事实,这将被一个PHP脚本附加到
(这不是你的一部分)问题),我没有看到任何表明涉及PHP的内容,更不用说PHP问题。



Since this is going to be on a Unix machine, might I suggest one of the
Unix/Linux groups? Other than the fact this is going to be appended to
by a PHP script (which isn''t part of your question), I don''t see
anything indicating PHP in involved, much less a PHP question.




事后看来,我没有让我自己清楚。另外

澄清是顺序的:


我已经使用PHP实现了解决方案的服务器端。我是

使用SOAP与C ++前端进行通信(即在服务器上的PHP和客户端的C ++之间传递
)。

我问的第一个问题是因为我(假设SOAP太重了文件

transfer(确定不是直接的PHP问题)


我问了第二个问题,因为文件将使用PHP脚本创建(并附加
) - 我想知道是否在Unix上用PHP编写了二进制文件

,可以通过C ++应用程序读取

在Windows上运行。


我的第三个问题被问到,因为我是一个真实的WAMP / LAMP& PHP

新手,我不完全理解这个框架中的安全问题。

我只是知道我想阻止客户直接访问

文件。


希望这有助于澄清事情



With the benefit of hindsight, I did not make myself clear. A further
clarification is thus in order:

I have implemented the server side of the solution using PHP. I am
communicating with the C++ frontend using SOAP (i.e. communicating
between PHP on the server and C++ at the client).
My first question is asked because I (assume) SOAP is too heavy for file
transfer (ok not directly a PHP question)

My second question was asked because the files will be created (and
appended) using PHP scripts - and I was wondering if binary files
written by PHP on Unix, may be able to be read by a C++ application
running on Windows.

My third question was asked because I''m a realitive WAMP/LAMP & PHP
newbie and I do not fully understand security issues in this framework.
I simply know that I want to prevent clients from directly accesing the
files.

Hope this helps clarify things


ET格雷写道:

我有一组(大)历史数据,我想在中央服务器上保存,作为几个单独的文件。


究竟有多大?

我希望客户端进程能够通过指定文件名来请求特定文件中的数据,开始日期/时间和结束日期/时间。


开始/结束日期/时间位实际上是一个相当肥胖的暗示,你要考虑使用数据库... ...通过大文件搜索

占用了大量的磁盘和处理器时间。

每天都会通过
(PHP)脚本将新数据附加到这些文件中。


考虑数据库的另一个原因......

传输数据的最佳(即最有效和最快捷的方式)是什么?服务器到客户端?


假设您使用的是HTTP,压缩(gzip)CSV最快可能是



我如何确保从Unix服务器发送的(二进制?)数据
可以在客户端正确解释?


为什么数据应该是二进制的?压缩CSV可能至少是b b b,如二进制数据一样紧凑,加上CSV将是人类可读的,在调试过程中,
应该有帮助。

如何防止客户端直接访问文件
(以防止数据文件的恶意或意外损坏。?

I have a (LARGE) set of historical data that I want to keep
on a central server, as several separate files.
How large exactly?
I want a client process to be able to request the data in a
specific file by specifying the file name, start date/time and
end date/time.
The start/end date/time bit actually is a rather fat hint that you
should consider using a database... Searching through large files will
eat up enormous amounts of disk and processor time.
New data will be appended to these files each day, by a
(PHP) script.
Yet another reason to consider a database...
What is the best (i.e. most efficient and fast way) to transfer data
from the server to clients ?.
Assuming you are using HTTP, compressed (gzip) CSV will probably be the
fastest.
How can I insure that that the (binary?) data sent from the Unix server
can be correctly interpreted at the client side?
Why should the data be binary? Compressed CSV is likely to be at least
as compact as binary data, plus CSV will be human-readable, which
should help during debugging.
How can I prevent clients from directly accessing the files
(to prevent malicious or accidental corruption of the data files.?




将它们导入数据库并将原件锁在安全的地方。


干杯,

NC



Import them into a database and lock the originals in a safe place.

Cheers,
NC


这篇关于数据传输问题 - 需要的想法/解决方案(请)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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