Skip to main content

Posts

Showing posts from 2014

add jar files into play!

add jar files into play! vi /jbatch/project/Build.scala   val appDependencies = Seq(     // Add your project dependencies here,     javaCore,     javaJdbc,     javaEbean,     "mysql" % "mysql-connector-java" % "5.1.25",     "org.apache.commons" % "commons-lang3" % "3.1",     "commons-validator" % "commons-validator" % "1.4.0",     "com.amazonaws" % "aws-java-sdk" % "1.5.1",     "com.github.mumoshu" %% "play2-memcached" % "0.3.0.2",   "redis.clients" % "jedis" % "2.1.0",   "com.typesafe" %% "play-plugins-mailer" % "2.1-RC2", "org.hibernate" % "hibernate-entitymanager" % "3.6.9.Final", "org.hibernate.javax.persistence" % "hibernate-jpa-2.0-api" % "1.0.1.Final", "org.mybatis" % "myba

실리콘밸리 구직 체험기_201409(6) - 6. 미국 입국 후 첫날

실리콘밸리 구직 체험기_201409(6) - 6. 미국 입국 후 첫날 드디어 가족을 모두 데리고 미국으로 입국한 후 첫날 아침입니다. 사촌 동생네에서 하룻밤을 묶었는데 밖에서는 출근과 등교 때문에 분주해 보이지만 시차 때문인가, 와이프와 아이들은 아직 깊은 잠에 빠져 있네요. 이제부터 올해 4/1에 한국으로 돌아가면서 공유한 제 미국 취업의 경험에 이어서 그 이후 일어난 일들을 공유하고자 합니다. 한국에 들어와서 미국에 H1B취업이 다른 나라의 해외 취업 보다 극명히 다른 이유는 비자 시스템 때문이란 것을 더욱 더 느끼게 되었습니다. 그렇게 어려운 기본적인 이유는 미국의 이민자의 수를 통제하기 위해서 4/1에 워킹비자신청을 접수 받아 lottery를 돌리고 3/1 정도를 또 cut하고 10/1에나 일을 할 수 있는 구조 때문입니다. 어떤 회사가 영어도 완벽하지 않은 직원을 미리 뽑아서 변호사 비용을 대고 (500만원 이상) 6개월이 지난 10월 달에 쓰고 싶을까? 특별한 능력이나 특별한 인연이 없다면 불가능한 것이고 난 특별한 인연들을 통해서 이렇게 미국에 들어왔습니다. H1B 심사를 받기위해 급행 처리 신청을 했기에 한 두달 사이에 결정이 날 것으로 기대했으나 사실 내 결과는 8월 중순이나 되어서야 이루어졌습니다. 그 이유는 첫째, 내 전공이 경영학과이기 때문에 이민국에 경영학과생인 내가 왜 SW엔지니어이냐는 것을 소명해야 했고, 두번째, 나를 스폰서하는 회사가 창업한지 얼마안된 startup인데 3명이나 H1B를 스폰서하는 것에 대한 자격 및 이유를 소명해야 하는 것 때문이였습니다. 첫째번 이유는 일반적으로는 최초 비자 신청할 때 적절한 대응을 할 수 있는 것이라서 문제가 안되는 것이 일반적인데 내 경우 문제가 되었습니다. 더 큰 것은 두번째 것이였는데 이것은 회사에서 변호사와 함께 많은 서류를 준비해서 결국은 해결했습니다. 우리회사에서는 인도인 1명, 중국계 1명, 나 이렇게 제출했고, 그 중 인도 1명과 내가 통과되었습니다.

Apache Tomcat Load Balance in windows

- apache tomcat Load Balance 1. apache installation httpd-2.2.25-win32-x86-openssl-0.9.8y.msi 2. Module copy tomcat-connectors-1.2.40-windows-i386-httpd-2.2.x/mod_jk.so => /apache/modules/mod_jk.so 3. tomcat copy /apache-tomcat-7 /apache-tomcat-72 4. apache configuration modify /apache/conf/httpd.conf # apache-tomcat connector <IfModule mod_proxy.c> <IfModule mod_proxy_ajp.c> Include "conf/extra/httpd-apj.conf" </IfModule> </IfModule> LoadModule jk_module modules/mod_jk.so JkWorkersFile conf/workers.properties JkLogLevel info JkLogFile logs/mod_jk.log JkMount /*.html lb JkMount /*.jsp lb JkMount /*.ajax lb JkMount /*.xpl lb JkMount /j_spring_security_check lb DocumentRoot "/wtpwebapps/testApp" <Directory "/wtpwebapps/testApp">    Options Indexes FollowSymLinks    AllowOverride None    Order allow,deny    Allow from all </Directory> <Location /jkmanager/> J

Port forwarding with ELB in AWS vs NginX

< requirement > input 1 : http://aaa1.testdomain.com internal service 1 : http://localhost:3000 input 2 : http://aaa2.testdomain.com internal service 2 : http://localhost:3001 < 1. AWS approach > 1. create LoadBalancers cf. https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LoadBalancers: ㅇ create Load Balancer for 1st port 1. Define Load Balancer Load Balancer name: aaa1-test Load Balancer Port: 80 Instance Port: 3000 2. Configure Health Check Ping Path: it's important! 3. Add EC2 Instances: Add EC2 Instances to Load Balancer 4. check out the domain and service (1st Load Balancer's Description > DNS Name > A Record : ex) aaa1-test-1425011489.us-east-1.elb.amazonaws.com ) - test service : http://aaa1-test-1425011489.us-east-1.elb.amazonaws.com ㅇ create Load Balancer for 2nd port 1. Define Load Balancer Load Balancer name: aaa2-test Load Balancer Port: 80 Instance Port: 3001 2. Conf

experience sharing for real-time log indexing in Elasticsearch

Elasticsearch automatically makes type mapping with log data, but in the most of cases, the mapping data is not correct, so we should change them. this is my experience of that. 1) run elasticsearch 2) run logstash with configration elk:/data1/elasticsearch/logstash-1.4.0> vi logstash-teton_runtime.conf& input{     file{         codec => json         path => ["/data1/elasticsearch/temp/*.log"]         start_position => "end"     } } output{     elasticsearch {         cluster => "locketCast"         node_name => "logstash-teton_runtime"         host => "xxx.xxx.xxx.xxx"         index => "teton_runtime"     } } elk:/data1/elasticsearch/logstash-1.4.0> bin/logstash -f mixpanel.conf 3) make log file in /data1/elasticsearch/temp/*.log {"androidId":"91e8b0c3d89","facebookId":"11250","type":0,"numberOfMyFollowers":

Fluentd for mysql in AWS

(0) preparation ulimit -n If your console shows 1024, it is insufficient. Please add following lines to your /etc/security/limits.conf file and reboot your machine. root soft nofile 65536 root hard nofile 65536 (1) install Fluentd // “Ubuntu 12.04 LTS / Precise” curl -L http://toolbelt.treasuredata.com/sh/install-ubuntu-precise.sh | sh /etc/init.d/td-agent start/stop/restart/status // test curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test /etc/init.d/td-agent stop chown: changing ownership of `/var/run/td-agent/td-agent.pid': Operation not permitted chown: changing ownership of `/var/run/td-agent': Operation not permitted  * Stopping td-agent td-agent                                                                                                                                                     start-stop-daemon: warning: failed to kill 31734: Operation not permitted (2) run / test sudo /etc/init.d/

LEK stack for node.js

LEK stack for node.js  1) node access log file 1. node access log json formatting   (/Users/mac/git/fuji/config/express.js) app.use(expressWinston.logger({      transports: [        new winston.transports.DailyRotateFile({  json: true ,  filename: config.logs_dir + '/access-',  datePattern: 'yyyy-MM-dd.log' })      ]    })); 2) logstash 1. logstash download http://logstash.net/ extract file to mac:/data1/logstash-1.4.0 2. make config file mac:/data1/logstash-1.4.0> vi logstash-node.conf input{    file{        codec => json        path => ["/Users/mac/git/fuji/logs/access*.log"]        start_position => "beginning"    } } output{    elasticsearch {        cluster => "locketCast"        node_name => "logstash"        host => "127.0.0.1"        index => "updatelogs"  

imagemagick node.js module error in macbook

When you use imagemagick module in macbook and get this error, then you can follow below steps. var im = require('imagemagick'); im.resize({     srcPath: "/Users/mac/tmp/test/a.jpg",     destPath: "/Users/mac/tmp/test/a1.jpg",     width: 200,     height: 200,     quality: 0.8 }, function(error, stdout, stderror) {     if (error) {        console.error(error); } }); "Command failed: convert: unable to load module `/usr/local/Cellar/imagemagick/6.8.7-7/lib/ImageMagick//modules-Q16/coders/jpeg.la': file not found @ error/module.c/OpenModule/1277. convert: no decode delegate for this image format `/Users/mac/tmp/test/test.jpg' @ error/constitute.c/ReadImage/555. convert: no images defined `jpg:-' @ error/convert.c/ConvertImageCommand/3145. " brew update brew doctor brew uninstall imagemagick brew uninstall libtool brew install libtool ( --universal ) brew install imagemagick --build-from-source

elasticsearch with hanb-elasticsearch-beginner

1) making server You can make a clustered server which contains 3 folders, node1, node2, node3. Each of node has a configuration file like "elasticsearch.yml". node.name: "node1" transport.tcp.port: 9300 http.port: 9200 node.name: "node2" transport.tcp.port: 9301 http.port: 9201 node.name: "node2" transport.tcp.port: 9302 http.port: 9202 2) running server And you can run the each server with this command. ./elasticsearch/node1> ./start.sh ./elasticsearch/node2> ./start.sh ./elasticsearch/node3> ./start.sh cf. https://github.com/doohee323/hanb-elasticsearch-beginner

Calling elasticsearch in Play! java stack.

Calling elasticsearch in Play! java stack. ㅇ index 0. play! installation http://www.playframework.com/documentation/2.2.x/Installing just download and make PATH 1. making play! app (esproject) 2. changing the app for eclipse 3. add elasticsearch libraries to play! 4. making the route for test (put elasticsearch index) 5. coding with sample util class 6. debugging the play! 7. run elasticsearch servers 8. monitoring elasticsearch 9. check out query result with java API 1. making play! app (esproject) $> play new esproject What is the application name? [esproject] >(enter) Which template do you want to use for this new application?  1             - Create a simple Scala application  2             - Create a simple Java application > 2 OK, application esproject is created. Have fun! 2. changing the app for eclipse $> cd esproject/ $> play eclipse ~~~ [info] Successfully created Eclipse project files for project(s

실리콘밸리 구직 체험기_201404(5) - 5. 면접 준비 생활과 비용

5. 면접 준비 생활과 비용 취업을 준비하는 지난 3개월 동안 어떻게 지냈는지 또 얼마나 비용이 들었는지 공개하려합니다. 미국에 들어온 지 5일만에 아래의 것들을 시작했습니다. 1/2/2014 핸펀 개통 at&t 에서 prepaid phone 60$, sim 카드 구매 후 장착 1/2/2014 통장 개설 후 입금 boa 에서 통장 개설 후 들고온 현금을 입금 (800.997.1475 한인 콜센터) 1/3/2014 리크루터에게 보낼 회신 메일 작성 1/3/2014 한인 주민들과 저녁 식사 1/4/2014 대만 친구와 저녁 식사 1/5/2014 자동차 확보 이동성 확보 가방, 선글라스 구매 이동성 확보 : 운전할 때도 필요함 한국엔지니어와 저녁 1/6/2014 전화 인터뷰 시작 suck! 한인리크루터 조언듣기 영어 학원 무료 학원 강습 틈만 나면 영어 사람들과 노출되는 것이 중요하므로 기회를 찾아 다녔습니다. 특히 다양한 곳에서 공짜 또는 저렴한 비용으로 영어를 배울 수 있다는 것이 신기했습니다. 그 목록을 정리해봤습니다. https://docs.google.com/spreadsheet/ccc?key=0AkXtOKllIGtidGc5NEV5aGFUNGIwUG15UF9LWUhaUFE&usp=drive_web#gid=10 어느 날은 백인 아줌마가 수업하는 ESL conversation club. 딸랑 나까지 3명이 참석했으니 거진 1:1 수업이나 다름없었습니다. 문제는 어디를 가나 차를 가지고 20분은 달려야 하는 경우가 많다는 것. - 엔지니어 만남 이곳에서 몇몇 엔지니어들을 만났습니다. 구글 검색엔진을 만드는 사람과 맥주 한잔 했는데, 이 친구는 와이프가 취직되면 결혼 한다고 해서 수많은 회사를 연구하고 100번이 넘는 전화 인터뷰를 했다고 했습니다. 이런 절실함이 있냐고 내게 묻었던 것이 기억납니다. 초급 대만 개발자에게 영어로 web app.을 하루 가르쳐 봤습니다. 이 친구도

실리콘밸리 구직 체험기_201404(4) - 4. 미국 면접 준비 과정

4. 미국 면접 준비 과정 이전 글에서도 언급했던 것처럼 저는 미국 취업이 목표가 아니였습니다. 70세가 넘어서도 개발을 하기 위해서는 엔지니어로서 대접을 받아야 하고 그러기 위해서는 그곳이 실리콘밸리 든, 호주 든, 싱가포르 든 상관 없이, 영어로 일을 해야 하고 가능한 한 기술 트랜드를 리드하고 있는 실리콘밸리에서 시작하는 것이 맞다고 생각한 것이였죠. 따라서 영어는 중요한 숙제였습니다. 또한 취업이 잘되는 기술셋을 갖추는 것도 중요했습니다. 지금 생각해도 이 두가지는 너무 중요한데 비자의 벽이 그렇게 높기 때문에 우리에게는 비자 말고는 특별히 중요한 것이 없습니다. 어쩌면 연봉도, 기술셋도 어느 정도 포기할 수 있어야 했습니다. 비자만 서준다면... (비자가 되면 나중에는 어디든 갈수 있습니다.) 그러니 많이 채용하되 인력이 없는 기술을 갖추는 것 또는 그것을 포장하는 것도 중요합니다. 4.1 영어 영어로 어찌되었던 소통할 수 없으면 인터뷰가 불가능합니다. 저도 상당히 어늘 한데 그래도 소통은 됩니다. 또한 개발자는 언어 말고 소스와 화이트 보드가 있기 때문에 소통만 가능하면 그것도 받아 들여 지는 것 같습니다. 제가 3개월 동안 경험 한 것들을 단편적으로 기술하겠습니다. - 전화 인터뷰할 때 백인 여자 말은 너무 빨라서 맨붕이 올 정도다. - 인도 리크루터 들도 뭔말인 지 안들리는 경우가 있다. - 대화 내용이 대동소이하여 10통화만 받으면 대충 버벅 거리면서 일반적인 대화는 가능하다. - 그래도 영어를 잘하는 것은 정말 장점이다. - 사무실에서 서로 대화하는 내용이 내 귀에만 안들린다. 특히 코딩할 때는 자동 벽이 쌓인다. - 한국 개발자는 인터뷰할 때 영어가 늘었다가 일을 하기 시작하면 영어 실력이 줄기도 한다.   (나중에 회사 옮길 때 또 다시 영어 공부를 합니다만 고용안정성이 낮기 때문에 영어를 못하면 위험할 수 있습니다.) - startup 에서는 영어가 더 중요하다.   (비자 스폰서는 startup에