{"id":46777,"date":"2023-09-29T00:00:00","date_gmt":"2023-09-29T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/save-unity-game-data-using-node-js-and-griddb\/"},"modified":"2026-03-30T12:19:10","modified_gmt":"2026-03-30T19:19:10","slug":"save-unity-game-data-using-node-js-and-griddb","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/","title":{"rendered":"Save Unity Game Data Using Node.js and GridDB"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>In this post, we will build a simple game called <strong>Feed The Animals<\/strong>. This game uses Node.js as a backend server and the GridDB database as storage.<\/p>\n<h2>Run the Project<\/h2>\n<p>Clone the project <a href=\"https:\/\/github.com\/junwatu\/unity-node.js-griddb\">source code<\/a> from the GitHub repository.<\/p>\n<div class=\"clipboard\">\n<pre><code>git clone https:\/\/github.com\/junwatu\/unity-node.js-griddb.git<\/code><\/pre>\n<\/div>\n<p>Change the directory into the project source code.<\/p>\n<div class=\"clipboard\">\n<pre><code>cd unity-node.js-griddb<\/code><\/pre>\n<\/div>\n<p>Install the Node.js dependencies for the game server.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">cd appserver\nnpm install<\/code><\/pre>\n<\/div>\n<h3>Game Server<\/h3>\n<p>Before running the game, you should run the game server first. Please go to the project source code and folder  <code>appserver<\/code> if you haven&#8217;t and run the following command in the terminal:<\/p>\n<div class=\"clipboard\">\n<pre><code>npm run start<\/code><\/pre>\n<\/div>\n<p>The server&#8217;s default host and port settings are in the <code>.env<\/code> file. Please change it if you want to run the server on another IP address and port. For example, to run the game server on IP <code>192.168.0.11<\/code> and the port is <code>9000<\/code>. Open the <code>.env<\/code> file and edit the <code>GAME_SERVER<\/code> variable.<\/p>\n<div class=\"clipboard\">\n<pre><code>GAME_SERVER=http:\/\/192.168.0.11:9000<\/code><\/pre>\n<\/div>\n<p>And then run or restart the game server.<\/p>\n<h3>Game Build<\/h3>\n<p>Let&#8217;s take a look at the actual build.<\/p>\n<h4>Windows Binary .exe<\/h4>\n<p>This game build is running on the Windows OS machine. Please download the binary build on this link:<\/p>\n<p><a href=\"https:\/\/github.com\/junwatu\/unity-node.js-griddb\/releases\/download\/demo\/FeedTheAnimals.Windows-x64.zip\">https:\/\/github.com\/junwatu\/unity-node.js-griddb\/releases\/download\/demo\/FeedTheAnimals.Windows-x64.zip<\/a>.<\/p>\n<p>Then extract it, and if you change the default game server address, you should change the IP address for the game, too. Open the <code>config.json<\/code> file, then edit the <code>WebSocketURL<\/code>:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\n{\n  \"WebSocketURL\": \"http:\/\/192.168.0.11:9000\"\n}<\/code><\/pre>\n<\/div>\n<p>After that, you can run the game by clicking the <code>feed.the.animals.exe<\/code> file!<\/p>\n<p>The gameplay is simple: feed the animal, and if you have failed to feed a few animals, you will lose, which means game over!<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/game-screenshot.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/game-screenshot.png\" alt=\"\" width=\"1659\" height=\"933\" class=\"aligncenter size-full wp-image-29822\" srcset=\"\/wp-content\/uploads\/2023\/09\/game-screenshot.png 1659w, \/wp-content\/uploads\/2023\/09\/game-screenshot-300x169.png 300w, \/wp-content\/uploads\/2023\/09\/game-screenshot-1024x576.png 1024w, \/wp-content\/uploads\/2023\/09\/game-screenshot-768x432.png 768w, \/wp-content\/uploads\/2023\/09\/game-screenshot-1536x864.png 1536w, \/wp-content\/uploads\/2023\/09\/game-screenshot-150x85.png 150w, \/wp-content\/uploads\/2023\/09\/game-screenshot-600x337.png 600w\" sizes=\"(max-width: 1659px) 100vw, 1659px\" \/><\/a><\/p>\n<p>This game only have three key functions:<\/p>\n<table>\n<thead>\n<tr>\n<th>Control Key<\/th>\n<th>Action<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Left Arrow<\/strong> or <strong>A<\/strong><\/td>\n<td>For the left movement.<\/td>\n<\/tr>\n<tr>\n<td><strong>Right Arrow<\/strong> or <strong>D<\/strong><\/td>\n<td>For the right movement.<\/td>\n<\/tr>\n<tr>\n<td><strong>Space Bar<\/strong><\/td>\n<td>For throwing a food at the animal.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><strong>The Building Blocks: Unity, Node.js, WebSocket, and GridDB<\/strong><\/h2>\n<p>Accurately and promptly saving every action, decision, and game state is crucial for seamless gameplay, especially in multiplayer scenarios or games requiring consistent syncing. We will build the game using the <strong>Unity<\/strong> game engine with the backend stack <strong>Node.js<\/strong> and <strong>GridDB<\/strong> database. Let&#8217;s examine the importance of each:<\/p>\n<h3><a href=\"https:\/\/unity.com\/\"><strong>Unity<\/strong><\/a><\/h3>\n<p>Unity is a top game development platform with a versatile engine for crafting 2D sprites and 3D worlds. The platform has a user-friendly interface, rich assets, and a supportive community to help create immersive gaming experiences for mobile devices, desktops, and VR headsets.<\/p>\n<h3><a href=\"https:\/\/nodejs.org\/en\/download\"><strong>Node.js<\/strong><\/a><\/h3>\n<p>Node.js allows developers to create efficient and scalable backend services using JavaScript, a language mostly recognized for web-based applications. Its event-driven, non-blocking I\/O model is ideal for handling numerous simultaneous connections, making it perfect for games with a large user base. It acts as a bridge, connecting Unity games to databases such as GridDB.<\/p>\n<h3><a href=\"https:\/\/www.griddb.net\/\"><strong>GridDB<\/strong><\/a><\/h3>\n<p>In real-time gaming, efficient data storage is crucial. GridDB is a highly scalable, available, and durable database system designed for this purpose. Its architecture is tailored for IoT use cases, translating well into gaming. It ensures every player&#8217;s action is captured and stored with low latency.<\/p>\n<h3><strong>WebSocket: Bridging Unity and Node.js in Real-time<\/strong><\/h3>\n<p>In the fast-paced gaming world, where every move and second is critical, more than traditional request-response communication models may be required. This is where the power of <a href=\"https:\/\/en.wikipedia.org\/wiki\/WebSocket\">WebSocket<\/a> comes in.<\/p>\n<ul>\n<li><strong>Basics of WebSocket:<\/strong><br \/>\nWebSocket offers a different approach to the traditional HTTP model. Rather than waiting for a response after sending a request, WebSocket creates a full-duplex communication channel over one long-lasting connection. This enables simultaneous sending and receiving of data without constantly disconnecting. The connection is established through an HTTP connection handshake, which is then upgraded for use with WebSocket. This consistent and uninterrupted connection is perfect for applications that require real-time feedback, as data transfer is instantaneous.<\/p>\n<\/li>\n<li><strong>Importance of real-time communication in games:<\/strong><br \/>\nWhen gaming, players want quick responses to their moves. In multiplayer shooter games, communication can determine whether a team wins or loses, and in real-time strategy games, decisions need to be made and executed without delay. To meet these expectations, game developers rely on WebSocket. These tools help minimize delays and ensure that players&#8217; actions are synchronized across various platforms and devices. With WebSocket, gamers can enjoy a seamless and engaging experience.<\/p>\n<\/li>\n<\/ul>\n<h2>System Architecture<\/h2>\n<p>This project consists of three main stacks, as we described earlier: Unity, Node.js, and GridDB database. The system diagram is very simple; we can use Node.js and GridDB as backend servers, and the communication between the Unity game and the backend server is through WebSocket technology.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\" alt=\"\" width=\"1605\" height=\"903\" class=\"aligncenter size-full wp-image-29820\" srcset=\"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png 1605w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-300x169.png 300w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-768x432.png 768w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-1024x576.png 1024w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-1536x864.png 1536w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-150x85.png 150w, \/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb-600x338.png 600w\" sizes=\"(max-width: 1605px) 100vw, 1605px\" \/><\/a><\/p>\n<p>This project uses two main programming languages: C# for game development and JavaScript running on Node.js.<\/p>\n<h2>Installation<\/h2>\n<h3>Setting up Node.js<\/h3>\n<p>The project discussed in this blog post utilizes Node.js LTS version 18, and it is recommended that you have the same version installed. To check if you have Node.js installed, run the following command:<\/p>\n<div class=\"clipboard\">\n<pre><code>node --version<\/code><\/pre>\n<\/div>\n<p>If Node.js is not installed or you have an older version, it is recommended to upgrade or install Node.js LTS from their official website <a href=\"https:\/\/nodejs.org\/en\/download\">nodejs.org<\/a>.<\/p>\n<h3>Setting up GridDB<\/h3>\n<p>GridDB is easy to setup. Please go to this <a href=\"https:\/\/docs.griddb.net\/latest\/gettingstarted\/using-apt\/\">link<\/a> for fresh installation on Ubuntu or <a href=\"https:\/\/docs.griddb.net\/installation\/misc.html\">here<\/a> to install it on Windows via WSL (Windows Subsystem Linux).<\/p>\n<p>If you already have it in your system, check if the griddb service is running with this command<\/p>\n<div class=\"clipboard\">\n<pre><code>sudo systemctl status gridstore<\/code><\/pre>\n<\/div>\n<p>This Ubuntu OS command line output shows the griddb service is running:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\u25cf gridstore.service - GridDB database server.\n     Loaded: loaded (\/lib\/systemd\/system\/gridstore.service; enabled; vendor preset: enabled)\n     Active: active (running) since Tue 2023-07-04 04:47:12 +07; 9h ago\n   Main PID: 575 (gsserver)\n      Tasks: 34 (limit: 7017)\n     Memory: 144.7M\n     CGroup: \/system.slice\/gridstore.service\n             \u2514\u2500575 \/usr\/bin\/gsserver --conf \/var\/lib\/gridstore\/conf\n\nJul 04 04:47:08 GenAI systemd[1]: Starting GridDB database server....\nJul 04 04:47:09 GenAI gridstore[381]: Starting gridstore service:\nJul 04 04:47:12 GenAI gridstore[526]: ..\nJul 04 04:47:12 GenAI gridstore[526]: Started node.\nJul 04 04:47:12 GenAI gridstore[381]: [ OK ]\nJul 04 04:47:12 GenAI systemd[1]: Started GridDB database server..<\/code><\/pre>\n<\/div>\n<h3>Setting up Unity<\/h3>\n<p>In this post, we will use Windows OS for the Unity installation.<\/p>\n<blockquote><p>\n  This installation is optional because we don&#8217;t discuss the game development from scratch here. If you want to dive into the Unity Editor and try the live development, please continue to install it.\n<\/p><\/blockquote>\n<h4>Unity Editor<\/h4>\n<p>For this project, we will use Unity 2022 LTS and to install it you need to install Unity Hub first. Please go here <a href=\"https:\/\/public-cdn.cloud.unity3d.com\/hub\/prod\/UnityHubSetup.exe\">Unity Hub<\/a> to install it. You have to install <strong>Unity 2022.3.6f1<\/strong> directly from Unity Hub for better project management.<\/p>\n<p><strong>What is the Unity Hub?<\/strong><br \/>\n Unity Hub is used to manage multiple installations of the Unity Editor, create new projects, and access your work.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-hub.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-hub.png\" alt=\"\" width=\"1330\" height=\"748\" class=\"aligncenter size-full wp-image-29826\" srcset=\"\/wp-content\/uploads\/2023\/09\/unity-hub.png 1330w, \/wp-content\/uploads\/2023\/09\/unity-hub-300x169.png 300w, \/wp-content\/uploads\/2023\/09\/unity-hub-1024x576.png 1024w, \/wp-content\/uploads\/2023\/09\/unity-hub-768x432.png 768w, \/wp-content\/uploads\/2023\/09\/unity-hub-150x85.png 150w, \/wp-content\/uploads\/2023\/09\/unity-hub-600x337.png 600w\" sizes=\"(max-width: 1330px) 100vw, 1330px\" \/><\/a><\/p>\n<p>After installed,you can import the game project source code and assets in the folder:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\"> appgameunity.feed.the.animals\n<\/code><\/pre>\n<\/div>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-hub-open.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-hub-open.png\" alt=\"\" width=\"1427\" height=\"803\" class=\"aligncenter size-full wp-image-29819\" srcset=\"\/wp-content\/uploads\/2023\/09\/unity-hub-open.png 1427w, \/wp-content\/uploads\/2023\/09\/unity-hub-open-300x169.png 300w, \/wp-content\/uploads\/2023\/09\/unity-hub-open-1024x576.png 1024w, \/wp-content\/uploads\/2023\/09\/unity-hub-open-768x432.png 768w, \/wp-content\/uploads\/2023\/09\/unity-hub-open-150x85.png 150w, \/wp-content\/uploads\/2023\/09\/unity-hub-open-600x338.png 600w\" sizes=\"(max-width: 1427px) 100vw, 1427px\" \/><\/a><\/p>\n<p>After that you can open the game project source and assets in the Unity Editor.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-editor.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/unity-editor.png\" alt=\"\" width=\"1921\" height=\"1080\" class=\"aligncenter size-full wp-image-29825\" srcset=\"\/wp-content\/uploads\/2023\/09\/unity-editor.png 1921w, \/wp-content\/uploads\/2023\/09\/unity-editor-300x169.png 300w, \/wp-content\/uploads\/2023\/09\/unity-editor-1024x576.png 1024w, \/wp-content\/uploads\/2023\/09\/unity-editor-768x432.png 768w, \/wp-content\/uploads\/2023\/09\/unity-editor-1536x864.png 1536w, \/wp-content\/uploads\/2023\/09\/unity-editor-150x85.png 150w, \/wp-content\/uploads\/2023\/09\/unity-editor-600x337.png 600w\" sizes=\"(max-width: 1921px) 100vw, 1921px\" \/><\/a><\/p>\n<h2>Project Codes<\/h2>\n<h3>Node.js and WebSocket Integration<\/h3>\n<p>Integrating Node.js with WebSocket is easy using <a href=\"https:\/\/github.com\/websockets\/ws\"><code>ws<\/code><\/a> npm package. This npm package is simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation, and <code>ws<\/code> is only available on the server, which means you cannot use it in the browser because the browser already has WebSocket implementation.<\/p>\n<h4>Node.js HTTP Server<\/h4>\n<p>This code sets up a basic HTTP and WebSocket server using Node.js and various Node.js packages. It also exposes some HTTP routes and connects to a database service to get game data:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">\/\/ index.js\nimport express from 'express';\nimport http from 'http';\nimport cors from 'cors';\nimport path from 'path';\nimport 'dotenv\/config';\nimport url from 'url';\n\nimport setupWebSocket from '.\/websocket.js';\nimport { __dirname } from '.\/libs\/dirname.js';\nimport { getAllData } from \".\/griddbservice.js\";\nimport { createRequire } from 'module'; \n\nconst require = createRequire(import.meta.url); \nconst WebSocket = require('ws');\n\nconst app = express();\n\nconst parsedUrl = url.parse(process.env.GAME_SERVER_URL);\nconst hostname = parsedUrl.hostname;\nconst port = parsedUrl.port || 8080; \n\nconst server = http.createServer(app);\n\nconst wss = new WebSocket.Server({ server });\n\nsetupWebSocket(wss);\n\nconst publicPath = path.resolve(`${__dirname}`, '.\/public');\n\napp.use(express.static(publicPath));\napp.use(cors());\n\napp.get('\/', (req, res) => {\n    res.send('Unity Game Server!');\n});\n\n\napp.get('\/api\/gamedata', async (req, res) => {\n    try {\n        const data = await getAllData();\n        res.json(data); \n    } catch (err) {\n        console.error(err);\n        res.status(500).send('Internal Server Error');\n    }\n});\n\nserver.listen(port, () => {\n    console.log(`HTTP and WebSocket server running on http:\/\/${hostname}:${port}`);\n});\n<\/code><\/pre>\n<\/div>\n<p>The HTTP server will read the <code>env<\/code> file and get the <code>GAME_SERVER_URL<\/code> environment variable first before the HTTP server runs:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">const parsedUrl = url.parse(process.env.GAME_SERVER_URL);\nconst hostname = parsedUrl.hostname;\nconst port = parsedUrl.port || 8080;<\/code><\/pre>\n<\/div>\n<p>The above code will parse <code>GAME_SERVER_URL<\/code> and extract <code>hostname<\/code> and <code>port<\/code>. If you don&#8217;t define the port in the <code>env<\/code> file, it will default to port <code>8080<\/code>.<\/p>\n<h4>HTTP Routes<\/h4>\n<p>The HTTP server also exposes some routes on is the homepage, and the other to get the game data list:<\/p>\n<table>\n<thead>\n<tr>\n<th>HTTP Method<\/th>\n<th>Route<\/th>\n<th>Description<\/th>\n<th>Response Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>GET<\/td>\n<td><code>\/<\/code><\/td>\n<td>Returns a simple text message<\/td>\n<td>Text: &#8220;Unity Game Server!&#8221;<\/td>\n<\/tr>\n<tr>\n<td>GET<\/td>\n<td><code>\/api\/gamedata<\/code><\/td>\n<td>Fetches game data from a service<\/td>\n<td>JSON or 500 Internal Server Error<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Note:<\/strong> This table only covers HTTP routes and does not include WebSocket routes, which are set up by the <code>setupWebSocket(wss)<\/code> function but not detailed in the given code.<\/p>\n<h4>WebSocket Server<\/h4>\n<p>The WebSocket server is attached to the HTTP server, so when the HTTP server is run, the WebSocket server will run too:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">const wss = new WebSocket.Server({ server });\n\nsetupWebSocket(wss);<\/code><\/pre>\n<\/div>\n<p>The <code>setupWebSocket()<\/code> is the main function that handles the connection between the game server and the Unity game. Let&#8217;s see the code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">\/\/ websocket.js\nimport { saveData, getAllData } from '.\/griddbservice.js';\n\nfunction setupWebSocket(wss) {\n    wss.on('connection', function connection(ws) {\n        ws.on('message', async (data) => {\n\n            let readableData;\n\n            \/\/ Check if the data is in JSON format\n            try {\n                readableData = JSON.parse(data.toString('utf8'));\n            } catch (e) {\n                console.log('Received data is not JSON. Ignoring...');\n                return;\n            }\n\n            \/\/ If data is of type \"save\", then save it\n            if (readableData.type === 'save') {\n                const playerposition = {\n                    x: readableData.PlayerX,\n                    y: readableData.PlayerY,\n                    z: readableData.PlayerZ\n                };\n                const numberofthrows = readableData.NumberOfMeatThrows;\n                const gameover = false;\n\n                await saveData({ playerposition, numberofthrows, gameover });\n                ws.send(JSON.stringify(readableData))\n            } else if (readableData.type === 'getAll') {\n                const allData = await getAllData();\n                ws.send(JSON.stringify(allData));\n            }\n\n            console.log('data received n %o', readableData);\n\n        });\n    });\n\n\n    wss.on('listening', () => {\n        console.log('WebSocket server is listening');\n    });\n};\n\nexport default setupWebSocket;<\/code><\/pre>\n<\/div>\n<p>When in the connection state, WebSocket will listen to the message from the Unity game. Because of the nature of WebSocket, any data will be received instantly from the Unity game (client). In this code, we will accept JSON data only:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">try {\n    readableData = JSON.parse(data.toString('utf8'));\n} catch (e) {\n    console.log('Received data is not JSON. Ignoring...');\nreturn;\n}<\/code><\/pre>\n<\/div>\n<p>The JSON data from the Unity game contains the last player&#8217;s movement and the number of meat throws.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">const playerposition = {\n        x: readableData.PlayerX,\n        y: readableData.PlayerY,\n        z: readableData.PlayerZ\n};\nconst numberofthrows = readableData.NumberOfMeatThrows;<\/code><\/pre>\n<\/div>\n<p>This data will later be saved to the GridDB database.<\/p>\n<h3>WebSocket Events<\/h3>\n<table>\n<thead>\n<tr>\n<th>Event<\/th>\n<th>Message Type<\/th>\n<th>Description<\/th>\n<th>Response\/Action<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>on message<\/td>\n<td><code>save<\/code><\/td>\n<td>Saves the player&#8217;s position, and number of meat throws<\/td>\n<td>Echoes received JSON data<\/td>\n<\/tr>\n<tr>\n<td>on message<\/td>\n<td><code>getAll<\/code><\/td>\n<td>Sends all saved game data to the client (future use)<\/td>\n<td>Sends all game data as JSON<\/td>\n<\/tr>\n<tr>\n<td>on listening<\/td>\n<td>N\/A<\/td>\n<td>Indicates WebSocket server is listening for incoming connections<\/td>\n<td>Logs a message to console<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The <code>setupWebSocket<\/code> function hooks into the WebSocket server and listens for different types of events:<\/p>\n<ul>\n<li><strong><code>connection<\/code><\/strong>: Whenever a new WebSocket connection is established, it sets up the following message handlers:\n<ul>\n<li><strong><code>message<\/code><\/strong>: Listens for incoming messages. Depending on the <code>type<\/code> field in the message (<code>save<\/code> or <code>getAll<\/code>), it either saves the data or retrieves all saved game data, sending it back to the client.<\/li>\n<\/ul>\n<\/li>\n<li><strong><code>listening<\/code><\/strong>: Logs that the WebSocket server is actively listening for incoming connections.<\/li>\n<\/ul>\n<h3>Storing Game Progress<\/h3>\n<p>To store the game data in the GridDB database is very easy. In the WebSocket server code, we use two methods, <code>saveData()<\/code> and <code>getAllData()<\/code>.<\/p>\n<div class=\"clipboard\">\n<pre><code>import { saveData, getAllData } from '.\/griddbservice.js';<\/code><\/pre>\n<\/div>\n<p>The <code>griddbservice.js<\/code> is a GridDB service file that handles the logic related to database operations. This makes it easier to update the database logic and to make the CRUD operations with GridDB more modular.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">\/\/ griddbservice.js\nimport * as GridDB from '.\/libs\/griddb.cjs';\nimport { generateRandomID } from '.\/libs\/rangen.js';\n\nconst { collectionDb, store, conInfo, containerName } = await GridDB.initGridDbTS();\n\nexport async function saveData({ playerposition, numberofthrows, gameover }) {\n    const id = generateRandomID();\n\n    \/\/ Serialize player position to a JSON string (if needed)\n    const playerpositionStr = JSON.stringify(playerposition);\n    const numberofthrowsStr = String(numberofthrows);\n    const gameoverStr = String(gameover);\n\n    \/\/ Now you can safely insert them into the database as strings\n    const playerState = [parseInt(id), playerpositionStr, numberofthrowsStr, gameoverStr];\n    const saveStatus = await GridDB.insert(playerState, collectionDb);\n    return saveStatus;\n}\n\nexport async function getAllData() {\n    return await GridDB.queryAll(conInfo, store);\n}<\/code><\/pre>\n<\/div>\n<p>The game data is saved using the <code>saveData()<\/code> function. This function has the signature:<\/p>\n<div class=\"clipboard\">\n<pre><code>async function saveData({ playerposition, numberofthrows, gameover })<\/code><\/pre>\n<\/div>\n<p>The <code>saveData()<\/code> function will save three game data: <code>playerposition<\/code>, <code>numberofthrows<\/code>, and <code>gameover<\/code> into the GridDB database.<\/p>\n<p>The <code>getAllData()<\/code> will return all the game data that is saved in the GridDB database. You can get this data via browser by running the HTTP server URL:<\/p>\n<div class=\"clipboard\">\n<pre><code>http:\/\/localhost:8080\/api\/gamedata<\/code><\/pre>\n<\/div>\n<p>Please note that if you change the HTTP URL server in the <code>env<\/code> file, the above URL will also change.<\/p>\n<h3>Game Architecture<\/h3>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/game-architecture.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/game-architecture.png\" alt=\"\" width=\"1869\" height=\"1203\" class=\"aligncenter size-full wp-image-29821\" srcset=\"\/wp-content\/uploads\/2023\/09\/game-architecture.png 1869w, \/wp-content\/uploads\/2023\/09\/game-architecture-300x193.png 300w, \/wp-content\/uploads\/2023\/09\/game-architecture-1024x659.png 1024w, \/wp-content\/uploads\/2023\/09\/game-architecture-768x494.png 768w, \/wp-content\/uploads\/2023\/09\/game-architecture-1536x989.png 1536w, \/wp-content\/uploads\/2023\/09\/game-architecture-600x386.png 600w\" sizes=\"(max-width: 1869px) 100vw, 1869px\" \/><\/a><\/p>\n<p>The <strong>Feed the Animals<\/strong> game architecture generally can be described as this diagram. In this diagram, the <strong>WebSocket (WsClient)<\/strong> component is sending out various data points:<\/p>\n<ul>\n<li><strong>PlayerX, PlayerY, PlayerZ<\/strong>: The position of the player, which is probably gathered from the PlayerController.\n<\/li>\n<li>\n<p><strong>NumberOfMeatThrows<\/strong>: This is directly read from GameManager.<\/p>\n<\/li>\n<\/ul>\n<p>These data points are serialized as a JSON and then sent through the WebSocket connection.<\/p>\n<h3>Unity Meets WebSocket<\/h3>\n<h4>WebSocket NuGet<\/h4>\n<p>Unity doesn&#8217;t support WebSocket natively, and to solve this problem, we will use the WebSocket package from NuGet. As you know, Unity uses C#, a language different from our Node.js server, which uses JavaScript.<\/p>\n<blockquote><p>\n  <strong>What is NuGet?<\/strong><br \/>\n  NuGet is the package manager for .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.\n<\/p><\/blockquote>\n<p>For better package management in this project, we have used <a href=\"https:\/\/github.com\/GlitchEnzo\/NuGetForUnity\">NuGetForUnity<\/a>. The Unity package can be installed from this <a href=\"https:\/\/github.com\/GlitchEnzo\/NuGetForUnity\/releases\">link<\/a>.<\/p>\n<blockquote><p>\n  <strong>NuGetForUnity<\/strong> is a NuGet client built from scratch to run inside the Unity Editor. NuGet is a package management system that makes it easy to create packages that are distributed on a server and consumed by users.\n<\/p><\/blockquote>\n<p>The WebSocket package that we use for this project is the <code>WebSocketSharp-netstandard<\/code> package.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/nuget-unity.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2023\/09\/nuget-unity.png\" alt=\"\" width=\"1918\" height=\"1058\" class=\"aligncenter size-full wp-image-29824\" srcset=\"\/wp-content\/uploads\/2023\/09\/nuget-unity.png 1918w, \/wp-content\/uploads\/2023\/09\/nuget-unity-300x165.png 300w, \/wp-content\/uploads\/2023\/09\/nuget-unity-1024x565.png 1024w, \/wp-content\/uploads\/2023\/09\/nuget-unity-768x424.png 768w, \/wp-content\/uploads\/2023\/09\/nuget-unity-1536x847.png 1536w, \/wp-content\/uploads\/2023\/09\/nuget-unity-600x331.png 600w\" sizes=\"(max-width: 1918px) 100vw, 1918px\" \/><\/a><\/p>\n<h4>WebSocket Client<\/h4>\n<p>This code initializes a WebSocket client when a game starts and then, during the game, sends data to the WebSocket server when the player hits the Spacebar. This data includes information about the player&#8217;s position in the game world and a game-specific metric called <code>NumberOfMeatThrows<\/code>:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">\/\/ WsClient.cs\npublic class WsClient : MonoBehaviour\n{\n    WebSocket ws;\n\n    void Start()\n    {\n      \/\/...\n    }\n\n    void Update()\n    {\n        if (ws == null)\n        {\n            return;\n        }\n        if (Input.GetKeyDown(KeyCode.Space))\n        {\n            ws.Send(\"Save Data...\");\n            Dictionary<string, object> dataToSave = new Dictionary<string, object>();\n\n            \/\/Add player position\n            Vector3 playerPosition = GameObject.Find(\"Player\").transform.position;\n            dataToSave.Add(\"PlayerX\", playerPosition.x);\n            dataToSave.Add(\"PlayerY\", playerPosition.y);\n            dataToSave.Add(\"PlayerZ\", playerPosition.z);\n            dataToSave.Add(\"NumberOfMeatThrows\", GameManager.Instance.numberOfMeatThrows);\n            dataToSave.Add(\"type\", \"save\");\n\n            \/\/ Convert dictionary to JSON and send it\n            string json = JsonConvert.SerializeObject(dataToSave);\n            ws.Send(json);\n        }\n    }\n}\n<\/code><\/pre>\n<\/div>\n<p><strong>Game Loop: Update() Method<\/strong><\/p>\n<p>This method gets called once per frame, allowing for real-time interaction. If the WebSocket client <code>ws<\/code> is not initialized, the method simply returns without doing anything.<\/p>\n<p>It checks if the <strong>Spacebar<\/strong> key is pressed. If pressed, it gathers some data and sends it to the WebSocket server:<\/p>\n<ul>\n<li>The position of a GameObject named <strong>Player<\/strong> is stored in a dictionary.<\/li>\n<li>The number of &#8220;meat throws&#8221;, is also stored.<\/li>\n<li>This dictionary data is then converted to a JSON string and sent to the game server via WebSocket.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as storage. Run the Project Clone the project source code from the GitHub repository. git clone https:\/\/github.com\/junwatu\/unity-node.js-griddb.git Change the directory into the project source code. cd unity-node.js-griddb Install the [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":29820,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Save Unity Game Data Using Node.js and GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as\" \/>\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\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Save Unity Game Data Using Node.js and GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-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-29T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-30T19:19:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1605\" \/>\n\t<meta property=\"og:image:height\" content=\"903\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Save Unity Game Data Using Node.js and GridDB\",\"datePublished\":\"2023-09-29T07:00:00+00:00\",\"dateModified\":\"2026-03-30T19:19:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\"},\"wordCount\":1976,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\",\"name\":\"Save Unity Game Data Using Node.js and GridDB | 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\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\",\"datePublished\":\"2023-09-29T07:00:00+00:00\",\"dateModified\":\"2026-03-30T19:19:10+00:00\",\"description\":\"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\",\"contentUrl\":\"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png\",\"width\":1605,\"height\":903},{\"@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\":\"en-US\"},{\"@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\":\"en-US\",\"@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\":\"en-US\",\"@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:\/\/www.griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Save Unity Game Data Using Node.js and GridDB | GridDB: Open Source Time Series Database for IoT","description":"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as","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\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Save Unity Game Data Using Node.js and GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as","og_url":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-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-29T07:00:00+00:00","article_modified_time":"2026-03-30T19:19:10+00:00","og_image":[{"width":1605,"height":903,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png","type":"image\/png"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"griddb-admin","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Save Unity Game Data Using Node.js and GridDB","datePublished":"2023-09-29T07:00:00+00:00","dateModified":"2026-03-30T19:19:10+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/"},"wordCount":1976,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/","url":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/","name":"Save Unity Game Data Using Node.js and GridDB | 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\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png","datePublished":"2023-09-29T07:00:00+00:00","dateModified":"2026-03-30T19:19:10+00:00","description":"Introduction In this post, we will build a simple game called Feed The Animals. This game uses Node.js as a backend server and the GridDB database as","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/save-unity-game-data-using-node-js-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png","contentUrl":"\/wp-content\/uploads\/2023\/09\/unity-nodejs-griddb.png","width":1605,"height":903},{"@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":"en-US"},{"@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":"en-US","@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":"en-US","@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:\/\/www.griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46777"}],"version-history":[{"count":2,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46777\/revisions"}],"predecessor-version":[{"id":55117,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46777\/revisions\/55117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/29820"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}