{"id":1209,"date":"2022-08-07T00:12:36","date_gmt":"2023-05-19T06:37:44","guid":{"rendered":"https:\/\/www.silicloud.com\/blog\/uncategorized\/ensuring-thread-safety-in-java-singleton-classes\/"},"modified":"2024-03-10T15:02:57","modified_gmt":"2024-03-10T15:02:57","slug":"ensuring-thread-safety-in-java-singleton-classes","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/","title":{"rendered":"Ensuring thread safety in Java Singleton Classes"},"content":{"rendered":"<p>The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton class is crucial when used in a multi-threaded environment. In real-world scenarios, it is essential to use limited resources like Database connections or Enterprise Information Systems (EIS) wisely in order to prevent any shortage. This can be accomplished by implementing a Singleton design pattern, which involves creating a wrapper class for the resource and restricting the number of objects created to just one during runtime.<\/p>\n<h2>Java&#8217;s <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/lang\/Thread.html\">Thread<\/a> Safe Singleton<\/h2>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655dd6b3cdcf9b6757a02083\/2-0.jpg\" alt=\"thread safe singleton in java\" \/><\/div>\n<ol>To prevent the creation of new objects using the new operator, implement a private constructor. Define a private static instance of the class and offer a public static method that returns the instance variable of the singleton class. If the variable is not yet initialized, initialize it; otherwise, return the instance variable.<\/ol>\n<p>After following the aforementioned steps, I have successfully developed a singleton class known as ASingleton.java.<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.designpatterns;\r\n\r\npublic class ASingleton {\r\n\r\n\tprivate static ASingleton instance = null;\r\n\r\n\tprivate ASingleton() {\r\n\t}\r\n\r\n\tpublic static ASingleton getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new ASingleton();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>The getInstance() method in the provided code is not thread-safe, meaning that multiple threads can access it concurrently. When the instance variable is not yet initialized, the first few threads can enter the if loop simultaneously and generate multiple instances, which would undermine the implementation of our singleton.<\/p>\n<h2>What is the approach to ensure thread-safety in a Singleton Class?<\/h2>\n<p>We can accomplish thread safety in three different ways.<\/p>\n<ol>One advantage is that the instance variable is created during the loading of the class.<\/ol>\n<ul class=\"post-ul\">\n<li>Thread safety without synchronization<\/li>\n<li>Easy to implement<\/li>\n<\/ul>\n<p>Drawbacks:<\/p>\n<ul class=\"post-ul\">\n<li>Early creation of resource that might not be used in the application.<\/li>\n<li>The client application can\u2019t pass any argument, so we can\u2019t reuse it. For example, having a generic singleton class for database connection where client application supplies database server properties.<\/li>\n<\/ul>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>&#8211; Ensure thread safety in accessing the getInstance() method.<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>&#8211; Prevent multiple threads from creating multiple instances of the object simultaneously.<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>&#8211; Maintain consistency and avoid race conditions in multi-threaded environments.<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>&#8211; Improve performance by reducing the overhead of unnecessary object creation.<\/ol>\n<ul class=\"post-ul\">\n<li>Thread safety is guaranteed.<\/li>\n<li>Client application can pass parameters<\/li>\n<li>Lazy initialization achieved<\/li>\n<\/ul>\n<p>Drawbacks:<\/p>\n<ul class=\"post-ul\">\n<li>Slow performance because of locking overhead.<\/li>\n<li>Unnecessary synchronization that is not required once the instance variable is initialized.<\/li>\n<\/ul>\n<ol>One advantage is that you can incorporate a synchronized block within the if loop and utilize a volatile variable.<\/ol>\n<ul class=\"post-ul\">\n<li>Thread safety is guaranteed<\/li>\n<li>Client application can pass arguments<\/li>\n<li>Lazy initialization achieved<\/li>\n<li>Synchronization overhead is minimal and applicable only for first few threads when the variable is null.<\/li>\n<\/ul>\n<p>Downsides:<\/p>\n<ul class=\"post-ul\">\n<li>Extra if condition<\/li>\n<\/ul>\n<p>After considering all three methods for achieving thread-safety, I believe the third one is the optimal choice. Consequently, the modified class will have the following appearance:<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.designpatterns;\r\n\r\npublic class ASingleton {\r\n\r\n\tprivate static volatile ASingleton instance;\r\n\tprivate static Object mutex = new Object();\r\n\r\n\tprivate ASingleton() {\r\n\t}\r\n\r\n\tpublic static ASingleton getInstance() {\r\n\t\tASingleton result = instance;\r\n\t\tif (result == null) {\r\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\tresult = instance;\r\n\t\t\t\tif (result == null)\r\n\t\t\t\t\tinstance = result = new ASingleton();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>The presence of the local variable result may appear unnecessary, but it serves to enhance the efficiency of our code. By using &#8220;return result;&#8221; instead of &#8220;return instance;&#8221;, the volatile field is accessed only once in cases where the instance is already initialized, which can boost the performance of the method by up to 25 percent. If you have alternative methods or concerns about the thread-safety of the above implementation, kindly share your thoughts for discussion.<\/p>\n<h2>Additional suggestion.<\/h2>\n<p>Using the synchronized keyword with a String is not ideal since Strings are stored in a pool and there is a risk of locking a String that is being used by another section of code. Instead, I am using an Object variable. Explore further about synchronization and ensuring thread safety in Java.<\/p>\n<p>You can explore additional Java examples on our GitHub Repository.<\/p>\n<p>&nbsp;<\/p>\n<p>More tutorials<\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/multithreading-in-java-that-you-need-to-know\/\" target=\"_blank\" rel=\"noopener\">multithreading in Java that you need to know<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/java-thread-ensuring-safety\/\" target=\"_blank\" rel=\"noopener\">Java thread ensuring Java code is thread-safe<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/example-tutorial-for-the-strategy-design-pattern-in-java\/\" target=\"_blank\" rel=\"noopener\">Strategy Design Pattern in Java tutorial<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/how-can-a-pandas-dataframe-be-acquired-from-an-api-endpoint-that-lacks-order\/\" target=\"_blank\" rel=\"noopener\">get pandas DataFrame from an API endpoint that lacks order?<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p><a class=\"LinkSuggestion__Link-sc-1gewdgc-4 cLBplk\" href=\"https:\/\/www.silicloud.com\/blog\/converting-a-python-string-to-an-integer-and-vice-versa\/\" target=\"_blank\" rel=\"noopener\">Converting a Python string to an integer and vice versa.<span class=\"sc-gswNZR eASTkv\">(Opens in a new browser tab)<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton class is crucial when used in a multi-threaded environment. In real-world scenarios, it is essential to use limited resources like Database connections or Enterprise Information Systems (EIS) wisely in order to prevent any shortage. This can [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-1209","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ensuring thread safety in Java Singleton Classes - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton\" \/>\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.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ensuring thread safety in Java Singleton Classes\" \/>\n<meta property=\"og:description\" content=\"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-19T06:37:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-10T15:02:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655dd6b3cdcf9b6757a02083\/2-0.jpg\" \/>\n<meta name=\"author\" content=\"Emily Johnson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:site\" content=\"@SiliCloudGlobal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Emily Johnson\" \/>\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.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\"},\"author\":{\"name\":\"Emily Johnson\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378\"},\"headline\":\"Ensuring thread safety in Java Singleton Classes\",\"datePublished\":\"2023-05-19T06:37:44+00:00\",\"dateModified\":\"2024-03-10T15:02:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\"},\"wordCount\":665,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\",\"name\":\"Ensuring thread safety in Java Singleton Classes - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\"},\"datePublished\":\"2023-05-19T06:37:44+00:00\",\"dateModified\":\"2024-03-10T15:02:57+00:00\",\"description\":\"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.silicloud.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ensuring thread safety in Java Singleton Classes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"name\":\"Silicon Cloud Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#organization\",\"name\":\"Silicon Cloud Blog\",\"url\":\"https:\/\/www.silicloud.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"contentUrl\":\"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png\",\"width\":1024,\"height\":1024,\"caption\":\"Silicon Cloud Blog\"},\"image\":{\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SiliCloudGlobal\/\",\"https:\/\/twitter.com\/SiliCloudGlobal\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378\",\"name\":\"Emily Johnson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g\",\"caption\":\"Emily Johnson\"},\"url\":\"https:\/\/www.silicloud.com\/blog\/author\/emilyjohnson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ensuring thread safety in Java Singleton Classes - Blog - Silicon Cloud","description":"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton","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.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/","og_locale":"en_US","og_type":"article","og_title":"Ensuring thread safety in Java Singleton Classes","og_description":"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton","og_url":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/","og_site_name":"Blog - Silicon Cloud","article_publisher":"https:\/\/www.facebook.com\/SiliCloudGlobal\/","article_published_time":"2023-05-19T06:37:44+00:00","article_modified_time":"2024-03-10T15:02:57+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/655dd6b3cdcf9b6757a02083\/2-0.jpg"}],"author":"Emily Johnson","twitter_card":"summary_large_image","twitter_creator":"@SiliCloudGlobal","twitter_site":"@SiliCloudGlobal","twitter_misc":{"Written by":"Emily Johnson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#article","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/"},"author":{"name":"Emily Johnson","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378"},"headline":"Ensuring thread safety in Java Singleton Classes","datePublished":"2023-05-19T06:37:44+00:00","dateModified":"2024-03-10T15:02:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/"},"wordCount":665,"commentCount":0,"publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/","url":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/","name":"Ensuring thread safety in Java Singleton Classes - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/blog\/#website"},"datePublished":"2023-05-19T06:37:44+00:00","dateModified":"2024-03-10T15:02:57+00:00","description":"The Singleton design pattern is extensively employed to control object creation in applications. Ensuring thread safety for the singleton","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/blog\/ensuring-thread-safety-in-java-singleton-classes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.silicloud.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ensuring thread safety in Java Singleton Classes"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/blog\/#website","url":"https:\/\/www.silicloud.com\/blog\/","name":"Silicon Cloud Blog","description":"","publisher":{"@id":"https:\/\/www.silicloud.com\/blog\/#organization"},"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.silicloud.com\/blog\/#organization","name":"Silicon Cloud Blog","url":"https:\/\/www.silicloud.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","contentUrl":"https:\/\/www.silicloud.com\/blog\/wp-content\/uploads\/2023\/11\/EN-SILICON-Full.png","width":1024,"height":1024,"caption":"Silicon Cloud Blog"},"image":{"@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SiliCloudGlobal\/","https:\/\/twitter.com\/SiliCloudGlobal"]},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/3b041b19cffc258705478ecfab895378","name":"Emily Johnson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.silicloud.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a5cb4e73d02ab1d79f2dfe919389ff7c1de072baa97686392031c03d858cc358?s=96&d=mm&r=g","caption":"Emily Johnson"},"url":"https:\/\/www.silicloud.com\/blog\/author\/emilyjohnson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/1209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/comments?post=1209"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/1209\/revisions"}],"predecessor-version":[{"id":1831,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/posts\/1209\/revisions\/1831"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/media?parent=1209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/categories?post=1209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/blog\/wp-json\/wp\/v2\/tags?post=1209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}