Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于大数据的添加 #11

Open
Ruanxingzhi opened this issue May 25, 2016 · 20 comments
Open

关于大数据的添加 #11

Ruanxingzhi opened this issue May 25, 2016 · 20 comments

Comments

@Ruanxingzhi
Copy link

author你好~

在浏览器中加数据的时候,往往加了几MB,浏览器就炸了。
但是我们动辄要添加几百MB的数据。

我有一个想法,就是我们通过别的数据上传工具(FTP等)上传压缩文件解压,这样就可以应付大数据。

但是我找不到测试数据目录。那么问题来了:我应该把测试数据放在哪里?

@hzxie
Copy link
Owner

hzxie commented May 26, 2016

测试数据在数据库里
有一张数据表是 voj_problem_checkpoints

几百MB的数据是指测试数据吗?

@Ruanxingzhi
Copy link
Author

是的,我是指测试数据。

提个建议:能不能写一个文件上传,直接把文件上传到数据库里面?
毕竟OI搞到后期,大数据很多。

@hzxie
Copy link
Owner

hzxie commented May 30, 2016

嗯~ 感谢你的建议。

@LinkClinton
Copy link

author你好~

在浏览器中加数据的时候,往往加了几MB,浏览器就炸了。
但是我们动辄要添加几百MB的数据。

我有一个想法,就是我们通过别的数据上传工具(FTP等)上传压缩文件解压,这样就可以应付大数据。

但是我找不到测试数据目录。那么问题来了:我应该把测试数据放在哪里?
robort1

@riteme
Copy link

riteme commented Jun 23, 2016

author你好~

表示不能文件上传十分那啥啊,整个OJ建完只能摆题面......
某些数据结构题的数据都是大得吓人的啊......

@hzxie
Copy link
Owner

hzxie commented Jun 23, 2016

@Link-Arthur @riteme
是嘛~ 现在所有的数据是存储于数据库中的. 并不是存储于文件中的.
为了更方便的分布式测试.

请问你们可以提供一下数据文件吗?

我最近比较忙~ 尽量在七月底完成这个功能可以吗?

@Ruanxingzhi
Copy link
Author

Ruanxingzhi commented Jun 23, 2016

@hzxie 啊,非常感谢(≧▽≦)……

关于数据文件,有一份Demo: https://coding.net/u/ruanxingzhi/p/File/git/blob/master/monster.7z
数据格式:<文件名>.in 对应 <文件名>.out

另外,其它OJ的处理方式一般是这两种之一:

A.叫用户一个一个测试点地上传数据,例如hustoj
B.叫用户把所有数据打包成zip,服务器解压后添加数据,例如Tsinsen、tyvj、vijos。

@hzxie
Copy link
Owner

hzxie commented Jun 23, 2016

@Ruanxingzhi
请问最大的测试文件(一个测试点)有多大?
因为所提到的那些OJ那些都是基于文件存储的。可是我的测试数据全都在数据库里。

@Ruanxingzhi
Copy link
Author

Ruanxingzhi commented Jun 23, 2016

@hzxie 最大的数据点约16MB。每个题可能有10~20个数据点。

@hzxie
Copy link
Owner

hzxie commented Jun 24, 2016

@Ruanxingzhi
OK
好的~ 我知道了.
这个功能可能需要修改一下数据库. 晚些时候我会告诉你需要如何操作.

@Ruanxingzhi
Copy link
Author

Ruanxingzhi commented Jun 24, 2016

@hzxie 好的

@hzxie
Copy link
Owner

hzxie commented Jul 30, 2016

非常抱歉, 最近一段时间太忙了.
请再给我一些时间~ 对你们造成的不便深表歉意.

@Ruanxingzhi
Copy link
Author

Ruanxingzhi commented Jul 30, 2016

@hzxie 没事

@zhblue
Copy link

zhblue commented Aug 11, 2016

测试数据可能放文件系统比较好

@hzxie
Copy link
Owner

hzxie commented Aug 11, 2016

@zhblue
如果放文件系统的话 多台评测机怎么获取测试数据呢?
如果测试数据更新了又要怎么办?

@virusdefender
Copy link

你需要的是rsync

@hzxie
Copy link
Owner

hzxie commented Aug 11, 2016

@virusdefender
可是Windows呢?
放数据库的考虑就是这个~
但是我也很担心测试数据增大之后导致的性能问题.

@virusdefender
Copy link

virusdefender commented Aug 11, 2016

@hzxie Windows不清楚,感觉Windows很麻烦。。

@zhblue
Copy link

zhblue commented Apr 13, 2017

同步机制也可以写在评测机里,按需下载

@hzxie
Copy link
Owner

hzxie commented Apr 14, 2017

@zhblue
其实是按需下载的,不过是从数据库同步。
不过改成文件系统的确会更好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants