{"id":32295,"date":"2025-03-13T11:38:36","date_gmt":"2025-03-13T10:38:36","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=32295"},"modified":"2025-03-13T11:38:38","modified_gmt":"2025-03-13T10:38:38","slug":"queueing-without-a-queue-the-postgresql-hack","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/","title":{"rendered":"Queueing Without a Queue: The PostgreSQL Hack"},"content":{"rendered":"\n<p>This second article about queueing without a queue focuses on implementation based on PostgreSQL. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues&#8217; status. The leading actor of this post will be <a href=\"https:\/\/timgit.github.io\/pg-boss\/#\/\" target=\"_blank\" rel=\"noreferrer noopener\">pg-boss<\/a>, an NPM library that implements the queue system thanks to pg and PostgreSQL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pg-boss\">pg-boss<\/h2>\n\n\n\n<p>pg-boss is a job queue built in Node.js on top of PostgreSQL in order to provide background processing and reliable asynchronous execution to Node.js applications.<br>It has a straightforward API and exposes many great features to handle queues in our system.<br>To work with pg-boss, you must enable it to create a custom database schema for managing your queues. As we will see soon, just a simple NPM installation and some knowledge will prepare you to use it without any problem.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-get-started-with-pg-boss\">Get started with pg-boss<\/h2>\n\n\n\n<p>To start with pg-boss, install it on your Node.js project.<br>I have already created a simple project for you to follow along with the post; you can find it\u00a0<a href=\"https:\/\/github.com\/Puppo\/queueing-without-a-queue\/tree\/postgres-init\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<br>So, the first simple step, after the\u00a0<em>git clone<\/em>\u00a0and the\u00a0<em>npm install<\/em>, is to run the commands\u00a0<em><code>npm install pg pg-boss<\/code><\/em> and <em><code>npm install -D @types\/pg<\/code>.<\/em> Those commands install the dependency in your project.<br>With those, you are ready to use pg-boos on your project.<br>As you can see, this package\u2019s setup is smooth and easy to do.<br>Before starting coding, we need to set up a PostgreSQL database. I&#8217;ve already prepared it for you. If you have a <a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docker<\/a> instance installed on your laptop, type <em><code>docker compose up - d<\/code><\/em>, and your database is ready to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-the-queue\">Create the queue<\/h2>\n\n\n\n<p>First, you need to create a connection to the database to allow pg-boss to connect to it. pg-boss simplifies the step and enables you to pass the connection options.<br>So, create a file on this path, <code>src\/pgBoss.ts<\/code>, and add this content.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">import<\/span> PgBoss <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'pg-boss'<\/span>;\n  \n<span class=\"hljs-keyword\">const<\/span> pgBossInstance = <span class=\"hljs-keyword\">new<\/span> PgBoss({\n  <span class=\"hljs-attr\">host<\/span>: process.env.POSTGRES_HOST!,\n  <span class=\"hljs-attr\">port<\/span>: <span class=\"hljs-built_in\">Number<\/span>(process.env.POSTGRES_PORT!),\n  <span class=\"hljs-attr\">user<\/span>: process.env.POSTGRES_USER!,\n  <span class=\"hljs-attr\">password<\/span>: process.env.POSTGRES_PASSWORD!,\n  <span class=\"hljs-attr\">database<\/span>: process.env.POSTGRES_DB!,\n});\n\npgBossInstance.on(<span class=\"hljs-string\">'error'<\/span>, <span class=\"hljs-built_in\">console<\/span>.error)\n\n<span class=\"hljs-keyword\">await<\/span> pgBossInstance.start()\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> pgBossInstance;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This code creates a pg-boss instance and connects it to the database. As you can notice, creating a pg-boss instance is easy.<br>But now it&#8217;s time to create the queue.<br>Let&#8217;s start by adding the Queue name in the <em><code>src\/common.ts<\/code><\/em> file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\"><span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">const<\/span> QUEUE_NAME = <span class=\"hljs-string\">'user-creation-queue'<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now, it&#8217;s time to create your queue. Create a new file on this path, <code>src\/queue.ts<\/code>, and add this code.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\"><span class=\"hljs-keyword\">import<\/span> pgBossInstance <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"pgBoss.js\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { QUEUE_NAME, UserCreatedTask } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/common.js\"<\/span>;\n\n<span class=\"hljs-keyword\">await<\/span> pgBossInstance.createQueue(QUEUE_NAME, {\n  name: QUEUE_NAME,\n  retryLimit: <span class=\"hljs-number\">2<\/span>\n});\n\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">enqueueJob<\/span>(<span class=\"hljs-params\">job: UserCreatedTask<\/span>) <\/span>{\n  <span class=\"hljs-keyword\">return<\/span> pgBossInstance.send(QUEUE_NAME, job);\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>As you can notice, this code is also easy to understand.<br>First, you import the Queue name. Then, using the <code>createQueue<\/code> method, you create a pg-boss queue with the name and the <code>retryLimit<\/code> equal to two; this means that if the same message fails twice, the queue discards it. If you want, you can also define a dead letter queue and find more info <a href=\"https:\/\/timgit.github.io\/pg-boss\/#\/.\/api\/queues\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<br>Last but not least, you are exporting a function `enqueueJob` to push tasks in the queue.<br>The last point is to push data inside the queue, so move to the file <code>src\/index.ts<\/code> and add these two imports after the <code>randomUUID<\/code> import<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\"><span class=\"hljs-keyword\">import<\/span> logger <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'logger.js'<\/span>;\n<span class=\"hljs-keyword\">import<\/span> { enqueueJob } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">'queue.js'<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>and then replace the TODO with the following code.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\"> <span class=\"hljs-keyword\">const<\/span> idTask = <span class=\"hljs-keyword\">await<\/span> enqueueJob(task);\n logger.info(task, <span class=\"hljs-string\">`Task with id <span class=\"hljs-subst\">${idTask}<\/span> has been pushed`<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This code permits you to push events inside of the queue.<br>Let&#8217;s test it out.<br>Open the terminal and type <code>npm run start<\/code>; the result should be something like this<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">&#91;19:07:34.036] INFO (23215): Task with id a5a01088-25b9-424c-8a1e-4ec1e678ae96 has been pushed\n    id: <span class=\"hljs-string\">\"8cd828c2-4028-45bb-bea4-6cdaf3627496\"<\/span>\n&#91;19:07:34.037] INFO (23215): Task with id 92071cf5-d278-4654-8fda-4076763e62d1 has been pushed\n    id: <span class=\"hljs-string\">\"13e6b091-b85e-48ba-9d2c-a376fc5ada8d\"<\/span>\n&#91;19:07:34.038] INFO (23215): Task with id 1567a32b-daa2-43f7-a016-2729f5511f86 has been pushed\n    id: <span class=\"hljs-string\">\"0589cb0e-9423-48dc-ab05-85ac560aa886\"<\/span>\n&#91;19:07:34.039] INFO (23215): Task with id 5aecbd45-a6d5-4913-816f-8bb495792569 has been pushed\n    id: <span class=\"hljs-string\">\"8b0218d1-22eb-4869-9bf8-7d9bc42b84a0\"<\/span>\n&#91;19:07:34.040] INFO (23215): Task with id adc92a04-ff85-49a6-9539-ea993b77a31c has been pushed\n    id: <span class=\"hljs-string\">\"1269f0d5-bbcd-49fd-89d5-7102be8237be\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Great! You&#8217;ve just completed the first part, and now you know how to push data inside a pg-boss queue. Let&#8217;s move on to the processing.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-processing-messages-with-pg-boss\">Processing messages with pg-boss<\/h2>\n\n\n\n<p>To process the messages, I&#8217;ve already prepared a file, <code>src\/worker.js<\/code>, where you will type the code.<br>You can open the <code>src\/worker.js<\/code> file and add the following imports<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\"><span class=\"hljs-keyword\">import<\/span> { setTimeout } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"timers\/promises\"<\/span>;\n\n<span class=\"hljs-keyword\">import<\/span> { QUEUE_NAME, UserCreatedTask } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/common.js\"<\/span>;\n<span class=\"hljs-keyword\">import<\/span> pgBossInstance <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\".\/pgBoss.js\"<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>and replace the TODO with the next code<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"TypeScript\" data-shcb-language-slug=\"typescript\"><span><code class=\"hljs language-typescript\">pgBossInstance.work&lt;UserCreatedTask&gt;<span class=\"hljs-function\">(<span class=\"hljs-params\"><span class=\"hljs-params\">QUEUE_NAME<\/span>, <span class=\"hljs-params\">async<\/span> (&#91;<span class=\"hljs-params\">job<\/span>]<\/span>) =&gt;<\/span> {\n  <span class=\"hljs-keyword\">if<\/span> (!messagesHandled&#91;job.id]) {\n    messagesHandled&#91;job.id] = { retries: <span class=\"hljs-number\">0<\/span>, result: <span class=\"hljs-string\">'created'<\/span> }; \n } <span class=\"hljs-keyword\">else<\/span> {\n    messagesHandled&#91;job.id].retries++;\n }\n  <span class=\"hljs-keyword\">const<\/span> resultType = <span class=\"hljs-built_in\">Math<\/span>.random() &gt; <span class=\"hljs-number\">0.6<\/span>;\n  <span class=\"hljs-keyword\">const<\/span> fakeImplementation = resultType ? <span class=\"hljs-string\">'success'<\/span> : <span class=\"hljs-string\">'error'<\/span>\n  <span class=\"hljs-keyword\">const<\/span> timeout = fakeImplementation === <span class=\"hljs-string\">'success'<\/span> ? <span class=\"hljs-number\">2000<\/span> : <span class=\"hljs-number\">1000<\/span>;\n  <span class=\"hljs-keyword\">await<\/span> setTimeout(timeout);\n  <span class=\"hljs-keyword\">if<\/span> (fakeImplementation === <span class=\"hljs-string\">'error'<\/span>) {\n    messagesHandled&#91;job.id].result = <span class=\"hljs-string\">'error'<\/span>;\n    printMessagesHandled();\n    <span class=\"hljs-keyword\">const<\/span> message = <span class=\"hljs-string\">`User created task got error with id: <span class=\"hljs-subst\">${job.id}<\/span>`<\/span>\n    <span class=\"hljs-keyword\">throw<\/span> <span class=\"hljs-keyword\">new<\/span> <span class=\"hljs-built_in\">Error<\/span>(message);\n } <span class=\"hljs-keyword\">else<\/span> {\n    messagesHandled&#91;job.id].result = <span class=\"hljs-string\">'success'<\/span>;\n    printMessagesHandled();\n }\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">TypeScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">typescript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If you look at this code, you are simulating message processing. First, you handle a map with all the processed messages to print the result in the console. Then, using Math.random(), you determine whether the message will fail or succeed and wait two or one seconds based on the result type. Last, if the message must fail, you throw an error; otherwise, you print the result in the console (only for showing the result of this example).<br>As you can understand, if the function raises an error, pg-boss will mark the message as a failure; otherwise, it will be interpreted as completed.<br>Let&#8217;s run this code by running it again <code>npm run start<\/code>.<br>The final result should look like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">Unique messages handled: 5\n940c9d32-3b83-4034-ba81-3b2d88035305: success (2 retries)\na19a224f-20c1-4481-b54b-81d73b81c691: success (1 retries)\n701f1a33-bde2-4013-9bd3-d4a4e0bedcf7: success (2 retries)\nd00b4a03-2e11-4f05-b2c3-8e60f2efe4f6: success (1 retries)\n6d660781-0fdf-4414-8bc6-d791be0588dc: success (0 retries)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>As you can see, the system has handled five messages in this case. Some of them had retries, and some did not.<br>Perfect! Now, you also learned how to process messages with pg-boss.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>It&#8217;s time to wrap up this post!<\/p>\n\n\n\n<p>As you can see, working with pg-boss is straightforward; the API is simple, and the code stays simple. This approach can be an excellent solution if you don&#8217;t have a specific queue system in your architecture, but you have to pay attention to the load you can have in the database to handle your queues; this is why, in the following article, we will see another solution: the solution that my team chose to strike the right balance between performance and simplicity.<\/p>\n\n\n\n<p>Okay, that&#8217;s it from pg-boss. I hope you enjoyed the article, and I look forward to seeing you in the next article.<\/p>\n\n\n\n<p>Bye-bye \ud83d\udc4b<\/p>\n\n\n\n<p>p.s. You can find the result code of the article <a href=\"https:\/\/github.com\/Puppo\/queueing-without-a-queue\/tree\/postgres-result\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This second article about queueing without a queue focuses on implementation based on PostgreSQL. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues&#8217; status. The leading actor of this post will be pg-boss, an NPM library that implements the queue system thanks&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\">Read more<\/a><\/p>\n","protected":false},"author":309,"featured_media":32435,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[36],"tags":[9961,57,12176,13097,9971],"collections":[11387],"class_list":{"0":"post-32295","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-backend","8":"tag-javascript","9":"tag-node-js","10":"tag-postgresql","11":"tag-queue","12":"tag-typescript","13":"collections-top-of-the-week","14":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Queueing Without a Queue: The PostgreSQL Hack<\/title>\n<meta name=\"description\" content=\"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues&#039; status.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Queueing Without a Queue: The PostgreSQL Hack\" \/>\n<meta property=\"og:description\" content=\"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues&#039; status.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-13T10:38:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-13T10:38:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1792\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Puppo92\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Puppo92\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\"},\"author\":{\"name\":\"Puppo92\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/59285912d17139a5023ec1bc0850571f\"},\"headline\":\"Queueing Without a Queue: The PostgreSQL Hack\",\"datePublished\":\"2025-03-13T10:38:36+00:00\",\"dateModified\":\"2025-03-13T10:38:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\"},\"wordCount\":849,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp\",\"keywords\":[\"JavaScript\",\"Node.js\",\"PostgreSQL\",\"queue\",\"typescript\"],\"articleSection\":[\"Backend\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\",\"name\":\"Queueing Without a Queue: The PostgreSQL Hack\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp\",\"datePublished\":\"2025-03-13T10:38:36+00:00\",\"dateModified\":\"2025-03-13T10:38:38+00:00\",\"description\":\"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues' status.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp\",\"width\":1792,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/backend\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Queueing Without a Queue: The PostgreSQL Hack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/59285912d17139a5023ec1bc0850571f\",\"name\":\"Puppo92\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f53382233f04621eca9e506d7cc3bbed35855197ea72254ad3e31b9a0b6d39a8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f53382233f04621eca9e506d7cc3bbed35855197ea72254ad3e31b9a0b6d39a8?s=96&d=mm&r=g\",\"caption\":\"Puppo92\"},\"description\":\"I'm a Senior Software Developer, Microsoft MVP, Google Developer Expert Codemotion Ambassador and GitKraken Ambassador. I love JavaScript and TypeScript. In my free time, I love studying new technologies, improving myself, creating YouTube content or writing technical articles. I can\u2019t stay without trail running and love to do it in my love Dolomiti.\",\"sameAs\":[\"https:\/\/www.delpuppo.net\/\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/puppo92\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Queueing Without a Queue: The PostgreSQL Hack","description":"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues' status.","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:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/","og_locale":"en_US","og_type":"article","og_title":"Queueing Without a Queue: The PostgreSQL Hack","og_description":"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues' status.","og_url":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2025-03-13T10:38:36+00:00","article_modified_time":"2025-03-13T10:38:38+00:00","og_image":[{"width":1792,"height":1024,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp","type":"image\/webp"}],"author":"Puppo92","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Puppo92","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/"},"author":{"name":"Puppo92","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/59285912d17139a5023ec1bc0850571f"},"headline":"Queueing Without a Queue: The PostgreSQL Hack","datePublished":"2025-03-13T10:38:36+00:00","dateModified":"2025-03-13T10:38:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/"},"wordCount":849,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp","keywords":["JavaScript","Node.js","PostgreSQL","queue","typescript"],"articleSection":["Backend"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/","url":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/","name":"Queueing Without a Queue: The PostgreSQL Hack","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp","datePublished":"2025-03-13T10:38:36+00:00","dateModified":"2025-03-13T10:38:38+00:00","description":"This second article about queueing without a queue focuses on Postgres implementation. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues' status.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp","width":1792,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/queueing-without-a-queue-the-postgresql-hack\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Backend","item":"https:\/\/www.codemotion.com\/magazine\/backend\/"},{"@type":"ListItem","position":3,"name":"Queueing Without a Queue: The PostgreSQL Hack"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/59285912d17139a5023ec1bc0850571f","name":"Puppo92","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f53382233f04621eca9e506d7cc3bbed35855197ea72254ad3e31b9a0b6d39a8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f53382233f04621eca9e506d7cc3bbed35855197ea72254ad3e31b9a0b6d39a8?s=96&d=mm&r=g","caption":"Puppo92"},"description":"I'm a Senior Software Developer, Microsoft MVP, Google Developer Expert Codemotion Ambassador and GitKraken Ambassador. I love JavaScript and TypeScript. In my free time, I love studying new technologies, improving myself, creating YouTube content or writing technical articles. I can\u2019t stay without trail running and love to do it in my love Dolomiti.","sameAs":["https:\/\/www.delpuppo.net\/"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/puppo92\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-600x400.webp","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-600x600.webp","author_info":{"display_name":"Puppo92","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/puppo92\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp",1792,1024,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-150x150.webp",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-300x171.webp",300,171,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-768x439.webp",768,439,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-1024x585.webp",1024,585,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-1536x878.webp",1536,878,true],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg.webp",1792,1024,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-100x100.webp",100,100,true],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-180x128.webp",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-896x504.webp",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-400x225.webp",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-600x400.webp",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-03-13-11.36.20-A-software-developer-specializing-in-queue-management-systems-working-at-a-modern-desk-with-multiple-monitors-displaying-complex-queue-processing-alg-600x600.webp",600,600,true]},"uagb_author_info":{"display_name":"Puppo92","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/puppo92\/"},"uagb_comment_info":0,"uagb_excerpt":"This second article about queueing without a queue focuses on implementation based on PostgreSQL. This solution moves the queue implementation from the node system to the database, where it has dedicated storage to save the queues&#8217; status. The leading actor of this post will be pg-boss, an NPM library that implements the queue system thanks&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/32295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=32295"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/32295\/revisions"}],"predecessor-version":[{"id":32299,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/32295\/revisions\/32299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/32435"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=32295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=32295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=32295"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=32295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}