Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

10年運用している 画像サービスでのJavaの活用と 今後の展望

Naoki Morioka
November 24, 2016

10年運用している 画像サービスでのJavaの活用と 今後の展望

Naoki Morioka

November 24, 2016
Tweet

More Decks by Naoki Morioka

Other Decks in Technology

Transcript

  1. ձһ਺ ສਓ ϖʔδϏϡʔ ສ17.POUI ։ൃऀ ໊νʔϜ ϐΫτϦϯΫαʔϏεॳظ   

     τϐοΫ ΦϨΦϨϑϨʔϜϫʔΫ ։ൃ؀ڥ͸ςΩετΤσΟλʴKBWBDίϚϯυ
  2. 8FC ϓϦᝑମ ϑΟʔνϟʔϑΥϯ αʔϏεॳظߏ੒ ը૾ొ࿥ ϑΝΠϧ %# 8FCΞϓϦέʔγϣϯ +4& 5PNDBU

    αʔό୆ %# 0SBDMFJ αʔό୆ ϑΝΠϧαʔό -JOVYαʔό αʔό୆ )551)5.- ը૾Ξοϓϩʔυ
  3. ձһ਺ ສਓ ϖʔδϏϡʔ ສ17.POUI ։ൃऀ ໊νʔϜ ϐΫτϦϯΫαʔϏε੒௕ظ   

     τϐοΫ 4FBTBSͷར༻։࢝ ձһ਺ɾΞΫηε਺͕૿͑ͯෛՙରࡦ
  4. 8FC ϓϦᝑମ ϑΟʔνϟʔϑΥϯ ը૾ొ࿥ ϑΝΠϧ %# )551)5.- ը૾Ξοϓϩʔυ 8FCΞϓϦέʔγϣϯαʔό +4&

    5PNDBU 4FBTBS αʔό୆ σʔλϕʔεαʔό 0SBDMFJ ΫϥελϦϯά αʔό୆ ϑΝΠϧαʔό /FU"QQ'"4 αʔό୆ αʔϏε੒௕ظߏ੒
  5. import java.awt.Toolkit;
 import java.awt.image.AreaAveragingScaleFilter;
 import java.awt.image.BufferedImage;
 import java.awt.image.FilteredImageSource;
 import java.awt.image.ImageFilter;


    
 BufferedImage tempImage = ..
 ImageFilter filter = new AreaAveragingScaleFilter(scaleSize.getWidth(),
 scaleSize.getHeight());
 FilteredImageSource fis = new FilteredImageSource(tempImage.getSource(),
 filter);
 
 Image filteredImage = Toolkit.getDefaultToolkit().createImage(fis);
 ໘ੵฏۉ๏αϯϓϧ
  6. ձһ਺ ສਓ ϖʔδϏϡʔ ສ17.POUI ։ൃऀ ໊νʔϜ ϐΫτϦϯΫαʔϏεགྷΓ৔ظ   

     τϐοΫ ձһ਺ͷ৳ͼ͕಄ଧͪ πΪϋΪͰ࡞͖ͬͯͨαʔϏεͷݶքײ ͔͚ۚͳ͍ํ๏ͷ໛ࡧΛ͍ͨ͠
  7. ຊ౰ʹ΍Δͷʁ w 4DBMB$POT ೥౰࣌  8FCϑϨʔϜϫʔΫͷܾఆଧ͕ແ͍ 1MBZܥ-JGU  ίϯύΠϧʹ͕͔͔࣌ؒΓ*%&ͷରԠ΋ශऑͰ͋ͬͨ طଘ։ൃऀͷֶशίετ

    w 4FBTBSίʔυɾϥΠϒϥϦΛྲྀ༻͠ͳ͍ͱ޻਺͕͔͔Δ w ৽نࣄۀͷབྷΈͰਓࡐΛকདྷతʹ֬อग़དྷͳ͍Մೳੑ
  8. ϦχϡʔΞϧߏ੒ ϑΝΠϧ ըొ࿥%# ΦϒδΣΫτετϨʔδ %# %# 8FCΞϓϦέʔγϣϯ +BWB4& 5PNDBU 4FBTBS

    αʔό̒୆ ը૾ొ࿥%# %# 0SBDMFH αʔό୆ %# .Z42- 4QJEFS αʔό୆ ΦϒδΣΫτετϨʔδ .PHJMF'4 αʔό୆ ϓϦᝑମ ϑΟʔνϟʔϑΥϯ ը૾ొ࿥ 8&# )551)5.- ը૾Ξοϓϩʔυ
  9. w ར༻։ൃݴޠͷߜΓࠐΈ εΫϦϓτهड़ 1FSM3VCZˠ(SPPWZ  ӡ༻πʔϧ 4DBMB3P3ˠ+BWB  +BWB4DSJQU͕৽ͨʹඞਢʹͳΔͷͰઐ೦͢Δ w

    ίΞͳΞʔΩςΫνϟ͸ͱΓ͋͑ͣखΛ͚ͭͳ͍ɻ4FBTBS ߋ৽͞Εͳͯ͘ؾʹ͸ͳΔ͚ͲઌૹΓ w ͨͩ͠ݴޠ࣮ߦ؀ڥͷ࠷৽Խ͸దٓߦ͏ αʔϏε։ൃʹूத͢Δ
  10. 4 ϓϦᝑମ 3%4 ΦϒδΣΫτετϨʔδ %# %# εϚʔτϑΥϯϒϥ΢β ը૾ొ࿥ 8FC 8FC

    ೝূ "1* ը૾ 64 "84 +1 "84 ΦϯϓϨ 4 3FETIJGU 64ϓϦᝑମ &5- εϚʔτϑΥϯରԠߏ੒ ൈਮ ը૾ొ࿥ ϑΝΠϧ εϚʔτϑΥϯΞϓϦ DBDIF
  11. @EnableAutoConfiguration
 @EnableScheduling
 public class NotificationApplication {
 
 @Autowired
 Source source;


    
 @Scheduled(cron = "0 0,10,20,30,40,50 * * * *", zone = "Asia/Tokyo")
 public void execute() throws InterruptedException {
 // find push message entry
 // … // send message source.output().send(MessageBuilder.withPayload(message).build());
 
 return;
 }
 
 public static void main(String[] args) {
 SpringApplication.run(NotificationApplication.class, args);
 }
 } 4DIFEVMJOH5BTLT
  12. "1* DPSFKBS վमޙͷϓογϡ௨஌αʔϏε "1/T ($.'$. )5514 ϓογϡ௨஌ ,BGLB )551 /PUJpDBUJPO

    4FSWJDF 4QSJOH#PPU 1VTI/PUJpDBUJPO 4JOL 4QSJOH#PPU ఆظϓογϡ ૹ৴πʔϧ 4QSJOH#PPU
  13. "1* DPSFKBS վमޙͷϓογϡ௨஌αʔϏε "1/T ($.'$. )5514 ϓογϡ௨஌ ,BGLB )551 /PUJpDBUJPO

    4FSWJDF 4QSJOH#PPU 1VTI/PUJpDBUJPO 4JOL 4QSJOH#PPU ఆظϓογϡ ૹ৴πʔϧ 4QSJOH#PPU ઈࢍ޻ࣄத