์‚ฌ์ง„ ๊ณต์œ  ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ธ๊ณต์ง€๋Šฅ ๋”ํ•˜๊ธฐ  

์Šค๋งˆํŠธํ•œ ์‚ฌ์ง„ ๊ณต์œ  ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋นŒ๋“œํ•˜๊ธฐ

Last updated

BluePic์€ ์‚ฌ์ง„์„ ์ฐ์–ด์„œ ๋‹ค๋ฅธ BluePic ์‚ฌ์šฉ์ž์™€ ์‚ฌ์ง„์„ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ๋Š” ์‚ฌ์ง„ ๋ฐ ์ด๋ฏธ์ง€ ๊ณต์œ  ์ƒ˜ํ”Œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ž…๋‹ˆ๋‹ค. ์ด ์ƒ˜ํ”Œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๋ชจ๋ฐ”์ผ iOS ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ Swift๋กœ ์ž‘์„ฑ๋œ Kitura๊ธฐ๋ฐ˜ ์„œ๋ฒ„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ํ™œ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

‘์ฝ”๋“œ ๋ณด๊ธฐ’ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด GitHub์—์„œ ํ•œ๊ธ€ README ํŒŒ์ผ์„ ์„ ํƒํ•˜์—ฌ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

By the Swift Platform Team

Overview

BluePic์€ Swift ์–ธ์–ด ๊ธฐ๋ฐ˜์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์œผ๋กœ, iOS ํด๋ผ์ด์–ธํŠธ ๊ฐœ๋ฐœ ๋ฟ ์•„๋‹ˆ๋ผ, ์„œ๋ฒ„ ์‚ฌ์ด๋“œ์—์„œ๋„ Kitura๋ผ๋Š”Swift ๊ธฐ๋ฐ˜ ์›น ํ”„๋ ˆ์ž„์›Œํฌ ๋ฐ HTTP ์„œ๋ฒ„๋ฅผ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค. Bluepic์˜ ํฅ๋ฏธ๋กœ์šด ๊ธฐ๋Šฅ์€ ์„œ๋ฒ„์—์„œ ์‚ฌ์ง„์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค. ์ด๋ฏธ์ง€๊ฐ€ ํฌ์ŠคํŒ…๋˜๋ฉด ๊ธฐ๋ก์ด Cloudant์— ์ €์žฅ๋˜๊ณ , ์ด๋ฏธ์ง€ ๋ฐ”์ด๋„ˆ๋ฆฌ๋Š” Object Storage์— ์ €์žฅ๋ฉ๋‹ˆ๋‹ค. ๊ฑฐ๊ธฐ์—์„œ OpenWhisk ์‹œํ€€์Šค๊ฐ€ ํ˜ธ์ถœ๋˜์–ด ์ด๋ฏธ์ง€๊ฐ€ ์—…๋กœ๋“œ ๋œ ํ•ด๋‹น ์œ„์น˜์˜ ์˜จ๋„์™€ ํ˜„์žฌ ๋‚ ์”จ ์ƒํƒœ (์˜ˆ: ๋ง‘์Œ, ํ๋ฆผ ๋“ฑ)๊ณผ ๊ฐ™์€ ๊ธฐ์ƒ ์ •๋ณด๊ฐ€ ๊ณ„์‚ฐ๋ฉ๋‹ˆ๋‹ค. Watson Visual Recognition์€ OpenWhisk ์‹œํ€€์Šค์—์„œ, ์ด๋ฏธ์ง€๋ฅผ ๋ถ„์„ํ•˜๊ณ  ์ด๋ฏธ์ง€๋กœ ๋ถ€ํ„ฐ ํ…์ŠคํŠธ ํƒœ๊ทธ๋ฅผ ์ถ”์ถœํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ๋งˆ์ง€๋ง‰์œผ๋กœ ํ‘ธ์‹œ ์•Œ๋ฆผ์ด ์‚ฌ์šฉ์ž์—๊ฒŒ ์ „์†ก๋˜์–ด ์ด๋ฏธ์ง€๊ฐ€ ์ฒ˜๋ฆฌ๋˜์—ˆ์œผ๋ฉฐ ๋‚ ์”จ์™€ ํ…์ŠคํŠธ ํƒœ๊ทธ ๋ฐ์ดํ„ฐ๊ฐ€ ํฌํ•จ๋˜์—ˆ์Œ์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.

Flow

  1. iOS ๋””๋ฐ”์ด์Šค๋‚˜ ์›น๋ธŒ๋ผ์šฐ์ €์˜ ํด๋ผ์ด์–ธํŠธ๊ฐ€ Kitura Mobile Backend์— ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค.
  2. ํด๋ผ์ด์–ธํŠธ๋Š” ๊ฒฝ์šฐ์— ๋”ฐ๋ผ ์ธ์ฆ์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ๋Š” iOS ๋””๋ฐ”์ด์Šค์—์„œ Bluemix์˜ AppID ์„œ๋น„์Šค๋ฅผ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค.
  3. ํด๋ผ์ด์–ธํŠธ๋Š” (iOS ํด๋ผ์ด์–ธํŠธ์—์„œ) ์‚ฌ์ง„์„ ์ฐ๊ณ  (iOS ํ˜น์€ ์›น๋ธŒ๋ผ์šฐ์ € ๊ธฐ๋ฐ˜ ํด๋ผ์ด์–ธํŠธ์—์„œ) ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  4. Kitura Mobile Backend๊ฐ€ Cloudant NoSQL DB์—์„œ ์—”ํŠธ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  5. Kitura Mobile Backend๊ฐ€ Bluemix Cloud Object Storage์— ํ•ด๋‹น ํŒŒ์ผ์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.
  6. Kitura๊ฐ€ Cloudant DB์™€ Object Storage์— ๊ธฐ๋กํ•˜๋ฉด OpenWhisk ์•ก์…˜์ด ํŠธ๋ฆฌ๊ฑฐ๋ฉ๋‹ˆ๋‹ค. ํŠธ๋ฆฌ๊ฑฐ๋˜๋Š” ์•ก์…˜์€ ์ด๋ฏธ์ง€ ๋ถ„์„์„ ์œ„ํ•œWatson Visual Recognition ์„œ๋น„์Šค๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
  7. ๋™์‹œ์— OpenWhisk๋Š” Bluemix Weather Company Data์„œ๋น„์Šค๋กœ๋ถ€ํ„ฐ ์ด๋ฏธ์ง€๊ฐ€ ์ฐํžŒ ์œ„์น˜์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
  8. OpenWhisk๋Š” Watson Visual Recognition๊ณผ Weather Company Data ์„œ๋น„์Šค์—์„œ ๋ฆฌํ„ด๋œ ๋ฐ์ดํ„ฐ๋กœ Cloudant NoSQL DB ์—”ํŠธ๋ฆฌ๋ฅผ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.
  9. ๋งˆ์ง€๋ง‰์œผ๋กœ OpenWhisk๊ฐ€ iOS ํด๋ผ์ด์–ธํŠธ์— Bluemix Push Notification ์ด๋ฒคํŠธ๋ฅผ ํŠธ๋ฆฌ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

Components

IBM Cloud Functions

ํ™•์žฅ์„ฑ์ด ๋›ฐ์–ด๋‚œ ์„œ๋ฒ„๋ฆฌ์Šค ํ™˜๊ฒฝ์ด๋ฉฐ, ์˜จ๋””๋งจ๋“œ ๋ฐฉ์‹์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. (FaaS - Function as a service๋กœ๋„ ๋ถˆ๋ฆผ)

Watson Visual Recognition

Visual Recognition์€ ์ด๋ฏธ์ง€์˜ ์ฝ˜ํ…์ธ ๋ฅผ ์ดํ•ดํ•ฉ๋‹ˆ๋‹ค โ€“ ์ด๋ฏธ์ง€๋กœ๋ถ€ํ„ฐ ํƒœ๊ทธ ์ถ”์ถœ, ์–ผ๊ตด ๊ฒ€์ถœ (Face detection), ๋‚˜์ด์™€ ์„ฑ๋ณ„์„ ์ถ”์ •ํ•˜๋ฉฐ ์ด๋ฏธ์ง€ ์ปฌ๋ ‰์…˜์—์„œ ์ฃผ์–ด์ง„ ์ด๋ฏธ์ง€ ๋Œ€๋น„ ์œ ์‚ฌ ์ด๋ฏธ์ง€๋ฅผ ์ฐพ์•„๋ƒ…๋‹ˆ๋‹ค.

Weather Company Data

Weather Company Data for IBM Bluemix ์„œ๋น„์Šค๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๊ธฐ์ƒ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ๋ถ„์˜ Bluemix ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค.

Cloudant NoSQL DB

Cloudant NoSQL DB๋Š” ์œ ์—ฐํ•œ JSON ์Šคํ‚ค๋งˆ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ตœ์‹  ์›น, ๋ชจ๋ฐ”์ผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์œ„ํ•œ ํด๋ผ์šฐ๋“œ ๊ธฐ๋ฐ˜์œผ๋กœ ์ œ๊ณต๋˜๋Š” DBaaS ์†”๋ฃจ์…˜์ž…๋‹ˆ๋‹ค.

Push Notifications

๋Œ€ํ™”ํ˜• ์•Œ๋ฆผ์„ ํฌํ•จํ•ด ์—ฐ๊ด€ ์ฝ˜ํ…์ธ ๋ฅผ ์ „์†กํ•ด Android์™€ iOS ๋ชจ๋ฐ”์ผ ์‚ฌ์šฉ์ž์˜ ์ฐธ์—ฌ๋ฅผ ์œ ๋„ํ•ฉ๋‹ˆ๋‹ค.

AppID

๋ชจ๋ฐ”์ผ๊ณผ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ธ์ฆ์„ ์ถ”๊ฐ€ํ•˜๊ณ  ๋ฐฑ์—”๋“œ ์‹œ์Šคํ…œ์„ ๋ณดํ˜ธํ•˜๊ธฐ ์œ„ํ•ด IBM Bluemix App ID ์„œ๋น„์Šค๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

Technologies

์• ๋„๋ฆฌํ‹ฑ์Šค

์ •๋ณด๋ฅผ ๋„์ถœํ•˜๊ธฐ ์œ„ํ•ด ๋ฐ์ดํ„ฐ์—์„œ ํŒจํ„ด์„ ์ฐพ์Šต๋‹ˆ๋‹ค.

์‚ฌ๋ฌผ ์ธํ„ฐ๋„ท (IoT)

๋งŽ์€ ์ˆ˜์˜ ์žฅ์น˜ ๊ฐ„์˜ ํ†ต์‹ ์„ ํ†ตํ•œ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘๊ณผ ๊ตํ™˜

Mobile

๋ชจ๋ฐ”์ผ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ํŠน๋ณ„ํžˆ ๋””์ž์ธ๋œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ฐœ๋ฐœํ•˜๊ณ  ์ฐธ์—ฌ๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๋Š” ํ™˜๊ฒฝ

Serverless Computing

์ด๋ฒคํŠธ์— ๋Œ€์‘ํ•ด ์ฝ”๋“œ๋ฅผ ์‹คํ–‰ํ•˜๋„๋ก ํ•˜๋Š” ์ด๋ฒคํŠธ-์•ก์…˜ ํ”Œ๋žซํผ(FaaS, Function as a service๋กœ๋„ ๋ถˆ๋ฆผ)์ž…๋‹ˆ๋‹ค.

Swift on the Server

๊ฐ•๋ ฅํ•˜๊ณ  ๋น ๋ฅด๋ฉฐ ์•ˆ์ „ํ•œ ํด๋ผ์šฐ๋“œ์šฉ ์„œ๋ฒ„์ธก Swift ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ตฌ์ถ•ํ•ฉ๋‹ˆ๋‹ค.

Related Blogs

๊ท€ํ•˜๊ฐ€ ์ž…๋ ฅํ•œ ์‡ผํŠธ์ฝ”๋“œ ๊ฒ€์ƒ‰์กฐ๊ฑด์— ๋งค์น˜๋˜๋Š” ํฌ์ŠคํŒ…์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Related Links

Transition to Server-Side Swift with BluePic

In order to demonstrate the possibilities a developer has using open source Swift, IBM built the open sourced demo application known as BluePic. This article will provide you with an overview of the technologies BluePic uses and how it leverages server-side Swift. BluePic is a photo sharing application for viewing, posting, and searching for images posted by others. This application takes advantage of Swift in a typical iOS client setting, but also on the server-side using the new Swift web framework and HTTP Server, Kitura.