1. "페북·인스타·트위터·스냅챗..이용시간 줄어든다"

http://media.daum.net/digital/all/newsview?newsid=20160607140850085

원문

http://www.cnbc.com/2016/06/06/people-are-spending-much-less-time-on-social-media-apps-said-report.html



2. 블리자드, 페이스북과 방송 플랫폼 관련 파트너십 체결

http://osen.mt.co.kr/article/G1110431306



3. 개인 우대 알고리즘 변경후 언론사 노출 42% 하락"

http://www.zdnet.co.kr/column/column_view.asp?artice_id=20160607110210&type=det&re=

원문

https://13357-presscdn-0-23-pagely.netdna-ssl.com/wp-content/uploads/2016/05/Screen-Shot-2016-05-26-at-17.29.43.png

This chart shows the decline in total engagements (likes + comments + shares) on web content (not native video) for the top ten English language Facebook publishers each month, from summer 2015 to April 2016.

The decline isn’t restricted to any single type of interaction. Likes, the dominant engagement type, saw a 55% decline for the top 10 sites combined from July 2015 to April 2016. Shares fell by 57%, and comments by almost 64%.



4. Facebook reaction 통계

https://www.newswhip.com/2016/05/facebook-reactions-publishers/#fVgJuo4DRWj88P0y.97



5. app store 2.0 출시

http://www.theverge.com/2016/6/8/11880730/apple-app-store-subscription-update-phil-schiller-interview

http://m.news.naver.com/read.nhn?sid1=105&oid=277&aid=0003763056


- 50 percent of submitted apps are now reviewed in 24 hours, and 90 percent are reviewed within 48 hours.

- For the first year of a subscription Apple will maintain its 70 / 30 revenue share; after one year, the new 85 percent / 15 percent revenue share will kick in (applied per subscriber).



6. 인스타그램 피드 알고리즘

관심사 위주의 새로운 피드 시스템 적용 진행

http://www.itworld.co.kr/news/99632

http://blog.instagram.com/post/141107034797/160315-news



7. 대한민국 SNS 이용현황

http://www.mobiinside.com/kr/index.php/2016/05/20/social-network/

https://brunch.co.kr/@mobiinside/216


8. 페북의 댓글에서 비디오 업로드 기능 추가

http://techcrunch.com/2016/06/09/facebook-now-lets-users-comment-with-a-video/

http://www.theverge.com/2016/6/10/11899894/facebook-video-comment-upload


9. 마이크로소프트가 링크드인을 30조원에 인수

http://www.theverge.com/2016/6/13/11920072/microsoft-linkedin-acquisition-2016


10. 라인 상장

http://in.reuters.com/article/linecorp-ipo-idINL4N18S3N9

http://media.daum.net/economic/stock/world/newsview?newsid=20160601062009489


11. 아마존 공개서한

Prime, marketplace, AWS가 축

https://www.sec.gov/Archives/edgar/data/1018724/000119312516530910/d168744dex991.htm



12. 스냅챗의 메시지와 동영상 결합

https://www.bloter.net/archives/257803




Posted by '김용환'
,



5대 서버에 redis cluster 셋업하기


다운로드 받고 설치

$ wget http://download.redis.io/releases/redis-3.0.7.tar.gz 

$ tar zxvf redis-3.0.7.tar.gz



설정 추가하기 


$ cd redis-3.0.7

$ mkdir 7000

$ cat > cluster.conf

port 7000

cluster-enabled yes

cluster-config-file nodes.conf

cluster-node-timeout 3000

daemonize yes

appendonly yes

dir ./7000



실행한 redis의 상태를 보면, 7000 번 포트가 떠있고, cluster 상태인지 알 수 있다. 

$ ./src/redis-server cluster.conf

$


$ ps -ef | grep redis

www   11235     1  0 11:25 ?        00:00:00 ./src/redis-server *:7000 [cluster]


cluster.conf 파일에 dir 지시자의 결과 디렉토리(7000)에 다음 파일이 존재하는 것을 확인할 수 있다.

$ ls

appendonly.aof  nodes.conf




만약 cluster.conf 파일에 daemonize yes를 사용하지 않고 데몬을 띄우면, Running in cluster mode 라는 로그를 볼 수 있다. 

$ ./src/redis-server cluster.conf


* No cluster configuration found, I'm d2c520147ed01b7b8dca0509b0ba71e0ba028f6c

                _._

           _.-``__ ''-._

      _.-``    `.  `_.  ''-._           Redis 3.0.7 (00000000/0) 64 bit

  .-`` .-```.  ```\/    _.,_ ''-._

 (    '      ,       .-`  | `,    )     Running in cluster mode

 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 7000

 |    `-._   `._    /     _.-'    |     PID: 27837

  `-._    `-._  `-./  _.-'    _.-'

 |`-._`-._    `-.__.-'    _.-'_.-'|

 |    `-._`-._        _.-'_.-'    |           http://redis.io

  `-._    `-._`-.__.-'_.-'    _.-'

 |`-._`-._    `-.__.-'    _.-'_.-'|

 |    `-._`-._        _.-'_.-'    |

  `-._    `-._`-.__.-'_.-'    _.-'

      `-._    `-.__.-'    _.-'

          `-._        _.-'

              `-.__.-'



한 대의 서버에 레디스 클러스터(src/redis-trib.rb)를 실행한다. 그 전에 먼저 ruby가 설치되었는지 확인하고, redis gem을 설치한다.


만약 아래와 같은 에러가 나면, 권한이 없다는 것이다.(cd /usr/local/lib/ruby/gems/2.1.0 디렉토리에 chmod 또는 chown 명령어를 사용한다).

$ ruby install redis

ERROR:  While executing gem ... (Gem::FilePermissionError)

    You don't have write permissions for the /usr/local/lib/ruby/gems/2.1.0 directory.



$ gem install redis

Fetching: redis-3.3.0.gem (100%)

Successfully installed redis-3.3.0

Parsing documentation for redis-3.3.0

Installing ri documentation for redis-3.3.0

Done installing documentation for redis after 0 seconds

1 gem installed





redis gem을 설치한 서버에서 src/redis-trib.rb 파일을 실행한다.


$ src/redis-trib.rb create 1.1.1.1:7000 1.1.1.2:7000 1.1.1.3:7000 1.1.1.4:7000 1.1.1.5:7000 

>>> Creating cluster

>>> Performing hash slots allocation on 5 nodes...

Using 5 masters:

1.1.1.1:7000

1.1.1.2:7000

1.1.1.3:7000

1.1.1.4:7000

1.1.1.5:7000

M: d2c520147ed01b7b8dca0509b0ba71e0ba028f6c 1.1.1.1:7000

   slots:0-3276 (3277 slots) master

M: 928190fdc1003f6bafc85da34cc23d20ce6cd1b01 1.1.1.2:7000

   slots:3277-6553 (3277 slots) master

M: 7a31e87116846784171dd55c559eaf6f3beef08f 1.1.1.3:7000

   slots:6554-9829 (3276 slots) master

M: bb90967fa662a4ca57d7329a138e86ae48b7b828 1.1.1.4:7000

   slots:9830-13106 (3277 slots) master

M: ffc4b32105d84e1ef0db310afddf70ae6befcf9e 1.1.1.5:7000

   slots:13107-16383 (3277 slots) master

Can I set the above configuration? (type 'yes' to accept): yes

>>> Nodes configuration updated

>>> Assign a different config epoch to each node

>>> Sending CLUSTER MEET messages to join the cluster

Waiting for the cluster to join..

>>> Performing Cluster Check (using node 1.1.1.1:7000)

M: d2c520147ed01b7b8dca0509b0ba71e0ba028f6 1.1.1.1:7000

   slots:0-3276 (3277 slots) master

M: 928190fdc1003f6bafc85da34cc23d20ce6cd1b0 1.1.1.2:7000

   slots:3277-6553 (3277 slots) master

M: 7a31e87116846784171dd55c559eaf6f3beef08f 1.1.1.3:7000

   slots:6554-9829 (3276 slots) master

M: bb90967fa662a4ca57d7329a138e86ae48b7b828 1.1.1.4:7000

   slots:9830-13106 (3277 slots) master

M: ffc4b32105d84e1ef0db310afddf70ae6befcf9e 1.1.1.5:7000

   slots:13107-16383 (3277 slots) master

[OK] All nodes agree about slots configuration.

>>> Check for open slots...

>>> Check slots coverage...

[OK] All 16384 slots covered.


hash slot이 제대로 설치되었는지 확인했다.



클러스터 상태로 접근해서 레디스 데이터를 저장하고 삭제해 본다.

$ ./src/redis-cli  -c -p 7000
127.0.0.1:7000> set foo bar
-> Redirected to slot [12182] located at 1.1.1.2:7000
OK
1.1.1.2:7000> get foo
"bar"
1.1.1.2:7000> del foo

(integer) 1 



'nosql' 카테고리의 다른 글

zookeeper rmr 커맨드  (0) 2017.01.12
[hbase]-로컬 환경 - Failed to become active master 해결  (0) 2016.08.03
[cassandra] history 보기  (0) 2016.05.06
[cassandra] Unsupported null value  (0) 2015.12.28
프레스토 소개 (facebook presto)  (0) 2015.11.05
Posted by '김용환'
,


sudo echo 리디렉션을 해야 하는 상황이 종종 생긴다. 

이럴 때는 tee를 잘 사용한다.


$ sudo echo 10000 > /proc/sys/vm/vfs_cache_pressure

-bash: /proc/sys/vm/vfs_cache_pressure: 허가 거부



==>


$  echo 10000 | sudo tee --append /proc/sys/vm/vfs_cache_pressure

10000

'unix and linux' 카테고리의 다른 글

[리눅스] redir로 proxy 서버 만들기  (0) 2016.06.20
ipcalc - ip 계산기  (0) 2016.06.14
[pv] rpm으로 파이프 뷰 프로그램 설치 및 실행  (0) 2016.05.27
[python] carriage return 이슈  (0) 2016.05.27
dstat 툴  (0) 2016.05.23
Posted by '김용환'
,


ls 대신, 디렉토리의 파일을 탐색하는 커맨드이다. 배치 스크립트 개발시 편리하다.



$ ls

0.json   14.json  2.json   25.json  30.json  36.json  41.json  47.json  52.json  58.json  63.json  69.json  74.json  8.json   85.json  90.json  96.json

1.json   15.json  20.json  26.json  31.json  37.json  42.json  48.json  53.json  59.json  64.json  7.json   75.json  80.json  86.json  91.json  97.json

10.json  16.json  21.json  27.json  32.json  38.json  43.json  49.json  54.json  6.json   65.json  70.json  76.json  81.json  87.json  92.json  98.json

11.json  17.json  22.json  28.json  33.json  39.json  44.json  5.json   55.json  60.json  66.json  71.json  77.json  82.json  88.json  93.json  99.json

12.json  18.json  23.json  29.json  34.json  4.json   45.json  50.json  56.json  61.json  67.json  72.json  78.json  83.json  89.json  94.json

13.json  19.json  24.json  3.json   35.json  40.json  46.json  51.json  57.json  62.json  68.json  73.json  79.json  84.json  9.json   95.json



첫 번째  for . 


$ for n in *; do echo "$n"; done

0.json

1.json

10.json

11.json

12.json

13.json

14.json

15.json

16.json

17.json

18.json

19.json

2.json

20.json

21.json

22.json

23.json

24.json

25.json

26.json

27.json

28.json

29.json

...



두 번째는 find 


$ find ./  -printf "%f\n" | grep -v '/'

0.json

1.json

10.json

11.json

12.json

13.json

14.json

15.json

16.json

17.json

18.json

19.json

2.json

20.json

21.json

22.json

23.json

24.json

25.json

26.json

27.json

28.json

29.json

...






Posted by '김용환'
,



apache commons io의 FilenameUtils 클래스 사용 예제


import static org.junit.Assert.assertTrue;

import org.apache.commons.io.FilenameUtils;

import org.apache.commons.lang.StringUtils;

import org.junit.Test;




@Test

public void test()

String url="http://host.google.com/abc/def/ghi/img.jpg?height=500&width=500";

String path = StringUtils.substringBefore(url, "?");

assertTrue("jpg".matches(FilenameUtils.getExtension(path)));

assertTrue("img".matches(FilenameUtils.getBaseName(path)));


assertTrue("http://host.google.com/abc/def/ghi/".matches(FilenameUtils.getFullPath(path)));

assertTrue("http://host.google.com/abc/def/ghi".matches(FilenameUtils.getFullPathNoEndSeparator(path)));

assertTrue("http://host.google.com/abc/def/ghi/".matches(FilenameUtils.getPath(path)));

}


Posted by '김용환'
,