rtyug

rtyug
Рейтинг
263
Регистрация
13.05.2009
Должность
perl,php,sql,javascript(jquery),freebsd/linux
Интересы
perl,php,sql,javascript(jquery),freebsd/linux
https://minfin.com.ua/blogs/94589307/115366/

попробуйте выполнить запрос

REPAIR TABLE my_table

Chamie, их зобанили, Вы что не видите?

если что, то я за них :)

по поводу сабжа, спросите у службы поддержки на ихнем сайте

точно не знаю, но не давно обнаружился такой класс в виде API на православном perl :)

Net::OSCAR - Implementation of AOL's OSCAR protocol for instant messaging (for interacting with AIM a.k.a. AOL IM a.k.a. AOL Instant Messenger - and ICQ, too!)

http://search.cpan.org/~toddr/Net-OSCAR-1.928/lib/Net/OSCAR.pm


METHODS

get_info (WHO)

Requests a user's information, which includes their profile and idle time. See the buddy_info callback for more information.
get_away (WHO)

Similar to get_info, except requests the user's away message instead of their profile.






send_typing_status (RECIPIENT, STATUS)

Send a typing status change to another user. Send these messages to implement typing status notification. Valid values for STATUS are:

* TYPINGSTATUS_STARTED: The user has started typing to the recipient. This indicates that typing is actively taking place.
* TYPINGSTATUS_TYPING: The user is typing to the recipient. This indicates that there is text in the message input area, but typing is not actively taking place at the moment.
* TYPINGSTATUS_FINISHED: The user has finished typing to the recipient. This should be sent when the user starts to compose a message, but then erases all of the text in the message input area.

evil (WHO[, ANONYMOUSLY])

Evils, or warns, a user. Evilling a user increases their evil level, which makes them look bad and decreases the rate at which they can send messages. Evil level gradually decreases over time. If the second parameter is non-zero, the evil will be done anonymously, which does not increase the user's evil level by as much as a standard evil.

You can't always evil someone. You can only do it when they do something like send you an instant message.
get_icon (SCREENNAME, MD5SUM)

Gets a user's buddy icon. See set_icon for details. To make sure this method isn't called excessively, please check the icon_checksum and icon_timestamp data, which are available via the buddy method (even for people not on the user's buddy list.) The MD5 checksum of a user's icon will be in the icon_md5sum key returned by buddy.

You should receive a buddy_icon_downloaded callback in response to this method.

может есть, какое-то другое решение...

...еще давно где-то были реализации на сокетах для этого протокола icq, толи на vingrad.ru, толи на античате

 alert( $("a.qqq").length );

это Вам - не это :) © (от куда не помню)

кстати, .toArray() добавили не давно в 1.4

мне отвечало:

Error: $("a.qqq").toArray is not a function

Line: 29

рабочий вариант:



<script type="text/javascript" src="/latest/jquery.pack.js"></script>

$(document).ready(function () {

var arr = new Array();


$('*[class^=qqq]').each(function(){

arr.push($(this).attr( 'rel' ));
});


alert( arr[1] );


});

смотря, что именно Вы хотите ускорить...

ускорить можно производительность за счет потребление памяти :) 128гиг давайте?

если у Вас много процессоров, и не так много памяти, то скорее всего оно не ускорит значительно

узким местом может быть база данных и шаблонизатор

например, если phpbb будет 100-200гиг, то надо будет долго переделывать двиг, оптимизировать запросы, разное кэширование, счетчики - атомарные операции, добавлять javascript - ajax/json, проводить рефакторинг и т.д и т.п....

alex545, а какие Ваши предложение? эти файлы должны будут отдаваться одиним куском? какая посещаемость?

проблема в том что очень много маленьких файлов и в том что на одном сервере все это... сколько файлов размера 1-20метр?

6000000/100=60000 файлов

6000000/1= 6000000 файлов

  • может быть файлы действительно в PgSQL/Oracle/DB\2 поставить? (советовать не будут, такую связки не было :) )
  • можно посмотреть на MogileFS
  • и т.д.

в одном проекте где было 10млн файлов и даже только у некоторых пользователей по 4Тб :)

когда пользователь хотел скачать через httpd, то переходил на страницу http://super-site.ru/file/we32swrs3/porn.avi , скрипт принимал название, смотрел в бд есть ли этот файл и его ид, после кнопки скачать, скрипт отправлял в nginx через внутрений редирект данные (время жизни ссылки и т.д.) и пользовтаь получал эту ссылку через которую можно было скачать файл...

файлы дедились по каталогам, именно так, по 1000 файлов...

узнать какой файл в каком каталоге должен быть и в каком он есть, можно было так:

$f->{new_id_file} - id файла

$c->{files_per_folder} - число файлов в каталоге

название каталога:

sprintf("%05d",$f->{new_id_file}/$c->{files_per_folder});

# perl -e 'print sprintf("%05d",100/10)'

00010
# perl -e 'print sprintf("%05d",101/10)'
00010
# perl -e 'print sprintf("%05d",111/10)'
00011

Кстати, на perl можно такую кроссплатформенность замутить :)



our $loaded_syscall = 0;

sub _load_syscall {
# props to Gaal for this!
return if $loaded_syscall++;
my $clean = sub {
delete @INC{qw<syscall.ph asm/unistd.ph bits/syscall.ph
_h2ph_pre.ph sys/syscall.ph>};
};
$clean->(); # don't trust modules before us
my $rv = eval { require 'syscall.ph'; 1 } || eval { require 'sys/syscall.ph'; 1 };
$clean->(); # don't require modules after us trust us
return $rv;
}

our ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();

our (
$SYS_epoll_create,
$SYS_epoll_ctl,
$SYS_epoll_wait,
$SYS_sendfile,
$SYS_readahead,
);

if ($^O eq "linux") {
# whether the machine requires 64-bit numbers to be on 8-byte
# boundaries.
my $u64_mod_8 = 0;

# if we're running on an x86_64 kernel, but a 32-bit process,
# we need to use the i386 syscall numbers.
if ($machine eq "x86_64" && $Config{ptrsize} == 4) {
$machine = "i386";
}

if ($machine =~ m/^i[3456]86$/) {
$SYS_epoll_create = 254;
$SYS_epoll_ctl = 255;
$SYS_epoll_wait = 256;
$SYS_sendfile = 187; # or 64: 239
$SYS_readahead = 225;
} elsif ($machine eq "x86_64") {
$SYS_epoll_create = 213;
$SYS_epoll_ctl = 233;
$SYS_epoll_wait = 232;
$SYS_sendfile = 40;
$SYS_readahead = 187;
} elsif ($machine eq "ppc64") {
$SYS_epoll_create = 236;
$SYS_epoll_ctl = 237;
$SYS_epoll_wait = 238;
$SYS_sendfile = 186; # (sys32_sendfile). sys32_sendfile64=226 (64 bit processes: sys_sendfile64=186)
$SYS_readahead = 191; # both 32-bit and 64-bit vesions
$u64_mod_8 = 1;
} elsif ($machine eq "ppc") {
$SYS_epoll_create = 236;
$SYS_epoll_ctl = 237;
$SYS_epoll_wait = 238;
$SYS_sendfile = 186; # sys_sendfile64=226
$SYS_readahead = 191;
$u64_mod_8 = 1;
} elsif ($machine eq "ia64") {
$SYS_epoll_create = 1243;
$SYS_epoll_ctl = 1244;
$SYS_epoll_wait = 1245;
$SYS_sendfile = 1187;
$SYS_readahead = 1216;
$u64_mod_8 = 1;
} elsif ($machine eq "alpha") {
# natural alignment, ints are 32-bits
$SYS_sendfile = 370; # (sys_sendfile64)
$SYS_epoll_create = 407;
$SYS_epoll_ctl = 408;
$SYS_epoll_wait = 409;
$SYS_readahead = 379;
$u64_mod_8 = 1;
} else {
# as a last resort, try using the *.ph files which may not
# exist or may be wrong
_load_syscall();
$SYS_epoll_create = eval { &SYS_epoll_create; } || 0;
$SYS_epoll_ctl = eval { &SYS_epoll_ctl; } || 0;
$SYS_epoll_wait = eval { &SYS_epoll_wait; } || 0;
$SYS_readahead = eval { &SYS_readahead; } || 0;
}

if ($u64_mod_8) {
*epoll_wait = \&epoll_wait_mod8;
*epoll_ctl = \&epoll_ctl_mod8;
} else {
*epoll_wait = \&epoll_wait_mod4;
*epoll_ctl = \&epoll_ctl_mod4;
}
}

elsif ($^O eq "freebsd") {
if ($ENV{FREEBSD_SENDFILE}) {
# this is still buggy and in development
$SYS_sendfile = 393; # old is 336
}
}

Buenos, это со всем детская база в 400Mb, надо оптимизировать запросы...

Всего: 2062