'Articles'에 해당되는 글 116건

  1. 2014/09/19 용비 oneM2M
  2. 2014/09/05 용비 스케치
  3. 2014/08/21 용비 IoT에 대한 짧은 단상
  4. 2014/08/12 용비 Redis Client Wrapper Java Class
  5. 2014/08/08 용비 Linux TCP Connection Setting

oneM2M

Articles 2014/09/19 10:10 용비
IoT 표준에 대한 업체들의 관심이 뜨겁다.
세계 시장에서 앞서 나가고자 하는 회사들 중에서 IoT 표준에 대해 가장 적극적인 회사들은 크게 3가지 부류로 나눠볼 수 있다.

첫째는 퀄컴과 삼성전자로 대변되는 제조업체들.
사실 IoT가 제조업이 뒷받침이 되지 않으면 성립할 수 없는 영역이기는 하다. 그래서인지 퀄컴은 AllJoyn으로 IoT 표준화 작업에 힘을 쏟고 있고, 이에 대항하여 삼성은 인텔과 함께 OIC(Open Interconnect Consortium)을 만들었다.

둘째는 구글로 대변되는 서비스업체들.
구글 또한 모토로라를 비롯한 하드웨어 업체들을 인수해서 IoT 사업에 뛰어들 수 있는 발판은 있는 것으로 여겨진다. 그래서인지 구글도 Thread Group을 만들어서 표준 전쟁에 뛰어 들었다.

셋째는 IoT를 위한 가장 필수적인 망 인프라를 가진 통신업체들.
사실 통신업체 주도로 만들어진 표준화 그룹은 없고, 범 국가 차원의 표준화 단체들이 중심이 되어 만들어진 IoT 표준화 그룹이 있다. 바로 oneM2M이 그것이다. 한국에서는 TTA가 참여하고 있고, 유럽과 미국, 중국과 일본 등의 표준화 단체가 참여하고 있다. 그런데 문제는 이런 표준화 단체에 전통의 Telco회사들이 멤버로 참여하고 있지만, oneM2M의 Type 1의 구성 멤버들은 아니라는 점이다. oneM2M Type 1 구성원들은 모두 각 국가의 표준화 단체들이다. 한 나라를 대표하는 표준화 단체들이 단지 통신사들의 요구사항과 상황, 입장만을 대변할까?

oneM2M에서 표준 1.0 Release를 했다. 그리고 그 표준을 분석하여 정리하다 보니 문득 통신사는 얼마나 적극적으로, 전쟁으로까지 표현되고 있는 IoT 표준에 신경쓰고 참여하고 있는가 하는 생각이 들었다.

사실, 국제 표준으로 정해지는 것은 관련 산업 전반에 대한 것을 다루어야 하는 것은 맞다. 다만, 각 영역별로 바라보는 시각에 따라 더 다양한 사업을 펼치는 것에 대한 유불리는 분명히 있을 것이다. 표준을 제정할 때, 어느 산업 분야의 시각이 좀 더 반영되었느냐 따라서. 그런 의미에서 보면 분명히 아쉬운 감이 있다.

몇 년 전만 해도 피부로 와 닿지 않던, 모든 것이 인터넷을 비롯한 망으로 연결되는 시대가 곧 올 것이다. 지난 날에는 IoT를 위한 모든 기반들은 갖추어져 있지만 인프라도, 제조 환경도, 관련 표준도 모두 제각각이고 파편화 되어 있어서 아직 시기 상조라는 생각을 많이 했었는데, 어느 덧 칩부터 서비스까지 체계적으로 정리되어 가는 추세다.

아직 시장은 모바일에 비하면 시작 단계에 불과하지만, 시계로 대변되는 Wearable 기기는 이미 상용화되었다.

칩과 Device, 통신망, 플랫폼, 서비스, 그리고 사람. 이 모든 것들이 하나로 묶이고, 그렇게 될수 있는 기반이 되는 것이 바로 표준인데, 통신사들이 좀 더 적극적으로 대응하지 못하고 갈수록 설자리를 잃어가는 것 같아서 안타깝다.

제조업체들은 칩을 만들고, Device를 만든다.
서비스 업체들은 Device에서 구동되는 앱부터 특정 분야에 관련된 서비스, 서비스를 제공하는데 필요한 플랫폼까지 만들 수 있다.

그럼 통신사들은 무엇을 할 수 있을까? 누구나 생각할 수 있듯이, 전통적인 제조업은 통신사의 영역이 아니니 고려하지는 않는다고 하더라도, 통신사가 주도권을 쥐고 있는 분야가 2가지가 있다.

첫째는 통신사의 본업인 통신망. 아무리 제조업이 좋은 Device를 만들고 서비스업체들이 훌륭한 서비스를 만들어도, 모든 커뮤니케이션의 채널인 통신망이 없으면 아무런 쓸모가 없다. 통신사는 가지고 있는 통신망으로 사업을 할 수 있다. 통신망 자체를 가상화해서 상품으로 파는 것이다. 알뜰폰 사업자들, MVNO 사업자들이 망을 빌려서 사업을 하듯이 IoT를 위한 가상망 상품을 기업에게 팔 수 있다. 아니면 NFV를 통해서 하나하나 단품으로 팔아도 되고. 시장 규모나 사업 수요가 얼마나 될지는 모르지만.. 사실 이 부분은 공돌이 출신인 내가 알 수도 없고.

두번째는 요즘 대세인 모바일이다. 스마트폰을 비롯한 휴대전화, 스마트 시계 등은 모두 모바일 제품이다. 통신사 없이 서비스가 가능하지 않다. 모바일에서 서비스를 하려면 필요한 것이 앱과 서비스 플랫폼이다. 앱은 통신사가 만들 수 있는 영역이 아니고, 플랫폼은 다르다. 서비스 사업자보다 더 쉽게 구축할 수 있는 부분이 바로 플랫폼이다. 통신사 입장에서는 모바일 사용자가 곧 자사 고객이니까. 현재 가지고 있는 고객 기반 서비스를 제공할 수 있는 플랫폼을 만드는 것이다. 서비스 사업자보다는 쉽게 접근할 수 있는 장점을 이미 갖고 있다.

그리고 통신망과 모바일을 붙이면 가장 쉽게 따라오는 것이 바로 데이터다. 수많은 사용자들로부터 올라오는 데이터, Device로부터 올라오는 데이터. 이것이 바로 빅데이터다. 그럼 그것을 분석해서 새로운 수요를 발굴하여 서비스를 출시할 수도 있고, 신규 Device에 대한 아이디어로 제조사들과 협업을 할 수도 있을 것이다. IoT는 망을 기반으로 모든 것이 연결되는 세상이지만, 거기에 빅데이터 플랫폼이 빠질 수 없다.

자신만의 강점을 살리고, 자신의 단점은 장점을 지닌 다른 곳과 협업을 통해 서로가 상생하는 것. 통신사의 미래. 시작은 미약했으나 나중은 창대하리라는 성경 구절처럼, 시작은 통신사였지만, 모든 것의 기본이 되는 통신망 기반으로 나중에는 전체 IoT를 아우르는 중심에 통신사가 서게 되는 모습을 보고 싶다는 것은 비단 나만의 생각은 아닐 것이다. 제조업체도, 서비스 업체도 그런 생각을 하기에 IoT 표준 전쟁에 뛰어든 것일 게다.

oneM2M 표준을 분석/정리하다가 삼천포(?)로 빠졌는데, 아무튼 흥미로운 분야이고, 무한히 열려 있는 분야라고 생각되는 IoT에서 이루고 싶다. 그 일이 무엇이건 간에.
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/617

스케치

Articles 2014/09/05 15:45 용비
그냥 요즘 떠오르는 여러가지 생각들.

- IoT가 대세인가?
- Cloud에서 향후 발전할 수 있는 기술이나 방향 : 보안, 안정성, 모바일과 융합, 서비스, XaaS..
- 지능형 자동차란?
- ICT와 기존 산업간 융합으로 인한 새로운 보안 위협 형태는?
- 표준과 특허 선점을 위해서 무엇을 어떻게 해야 하는가?
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/616

IoT에 대한 짧은 단상

Articles 2014/08/21 14:34 용비
IoT (Internet of Things)는 사전적인 의미로는 인터넷에 연결되어 있는 모든 대상을 포괄하여 지칭하는 용어이다. 하지만, 예전에 이와 비슷한 의미로 있었던 용어들인 M2M, Ubiquitous, Smart Grid를 포함한 Smart류와는 무엇이 다른 것일까?

통신망이 인터넷으로 바뀐 것?
아니면, Machine으로 명시되어 있던 대상이 Things로 추상화된 것?

IT세계에서 새로운 용어가 나온다면, 그것은 개념적으로 전혀 새로운 것보다 의미에 따른 말바꾸기가 더 많다는 냉소적인 누군가의 말이 떠오른다.

의미론적으로 IoT에 해당하는 이야기는 이미 한참 전에 나왔다고 본다.
다만, 기술적으로 성숙하기 위해서는 H/W (인프라 및 네트워크), S/W (각종 표준 프로토콜을 비롯한 SW 개발 기술)이 같이 준비되어야 하는데 그동안에는 기반 여건이 부족했기 때문에 이제와서 IoT라는 새로운 것 같은 용어로 재조명 받는 것이 아닐까.

M2M이든, Ubiquitous든, IoT든 이제부터 시작된다고 여겨지는데,
무엇에 Focus를 맞추고 어떻게 Workflow를 그려나갈 것인지에 따라 시장 진입의 속도가 결정될 것이다.

과연, 이 시대 IoT에서 가장 필요한 것은 무엇일까?
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/614

Redis Client Wrapper Java Class

Articles 2014/08/12 09:43 용비
import java.util.List;
import java.util.Set;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.exceptions.JedisConnectionException;
import redis.clients.jedis.exceptions.JedisException;

import com.github.jedis.lock.JedisLock;

public class RedisClient {
private static AgLogger logger = AgLogger.getLogger(RedisClient.class);
/**
* Added Date : 2014.05.20
*/
private Node node = null;
private JedisPool pool;
/**
* Added Date : 2014.05.20
*/
public RedisClient() {

this.node = new Node();
node.setIpAddr("localhost");
node.setPort(6379);
pool = new JedisPool(new JedisPoolConfig(), node.getIpAddr(), node.getPort());
}
/**
* Added Date : 2014.05.20
* ---------------------------
*
* @param node : Redis Master Node
*/
public RedisClient(Node node) {
this.node = node;
pool = new JedisPool(new JedisPoolConfig(), node.getIpAddr(), node.getPort());
}
/**
* Added Date : 2014.05.23
* ---------------------------
*
* @param host : Redis Master Node IP
* @param port : Redis Master Node Port
*/
public RedisClient(String host, int port) {
this.node = new Node();
node.setIpAddr(host);
node.setPort(port);
pool = new JedisPool(new JedisPoolConfig(), host, port);
}

/**
* Added Date : 2014.06.17
* ---------------------------
* Redis Ping command for health check.
*
* @return
*/
public String ping() throws JedisConnectionException, JedisException {
logger.info("Redis Ping Start.");
Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.ping();
}
        revert(jedis);
logger.info("Redis Ping End.");
return result;
}
/**
* Added Date : 2014.06.16
* ---------------------------
* Write changed configurations to local file.
* This is executed Lua script at redis server side.
*
* @return : Lua Script SHA1 value
*/
public String configRewrite() throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.scriptLoad("return redis.call('config', 'rewrite')");
}

        revert(jedis);
return result;
}
/**
* Added Date : 2014.06.16
* ---------------------------
* Check the configuration rewrite lua script execution result.
*  
* @param sha1 : Script SHA1 value
* @return : result message. if success, "OK" returned.
*/
public Object configRewriteResult(String sha1) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
Object result = null;

if (jedis != null) {
result = jedis.evalsha(sha1, 0);
}

        revert(jedis);
return result;
}
/**
* Added Date : 2014.06.16
* ---------------------------
* Change the replication setting.
* Set current slave to master.
*
* @return
*/
public String slaveOfNoOne() throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
String result = "";

if (jedis != null) {
result = jedis.slaveofNoOne();
}

        revert(jedis);
return result;
}
/**
* Added Date : 2014.06.16
* ---------------------------
* Change the replication setting.
* This is the same as SLAVEOF command.
*
* @param host : Master Node IP Address
* @param port : Master Node Port
* @return
*/
public String slaveOf(String host, int port) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.slaveof(host, port);
}
        revert(jedis);
return result;
}
/**
* Added Date : 2014.06.12
* ---------------------------
*
* @return : all key count
*/
public long dbSize() throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
long result = 0;
if (jedis != null) {
result = jedis.dbSize();
}

        revert(jedis);
return result;
}
/**
* Added Date : 2014.06.09
* ---------------------------
* Redis Configuration Setter
*
* @param parameter : config parameter
* @param value : config value
* @return
*/
public String configSet(String parameter, String value) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.configSet(parameter, value);
}

        revert(jedis);
       
return result;
}
/**
* Added Date : 2014.06.09
* ---------------------------
* Get all configuration
*
* @param pattern
* @return
*/
public List<String> configGet(String pattern) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
List<String> result = null;
if (StringUtils.isNullString(pattern)) {
if (jedis != null) {
result = jedis.configGet("*");
}
}
else {
if (jedis != null) {
result = jedis.configGet(pattern);
}
}
        revert(jedis);
return result;
}
/**
* Added Date : 2014.05.27
* ---------------------------
* Get all keys by pattern
*
* @param pattern
* @return
*/
public Set<String> keys(String pattern) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
Set<String> result = null;
if (jedis != null) {
result = jedis.keys(pattern);
}

        revert(jedis);
return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* auto increment by key
*
* @param key
* @return
*/
public long incr(String key) throws JedisConnectionException, JedisException, InterruptedException {
Jedis jedis = borrow();
long result = 0L;
    JedisLock lock = new JedisLock(jedis,  "incr_lock:" + key, 100, 100);
 
  lock.acquire();
if (jedis != null) {
  result = jedis.incr(key);
}
if (lock != null) {
            lock.release();
}
        revert(jedis);
return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* auto decrement by key
*
* @param key
* @return
*/
public long decr(String key) throws JedisConnectionException, JedisException, InterruptedException {
Jedis jedis = borrow();
long result = 0L;
    JedisLock lock = new JedisLock(jedis, "decr_lock:" + key, 100, 100);
  lock.acquire();
if (jedis != null) {
  result = jedis.decr(key);
}
 
if (lock != null) {
            lock.release();
}

revert(jedis);
return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* delete info by key
*
* @param key
* @return
*/
public long del(String key) throws JedisConnectionException, JedisException, InterruptedException {
        Jedis jedis = borrow();
long result = 0L;
    JedisLock lock = new JedisLock(jedis, "del_lock:" + key, 100, 100);

  lock.acquire();
if (jedis != null) {
  result = jedis.del(key);
}
   
if (lock != null) {
lock.release();
}
        revert(jedis);
   
    return result;
   
}
/**
* Added Date : 2014.05.20
* ---------------------------
* get info by key
*
* @param key
* @return
*/
public String get(String key) throws JedisConnectionException, JedisException {
Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.get(key);
}
        revert(jedis);
return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* set info by key (insert, update)
*
* @param key
* @param value
* @return
*/
public String set(String key, String value) throws JedisConnectionException, JedisException, InterruptedException {
        Jedis jedis = borrow();
String result = "";
    JedisLock lock = new JedisLock(jedis, "set_lock:" + key, 100, 100);
       
  lock.acquire();
   
if (jedis != null) {
result = jedis.set(key, value);
}
   
    if (lock != null) {
    lock.release();
    }
   
        revert(jedis);
       
        return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* remove all data in db.
* If use this method, critical.
* Be careful.
*
* @return
*/
public String clear() throws JedisConnectionException, JedisException {
        Jedis jedis = borrow();
String result = "";
if (jedis != null) {
result = jedis.flushDB();
}
        revert(jedis);
       
        return result;
}
/**
* Added Date : 2014.05.20
* ---------------------------
* Check the key exists or not.
*
* @param key
* @return
*/
    public boolean exists(String key) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
boolean result = false;

if (jedis != null) {
result = jedis.exists(key);
}
        revert(jedis);
       
        return result;
    }

    /**
  * Added Date : 2014.05.20
* ---------------------------
     * get all redis server info for monitoring
     *
     * @return
     */
    public String info() throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        String result = "";

if (jedis != null) {
result = jedis.info();
}
       
        revert(jedis);
       
        return result;
    }
   
    /**
  * Added Date : 2014.05.20
* ---------------------------
     * get redis server info for monitoring of given section
     *
     * @param section
     * @return
     */
    public String info(String section) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        String result = "";

if (jedis != null) {
result = jedis.info(section);
}
       
        revert(jedis);

        return result;
    }
   
    /**
  * Added Date : 2014.06.09
* ---------------------------
     * migration all keys in given slot to target redis server.
     *
     * @param host
     * @param port
     * @param slot
     * @return
     */
    public String migrateKeysInSlot(String host, int port, int slot) throws JedisConnectionException, JedisException {

    String result = "";

    Set<String> keysInSlot = keys("*");
    int curSlot = 0;
    HashSlot hashSlot = new HashSlot();
   
    for (String s : keysInSlot) {
   
    //Calculate slot of key
    curSlot = hashSlot.slotCalculate(s);
   
    if (curSlot == slot) {
    result = migrate(host, port, s);
    }
    }
       
    return result;
   
    }
   
    /**
  * Added Date : 2014.06.09
* ---------------------------
     * migrate given key to target redis server
     *
     * @param host
     * @param port
     * @param key
     * @return
     */
    public String migrate(String host, int port, String key) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        String result = "";
       
if (jedis != null) {
result = jedis.migrate(host, port, key, 0, 100000);
}
   
        revert(jedis);

        return result;
    }
   
    /**
  * Modified Date : 2014.06.12
* ---------------------------
  * Added Date : 2014.06.09
* ---------------------------
     * migration all keys in given slot to target redis server.
     * redis cluster is working, dev mode.
     *
     * @param host
     * @param port
     * @param slot
     * @return
     */
    @Deprecated
    public String migrate(String host, int port, int slot) throws JedisConnectionException, JedisException {
   
    String result = "";

    Jedis jedis = borrow();
    List<String> keys = jedis.clusterGetKeysInSlot(slot, 1000);
   
    for (String key : keys) {
      result = migrate(host, port, key);
    }
   
        revert(jedis);
       
        return result;
       
    }
   
    @Deprecated
    public byte[] bGetJ(String key) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        byte[] value = null;
       
        if (jedis != null) {
        value = jedis.get(key.getBytes());
        }
       
        revert(jedis);
       
        if (value != null) {
        return value;
        } else {
            return null;
        }
       
    }
 
    @Deprecated
    public String bSetJ(String key, byte[] value) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        String result = "";
 
    if (jedis != null) {
    result = jedis.set(key.getBytes(), value);
    }
       
        revert(jedis);
   
        return result;
    }
 
    @Deprecated
   public List<String> mget(String[] keys) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        List<String> result = null;
               
    if (jedis != null) {
    result = jedis.mget(keys);
    }

        revert(jedis);

        return result;
       
    }
 
    @Deprecated
   public Set<String> sCopy(String key, String new_key) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        Set<String> oldSets = null;

    if (jedis != null) {
            oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.sadd(new_key, str);
            }
    }
       
        revert(jedis);

        return oldSets;
       
    }
 
    @Deprecated
    public void sClear(String key, String oldKey) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();

    if (jedis != null) {
            Set<String> oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.del(oldKey + ":" + str);
            }
            jedis.del(key);
    }

        revert(jedis);
       
    }
 
    @Deprecated
    public Set<String> sMove(String key, String new_key) throws JedisConnectionException, JedisException {
   
        Jedis jedis = borrow();
        Set<String> oldSets = null;
       
    if (jedis != null) {
            oldSets = jedis.smembers(key);
            for (String str : oldSets) {
                jedis.smove(key, new_key, str);
            }
    }

        revert(jedis);

        return oldSets;
    }
   
    /**
     *
     */
    @SuppressWarnings("unused")
private void destory() throws JedisException {
        pool.destroy();
    }
 
/**
*
* @return
*/
private Jedis borrow() throws JedisConnectionException {
        return pool.getResource();
    }
 
    /**
     *
     * @param jedis
     */
    private void revert(Jedis jedis) throws JedisException {
        pool.returnResource(jedis);
    }
   
   
}

받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/613

Linux TCP Connection Setting

Articles 2014/08/08 17:23 용비
Linux에서 TCP기반 (HTTP 포함) 서버를 개발할 때, 성능을 위해서 튜닝을 해야하는 항목들이 있다.

Root 계정으로 로그인 한 후, 다음 항목들을 변경하면 HTTP Request의 성능이 향상된다.

1. tcp_tw_reuse 설정
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse


2. tcp_fin_timeout 설정
echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout


3. tcp_orphan_retries 설정
echo 7 > /proc/sys/net/ipv4/tcp_orphan_retries


4. tcp_rfc1337 설정
echo 1 > /proc/sys/net/ipv4/tcp_rfc1337


Port Forwarding을 설정했을 경우에는 다음 항목을 추가로 설정한다.
echo 1000000 > /proc/sys/net/netfilter/nf_conntrack_max
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_close
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_close_wait
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_fin_wait
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_last_ack
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_syn_recv
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_syn_sent
echo 10 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_time_wait


받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/612