{"id":50874,"date":"2023-09-13T00:00:00","date_gmt":"2023-09-13T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/"},"modified":"2025-11-14T07:56:25","modified_gmt":"2025-11-14T15:56:25","slug":"realtime-event-tracking-using-spring-boot-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/","title":{"rendered":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0"},"content":{"rendered":"<h2>\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9<\/h2>\n<p>\u4eca\u65e5\u306e\u30c7\u30b8\u30bf\u30eb\u74b0\u5883\u306b\u304a\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u30a4\u30d9\u30f3\u30c8\u3092\u8ffd\u8de1\u30fb\u5206\u6790\u3059\u308b\u3053\u3068\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u884c\u52d5\u306b\u95a2\u3059\u308b\u6d1e\u5bdf\u3092\u5f97\u305f\u308a\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3057\u305f\u308a\u3001\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u6975\u3081\u3066\u91cd\u8981\u3067\u3059\u3002<\/p>\n<p>\u30a4\u30d9\u30f3\u30c8\u3068\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3084\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u4e0a\u3067\u30e6\u30fc\u30b6\u30fc\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u30c8\u30ea\u30ac\u30fc\u3068\u3057\u3066\u767a\u751f\u3059\u308b\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u306e\u3053\u3068\u3067\u3059\u3002\u3053\u308c\u306b\u306f\u3001\u30dc\u30bf\u30f3\u306e\u30af\u30ea\u30c3\u30af\u304b\u3089\u30cb\u30e5\u30fc\u30b9\u30ec\u30bf\u30fc\u3078\u306e\u767b\u9332\u3001\u88fd\u54c1\u306e\u8cfc\u5165\u307e\u3067\u3001\u3042\u3089\u3086\u308b\u3082\u306e\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u30da\u30fc\u30b8\u30d3\u30e5\u30fc\u81ea\u4f53\u304c\u30a4\u30d9\u30f3\u30c8\u3067\u3059\u3002<\/p>\n<p>Event Tracking Service\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4f01\u696d\u306f\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3059\u308b\u3068\u305d\u308c\u3092\u6355\u6349\u3057\u3066\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u6700\u65b0\u306e\u30a4\u30f3\u30b5\u30a4\u30c8\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4f01\u696d\u306f\u65b0\u305f\u306a\u30c8\u30ec\u30f3\u30c9\u306b\u8fc5\u901f\u306b\u5bfe\u5fdc\u3057\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u554f\u984c\u3092\u7279\u5b9a\u3057\u3001\u30c7\u30fc\u30bf\u99c6\u52d5\u578b\u306e\u610f\u601d\u6c7a\u5b9a\u3092\u5373\u5ea7\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u3066\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u8ffd\u8de1\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6a5f\u80fd\u8981\u4ef6<\/h2>\n<p>\u6280\u8853\u7684\u306a\u8a73\u7d30\u306b\u5165\u308b\u524d\u306b\u3001Event Tracking Service\u306e\u4e3b\u8981\u306a\u6a5f\u80fd\u8981\u4ef6\u306e\u6982\u8981\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u8981\u4ef6\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u8a2d\u8a08\u3068\u5b9f\u88c5\u3092\u5f62\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u30a4\u30d9\u30f3\u30c8\u3092\u6355\u6349\u3057\u3001\u4fdd\u5b58\u3059\u308b\u3002<\/li>\n<li>\u96c6\u8a08\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3067\u63d0\u4f9b\u3059\u308b\u3053\u3068\u3002<\/li>\n<\/ul>\n<h2>\u5bb9\u91cf\u306e\u898b\u7a4d\u3082\u308a<\/h2>\n<p>\u6bce\u65e5\u3069\u308c\u3060\u3051\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u304b\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>1\u65e5\u306e\u30a2\u30af\u30c6\u30a3\u30d6\u30e6\u30fc\u30b6\u30fc\u304c10K\u4eba\u3044\u308b\u3068\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\n<p>\u5404\u30e6\u30fc\u30b6\u30fc\u306f1\u65e5\u3042\u305f\u308a50\u30af\u30ea\u30c3\u30af * 10K * 50 = 500K clicks per day * 1\u30af\u30ea\u30c3\u30af\u306e\u30c7\u30fc\u30bf\u306f0.1KB\u3067\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>1\u65e5\u306b\u5fc5\u8981\u306a\u30b9\u30c8\u30ec\u30fc\u30b8 1\u65e5\u306b\u5fc5\u8981\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\uff1a0.1KB * 500K = 50\u30e1\u30ac\u30d0\u30a4\u30c8 * 1\u65e5\u3042\u305f\u308a<\/p>\n<\/li>\n<\/ul>\n<h3>\u6b63\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u9078\u629e\uff1a SQL\u304bNoSQL\u304b<\/h3>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u95a2\u3057\u3066\u306f\u3001SQL\u3068NoSQL\u306e\u3069\u3061\u3089\u3092\u9078\u629e\u3059\u308b\u304b\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7279\u5b9a\u306e\u8981\u4ef6\u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002\u30b9\u30d4\u30fc\u30c9\u3068\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u304c\u91cd\u8981\u306a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30fb\u30a4\u30d9\u30f3\u30c8\u8ffd\u8de1\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u3001NoSQL\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u5f93\u6765\u306eSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u51cc\u99d5\u3057\u307e\u3059\u3002<\/p>\n<p>GridDB\u306e\u3088\u3046\u306aNoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u67d4\u8edf\u306a\u30b9\u30ad\u30fc\u30de\u8a2d\u8a08\u3001\u6c34\u5e73\u65b9\u5411\u306e\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3001\u5927\u5bb9\u91cf\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30fb\u30a4\u30d9\u30f3\u30c8\u30fb\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u6700\u9069\u5316\u3055\u308c\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002GridDB\u306e\u3088\u3046\u306aNoSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u67d4\u8edf\u306a\u30b9\u30ad\u30fc\u30de\u8a2d\u8a08\u3001\u6c34\u5e73\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u3001\u305d\u3057\u3066\u5927\u5bb9\u91cf\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30fb\u30a4\u30d9\u30f3\u30c8\u30fb\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306e\u6700\u9069\u5316\u3055\u308c\u305f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h2>Spring Boot\u3092\u4f7f\u3063\u305fJava\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>Spring Boot\u3067\u306e\u5b9f\u88c5\u306e\u8a73\u7d30\u306b\u98db\u3073\u8fbc\u3080\u524d\u306b\u3001Spring Boot\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u57fa\u672c\u7684\u306a\u7406\u89e3\u3092\u6301\u3064\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002Spring Boot\u306f\u4eba\u6c17\u306e\u3042\u308bJava\u30d9\u30fc\u30b9\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u30b0\u30ec\u30fc\u30c9\u306eSpring\u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u3092\u7c21\u7d20\u5316\u3057\u307e\u3059\u3002\u958b\u767a\u30d7\u30ed\u30bb\u30b9\u3092\u52b9\u7387\u5316\u3059\u308b\u30c4\u30fc\u30eb\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5305\u62ec\u7684\u306a\u30bb\u30c3\u30c8\u3092\u63d0\u4f9b\u3059\u308b\u306e\u3067\u3001\u958b\u767a\u8005\u306f\u5b9a\u578b\u7684\u306a\u30b3\u30fc\u30c9\u3092\u6271\u3046\u306e\u3067\u306f\u306a\u304f\u3001\u30d3\u30b8\u30cd\u30b9\u30ed\u30b8\u30c3\u30af\u3092\u66f8\u304f\u3053\u3068\u306b\u96c6\u4e2d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001Spring Boot\u3092\u4f7f\u3063\u3066Java\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u9032\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>Java Development Kit (JDK)\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u958b\u767a\u74b0\u5883\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u307e\u3059\u3002<\/li>\n<li>\u597d\u307f\u306e\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\uff08Maven\u3084Gradle\u306a\u3069\uff09\u3092\u4f7f\u3063\u3066\u3001\u65b0\u3057\u3044Spring Boot\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u307e\u3059\u3002https:\/\/start.spring.io\/ \u3092\u4f7f\u3063\u3066Spring Boot\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002<\/li>\n<li>GridDB\u3084\u305d\u306e\u4ed6\u306e\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3064\u3044\u3066\u3001Spring Boot\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4e3b\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a <\/li>\n<\/ul>\n<p>1&#46; <strong>spring-boot-starter-web<\/strong> : Spring MVC\u3092\u4f7f\u3063\u3066RESTful\u3092\u542b\u3080Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306e\u30b9\u30bf\u30fc\u30bf\u30fc\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u7d44\u307f\u8fbc\u307f\u30b3\u30f3\u30c6\u30ca\u3068\u3057\u3066Tomcat\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    &lt;dependency&gt;\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n        &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n    &lt;\/dependency&gt;<\/code><\/pre>\n<\/div>\n<p>2&#46; <strong>gridstore<\/strong> : GridDB CE\u7528\u306eJava\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">    &lt;dependency&gt;\n        &lt;groupId&gt;com.github.griddb&lt;\/groupId&gt;\n        &lt;artifactId&gt;gridstore&lt;\/artifactId&gt;\n        &lt;version&gt;5.1.0&lt;\/version&gt;\n    &lt;\/dependency&gt;<\/code><\/pre>\n<\/div>\n<h3>GridDB \u8a2d\u5b9a\u306e\u5b9a\u7fa9<\/h3>\n<p>API\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068GridDB\u306e\u30af\u30e9\u30b9\u30bf\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u63a5\u7d9a\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001GridStore \u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">@Bean\npublic GridStore gridStore() throws GSException {\n    \/\/ Acquiring a GridStore instance\n    Properties properties = new Properties();\n    properties.setProperty(\"notificationMember\", \"griddbserver:10001\");\n    properties.setProperty(\"clusterName\", \"dockerGridDB\");\n    properties.setProperty(\"user\", \"admin\");\n    properties.setProperty(\"password\", \"admin\");\n    GridStore store = GridStoreFactory.getInstance().getGridStore(properties);\n    return store;\n}<\/code><\/pre>\n<\/div>\n<h3>\u30a4\u30d9\u30f3\u30c8\u30fb\u30c7\u30fc\u30bf\u30fb\u30e2\u30c7\u30eb\u306e\u5b9f\u88c5<\/h3>\n<p>\u3053\u308c\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u30fb\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308bJava\u30af\u30e9\u30b9\u3067\u3059\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u30fb\u30ab\u30e9\u30e0\u3092\u4e3b\u30ad\u30fc\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">import java.util.Date;\nimport com.toshiba.mwcloud.gs.RowKey;\nimport lombok.Data;\n\n@Data\npublic class Event {\n    @RowKey\n    Date timestamp;\n    String appId;\n    String eventType;\n    String externalId;\n}<\/code><\/pre>\n<\/div>\n<ul>\n<li>appId: Owner ID of the Mobile App or Website.<\/li>\n<li>eventType: &#8220;ADD_CART&#8221;, &#8220;ADD_TO_WISHLIST&#8221;, &#8220;IN_APP_AD_CLICK&#8221;, &#8220;SEARCH&#8221;, &#8220;LOGIN&#8221;, &#8220;LAUNCH_APP&#8221;, &#8220;START_TRIAL&#8221;<\/li>\n<li>externalId: External userId<\/li>\n<\/ul>\n<h3>\u884c\u3092\u7ba1\u7406\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3059\u308b\u3002<\/h3>\n<p>DB \u63a5\u7d9a\u3092\u8a2d\u5b9a\u3057\u305f\u3089\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u4e00\u9023\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306b TimeSeries \u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">import com.toshiba.mwcloud.gs.TimeSeries;\n\n@Bean\npublic TimeSeries&lt;event> eventsContainer(GridStore gridStore) throws GSException {\n    return gridStore.putTimeSeries(\"events\", Event.class);\n}<\/code><\/pre>\n<\/div>\n<ul>\n<li>com.toshiba.mwcloud.gs.TimeSeries\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306f\u3001TimeSeries\u30c7\u30fc\u30bf\u306e\u64cd\u4f5c\u306b\u7279\u5316\u3057\u305f\u30b3\u30f3\u30c6\u30ca\u3067\u3059\u3002<\/li>\n<\/ul>\n<h2>\u30a4\u30d9\u30f3\u30c8\u306e\u53d6\u5f97<\/h2>\n<p>\u30a4\u30d9\u30f3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b\u305f\u3081\u306e RESTful \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u30011\u3064\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u307f\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30d9\u30f3\u30c8(\u4f8b: <strong>LaunchAPP, Purchase, Login, Add to Cart<\/strong>) \u3092\u5831\u544a\u3059\u308b\u306b\u306f\u3001\/app\/track\/ \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b POST \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/p>\n<pre><code>| Request address | http:\/\/localhost:8080\/api\/track |\n| -------- | -------- |\n| Request method     | **POST**     |\n\nRequest Example\n<\/code><\/pre>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">curl --request POST --url http:\/\/localhost:8080\/api\/track \n --header 'content-type: application\/json'  --header 'user-agent: vscode-restclient' \n   --data '{\n    \"appId\":\"APP_1\",\n    \"eventType\":\"ADD_CART\",\n    \"externalId\":\"2385254254\",\n    \"timestamp\":\"2023-07-12T10:55:50.764Z\"\n}'<\/code><\/pre>\n<\/div>\n<pre><code>Response Example\nHTTPS\/1.1 200 OK\nSaved\n<\/code><\/pre>\n<ul>\n<li>\u3053\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u6210\u529f\u3057\u305f\u5834\u5408\u306f HTTP Status 200 \u3092\u8fd4\u3057\u3001\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u4f8b\u5916\u3092\u6295\u3052\u307e\u3059\u3002<\/li>\n<\/ul>\n<h3>GridDB\u306eJava\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u30fb\u4fdd\u5b58\u30ed\u30b8\u30c3\u30af\u306e\u5b9f\u88c5<\/h3>\n<p>\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f Container \u3092\u53d6\u5f97\u3057\u3001 append \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">public void create(EventRequest request) {\n    Event event = new Event();\n    event.setAppId(request.getAppId());\n    event.setEventType(request.getEventType());\n    event.setExternalId(request.getExternalId());\n    event.setTimestamp(request.getTimestamp());\n    try {\n        eventsContainer.append(event);\n    } catch (GSException e) {\n        e.printStackTrace();\n    }\n}<\/code><\/pre>\n<\/div>\n<h2>\u30ec\u30dd\u30fc\u30c6\u30a3\u30f3\u30b0\u30fb\u30a6\u30a7\u30d6\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/h2>\n<p>\u3055\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u63d0\u4f9b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u65e5\u4ed8\u5225\u3068\u30a4\u30d9\u30f3\u30c8\u30bf\u30a4\u30d7\u5225\u306b\u30a4\u30d9\u30f3\u30c8\u306e\u30ab\u30a6\u30f3\u30c8\u3092\u8868\u793a\u3059\u308b2\u3064\u306e\u30c1\u30e3\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30c1\u30e3\u30fc\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>Thymeleaf\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4e0a\u306b\u30c1\u30e3\u30fc\u30c8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306bChartjs\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>Chart.js\u306f\u3088\u304f\u4f7f\u308f\u308c\u308b\u30c1\u30e3\u30fc\u30c8\u306e\u7a2e\u985e\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u5408\u7406\u7684\u306a\u30d3\u30eb\u30c8\u30a4\u30f3\u30c1\u30e3\u30fc\u30c8\u30bf\u30a4\u30d7\u306e\u30bb\u30c3\u30c8\u306b\u52a0\u3048\u3066\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u7ba1\u7406\u3059\u308b\u8ffd\u52a0\u30c1\u30e3\u30fc\u30c8\u30bf\u30a4\u30d7\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u4e0a\u3001\u8907\u6570\u306e\u30c1\u30e3\u30fc\u30c8\u30fb\u30bf\u30a4\u30d7\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u6df7\u5408\u30c1\u30e3\u30fc\u30c8\uff08\u57fa\u672c\u7684\u306b\u3001\u8907\u6570\u306e\u30c1\u30e3\u30fc\u30c8\u30fb\u30bf\u30a4\u30d7\u3092\u540c\u3058\u30ad\u30e3\u30f3\u30d0\u30b9\u4e0a\u30671\u3064\u306b\u30d6\u30ec\u30f3\u30c9\u3059\u308b\u3053\u3068\uff09\u306b\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h4>\u5358\u4e00\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u68d2\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3057\u3001HTML\u30da\u30fc\u30b8\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u307e\u3059\u3002<\/h4>\n<div class=\"clipboard\">\n<pre><code class=\"language-js\">&lt;script th_inline=\"javascript\"&gt;\n    Chart.register(ChartDataLabels);\n    const ctx = document.getElementById('charts');\n\n    const data = \/*[[${aggregates}]]*\/[\n        { timeLabel: \"2023-07-01\", count: 10 }\n    ];\n\n    new Chart(ctx, {\n        type: 'bar',\n        data: {\n            labels: data.map(row => row.timeLabel),\n            datasets: [{\n                label: 'Count by Date',\n                data: data.map(row => row.count),\n                borderWidth: 1\n            }]\n        },\n        options: {\n            scales: {\n                y: {\n                    beginAtZero: true\n                }\n            },\n            plugins: {\n                datalabels: {\n                    color: 'white',\n                    font: {\n                        weight: 'bold'\n                    }\n                }\n            }\n        }\n    });<\/code><\/pre>\n<\/div>\n<h4>\u65e5\u4ed8\u5225\u30a4\u30d9\u30f3\u30c8\u6570\u306e\u8868\u793a<\/h4>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/griddb-event-tracking1.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/griddb-event-tracking1.png\" alt=\"\" width=\"941\" height=\"630\" class=\"aligncenter size-full wp-image-29783\" srcset=\"\/wp-content\/uploads\/2023\/09\/griddb-event-tracking1.png 941w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking1-300x201.png 300w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking1-768x514.png 768w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking1-600x402.png 600w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><\/p>\n<h4>\u30a4\u30d9\u30f3\u30c8\u30bf\u30a4\u30d7\u5225\u306e\u30a4\u30d9\u30f3\u30c8\u6570\u306e\u8868\u793a<\/h4>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/griddb-event-tracking2.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/griddb-event-tracking2.png\" alt=\"\" width=\"918\" height=\"477\" class=\"aligncenter size-full wp-image-29781\" srcset=\"\/wp-content\/uploads\/2023\/09\/griddb-event-tracking2.png 918w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking2-300x156.png 300w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking2-768x399.png 768w, \/wp-content\/uploads\/2023\/09\/griddb-event-tracking2-600x312.png 600w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/a><\/p>\n<h3>\u30a4\u30d9\u30f3\u30c8\u96c6\u8a08<\/h3>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092chartjs\u306b\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u3001\u6642\u7cfb\u5217\u884c\u306e\u96c6\u7d04\u51e6\u7406\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">public List getEvents() {\n    List views = new ArrayList&lt;>();\n\n    LocalDateTime startDate = LocalDateTime.parse(\"2023-07-01T00:00:00\"),\n            endDate = LocalDateTime.now();\n    for (LocalDateTime date = startDate; date.isBefore(endDate); date = date.plusDays(1)) {\n        try {\n            java.util.Date start =\n                    convertToDateViaInstant(date.withHour(0).withMinute(0).withSecond(0));\n            java.util.Date end =\n                    convertToDateViaInstant(date.withHour(23).withMinute(59).withSecond(59));\n            AggregationResult aggregationResult =\n                    eventsContainer.aggregate(start, end, \"appId\", Aggregation.COUNT);\n            Long count = aggregationResult.getLong();\n            if (count.compareTo(0L) > 0) {\n                views.add(new EventAggregateView(convertToDateViaInstant(date), count,\n                        date.format(dateTimeFormatter)));\n            }\n        } catch (GSException e) {\n            e.printStackTrace();\n        }\n    }\n    return views;\n}<\/code><\/pre>\n<\/div>\n<p>TimeSeries \u30b3\u30f3\u30c6\u30ca\u306e\u96c6\u7d04\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">AggregationResult aggregate(java.util.Date start,\n                          java.util.Date end,\n                          java.lang.String column,\n                          Aggregation aggregation)\n                            throws GSException<\/code><\/pre>\n<\/div>\n<blockquote>\n<p>\u6307\u5b9a\u3055\u308c\u305f\u958b\u59cb\u6642\u523b\u3068\u7d42\u4e86\u6642\u523b\u306b\u57fa\u3065\u3044\u3066\u3001\u884c\u30bb\u30c3\u30c8\u307e\u305f\u306f\u305d\u306e\u7279\u5b9a\u306e\u5217\u306b\u5bfe\u3057\u3066\u96c6\u7d04\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u30d1\u30e9\u30e1\u30fc\u30bf\u5217\u306f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u96c6\u7d04\u306b\u3088\u3063\u3066\u306f\u7121\u8996\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u958b\u59cb\u6642\u523b\u307e\u305f\u306f\u7d42\u4e86\u6642\u523b\u3068\u4e00\u81f4\u3059\u308b\u5883\u754c\u884c\u306f\u3001\u64cd\u4f5c\u7bc4\u56f2\u306b\u542b\u307e\u308c\u307e\u3059\u3002\u6307\u5b9a\u3055\u308c\u305f\u958b\u59cb\u6642\u523b\u304c\u7d42\u4e86\u6642\u523b\u3088\u308a\u3082\u9045\u3044\u5834\u5408\u3001\u3059\u3079\u3066\u306e\u884c\u304c\u64cd\u4f5c\u7bc4\u56f2\u304b\u3089\u9664\u5916\u3055\u308c\u307e\u3059\u3002<\/p>\n<\/blockquote>\n<h3>\u30a4\u30d9\u30f3\u30c8\u751f\u6210\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u30011\u5206\u3054\u3068\u306b\u8d77\u52d5\u3059\u308b\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u30bf\u30b9\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/h3>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">@Scheduled(fixedDelay = 1, initialDelay = 1, timeUnit = TimeUnit.MINUTES)\npublic void scheduleEventCreation() throws IOException, InterruptedException {\n    log.info(\"scheduleEventCreation()\");\n\n    HttpClient client = HttpClient.newHttpClient();\n    ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();\n\n    for (int i = 0; i &lt;= 10; i++) {\n        Runnable runnableTask = () -> {\n            try {\n                postEvent(client);\n            } catch (IOException | InterruptedException e) {\n                e.printStackTrace();\n            }\n        };\n        executorService.schedule(runnableTask, i, TimeUnit.SECONDS);\n    }\n}\n\nprivate void postEvent(HttpClient client)\n        throws JsonProcessingException, IOException, InterruptedException {\n    Instant instant = Instant.now();\n    var values = new HashMap&lt;String, String>() {\n        {\n            put(\"appId\", \"APP_1\");\n            put(\"eventType\", getRandomElement(EventTrackerConstants.EVENT_TYPE_LIST));\n            put(\"externalId\", faker.idNumber().valid());\n            put(\"timestamp\", instant.toString());\n        }\n    };\n\n    var objectMapper = new ObjectMapper();\n    String requestBody = objectMapper.writeValueAsString(values);\n\n    HttpRequest request =\n            HttpRequest.newBuilder().uri(URI.create(\"http:\/\/localhost:8080\/api\/track\"))\n                    .POST(HttpRequest.BodyPublishers.ofString(requestBody))\n                    .header(\"Content-type\", \"application\/json\").build();\n\n    client.send(request, HttpResponse.BodyHandlers.ofString());\n}<\/code><\/pre>\n<\/div>\n<h3>Docker Compose\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5b9f\u884c<\/h3>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7acb\u3061\u4e0a\u3052\u308b\u306b\u306f\u3001docker\u3068docker-compose\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u5fc5\u8981\u306a\u306e\u306fdocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3060\u3051\u3067\u3059\u3002\u305d\u3057\u3066\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n<p>1&#46; docker \u30a4\u30e1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\uff1a<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">docker compose build<\/code><\/pre>\n<\/div>\n<p>2&#46; docker \u30a4\u30e1\u30fc\u30b8\u3092\u5b9f\u884c\u3057\u307e\u3059\uff1a<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">docker compose up<\/code><\/pre>\n<\/div>\n<h4>\u3059\u3079\u3066\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u898b\u308b\u306b\u306f\u3001http:\/\/localhost:8080\/events \u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/h4>\n<h4>\u30c1\u30e3\u30fc\u30c8\u3092\u898b\u308b\u306b\u306f http:\/\/localhost:8080\/aggregate \u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/h4>\n<h2>\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h2>\n<p>Spring Boot\u3067\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u8ffd\u8de1\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u306b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u5f93\u3046\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u8ffd\u8de1\u306e\u53ef\u80fd\u6027\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u305f\u3081\u306e\u63a8\u5968\u4e8b\u9805\u3067\u3059\uff1a<\/p>\n<ul>\n<li>\u95a2\u9023\u3059\u308b\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u30a2\u30af\u30b7\u30e7\u30f3\u3068\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b\u3001\u660e\u78ba\u3067\u4e00\u8cab\u6027\u306e\u3042\u308b\u30a4\u30d9\u30f3\u30c8\u30b9\u30ad\u30fc\u30de\u306e\u5b9a\u7fa9\u306b\u6642\u9593\u3092\u304b\u3051\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u72b6\u614b\u3084\u74b0\u5883\u306b\u95a2\u3059\u308b\u6d1e\u5bdf\u3092\u63d0\u4f9b\u3059\u308b\u95a2\u9023\u3059\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308b\u3053\u3068\u3082\u91cd\u8981\u3067\u3059\u3002<\/li>\n<li>\u30b7\u30b9\u30c6\u30e0\u304c\u30c7\u30fc\u30bf\u4fdd\u8b77\u898f\u5236\u306b\u6e96\u62e0\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3001\u9069\u5207\u306a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5bfe\u7b56\u3092\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/li>\n<li>\u30b9\u30c8\u30ea\u30fc\u30e0\u51e6\u7406\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u7528\u3057\u3066\u5206\u6790\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002<\/li>\n<li>\u30a4\u30d9\u30f3\u30c8\u30fb\u30c9\u30ea\u30d6\u30f3\u30fb\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30fc\u3068Apache Kafka\u3084RabbitMQ\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u30f3\u30b0\u30fb\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u30a4\u30d9\u30f3\u30c8\u30fb\u30d7\u30ed\u30c7\u30e5\u30fc\u30b5\u30fc\u3068\u30b3\u30f3\u30b7\u30e5\u30fc\u30de\u30fc\u3092\u30c7\u30ab\u30c3\u30d7\u30ea\u30f3\u30b0\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9 \u4eca\u65e5\u306e\u30c7\u30b8\u30bf\u30eb\u74b0\u5883\u306b\u304a\u3044\u3066\u3001\u30e6\u30fc\u30b6\u30fc\u30a4\u30d9\u30f3\u30c8\u3092\u8ffd\u8de1\u30fb\u5206\u6790\u3059\u308b\u3053\u3068\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u884c\u52d5\u306b\u95a2\u3059\u308b\u6d1e\u5bdf\u3092\u5f97\u305f\u308a\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3057\u305f\u308a\u3001\u30d1\u30fc\u30bd\u30ca\u30e9\u30a4\u30ba\u3055\u308c\u305f\u30e6\u30fc\u30b6\u30fc\u4f53\u9a13\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u6975\u3081 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":50360,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50874","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/realtime-event-tracking-using-spring-boot-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/realtime-event-tracking-using-spring-boot-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-13T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:56:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"891\" \/>\n\t<meta property=\"og:image:height\" content=\"543\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\",\"datePublished\":\"2023-09-13T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/\"},\"wordCount\":154,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/\",\"name\":\"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg\",\"datePublished\":\"2023-09-13T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:56:25+00:00\",\"description\":\"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg\",\"width\":891,\"height\":543},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT","description":"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/realtime-event-tracking-using-spring-boot-and-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT","og_description":"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/realtime-event-tracking-using-spring-boot-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2023-09-13T07:00:00+00:00","article_modified_time":"2025-11-14T15:56:25+00:00","og_image":[{"width":891,"height":543,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0","datePublished":"2023-09-13T07:00:00+00:00","dateModified":"2025-11-14T15:56:25+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/"},"wordCount":154,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/","name":"Spring Boot\u3068GridDB\u3092\u4f7f\u3063\u305f\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg","datePublished":"2023-09-13T07:00:00+00:00","dateModified":"2025-11-14T15:56:25+00:00","description":"\u30a4\u30d9\u30f3\u30c8\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306e\u5b9a\u7fa9","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/realtime-event-tracking-using-spring-boot-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg","contentUrl":"\/wp-content\/uploads\/2023\/09\/system-design-event-tracking-1.jpg","width":891,"height":543},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50874"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50874\/revisions"}],"predecessor-version":[{"id":51700,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50874\/revisions\/51700"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/50360"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}