{"id":2224,"date":"2016-04-14T17:33:59","date_gmt":"2016-04-14T17:33:58","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2224"},"modified":"2023-09-09T02:31:34","modified_gmt":"2023-09-09T09:31:34","slug":"embed-couchbase-in-an-iot-project-for-data-synchronization","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/embed-couchbase-in-an-iot-project-for-data-synchronization\/","title":{"rendered":"Integrar Couchbase en un proyecto IoT para la sincronizaci\u00f3n de datos"},"content":{"rendered":"<p>El Internet de los objetos (IoT) se est\u00e1 poniendo de moda \u00faltimamente. Poder fabricar cualquier dispositivo mec\u00e1nico, por ejemplo relojes, televisores, termostatos, y hacer que se comuniquen a trav\u00e9s de Internet es la era moderna. En esta era moderna, una cosa que permanece constante es la necesidad de transferir y almacenar datos. \u00bfC\u00f3mo se hace esto desde un dispositivo IoT?<\/p>\n<p><a href=\"https:\/\/developer.couchbase.com\/server\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Servidor Couchbase<\/a> para almacenar cantidades masivas de datos empresariales y <a href=\"https:\/\/www.couchbase.com\/blog\/es\/developers\/mobile\/?utm_source=blogs&amp;utm_medium=link&amp;utm_campaign=blogs\">Couchbase M\u00f3vil<\/a> existe para almacenar datos localmente en dispositivos m\u00f3viles y sincronizarlos con Couchbase Server cuando sea posible. \u00bfD\u00f3nde encaja IoT en todo esto? Los dispositivos IoT no son servidores y t\u00e9cnicamente no son dispositivos m\u00f3viles.<\/p>\n<p>\u00bfSab\u00edas que muchos dispositivos IoT son capaces de ejecutar aplicaciones Java? En realidad hay un SDK de Couchbase Lite para Java. No es un SDK para Android o iOS. Es un SDK para aplicaciones Java en general. Con esto, podemos usarlo para IoT.<\/p>\n<h2>Alcance del proyecto<\/h2>\n<p>Ahora que sabemos que es posible, pensemos en un buen ejemplo de IoT y ejecut\u00e9moslo. Vamos con un ejemplo iBeacon bajo el siguiente escenario.<\/p>\n<p>Supongamos que desea rastrear a su mascota cuando est\u00e1 fuera de casa. Quiere saber por d\u00f3nde pasa su mascota y a qu\u00e9 horas del d\u00eda. As\u00ed que decide colocar un iBeacon en el collar de su mascota e instalar varios esc\u00e1neres IoT en su casa.<\/p>\n<p>As\u00ed, con el iBeacon conectado y las pasarelas IoT instaladas, los dispositivos IoT pueden buscar continuamente iBeacons. Cuando un iBeacon entra en el radio de alcance, se guarda una marca de tiempo junto con la ubicaci\u00f3n y la informaci\u00f3n de la baliza, y se carga en el servidor. M\u00e1s tarde puede crear su propio panel de control con un mapa de calor para comprender mejor sus datos.<\/p>\n<p>\u00bfQu\u00e9 hace falta para probar este proyecto?<\/p>\n<h2>Requisitos<\/h2>\n<p>Hay algunos requisitos tanto en el \u00e1mbito del software como del hardware. Pueden verse a continuaci\u00f3n:<\/p>\n<ul>\n<li>M\u00ednimo uno (1) <a href=\"https:\/\/www.intel.com\/content\/www\/us\/en\/embedded\/solutions\/iot-gateway\/development-kits.html\">Pasarela Intel IoT<\/a><\/li>\n<li>M\u00ednimo uno (1) <a href=\"https:\/\/store.gimbal.com\/\">Gimbal<\/a> baliza de proximidad<\/li>\n<li>Java 1.7+<\/li>\n<li>Maven<\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/es\/nosql-databases\/downloads\/\">Pasarela de sincronizaci\u00f3n Couchbase<\/a><\/li>\n<\/ul>\n<p>Aunque hay un requisito de hardware, la marca del hardware es un poco flexible. He incluido tanto la pasarela Intel IoT como las balizas de proximidad Gimbal porque no s\u00f3lo son incre\u00edblemente asequibles, sino que son las que he utilizado al crear mi aplicaci\u00f3n. Para sacar el m\u00e1ximo provecho de este ejemplo, lo mejor es tener varias balizas y puertas de enlace, pero una estar\u00e1 bien para la creaci\u00f3n de prototipos.<\/p>\n<p>A continuaci\u00f3n se explica c\u00f3mo se llevar\u00e1 a cabo este proyecto.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/april\/embed-couchbase-in-an-iot-project-for-data-synchronization\/iot-beacon-flow.png\" \/><\/p>\n<p>El c\u00f3digo fuente completo de este proyecto puede consultarse en <a href=\"https:\/\/github.com\/couchbaselabs\/iot-beacon-example\">GitHub<\/a>.<\/p>\n<h2>Guardar los datos con Couchbase<\/h2>\n<p>Antes de entrar en el trabajo de IoT y balizas, ser\u00eda una buena idea definir nuestro modelo de datos y construir nuestra aplicaci\u00f3n Java. En este escenario, que es uno de muchos, la aplicaci\u00f3n Java no buscar\u00e1 balizas. S\u00f3lo ser\u00e1 responsable de guardar los datos.<\/p>\n<h3>El modelo de datos de Couchbase Beacon<\/h3>\n<p>Si no est\u00e1s familiarizado con los iBeacons, no ofrecen nada m\u00e1s que unos pocos valores de cadena y enteros en su transmisi\u00f3n. No se puede conectar a ellos y no pueden ver otros dispositivos. Lo \u00fanico que hacen es emitir. Dicho esto, los valores emitidos son los siguientes:<\/p>\n<ul>\n<li>UUID<\/li>\n<li>Mayor<\/li>\n<li>Menor<\/li>\n<li>Potencia<\/li>\n<\/ul>\n<p>En <strong>UUID<\/strong>, <strong>Mayor<\/strong>y <strong>Menor<\/strong> ofrecen informaci\u00f3n uniquness sobre una baliza concreta. Los tres valores pueden formar una clave compuesta \u00fatil para consultas posteriores.<\/p>\n<p>Pensemos en c\u00f3mo vamos a almacenar los datos de la baliza cada vez que se detecte una.<\/p>\n<p>Podr\u00edamos crear un nuevo documento JSON cada vez que se detecte una baliza. Los documentos individuales podr\u00edan tener un aspecto similar a:<\/p>\n<pre><code>\r\n{\r\n    \"uuid\": \"32342342\",\r\n    \"major\": 1,\r\n    \"minor\": 0,\r\n    \"createdAt\": 1932847298,\r\n    \"gatewayDevice\": \"kitchen\"\r\n}\r\n<\/code><\/pre>\n<p>El planteamiento anterior no tiene nada de malo. Sin embargo, podr\u00edas acabar con cantidades masivas de documentos dependiendo de cu\u00e1ntas balizas tengas circulando. Una vez m\u00e1s, Couchbase fue dise\u00f1ado para manejar esto, as\u00ed que es una cuesti\u00f3n de preferencia. Yo prefiero mantener todas las transacciones de una baliza en particular en el mismo documento:<\/p>\n<pre><code>\r\n{\r\n    \"uuid\": \"23423423\",\r\n    \"major\": 1,\r\n    \"minor\": 0,\r\n    \"beaconStatus\": [\r\n        {\r\n            \"createdAt\": 234234321234,\r\n            \"gatewayDevice\": \"kitchen\"\r\n        },\r\n        {\r\n            \"createdAt\": 12312323544,\r\n            \"gatewayDevice\": \"garage\"\r\n        }\r\n    ]\r\n}\r\n<\/code><\/pre>\n<p>En el segundo escenario, cada vez que se descubra una baliza, se consultar\u00e1 a Couchbase en funci\u00f3n de la clave compuesta y, a continuaci\u00f3n, los datos de estado se a\u00f1adir\u00e1n a la matriz de estado.<\/p>\n<h3>A\u00f1adir las dependencias de Maven<\/h3>\n<p>Dado que este proyecto Java va a estar basado en Maven, el archivo <strong>pom.xml<\/strong> necesita satisfacer ciertas dependencias. A\u00f1ade la siguiente dependencia a tu archivo Maven para incluir Couchbase Lite Java SDK en tu proyecto:<\/p>\n<pre><code>\r\n\r\n   com.couchbase.lite\r\n   couchbase-lite-java\r\n   1.2.0\r\n\r\n<\/code><\/pre>\n<p>La dependencia anterior te permitir\u00e1 almacenar documentos Couchbase localmente en tu dispositivo IoT y hacer que se sincronicen con Couchbase Sync Gateway.<\/p>\n<h3>Creaci\u00f3n de una clase de baliza<\/h3>\n<p>Dado que vamos a trabajar con iBeacons, tiene sentido crear una clase Java Beacon. Esta clase debe ser responsable de guardar los datos de la baliza, as\u00ed como de cargarlos en caso de consulta. Empecemos echando un vistazo a c\u00f3mo es la carga:<\/p>\n<pre><code>\r\nprivate Document load(Database database) {\r\n    Document document = null;\r\n    try {\r\n        View beaconView = database.getView(\"beacons\");\r\n        beaconView.setMap(new Mapper() {\r\n            @Override\r\n            public void map(Map&lt;String, Object&gt; document, Emitter emitter) {\r\n                List<object> keys = new ArrayList<object>();                keys.add(document.get(\"uuid\"));                keys.add(document.get(\"major\"));                keys.add(document.get(\"minor\"));                emitter.emit(keys, document.get(\"beaconStatus\"));            }        }, \"1\");        Query query = beaconView.createQuery();        List<object> keys = new ArrayList<object>();        List<object> key = new ArrayList<object>();        key.add(this.uuid);        key.add(this.major);        key.add(this.minor);        keys.add(key);        query.setKeys(keys);        QueryEnumerator result = query.run();        for (Iterator it = result; it.hasNext(); ) {            QueryRow row = it.next();            document = row.getDocument();        }    } catch (Exception e) {        e.printStackTrace();    }    return document;}A lot is happening in the above load so let's take a look at it.Since Couchbase Lite queries based on MapReduce views we first create a view. Remember we plan to use a composite key which is why we create a list of keys. The only data we need returned if a match was found is the status array that contains timestamp and gateway information.With the view in place, a query can be constructed. Since we are in a custom Java class, let's assume that we've captured the <strong>uuid<\/strong>, <strong>mayor<\/strong>y <strong>menor<\/strong> values at some point in time. We'll construct the key lists out of the values and set the query to use them with the <code>query.setKeys<\/code> function.After the query runs we'll loop through the results. We are only expecting one result which can further be insured by using a limit function before executing the query. The result returned from the query, if any, will be returned to whatever calls the load function. In this case the save function calls it before saving.Now let's take a look at the save function of our beacon class.\r\n<pre><code>public String save(Database database) {    String docId = \"\";    Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;();    ArrayList beaconStatusList = new ArrayList();    Document document = this.load(database);    if(document != null) {        properties.putAll(document.getProperties());        beaconStatusList = (ArrayList) properties.get(\"beaconStatus\");    } else {        document = database.createDocument();        properties.put(\"uuid\", this.uuid);        properties.put(\"major\", this.major);        properties.put(\"minor\", this.minor);    }    beaconStatusList.add(this.beaconStatus);    properties.put(\"beaconStatus\", beaconStatusList);    try {        docId = document.putProperties(properties).getDocument().getId();    } catch (Exception e) {        e.printStackTrace();    }    return docId;}<\/code><\/pre>\n<p>In the save function we first want to load documents to see if they first exist. If a document exists for the beacon information, we want to add to it, otherwise we can just create a new document. After we've reconstructed our Couchbase document, whether it be from scratch or from existing document data, we save it via the <code>putProperties<\/code> En este punto, los datos de la baliza pueden guardarse y leerse desde la base de datos local de Couchbase Lite.<\/p>\n<h3>Sincronizaci\u00f3n con Couchbase Sync Gateway<\/h3>\n<p>More than likely you're going to be working with more than one IoT scanning gateway. Because of this, the beacon data (in the embedded document model) will need to be synchronized between IoT devices. Now we can take our saving and loading code to the next level.Take a look at the following code:<\/p>\n<pre><code>try {    manager = new Manager(new JavaContext(\"data\"), Manager.DEFAULT_OPTIONS);    database = manager.getDatabase(\"iot-project\");    URL url = new URL(\"https:\/\/192.168.1.174:4984\/beacons-iot\/\");    final Replication push = database.createPushReplication(url);    Replication pull = database.createPullReplication(url);    pull.setContinuous(false);    push.setContinuous(false);    pull.addChangeListener(new Replication.ChangeListener() {        @Override        public void changed(Replication.ChangeEvent event) {            if(event.getSource().getStatus() == Replication.ReplicationStatus.REPLICATION_STOPPED) {                beacon.save(database);                push.start();            }        }    });    push.addChangeListener(new Replication.ChangeListener() {        @Override        public void changed(Replication.ChangeEvent event) {            if(event.getSource().getStatus() == Replication.ReplicationStatus.REPLICATION_STOPPED) {                System.exit(1);            }        }    });    pull.start();} catch (Exception e) {    e.printStackTrace();}<\/code><\/pre>\n<p>Este c\u00f3digo debe existir en otra clase, preferiblemente la clase que contiene su <code>principal<\/code> function. Essentially it will initialize connection to your local database, configure the push and pull replicators to a remotely running instance of Sync Gateway, and start the save and synchronization process.To be more specific, the replication process will only happen one time. When we run the application, first we will pull down any relevent beacon documents from the server. By using change listeners on the replicators we can wait to save only after we've finished downloading any changes. To prevent the Java application from remaining open after pushing, we add a listener that will close the application upon completion.<\/p>\n<h3>Resoluci\u00f3n de errores de dependencia de SQLite<\/h3>\n<p>When building this application with Maven, there shouldn't be any issues. However, depending on the IoT device you deploy to there could be a library dependency issue. There are many different architectures in circulation. An example error might look like the following:<\/p>\n<pre><code>Library not found: \/native\/linux\/i386\/libsqlite3.so<\/code><\/pre>\n<p>Esto puede resolverse f\u00e1cilmente extrayendo el archivo JAR, renombrando uno de los directorios y empaquet\u00e1ndolo de nuevo en un JAR. Para ser m\u00e1s espec\u00edficos, para extraer su archivo JAR, ejecute el siguiente comando:<\/p>\n<pre><code>jar xvf [filename].jar<\/code><\/pre>\n<p>A partir de los documentos y archivos extra\u00eddos, cambie el nombre de los archivos <strong>\/nativo\/linux\/x86<\/strong> al directorio <strong>\/nativo\/linux\/i386<\/strong>. Una vez hecho esto, puede volver a empaquetar su archivo JAR y volver a desplegarlo.<\/p>\n<pre><code>jar cvfm [filename].jar META-INF\/MANIFEST.MF .<\/code><\/pre>\n<p>El comando anterior volver\u00e1 a empaquetar el archivo JAR para usted.<\/p>\n<h2>B\u00fasqueda de iBeacons y seguimiento de su estado<\/h2>\n<p>Like mentioned previously, the Java application is not responsible for detecting iBeacons. It is only responsible for saving the data. Instead we're going to make use of a few tools that come pre-installed on a Linux operating system.<\/p>\n<h3>Escaneado con herramientas Linux<\/h3>\n<p>La mayor\u00eda de las distribuciones de Linux incluyen <strong>hcitool<\/strong> y <strong>hcidump<\/strong> aplicaciones. El sitio <strong>hcitool<\/strong> te permitir\u00e1 buscar dispositivos bluetooth que est\u00e9n dentro de su alcance. Deber\u00edas ejecutar algo como lo siguiente:<\/p>\n<pre><code>hcitool lescan<\/code><\/pre>\n<p>Lo anterior devolver\u00eda informaci\u00f3n b\u00e1sica sobre los dispositivos encontrados en un escaneo. A continuaci\u00f3n, se utilizar\u00eda la funci\u00f3n <strong>hcidump<\/strong> herramienta para mostrar cualquier cosa y todo sobre los datos bluetooth que se descubri\u00f3. Algo como esto mostrar\u00eda los datos en bruto:<\/p>\n<pre><code>hcidump --raw<\/code><\/pre>\n<p>The problem is that data is very raw. It is not something we can work with in its current form. We wouldn't be able to use it to make sense of iBeacon data.<\/p>\n<h3>Simplifique el proceso con una herramienta de Radius Networks<\/h3>\n<p>Aqu\u00ed es donde un gui\u00f3n de <a href=\"https:\/\/developer.radiusnetworks.com\/ibeacon\/idk\/ibeacon_scan\">Redes Radius<\/a> entra en juego. Existe un script llamado <strong>Escaneado iBeacon<\/strong> que har\u00e1 uso de <strong>hcitool<\/strong> y <strong>hcidump<\/strong>pero analizado y limpio. Se puede ver a continuaci\u00f3n:<\/p>\n<pre><code>#!\/bin\/bash# iBeacon Scan by Radius Networks# Modified by Nic Raboy at Couchbaseif [[ $1 == \"parse\" ]]; then    packet=\"\"    capturing=\"\"    count=0    while read line    do        count=$[count + 1]        if [ \"$capturing\" ]; then            if [[ $line =~ ^[0-9a-fA-F]{2} [0-9a-fA-F] ]]; then                packet=\"$packet $line\"            else                if [[ $packet =~ ^04 3E 2A 02 01 .{26} 02 01 .{14} 02 15 ]]; then                    UUID=`echo $packet | sed 's\/^.{69}(.{47}).*$\/1\/'`                    MAJOR=`echo $packet | sed 's\/^.{117}(.{5}).*$\/1\/'`                    MINOR=`echo $packet | sed 's\/^.{123}(.{5}).*$\/1\/'`                    POWER=`echo $packet | sed 's\/^.{129}(.{2}).*$\/1\/'`                    UUID=`echo $UUID | sed -e 's\/ \/\/g' -e 's\/^(.{8})(.{4})(.{4})(.{4})(.{12})$\/1-2-3-4-5\/'`                    MAJOR=`echo $MAJOR | sed 's\/ \/\/g'`                    MAJOR=`echo \"ibase=16; $MAJOR\" | bc`                    MINOR=`echo $MINOR | sed 's\/ \/\/g'`                    MINOR=`echo \"ibase=16; $MINOR\" | bc`                    POWER=`echo \"ibase=16; $POWER\" | bc`                    POWER=$[POWER - 256]                    # Launch Couchbase Java Application To Save Beacon Transaction                    java -jar iot-couchbase-project.jar $UUID $MAJOR $MINOR $POWER                fi                capturing=\"\"                packet=\"\"            fi        fi        if [ ! \"$capturing\" ]; then            if [[ $line =~ ^&gt; ]]; then                packet=`echo $line | sed 's\/^&gt;.(.*$)\/1\/'`                capturing=1            fi        fi    doneelse    sudo hcitool lescan --duplicates 1&gt;\/dev\/null &amp;    sudo hcidump --raw | .\/$0 parse $1fi<\/code><\/pre>\n<p>Este script fue escrito por Radius Networks con la excepci\u00f3n de una l\u00ednea:<\/p>\n<pre><code>java -jar iot-couchbase-project.jar $UUID $MAJOR $MINOR $POWER<\/code><\/pre>\n<p>We're taking the information parsed by the script and piping it into our Java application to be saved. This script will run continuously until manually stopped.<img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/april\/embed-couchbase-in-an-iot-project-for-data-synchronization\/iot-couchbase-ibeacon-example.gif\" \/>Arriba se muestra una animaci\u00f3n de este proyecto en acci\u00f3n.<\/p>\n<h2>Conclusi\u00f3n<\/h2>\n<p>That wasn't so bad right? You just created a simple Internet of Things (IoT) project that scans iBeacons and saves the information into Couchbase. The Couchbase Lite Java SDK is near identical to the Couchbase Lite Android SDK. With it we can take our Java applications to pretty much anything that supports Java.A full working example project can be seen on <a href=\"https:\/\/github.com\/couchbaselabs\/iot-beacon-example\">GitHub<\/a>.<\/object><\/object><\/object><\/object><\/object><\/object><\/code><\/p>","protected":false},"excerpt":{"rendered":"<p>The Internet of Things (IoT) is becoming all the rage lately. Being able to craft any mechanical device, for example watches, televisions, thermostats, and have them communicate over the internet is the modern age. In this modern age, one thing [&hellip;]<\/p>","protected":false},"author":63,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1814,1815,1810,1818],"tags":[1627,1337],"ppma_author":[9032],"class_list":["post-2224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-design","category-best-practices-and-tutorials","category-couchbase-mobile","category-java","tag-ibeacon","tag-iot"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Embed Couchbase in an IoT Project for Data Synchronization<\/title>\n<meta name=\"description\" content=\"See how to create a simple Internet of Things (IoT) project that scans iBeacons and saves the information into Couchbase.\" \/>\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.couchbase.com\/blog\/es\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Embed Couchbase in an IoT Project for Data Synchronization\" \/>\n<meta property=\"og:description\" content=\"See how to create a simple Internet of Things (IoT) project that scans iBeacons and saves the information into Couchbase.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/thepolyglotdeveloper\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-14T17:33:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-09T09:31:34+00:00\" \/>\n<meta name=\"author\" content=\"Nic Raboy, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nraboy\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nic Raboy, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\"},\"author\":{\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1\"},\"headline\":\"Embed Couchbase in an IoT Project for Data Synchronization\",\"datePublished\":\"2016-04-14T17:33:58+00:00\",\"dateModified\":\"2023-09-09T09:31:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\"},\"wordCount\":1504,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"ibeacon\",\"IoT\"],\"articleSection\":[\"Application Design\",\"Best Practices and Tutorials\",\"Couchbase Mobile\",\"Java\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\",\"name\":\"Embed Couchbase in an IoT Project for Data Synchronization\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-04-14T17:33:58+00:00\",\"dateModified\":\"2023-09-09T09:31:34+00:00\",\"description\":\"See how to create a simple Internet of Things (IoT) project that scans iBeacons and saves the information into Couchbase.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Embed Couchbase in an IoT Project for Data Synchronization\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1\",\"name\":\"Nic Raboy, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g\",\"caption\":\"Nic Raboy, Developer Advocate, Couchbase\"},\"description\":\"Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.\",\"sameAs\":[\"https:\/\/www.thepolyglotdeveloper.com\",\"https:\/\/www.facebook.com\/thepolyglotdeveloper\",\"https:\/\/x.com\/nraboy\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/es\/author\/nic-raboy-2\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Integrar Couchbase en un proyecto IoT para la sincronizaci\u00f3n de datos","description":"Descubre c\u00f3mo crear un sencillo proyecto de Internet de las Cosas (IoT) que escanea iBeacons y guarda la informaci\u00f3n en Couchbase.","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.couchbase.com\/blog\/es\/embed-couchbase-in-an-iot-project-for-data-synchronization\/","og_locale":"es_MX","og_type":"article","og_title":"Embed Couchbase in an IoT Project for Data Synchronization","og_description":"See how to create a simple Internet of Things (IoT) project that scans iBeacons and saves the information into Couchbase.","og_url":"https:\/\/www.couchbase.com\/blog\/es\/embed-couchbase-in-an-iot-project-for-data-synchronization\/","og_site_name":"The Couchbase Blog","article_author":"https:\/\/www.facebook.com\/thepolyglotdeveloper","article_published_time":"2016-04-14T17:33:58+00:00","article_modified_time":"2023-09-09T09:31:34+00:00","author":"Nic Raboy, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@nraboy","twitter_misc":{"Written by":"Nic Raboy, Developer Advocate, Couchbase","Est. reading time":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/"},"author":{"name":"Nic Raboy, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1"},"headline":"Embed Couchbase in an IoT Project for Data Synchronization","datePublished":"2016-04-14T17:33:58+00:00","dateModified":"2023-09-09T09:31:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/"},"wordCount":1504,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["ibeacon","IoT"],"articleSection":["Application Design","Best Practices and Tutorials","Couchbase Mobile","Java"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/","url":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/","name":"Integrar Couchbase en un proyecto IoT para la sincronizaci\u00f3n de datos","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-04-14T17:33:58+00:00","dateModified":"2023-09-09T09:31:34+00:00","description":"Descubre c\u00f3mo crear un sencillo proyecto de Internet de las Cosas (IoT) que escanea iBeacons y guarda la informaci\u00f3n en Couchbase.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/embed-couchbase-in-an-iot-project-for-data-synchronization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Embed Couchbase in an IoT Project for Data Synchronization"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"El blog de Couchbase","description":"Couchbase, la base de datos NoSQL","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"El blog de Couchbase","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/bb545ebe83bb2d12f91095811d0a72e1","name":"Nic Raboy, Defensor del Desarrollador, Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8863514d8bed0cf6080f23db40e00354","url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","caption":"Nic Raboy, Developer Advocate, Couchbase"},"description":"Nic Raboy es un defensor de las tecnolog\u00edas modernas de desarrollo web y m\u00f3vil. Tiene experiencia en Java, JavaScript, Golang y una variedad de frameworks como Angular, NativeScript y Apache Cordova. Nic escribe sobre sus experiencias de desarrollo relacionadas con hacer el desarrollo web y m\u00f3vil m\u00e1s f\u00e1cil de entender.","sameAs":["https:\/\/www.thepolyglotdeveloper.com","https:\/\/www.facebook.com\/thepolyglotdeveloper","https:\/\/x.com\/nraboy"],"url":"https:\/\/www.couchbase.com\/blog\/es\/author\/nic-raboy-2\/"}]}},"authors":[{"term_id":9032,"user_id":63,"is_guest":0,"slug":"nic-raboy-2","display_name":"Nic Raboy, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bedeb68368d4681aca4c74fe5f697f0c423b80d498ec50fd915ba018b72c101f?s=96&d=mm&r=g","author_category":"","last_name":"Raboy","first_name":"Nic","job_title":"","user_url":"https:\/\/www.thepolyglotdeveloper.com","description":"Nic Raboy es un defensor de las tecnolog\u00edas modernas de desarrollo web y m\u00f3vil. Tiene experiencia en Java, JavaScript, Golang y una variedad de frameworks como Angular, NativeScript y Apache Cordova. Nic escribe sobre sus experiencias de desarrollo relacionadas con hacer el desarrollo web y m\u00f3vil m\u00e1s f\u00e1cil de entender."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=2224"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}