'All Category'에 해당되는 글 502건

  1. 2015.12.29 OVS
  2. 2015.12.29 AMI, PLC
  3. 2015.12.26 ExtJS, Sencha
  4. 2015.12.21 IoT (LTE MTC)
  5. 2015.12.18 MSPP vs PTN
  6. 2015.12.11 IFC
  7. 2015.12.10 jvm
  8. 2015.12.09 PSI (Public Service Identity)
  9. 2015.12.04 Puppet & Vagrant
  10. 2015.12.04 maven
  11. 2015.12.01 tomcat 설치 (Linux)
  12. 2015.11.09 기타 index
  13. 2015.11.06 index, storageEngine
  14. 2015.11.02 IMS 과금
  15. 2015.11.02 Android 4,~ 6.0 Changes
  16. 2015.10.24 mongoDB query (with subDoc)
  17. 2015.10.23 mongoDB query (with array)
  18. 2015.10.21 commands: traceroute
  19. 2015.10.15 SIP stack
  20. 2015.10.15 maven
  21. 2015.10.13 mongoDB
  22. 2015.10.12 Actor & Future
  23. 2015.10.08 Valgrind, CppCheck, gCoverage, gProfiler
  24. 2015.10.06 SIP & IMS
  25. 2015.10.01 Ant 자동빌드
  26. 2015.10.01 Git
  27. 2015.09.30 SOAP
  28. 2015.09.24 VoLTE 로밍
  29. 2015.09.16 intellij IDEA + spring boot
  30. 2015.09.16 EL & JSTL

OVS

SDN,cloud,Puppet 2015. 12. 29. 11:09

OVS(Open vSwich) 는 OpenFlow가 가능한 Virtual Switch로서

hypervisor가 VM간 연결을 할 수 있도록 해준다

(즉, SDN의 핵심기능이라고 할 수 있는 vLAN(vNIC?), vPort등을 제공한다.)

 

 

REF-SITE(영상)

 

 

===OVS 참고 명령어들======

(bridge추가)

$ovs-vsctl  add-br mybridge 

 

$ovs-vsctl show

$ifconfig mybridge up

 

(port추가)

$ip tuntap add mode tap vport1 후에

$ovs-vsctl add-port mybridge vport1

 

$ovs-appctl fdb/show   (VLAN/Mac 나열)

(openFlow관련)

$ovs-ofctl 

Posted by yongary
,

AMI, PLC

통신 2015. 12. 29. 10:16

   REF-SITE (기사)

 

 

AMI (Advanced Metering Infrastructure: 원격검침인프라)

 

PLC (전력선통신) : 한전에서 AMI구축에 밀고 있는 방식. (PLC형 AMI로 한전에서 약 200만호 기 공급)

 - PLC형 AMI는 더디게 진행되고 있으며 검침율면에서 LTE-AMI가 유일하게 100%로 뛰어남.

 

 

HPGP(HomePlug Green Phy) : 유럽에서 국가 가정용 통신네트워크에 주로 사용하나 한국(KS)규격에는 만족하지 못함.

 

Posted by yongary
,

ExtJS, Sencha

javascript 2015. 12. 26. 15:23

ExtJS:  개인적으로 느낀 느낌은 .. 조직도 가 잘 구현되어 있는 JS이다.

 

 

예제:  http://dev.sencha.com/deploy/ext-4.0.0/examples/#sample-3

 

기본: http://rhio.tistory.com/240

        http://rhio.tistory.com/350 

 

 

 

Sencha Touch: REF-SITE

Sencha Touch는 Mobile Web Application 개발을 위한 JavaScript Framework 입니다. Mobile에 최적화된 기능을 탑재하고있으며 폰과 태블릿 기기를 위한 Framework 입니다. Sencha Touch는 ExtJS 개발사의 Framework이며 JavaScript, CSS, HTML 등 순수 웹 기술만으로 네이티브 스타일을 표현할 수 있도록 함.

Posted by yongary
,

IoT (LTE MTC)

통신 2015. 12. 21. 14:12

LTE-MTC(Machine-Type Communication)  : REF-SITE

 

LTE-MTC  : LTE 카테고리0, 카테고리1, 카테고리-M 이 있으며

LTE를 활용하여 비교적 싸게 구축가능하다.  

   cat0:  10M?

   cat1:  2M?

   cat -M: 300K?

  

 

Lora나 SigFox등 보다 저렴.

   Lora=개방형 컨소시엄 기술, 속도도 좋음 (속도가 좋은 만큼 비쌈, SKT는 이걸로 결정)

   SigFox = 특정회사 제품. 

 


http://m.it.co.kr/m/m_article.html?no=2802456  (참고 사이트)

Posted by yongary
,

MSPP vs PTN

통신 2015. 12. 18. 09:07

MSPP(Multi-Service Provisioning Platform) :   이더넷과 T1, E1등의 프로토콜을 함께 처리  REF-SITE

   - Framerelay -> ATM -> MSPP 순으로 발전해왔음.
   - IP통신을 효과적으로 전달하기 위한 방법이며 기존 광전송장비의 한계를 극복

   - 대역폭조절을 하면서 Vlan,MPLS,ATM,SDI 같은 다양한 서비스가 가능한 차세대 SDH/SONE.

  

 

 

PTN : 모든 전송망을 이더넷으로 단일화 하여 네트워크의 확장성과 관리 편의성을 높임.

        캐리어이더넷이라고도 불림. (모바일 백홀에 적용하기 시작하면서 발전했기 때문)

 

WDM (Wavelength Division Multiplexing) : 광전송 장비

CWDM(Coarse WDM):  단거리(50Km이하), 광파장, 저렴  - REF-SITE

 

 

UTM: Unified Threat Management (출처:텀즈)

 

UTM은 다중 위협에 대해 보호 기능을 제공할 수 있는 포괄적 보안 제품을 가리킨다. UTM 제품은 대체로 방화벽, 앤티바이러스 소프트웨어, 콘텐츠 필터링 그리고 스팸 필터 등이 하나의 패키지로 통합되어 있는 형태가 많다. UTM이라는 용어는 원래 시장 데이터 분석 관련 서비스를 제공하는 업체인 IDC에 의해 처음 사용되기 시작했다. UTM 공급자로는 Fortinet, LokTek, Secure Computing Corporation 그리고 시만택 등이 있다.

UTM이 제공하는 가장 주요한 장점은 단순하고, 설치 및 사용이 간결하며, 모든 보안 기능이나 프로그램을 동시에 갱신할 수 있는 점 등을 들 수 있다. 인터넷 위협의 특질과 다양성은 보다 복잡하게 발전하고 있기 때문에, UTM 제품 역시 이 모든 위협들에 대해 적절히 대응할 수 있도록 맞추어질 수 있다. 시스템 관리자들이 오랜 기간에 걸쳐 다양한 종류의 보안 프로그램들을 유지, 관리해야 하는 수고를 덜어준다.

 

 

Dark Fiber: 광섬유 인프라. 설치는 되었지만 현재 사용되지 않고 있는 광섬유 인프라. (전력회사나 지사간 연결목적으로 설치를 하였으나, 아직 미사용 중)

 

MPLS (Multiprotocol Label Switching) :  네트웍 트래픽 흐름의 속도를 높이고 관리하기 쉽게 하기 위한 입증된 표준 기술이다. MPLS는 주어진 패킷 열에 대하여 특정 경로를 설정하는 것에 관여하는데, 각 패킷 내에는 라벨이 있어서 라우터 입장에서는 그 패킷을 전달해야할 노드의 주소를 보는데 소요되는 시간을 절약할 수 있다. MPLS는 멀티프로토콜이라고 불리는데, 그 이유는 IP, ATM프레임 릴레이 네트웍 프로토콜 등과 함께 동작하기 때문이다. MPLS는 네트웍의 OSI 표준 참조모델과 관련하여, 3 계층(라우팅)이 아닌, 스위칭을 하는 2 계층에서 대부분의 패킷이 전달될 수 있게 한다.

 

IPSec VPN tunnel = (lan2lan) .

  VPN은 보통 L2TP (Layer 2 Tunneling Protocol)을 이용.   REF-SITE

 

 

FTTH 기업용 인터넷에 많이 쓰이며 가정에도 좀 쓰임. (이름에 광섬유가 있긴 하지만. 광섬유가 광케이블을 의미하는 것은 아님)

전용회선: 광케이블(Optical Fiber cable)을 이용해서 중간에 R/N을 거쳐 직접 연결.   

 

 <예제 : 가격분류>

 PTN 기반 eLAN이 비교적 저렴.

        (TDM Connection 방식인 듯)

 MPLS VPN .

 IPSec VPN 더 쌈..

 UTM 더더 쌈.

 

Posted by yongary
,

IFC

IMS 2015. 12. 11. 15:51

S-CSCF에서 받은 호를 라우팅 하는 방법에는 3가지가 있지만

주로 1,2번 2가지가 스인다.

 

1. IFC (가입자 기반으로 동작)

 

  가입자 기반에도 2가지가 있는데

  A. 발신호: P-Asserted-Identity (없으면 From)을 기준으로 처리한다.

  B. 착신호: invite 옆에있는 R-URI (Request URI)를 기준으로 처리한다.

 

     기준이 바뀌면 동작이 재설정 되므로, P-A-I나 R-URI가 동일한 상태에서

     iFC가 순차적으로 처리되며, 따라서 iFC에는 우선순위(Priority)가 존재한다.

 

 

2. Prefix-Routing

  가입자랑 상관없이 특정번호 (예:1593408)의 경우

  지정한 서버로 포워딩 시킬 수 있다.

 

 

 

3. PSI-일반적으로는 외부에서 들어온 호를 I-CSCF에서 처리할 때 사용하지만

  S-CSCF에서도 사용 가능.

Posted by yongary
,

jvm

java core 2015. 12. 10. 09:23

Hotspot VM. (JIT의 일종. SUN의 JIT임)  REF-SITE

 

      JIT는 그때 그때 OS에 맞게 bytecode를 변환하지만,   AOT는 미리 변환해 놓는다.  

     Android LolliPop부터 ART(anroid Run Time)이라고 부르는 AOT 사용.

 


JDK1.2부터 HostSpot VM 등장. ( Hot=선택적으로 메서드를 선택해서 컴파일하여 성능을 높이는 VM)

 

3개의 Generation으로 Heap구성.

 

1. Young Generation

2. Old Gen

3. Permanent Gen (Perm Gen)

 

 

 일반적으로 처음 Heap생성하면 Young Gen.  (Young Gen도 3분류. 처음 Eden -> 나중에 From or  To[=Survivor Space] ) 

 시간이 지나거나 공간부족시 Young Gen----> Old Gen으로 이동.

 

GC가 끝나면 From, To가 바뀜. (즉, From이 Survivor space가 됨)

 

 

각종 옵션

 

-Xss  : statck Size 

 

-Xmx -Xms : heap 최대 , 최소 size

 

-XX:NewSize  (Young Gen 최초 사이즈)

 

-XX:NewRatio  (Young /Old 비율, x/4, 즉 2면 반반)

 

-XX:SurvivorRatio  ( Eden과 Survivor비율.  x/9  )

 

-XX:MaxPermSize    (default=64M or 64bit 머신에서는 +30%)

 

-XX:+HeapDumpOnOutOfMemoryError

-XX:OnOutOfMemoryError="<cmd args>;<cmd args>"

-XX:OnError="<cmd args>;<cmd args>"

Posted by yongary
,

PSI (Public Service Identity)

IMS 2015. 12. 9. 15:18

IMS에서는 PSI를 통해

외부에서 들어온 호를 I-CSCF에서 AS로 직접 포워딩 할 수 있다. (8.8장 )

 

3가지 방식이 있는데

 

1. 서브도메인 이용

2. Direct PSI trigger

3. Indiect PSI trigger

 

 

이 중 1,2번이 간단한 편인데

2번을 설명하면

 

I-CSCF에서 HSS로 LIR(Location info query) 및  LIA(Answer)를 통해

AS주소를 안 다음에 AS로 바로 라우팅 하는 것이다.

 

AS에서는 처리 후, 다시 I-CSCF로 호를 보내면

I-CSCF -> S-CSCF -> (T)AS 형태로 호가 이루어 진다. (확인 중)

 

그리고 WildCard(*) PSI 등록시에는

번호!.*!  형태로 느낌표 사이에 regex로 표현된다.

 

 

3. Indirect PSI trigger는

I-CSCF(HSS LIR) -> SCSCF (HSS SAR:레지확인 후 iFC 동작) -> AS로 호가 되는데

unregi된 서비스 번호에 대해서도 서비스가 가능한 장점이 있다.

단점은 PSI + iFC도 필요해서 다소 복잡하다.

 

 

Posted by yongary
,

Puppet & Vagrant

SDN,cloud,Puppet 2015. 12. 4. 11:58



Vagrant (부랑자)    Ref-Site:


 - VM 자동화 관리도구 로서   VirtualBox를 기본 지원하고, AWS, VMWare를 지원한다.   VMWare는 추가 라이선스 필요.


- Box 라는 컨테이너 단위를 가져다가 설치만 하면 OS가 설치되는 형태로서,

   각종 작업에 shellscript 를 이용한 자동화가 지원되며,  windows/mac 도 지원된다.

   Box-download site:   



- Ruby로 개발되어 있다.


- vagrantfile 에 모든 설정이 있고, vagrant up 명령으로 실행하므로  매우 간단하다.




(VM 생성시, shellscript 뿐 아니라

   automation 툴인 Chef나  Puppet 을 사용하여 VM에 대한 Provision 수행이 가능하다.) 



Puppet (퍼핏=꼭두가시)  Ref-Site  


- Ruby로 구현된 서버설정 자동화 툴.


- 주기적(30분)으로  puppetd가  관리서버의 puppetmasterd =서버설정을 받아와서 반영 함.


- forge 사이트에서 모듈을 공유하며, 개발 가이드 있음.     dev-guide


- class상속등 다양한 방식 지원,    postgreSQL 이용..




Posted by yongary
,

maven

Spring 2015. 12. 4. 11:29

spring 에서   pom.xmL을 이용하는 경우가 많은데

이것은 maven 의존성 관리툴에서 사용하는 파일이다.


maven을 직접사용하는 방법도 있는데

maven 설치 후


$ mvn archetype:generate     해서 각종 값을 넣고 나면 (주로  package 명으로 넣으면된다)

pom.xml까지 자동 생성이 되며,


mvn compile exec:java -Dexec.mainClass=com.ky.App

 으로 바로 커맨드 상에서 실행한다.


매우 유용하다. 

 




Posted by yongary
,

tomcat 설치 (Linux)

FRONT-END 2015. 12. 1. 21:19

rpm이나 deb로 설치 후,


etc/profile 5줄 추가==================

JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.amd64


CATALINA_HOME=/usr/share/tomcat7


CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/lib/jsp-api.jar:$CATALINA_HOME/lib/servlet-api.jar


PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin


export JAVA_HOME CLASSPATH PATH CATALINA_HOME


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




======tomcat port 수정.

/etc/tomcat7/server.xml 수정. 8080->80

service tomcat7 restart


(Ubuntu인 경우 필요할 수 있음)

autobind를 이용한 80포트 사용토록 수정. 

http://blog.ciaranoconnor.me/2015/01/12/configuring-tomcat7-to-port-80-on-ubuntu/



=======front-end 소스를 

/var/lib/tomcat7/webapps/ROOT  밑에 복사.



Posted by yongary
,

기타 index

mongoDB, redis 2015. 11. 9. 17:47

mongoDB의 index는 메모리상의 working Set 에  Cache되어 관리된다.

working Set에는 index외에도, 데이타 일부가 cache되지만,   index가 우선 cache되어 성능향상을 시키는 구조이다.

 

 

데이타가: type: "restratunt"

loc: [ 37, 132 ] 일 경우,  

 

<2D index>

 

 

db.data..ensureIndex( {loc:'2d', type:1} )

 => $near 나  $maxDistance 가 사용가능하다. 

 

 

 

<2dsphere index>

 

db.data..ensureIndex( {loc:'2dsphere', type:1} )

=> $near 나 $maxDistance 가 사용가능하다.  $gemetry를 사용할 수 있다.

db.data.find( {loc: {  $near: {   $geomerty: { type: "restaurant",  coordinates:[38,127] },  $maxDistance:2000 }   }})

 

 

<text search index>

 

db.data..ensureIndex( {type:'text'} )

db.data.find( {'$text:{$search:'restaurant'}'} )          //$text앞에 '는 빼도 될듯.

 

 

Posted by yongary
,

<Index>

mongoDB에서 index 및 멀티index가 가능하다.

(default는 _Id 가 인덱스이다.)


<DB daata>

    db.nameage.find()

    { "_id" : ObjectId("561ddb57e8c49d6d56c71503"), "name" : "kim", "age" : 2 }


인덱스 추가시 

> db.nameage.ensureIndex( {name:1} )  or

db.nameage.createIndex( {name:1,  age:-1} )  // -1=descending.. compound index.

index show
db.nameage..getIndexes()

> db.namegae.dropIndex( {name:1} )


조회시 index  사용하는지 확인.
> db.nameage.find({name:"kim"}).explain()



MultiKey  index (for array index)  : age가 array라면 자동으로 MultiKey index 가 됨.

   - explain()해보면  isMultiKey: true라고 나옴.

    - name이 array라고 되고, age가 array라도 됨.

=> 단, name과 age 둘 다 array 로 doc insert하면.. insert 실패 남.


    -array 안에 subDoc이 있을 때, .(dot)을 사용해 index 생성가능. names:[  { country:"kor", name:"yong" }, { country:"nz", name:"gary"} ]

     db.nameage.createIndex( {names.name:1} )


     tip:  subDoc조회시에는 $elemMatch 사용가능.

    

Unique Index

   > db.nameage.createIndex( {name:1}, {unique:true}  )

   unique index를 만들면서, sparse 옵션을 주면  unique이긴 하지만, 그 필드가 없어도 된다.

 db.nameage.createIndex( {name:1}, {unique:true, sparse:true} )

    단, sparse index 일 경우, sort()명령에서는 index 사용을 못함.



<Storage Engine>


Mongo서버가---> StorageEngine을 통해서 --> disk에 접근.

MongoDB에는 2가지 storageEngine이 있다.


1. linux기본의  mmap  (이게 3.0에서도 default)

- collection 레벨 locking

- 2의 승수(power of 2) document 생성. (즉, 4,8,16,32  byte단위로 update여유 있게 생성)

2. WiredTiger ( 최근에 인수.)  mongoDB 3.0부터 지원,

        - document 레벨 locking

       -  압축 지원

       -  no in-place Update  (즉, update 하면 doc을 항상 추가함) : 이게 doc 레벨 lockding의 원동력임.

사용법:  시작시  $ mongod  -storageEngine wiredTiger             (-dbpath wT)

          

     

Posted by yongary
,

IMS 과금

IMS 2015. 11. 2. 18:52

ICID (IMS charging ID) :과금 ID

 

P-CSCF가 Regi 수신받으면 ICID 생성.  (11.12)

P-CSCF는  P-Charging-Vector헤더를 이용해 ICID를 S-CSCF로 전달.

 

S-CSCF는 받은 ICID를 저장. 하고 이를 이용한 과금 수행.

 

(12.7)

세션중에 P-CSCF는 추가적인 media-stream용 ICID생성. (PDP Context 연관부분)

IOI(Inter-Operator ID)도 과금에 사용됨.

-type2 : 주로 통신사 내부에서 이걸 사용함.

-type1:(p-cscf 와 s-cscf간 용도),   type3:로밍용.

 

발신쪽 S-CSCF가 P-Charging-Vector에 orig-ioi넣어놓으면,

착신쪽에서 orig-ioi를 제거하고 단말로 내려감(단말로는 과금정보 절대 안내려감)

대신 183이 단말에서 올라오면 다시 ICID,IOI등을 더해서  전달함.

Posted by yongary
,

Android 4,~ 6.0 Changes

Android 2015. 11. 2. 10:26

Android 6.0 (API level 23) - Marshmallow

- runtime permissions.

- App Power Saving optimization.

Doze: device

App Standby:

- ART runtime 수정.

- Android for Work changes

- Camera Service Changes

priority 추가.

 Wi-Fi & Network

기존에 다른 네트웍이 끊어졌지만, 이젠 끊어지지 않는다. (API 21이후에는 multinetwork지원)

- APK validation

- USB Connection

 

Android 5.x (Lollipop,  API Level 21)

- Android RunTime (ART), 기존 dalvik대체

1. AOT(Ahead Of Time) 컴파일

2. GC향상

3. debugging 향상
(단,

- JNI / obfuscator 쓰는 경우 주의 필요

- GC에 반하는 기술 주의 필요)

- Notification : 계정별로 noti가 됨.

- Sound / 진동

Notification.Builder를 이용해서 prioritymode를 써야 함.

- MediaSession  등장 for media control (이전의 RemoteControlClient 대신임.)

Notification.MediaStyle,   (with Notification.Builder.addAction() )

- 64bit support in NDK.

- Managed Profile

- file공유 (profile간)

- Lockscreen widget support 없어짐.  (이제 lockscreen에서 Widget이 사라지나 보네요)

 

Android 4.4 (Kitkat, API Level 19)

 

- WebView가 크롬으로 바뀜. (기존엔 WebView base였음)

- READ_EXTERNAL_STORAGE permission 추가됨. -> getExternalStoragePublicDirectory() 사용가능

 

- android.pirnt 프레임웍 추가, 로 문서 printing이 쉬워짐.

- SMS Provider 추가:  default SMS앱으로 선정되어야만 SMS수신등이 가능

 

-

 

Android 4.1, 4.2, 4.3 (Jellybean  API 16~18)

- 4.3  OpenGL ES 3.0 지원.

- WifiEnterpriseConfig 기업용 자동 Wi-Fi세팅 지원.

- MediaMuxer : 1audio + 1video mux.

- ViewOverlay: OpticalBounds 추가.

- Screen Orientation 사용자편의 옵션 3개 추가.

 

 

Android 4.0 (IcecreamSandwich, API Level 14)

 

- RemoteControlClient 등장: media control / lock screen 등의 이벤트 수신.

 

 

Posted by yongary
,

user collections에 data가 아래와 같을 때:

  {name:"kim", phone:{mobile:"010-1234", office:"02-1234" }}

  {name:"lee",  phone:{mobie:"010-2222", office:"02-2222" }}

 

Sub Document

>  db.user.find(  {phone:{mobile:"010-1234", office:"02-1234"}  } )       : mobile, office 순서가 일치해야지만 찾음. Exact match

 

result:  kim user 1 line.

>  db.user.find(  {phone:{mobile:"010-1234" }}) 

result: no result

 

Cursor

>  

cur=db.user.find();null;  (null 이 잠시대기함)> while (cur.hasNext()) printjson(cur.next());

result: all 2users. 2 line
 
 ( Doc 조회 이전 or empty일 때,  설정 가능한 작업들)
> cur.sort( {name:-1}  );null;                       //  reverse order -> return new Cursor. so need null;

> cur.sort( {name:-1}  ).limit(3); ;null;     // limit 3. -> return new Cursor. so need null;

 

update

대표예제:  db.b2bRawCncity.updateMany({cmId:{$gt:240400007}}, {$set:{cmId:null}} );

 

>  db.user.update(  {name:"kim"},   { name:"kim2"} )     //문서 전체 udpate. 

result:  kim->kim2  phone은 날아감. (disappear)

  $set

  >  db.user.update(  {name:"kim"},   { $set: { name:"kim2"} )  //just update

 result:  kim->kim2  phone remain.

  $unset

  >  db.user.update(  {name:"kim"},   { $unset: { phone:1} )

  field  phone remove

  $upsert : true   means  => 없을 때 insert 하라는 의미.

  $multi : true   means  => 여러건 update 할 때  필수. default는 한 건만 update.

 

$type:2    string을 의미함. bson의 저장방식으로 숫자마다 다른 type을 의미함.

 

 

Posted by yongary
,

user collections에 data가 아래와 같을 때:

  {name:"kim", food:["rice","water" ]}

  {name:"lee", food:["rice","orange" ]}

 

Field Display : _id는 default.

> db.user.find( {name:"kim"}, {food:false, _id:false } )

result: {"name":"kim"}

 

 

array

>  db.user.find( {food:"rice"} )       : array 1depth까지 바로 탐색.

result:  all user 2 line. 

  update array { $push (rightmost),  $pop:1(rightmost),       $pull (remove),  $addToSet(work like set) 

  >  db.user.update( {name:"kim", {food: { $pop:1}} )      

 

 

 

$or,

> db.user.find( { $or:[ { name:"kim"}, {name:"lee"} ] } )

 


$and

 and는 보통 필요가 없다.

> db.user.find( {name:"kim", food:"rice"}  ) ?

result: kim user 1 line. 


$regex, 

> db.user.find(  {name:  {$regex:" ^k"}   } )

result: kim user 1 line.


$exists (=field exists )

> db.user.find(  {name:  {$exists:true}   } )

result: all user 2line


$all,

> db.user.find ( {rice: {$all ["rice","water] }} )

result: kim user 1 line.


$in,  (sql 의 in과 유사)

> db.user.find ( {rice: {$in ["orange","water] }} )

result: all user 2 line.

Posted by yongary
,

commands: traceroute

Linux 2015. 10. 21. 10:16

UDP traceroute:

 

traceroute 125.152.0.117 -s 220.75.130.5 -p 5160 -U

Posted by yongary
,

SIP stack

IMS 2015. 10. 15. 10:27

SIP stack is process&Library for dealing with SIP.(Sessin Initiation Protocol)

 

Open Source SIP Stack for JAVA:

 -

1) PJSIP-JNI  which is java bindings for the C PJSIP library

2) JAIN-SIP  http://users.cis.fiu.edu/~ege/JAIN/

    https://github.com/Mobicents/jain-sip 

    https://jsip.ci.cloudbees.com/job/jsip/javadoc/ 

    http://www.oracle.com/technetwork/java/introduction-jain-sip-090386.html      (Oracle introduction)

    https://developer.opencloud.com/devportal/devportal/apis/jainsip/1.1/docs/index.html 

    http://www.worldlibrary.org/articles/mobicents 

    http://www.mobicents.org/products.html 

 

    RFC 3261 functionality and the following SIP extensions; the INFO method (RFC 2976), Reliability of provisional responses (RFC 3262), Event Notification Framework (RFC 3265), the UPDATE method (RFC 3311), the Reason Header (RFC 3326), the Message method (RFC 3428) defined for instant messaging and the REFER method (RFC 3515), Distributing Authoritative Name Servers via Shared Unicast Addresses (RFC 3581), the PUBLISH method (RFC3903).

   SDP API(JSR 141) is property of Dynamic Soft. => under JCP License

 

3) MjSip        http://www.mjsip.org

4) javaforce   http://sourceforge.net/projects/javaforce/

5) jSIP          http://jsip.java.net  http://jsip.sourceforge.net/

6) openjsip    http://code.google.com/p/openjsip/

 

 

 

SIP Stack for C

1) reSIPRocate    http://www.resiprocate.org, http://svn.resiprocate.org/dox/ 

 

 

2) Spirent IMS SIP stack = Radvision SIP Stack.   REF-SITE

   - (Avaya m&a Radvision(2012),   spirent m&a Radvision Tech Biz Unit(2014) )

 

  • P-headers: private SIP headers for IMS
  • IPv6 support: the mandatory IMS transportation level
  • Signaling compression: mandatory IMS request for signaling between UE and P-CSCF
  • Support for IM URI, PRES URI, and TEL URI
  • ENUM: translation between phone numbers or TEL URI to SIP URI
  • Support for different event packages, such as presence, reg-event
  • Support for instant messaging (IM)
  • HTTP DIGEST using 3GPP AKA Authentication -"AKAv1-MD5"
  • IPsec: IP security
  • Security agreement negotiation, as defined in RFC 3329
  • Support for mobile registration using Service-route and Path headers
  •  

    Posted by yongary
    ,

    maven

    java core 2015. 10. 15. 09:10

    maven is project management tool for  autobuild & dependency management.


    INSTALL: just download and unzip.  add bin path to $PATH.


    RUN:  $mvn archetype:generate

    => defalt select.

    => groupID,package..etc:  com.ky

    $cd com.ky

    $mvn compile exec:java -Dexec.mainClass=com.ky.App


    Posted by yongary
    ,

    mongoDB

    mongoDB, redis 2015. 10. 13. 22:14

    Functionality vs scalability&performance :

      -mongoDB achievs both. But missing some functionality because of scalibility&performance.


    Not exists in mongoDB:

     -Join, transaction., schema, SQL


    Exists in mongoDB:

      Index, secondary Index



    Command:

      db

      show tables

      db.things.find ().pretty()

      db.things.insert (..json..)  or .save(json)


    SchemaLess example:

    > db.user.insert( {name:"kim"})

    > db.user.insert( {name:"lee", age:11} )

    > var j = db.user.findOne( {name:"kim"} )

    > j.age = 11

    > db.user.save(j)



    Posted by yongary
    ,

    Actor & Future

    scala 2015. 10. 12. 23:31

    Actor is Thread+Queue, while

    Future provide a way to reason about performing many operations in paralle


       http://la-stranger.tistory.com/m/post/entry/Scala-Future-Tutorial

    Posted by yongary
    ,

    linux에서 c로 개발한 후, 코드를 검사하는 방법 몇가지.. 

     

     

    ValgrindREF-SITE

     - 메모리 오류 체크, 메모리 leak 체크.

       특히 메모리 오류가 가장 짜증나는 부분인데 이런 부분을 제법 잡아주므로 꼭 돌릴 필요가 있다.

     

    - 사용법:

    $gcc test.c -o app_test

    $valgrind --leak-check=yes ./app_test

        

     

    CppCheck   http://cppcheck.sourceforge.net/

    -  Linux버전도 있고, pc버전도 있으며, 파일 단위나 폴더단위로 소스를 검사.

       메모리 누수/배열 범위/멀티 Thread 등이 check됨.

     

     

     

    gcov REF-SITE

    - 사용(혹은 TEST) 이 안되고 있는 코드 체크, 코드별 실행 횟수 및 %가 나온다.

     

    - 사용법:

      $gcc -fprofile-arcs -ftest-coverage tmp.c
      $./a.out
      $gcov tmp.c

     

     

    gprof

    - 코드 성능 분석

    Posted by yongary
    ,

    SIP & IMS

    IMS 2015. 10. 6. 14:04

    SIP is protocol like HTTP. while

    IMS is telco System Architecture which uses SIP.

     

     

    <SIP History>


    1998년에 H.323 이 나오고  -( 최초로 RTP사용.)

    1999년에 SIP가 나오면서 혼용되다가,  2008년경부터 본격 사용됨.
        -SIP는 1996년에 나온 HTTP1.0을 차용하여 Text-based로 정의.


    2002년 RFC3261.


    2012년에 8월(skt,lgt) 12월(kt) VoLTE 최초 상용화.




    <IMS>

    - 3G에서부터 HLR, 통화 등을 수용하기 위한 텔코의 시스템 구조로 발전.

          UNI: user to Network Interface (단말과 망 사이)

          NBI : North Border (AS 경계)

          NNI : Network to Network ( 타이통사간 경계)


    - IFC Chaining을 통해서 호가 흘러가는 구조 임.(IFC를 S-CSCF가 HSS로부터 받아오는 게 핵심.)

     

    - PSI 는 최종 서비스 혹은 trigger의 경우 최종 서비스로 바로가는 방법.  

      즉,IFC 는 체이닝이 되어야 효과를 발생하는 과정이고 차이가 큼..


    -  ISC (IMS Service Control )Reference Point 임. 여기서 IFC가 처리됨.


     

    Posted by yongary
    ,

    Ant 자동빌드

    java core 2015. 10. 1. 14:40

    Eclipse에서 프로젝트를 하나 골라서

    -> Export  ->  General 밑에 Ant Buildfiles 로 하면  build.xml 이 생성된다.

     

    Windows -> Show View메뉴에서 -> Ant를 고르면 우측에 Ant 작업창이 뜨고,

    그곳으로 build.xml을 drag하면 build.xml로 빌드가 가능하다

     

     

    장점: jenkins와 연동한 자동 build가 가능하다.  

    Jenkins연동 시에  Build->Add Build Step ->Invoke Ant.

    Posted by yongary
    ,

    Git

    IT 2015. 10. 1. 11:27

    SVN의 단점을 극복한 Git, 리누스 토발즈가 만들어서 더욱 유명하다.

    특히 github.com 서버에서 git을 이용한 무료소스관리를 해주므로 무수한 사용자들이 사용하고 있다.

     

    개인적으로 느낀 git의 가장 큰 장점은

    local 커밋이 가능하다는 점이다. 즉 비행기를 타고 가는 중에도 커밋이 가능하다.

     

    개발자로서 자주 커밋하는 것이 안전하다는 것을 항상 느끼는데,

    수십명이 사용하는 서버에 한줄 고치고 커밋하는 걸 여러번 하면 형상관리가 지저분해지는 단점이 있었는데

    git을 이용하면 로컬 커밋을 자주하다가, 서버에는 push로 올리면 된다.

     

     

     

    http://git-scm.com/book/ko : 공식매뉴얼




    Git 기본 사용법 :

      git config --list

     

      git config --global use.name "myName"

      git config --global user.email my@Email

      git config --global core.editor vim

      git config --global merge.tool vimdiff

     

      git init

      git add <a.c>

      git commit -m 'test'

    git remote add origin gitURL(like github)

      git push -u origin master

     

     

     

    Windows용 git도 있다.  http://www.git-scm.com/downloads  에서 다운로드 가능.

     

    설치해서 icon만 고르면,  minGW의 bash쉘에서 git이 실행이 된다.
    (컴퓨터 이름이 한글일때 prompt가 깨지는 현상이 있음:  Administrator@ㅁㅁㅁ ~$  이렇게 되네요)

     

     

    tip: 한글설정: git config --global core.quotepath false

    이쁘게: .bashrc에 alias ls='ls -al --color=auto --show-conftrol-chars'

     

    Posted by yongary
    ,

    SOAP

    IT 2015. 9. 30. 13:47

    REST가 대세이긴 하지만, 이전 시스템들을 위해 SOAP을 알아둘 필요가 있다.

    REF-SITE



    SOAP(Simple Object Access Protocol)은 HTTP/SMTP 상에서 XML기반 메시지를 교환하는 프로토콜 이다.


    SOAP에서는 SOAP Envelope과 SOAP BODY 를 주로 이용한다.

       -> SOAP BODY에   <Price>$4.0</Price> 와 같이 전달.



    SOAP외에,  WSDL 로 웹서비스가 정의 되기 때문에 WSDL 을 이해하여야 한다.



    WSDL(Web Services Description Language)

       <portType>의  <operation>  메서드 선언 </operation>   : What 정의

        <service>의   <port> 웹서비스 URL </port>   : How&Where  즉 서비스의 EndPoint 정의.



    그리고 실제 구현하면서 JAXB 와 같이 JAVA <-> XML 마샬링 툴등을 이용하게 된다.





    JSON이 대세인데,  SOAP을 보고 있으니 답답하다는 생각이 들긴한다.

    mongoDB + Angular.js 를 이용해 JSON 을 이용해서 REST방식으로 구현하길 권장한다.



    Posted by yongary
    ,

    VoLTE 로밍

    IMS 2015. 9. 24. 13:26

    RAVEL기반 로밍: VoLTE로밍의 대세

     - CMCC에서 밀고 있음.

     

    s8hr로밍: simple해서 힘을 받고 있음.

     

     

    IP Layer에서만 로밍하면 국내호 처리는 완료되며,

    로컬호 처리가 이슈.

     

     

    Posted by yongary
    ,

    intellij IDEA + spring boot

    Mac 2015. 9. 16. 08:49




    <IntelliJ 단축키>  Ref  REF2


    ⌘N : new class - gradle에서도  new사용가능

    ⌘E : recent files  (Ctrl+Tab:switch보다 좀 많이 나옴)

    ⌘1 : 



    Home/End (에디터 앞으로/뒤로) : fn⌘left  or right

    Page up/down  : fn⌘up ,  down

    탭간 이동: ^Tab


    Class Def : ⌘B

    자동import: Alt + Enter

      => 참고로 Lombok의 @Data를 쓰려면 3가지 작업이 필요.

      1. (Preference세팅) 의 plugins에서 Lombok plugin설치

      2.(Preference세팅)  compiler->annotation processor에서 Enable Annotation Processor선택

      3. gradle Dependency추가:    compileOnly('org.projectlombok:lombok'



    이전커서위치: ⌘+⌥(alt) + left/right

    한줄삭제 : ⌘ + back


    북마크:  +F3    조회:  +F3.  조회한 후 왼쪽창 더블클릭으로 이동가능   ( 1~9,알파벳 북마크 가능..   )
           

    spring-boot는

    intelliJ에서 아주 쉽게 프로젝트가 생성된다.


    REF-SITE: (boot+intelliJ)


    REF_SITE: (boot설명)



    <Spring Boot>

    getting startetd:   http://docs.spring.io/autorepo/docs/spring-boot/current/reference/html/getting-started.html


    Test:   http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html 



    Posted by yongary
    ,

    EL & JSTL

    FRONT-END 2015. 9. 16. 08:45

    (spring 분류에도 같은 글 존재)


    EL (expression language) -> JSP2부터 지원.


    ${param.id}   = 기존의 request.getParameter("id");와 동일

    ${member}   =  request.getAttribute("member");


    ${member.name} : Member m = (Member)request.getAttribute("member");m.getName();

    ${list["0"]}   : List list = (List)request.getAttribute("list"); list.get(0);




    JSTL  (JavaServer Pages Standard Tag Library ) -> c tag를 가장 많이 사용.


     <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  // c:tag사용.

     <c:forEach  items="${list}"  var="oneItem" >

          <td>   ${oneItem.title}  </td>

      </c:forEach>


    <c:if test="${stable}">checked="checked"</c:if>


    <c:if test="${menuNameVo.useYn eq 'Y'}">checked</c:if> 




    참고사이트:  http://egloos.zum.com/slog2/v/3581446  

    https://docs.oracle.com/javaee/6/tutorial/doc/bnahq.html 

    Posted by yongary
    ,