모바일 서비스를 하기 위해서는 서버 또는 외부에서 정해진 스케쥴에 의해 푸시를 발송하는 경우가 빈번합니다. 요즘은 클라우드 서비스를 비롯하여 Facebook 에서도 약간의 비용을 받고 푸시 발송 솔루션을 제공하는데요.. 굳이 외부 솔루션을 사용하지 않고 직접 Push 서비스를 구축할 수 있는 오픈 라이브러리를 소개합니다. 간단한 사용으로 푸시의 모든 기능을 손쉽게 구축할 수 있는 매력적인 솔루션입니다.



1. APNS 발송 처리 부분
// Configuration (NOTE: .pfx can also be used here)
var config = new ApnsConfiguration (ApnsConfiguration.ApnsServerEnvironment.Sandbox, 
    "push-cert.p12", "push-cert-pwd");

// Create a new broker
var apnsBroker = new ApnsServiceBroker (config);

// Wire up events
apnsBroker.OnNotificationFailed += (notification, aggregateEx) => {

    aggregateEx.Handle (ex => {

        // See what kind of exception it was to further diagnose
        if (ex is ApnsNotificationException) {
            var notificationException = (ApnsNotificationException)ex;

            // Deal with the failed notification
            var apnsNotification = notificationException.Notification;
            var statusCode = notificationException.ErrorStatusCode;

            Console.WriteLine ($"Apple Notification Failed: ID={apnsNotification.Identifier}, Code={statusCode}");

        } else {
            // Inner exception might hold more useful information like an ApnsConnectionException           
            Console.WriteLine ($"Apple Notification Failed for some unknown reason : {ex.InnerException}");
        }

        // Mark it as handled
        return true;
    });
};

apnsBroker.OnNotificationSucceeded += (notification) => {
    Console.WriteLine ("Apple Notification Sent!");
};

// Start the broker
apnsBroker.Start ();

foreach (var deviceToken in MY_DEVICE_TOKENS) {
    // Queue a notification to send
    apnsBroker.QueueNotification (new ApnsNotification {
        DeviceToken = deviceToken,
        Payload = JObject.Parse ("{\"aps\":{\"badge\":7}}")
    });
}

// Stop the broker, wait for it to finish   
// This isn't done after every message, but after you're
// done with the broker
apnsBroker.Stop ();



APNS 발송 처리시 더 이상 유효하지 않은 단말의 토큰을 Feedback 서비스를 통해 삭제하는 작업을 별도로 진행해 줘야만 합니다.

2. APNS Feedback 처리
var config = new ApnsConfiguration (
    ApnsConfiguration.ApnsServerEnvironment.Sandbox, 
    Settings.Instance.ApnsCertificateFile, 
    Settings.Instance.ApnsCertificatePassword);

var fbs = new FeedbackService (config);
fbs.FeedbackReceived += (string deviceToken, DateTime timestamp) => {
    // Remove the deviceToken from your database
    // timestamp is the time the token was reported as expired
};
fbs.Check ();



GCM 의 경우 발송 처리시에 유효하지 않은 단말이라는 결과를 전달 해 줌으로 한 번의 작업으로 깔끔하게 마무리 할 수 있습니다.

3. GCM Push 처리

// Configuration
var config = new GcmConfiguration ("GCM-SENDER-ID", "AUTH-TOKEN", null);

// Create a new broker
var gcmBroker = new GcmServiceBroker (config);

// Wire up events
gcmBroker.OnNotificationFailed += (notification, aggregateEx) => {

    aggregateEx.Handle (ex => {

        // See what kind of exception it was to further diagnose
        if (ex is GcmNotificationException) {
            var notificationException = (GcmNotificationException)ex;

            // Deal with the failed notification
            var gcmNotification = notificationException.Notification;
            var description = notificationException.Description;

            Console.WriteLine ($"GCM Notification Failed: ID={gcmNotification.MessageId}, Desc={description}");
        } else if (ex is GcmMulticastResultException) {
            var multicastException = (GcmMulticastResultException)ex;

            foreach (var succeededNotification in multicastException.Succeeded) {
                Console.WriteLine ($"GCM Notification Failed: ID={succeededNotification.MessageId}");
            }

            foreach (var failedKvp in multicastException.Failed) {
                var n = failedKvp.Key;
                var e = failedKvp.Value;

                Console.WriteLine ($"GCM Notification Failed: ID={n.MessageId}, Desc={e.Description}");
            }

        } else if (ex is DeviceSubscriptionExpiredException) {
            var expiredException = (DeviceSubscriptionExpiredException)ex;

            var oldId = expiredException.OldSubscriptionId;
            var newId = expiredException.NewSubscriptionId;

            Console.WriteLine ($"Device RegistrationId Expired: {oldId}");

            if (!string.IsNullOrWhitespace (newId)) {
                // If this value isn't null, our subscription changed and we should update our database
                Console.WriteLine ($"Device RegistrationId Changed To: {newId}");
            }
        } else if (ex is RetryAfterException) {
            var retryException = (RetryAfterException)ex;
            // If you get rate limited, you should stop sending messages until after the RetryAfterUtc date
            Console.WriteLine ($"GCM Rate Limited, don't send more until after {retryException.RetryAfterUtc}");
        } else {
            Console.WriteLine ("GCM Notification Failed for some unknown reason");
        }

        // Mark it as handled
        return true;
    });
};

gcmBroker.OnNotificationSucceeded += (notification) => {
    Console.WriteLine ("GCM Notification Sent!");
};

// Start the broker
gcmBroker.Start ();

foreach (var regId in MY_REGISTRATION_IDS) {
    // Queue a notification to send
    gcmBroker.QueueNotification (new GcmNotification {
        RegistrationIds = new List { 
            regId
        },
        Data = JObject.Parse ("{ \"somekey\" : \"somevalue\" }")
    });
}

// Stop the broker, wait for it to finish   
// This isn't done after every message, but after you're
// done with the broker
gcmBroker.Stop ();
공식 다운로드는 이 곳에서 하시면 됩니다. https://github.com/Redth/PushSharp

'IT 이야기 > Code' 카테고리의 다른 글

고성능 .NET코드 프로그래밍 <책소개>  (0) 2016.11.08
Open source vs Commercial software - 1부  (0) 2015.05.27

 


많은 기대도 하지 않았지만 예상보다 훨씬 더 수준 낮은 영화였음.

전체 스토리는 무난한 편이었으나 불필요하게 잔인한 장면들로 인해 인상을 찌푸리고 부실한 편집으로 인해 짜증 유발하는 영화였음.


차라리 '그것이 알고싶다' 세월호 편을 보는게 더 나은 선택이었을것을..


'사람 사는 이야기 > 영화이야기' 카테고리의 다른 글

심야식당  (0) 2016.04.25
나의 그리스식 웨딩2  (0) 2016.04.06
매드맥스4  (0) 2015.06.01

나의 그리스식 웨딩 2 포스터


원제는 My Big Fat Greek Wedding 2



1편은 보지 못했고 영화평을 보고 나쁘지 않을것 같아 선택한 영화.

미국 이민에 성공한 그리스 출신의 3대 가족들의 모습속에서 어쩌면 우리의 정서와 유사함을 발견할 수 있었던 영화.


나는 재미있고 감동적으로 봤다


http://m.movie.daum.net/moviedb/main?movieId=94254


'사람 사는 이야기 > 영화이야기' 카테고리의 다른 글

심야식당  (0) 2016.04.25
날 보러와요  (0) 2016.04.25
매드맥스4  (0) 2015.06.01


택배 위치 확인하는 Web 화면들의 목록 입니다.


아래 내용 중 일부는 아래 블로그에서 발췌

http://blog.naver.com/smartbiker/220261822007





[국내 업체]

 

  1. 우체국택배 http://service.epost.go.kr/trace.RetrieveRegiPrclDeliv.postal?sid1=송장번호
  2. CJ대한통운택배 https://www.doortodoor.co.kr/parcel/doortodoor.do?fsp_action=PARC_ACT_002&fsp_cmd=retrieveInvNoACT&invc_no=송장번호
  3. CJ 대한 통운 상세보기 - http://nplus.doortodoor.co.kr/web/info.jsp?slipno={택배번호}
  4. 현대택배 http://www.hlc.co.kr/hydex/jsp/tracking/trackingViewCus.jsp?InvNo=송장번호
  5. 한진택배 http://www.hanjin.co.kr/Delivery_html/inquiry/result_waybill.jsp?wbl_num=송장번호
  6. 로젠택배 http://d2d.ilogen.com/d2d/delivery/invoice_tracesearch_quick.jsp?slipno=송장번호
  7. 경동택배 http://kdexp.com/sub3_shipping.asp?stype=1&yy=&mm=&p_item=송장번호
  8. 대신택배 http://home.daesinlogistics.co.kr/daesin/jsp/d_freight_chase/d_general_process2.jsp?billno1=송장번호
  9. 이노지스택배 http://www.innogis.net/trace02.asp?invoice=송장번호
  10. 편의점택배 http://www.doortodoor.co.kr/jsp/cmn/TrackingCVS.jsp?pTdNo=송장번
  11. KGB 택배 http://www.kgbls.co.kr//sub5/trace.asp?f_slipno=송장번호
  12. 합동택배 http://www.hdexp.co.kr/parcel/order_result_t.asp?stype=1&p_item=송장번호
  13. 일양로지스 http://www.ilyanglogis.com/functionality/card_form_waybill.asp?hawb_no=송장번호
  14. 천일 택배 http://www.cyber1001.co.kr/kor/taekbae/HTrace.jsp?transNo=송장번호
  15. 용마로지스 http://yeis.yongmalogis.co.kr/trace/etrace_yongma.asp?OrdCode=송장번호
  16. GTX로지스 http://www.gtxlogis.co.kr/tracking/default.asp?awblno=송장번호
  17. 고려 택배 http://www.klogis.kr/03_business/01_tracking_detail_bcno.asp?bcno=송장번호
  18. 다젠 http://www.dazen.co.kr/admin/search/trace_view.asp?buy_no=송장번호
  19. 퀵퀵닷컴 http://www.quickquick.com/q/MTrack.php?hawb=송장번호
  20. KG로지스 http://www.kglogis.co.kr/delivery/delivery_result.jsp?item_no=송장번호 

 

'IT 이야기' 카테고리의 다른 글

IP 정보로 활용 가능한 서비스 범위  (0) 2016.11.08
베뉴 8 Pro Windows 10 업그레이드  (0) 2016.06.29
Windows용 Mantis 설치  (0) 2015.05.29
VI Editor 단축키  (0) 2015.05.27
Eclips 단축키 모음  (0) 2015.05.27


한 참전의 여행이었지만 미뤄뒀던 기록을 남기기 위해 많이 늦은 블로깅을 시작합니다.

에코랜드 테마파크


이 곳은 우리나라 대표 청정 지역 중 하나인 제주도에 자연을 테마로 조성한 테마파크입니다.

약 30만평의 부지위에 잘 조성해 놓은 자연환경[곶자왈 원시림]을 약 4.5 Km 에 달하는 기차로 관람 및 체험하는 곳입니다. 제주에서 수 많은 테마파크를 가 보았지만.. 이곳만큼은 언젠가 기회가 되면 다시 한번 가봐도 좋겠다 라는 생각이 들 정도로 몸과 마음에 위로가 되는 장소였습니다.


숲의 탐방은 이러한 기차를 타고 이동하게 됩니다. 중간중간 포인트마다 기차가 정차를 하고 원하는 시간 만큼 둘러본 후 다시 기차를 타고 이동할 수 있습니다. 기차는 순환선이기에 언제 타도 무방합니다. 즉, 마음에 드는곳이 있으시면 편히 쉬다 가도 좋은 여유가 있는 그런 곳입니다.

이렇게 중간 역에 정차하면 매 역마다 경치 좋은 곳이 나타나게 됩니다.


중간 중간 사진찍기 좋은 장소도 제공하고 있고 남녀 노소 큰 불편함 없이 편하게 관람 및 체험하실 수 있습니다.


좀 쌩뚱 맞아보이긴 하지만 외국의 풍차 같은 건물도 있구요..

충분히 관람 후 기차가 도착하면 승차하시면 됩니다. 그럼 다시 다음 역으로 이동 ~ !


아마 에코 숲에 대한 설명을 해 주는 장소인것 같은데.. 시간이 안 맞아서 인지 프로그램이 없었습니다. 이 주변에는 제주를 상징하는 다양한 조형물도 많이 있습니다.


여기서부터는 기차로 이동하지 않고 숲속을 체험하는 도보 코스입니다.

산책하는 마음으로 가볍게 이동하다보면 원시림 같은 잘 보존된 자연을 충분히 만끽하실 수 있을 것 같아요. 딸아이가 5살이었는데도 씩씩하게 잘 걸어다닐 정도입니다.





마지막으로 원시림을 지나면 탐방이 끝났던걸로 기억됩니다. 물론 기차를 타고 바로 이동도 가능했던것으로 기억되는데.. 가급적 도보 산책을 추천합니다.

제주에서 가본 많은 관광지중에 추천 할 만한 소중한 장소입니다.


여행후 한참을 지나 기록하다보니 저도 기억이 가물가물하네요.


자세한 설명은 이곳을 참조 해 보세요~.

http://theme.ecolandjeju.co.kr/content/content.php?cont=ecoview1


'사람 사는 이야기 > 여행이야기' 카테고리의 다른 글

2015년-제주 가족(힐링)여행 #1  (0) 2015.09.02
상해  (0) 2015.05.29
세부  (0) 2015.05.29
팔라완 2004년  (0) 2015.05.29
도쿄, 타카오산 (高尾山)  (0) 2015.05.29

+ Recent posts