Software Crafters Barcelona: 2016 vs 2018

I’m going back to Madrid after an intense weekend of talks, workshops and of course some free time at the conference Barcelona Software Crafters.

It is not the first time that I attend to that event, and that allowed me to follow the evolution that the event and the organisation had.

In 2016, after hearing a lot of good things from an event called Pamplona Software Craftsmanship and after some time being a part of the community in Madrid I decided to send a proposal to Barcelona Software Craftsmanship. My talk was about «Testing on the toilet» and it was going to be the first time that I was going to give that talk as I thought that the audience could be the right one to start some debates about different testing techniques.

They liked my proposal and it was selected. But I received the first unpleasant surprise when they asked me to buy my ticket for the event. So, I was going to be a speaker and I had to pay my travel and hotel expenses and also I had to pay the ticket. I decided not to keep quiet and I complained, it didn’t look right to me to ask the speakers to pay a ticket and ask them to bring content to your event. The answer that I got was that as it was a community event and a part was an Open Conference all the attendees (speakers or not) could contribute to the event and because of that all of us should pay the expenses that the sponsors were not covering. The answer didn’t convince me and my point of view is still the same: If I decide to go to an Open Space I can choose during the event if I want to propose something or not, but if I go as a speaker I need to prepare it in advance and I have to give that talk because I committed myself to do that.

Despite of not being happy with the answer, I had planned to go with my boyfriend to the conference and, by surprise, I had bought tickets for the Red Hot Chili Peppers concert that would take place that weekend in Barcelona, so I didn’t cancel anything.

When I arrived to the registry the first day I found out something that I didn’t like related to the t-shirts: all of them were the unisex kind (wide shoulders and straight, something that unless I love the design I won’t use except for the gym or as a pyjama, even if some women prefer them). When I asked if the didn’t have female t-shirts they asked me that the order had been too small (only 100 t-shirts) and their provider didn’t allow them to choose different kind of t-shirts.

Those are details that for a lot of people don’t matter, but when you are in an environment that is supposed to be worried because of the obvious lack of diversity (the previous year there were no women at the event and that year we were less than a 5%, and there was no other kind of diversity either), I think that you have to show some concern for the details.

When this year a friend of mine that is involved with the organisation wrote me because they wanted to take steps to improve, I decided to help them. We started with some small changes: we checked that the name Software Craftsmanship was sometimes an entry barrier and the organisers decided to change the name to Software Crafters (more inclusive but keeping the spirit of the conference). They also worked to provide tickets for the underrepresented groups and to share the C4P to try to reach more and different people. And overall, I felt way more attention to the details.

He also asked me if I wanted to send some proposal. The conditions this time were much better: the conference ticket was granted to the speakers, it included event the Saturday dinner and they had managed to provide 200 euros per speaker to cover some of the expenses. The train from Madrid costed me 160 euros with the conference discount that Renfe provides so not everything could be covered, but at least it helps. I was really lucky with the accommodation and Ana Gamito read a twit that I sent looking for someone to share a room and she offered me to stay at her apartment. This has been my first time doing coach surfing and I really liked it as I had the opportunity to know and spend some time with someone so fantastic as Ana and now I’d love to repeat the experience in future events.

In conclusion, I wanted to say that I’m really proud and happy to see hoe events like Barcelona Software Crafters evolve, how they consider the feedback and improve edition by edition. I hope that we manage to transmit that message of continuous improvement to be able to reach more people, because I’m sure that if they knew these events they would enjoy them as much as we have enjoyed it this year participants. Thank you for everything and congratulations to the organization and the attendees!

Publicado en Events | Deja un comentario

Software Crafters Barcelona: 2016 vs 2018

I’m going back to Madrid after an intense weekend of talks, workshops and of course some free time at the conference Barcelona Software Crafters.

It is not the first time that I attend to that event, and that allowed me to follow the evolution that the event and the organisation had.

In 2016, after hearing a lot of good things from an event called Pamplona Software Craftsmanship and after some time being a part of the community in Madrid I decided to send a proposal to Barcelona Software Craftsmanship. My talk was about «Testing on the toilet» and it was going to be the first time that I was going to give that talk as I thought that the audience could be the right one to start some debates about different testing techniques.

They liked my proposal and it was selected. But I received the first unpleasant surprise when they asked me to buy my ticket for the event. So, I was going to be a speaker and I had to pay my travel and hotel expenses and also I had to pay the ticket. I decided not to keep quiet and I complained, it didn’t look right to me to ask the speakers to pay a ticket and ask them to bring content to your event. The answer that I got was that as it was a community event and a part was an Open Conference all the attendees (speakers or not) could contribute to the event and because of that all of us should pay the expenses that the sponsors were not covering. The answer didn’t convince me and my point of view is still the same: If I decide to go to an Open Space I can choose during the event if I want to propose something or not, but if I go as a speaker I need to prepare it in advance and I have to give that talk because I committed myself to do that.

Despite of not being happy with the answer, I had planned to go with my boyfriend to the conference and, by surprise, I had bought tickets for the Red Hot Chili Peppers concert that would take place that weekend in Barcelona, so I didn’t cancel anything.

When I arrived to the registry the first day I found out something that I didn’t like related to the t-shirts: all of them were the unisex kind (wide shoulders and straight, something that unless I love the design I won’t use except for the gym or as a pyjama, even if some women prefer them). When I asked if the didn’t have female t-shirts they asked me that the order had been too small (only 100 t-shirts) and their provider didn’t allow them to choose different kind of t-shirts.

Those are details that for a lot of people don’t matter, but when you are in an environment that is supposed to be worried because of the obvious lack of diversity (the previous year there were no women at the event and that year we were less than a 5%, and there was no other kind of diversity either), I think that you have to show some concern for the details.

When this year a friend of mine that is involved with the organisation wrote me because they wanted to take steps to improve, I decided to help them. We started with some small changes: we checked that the name Software Craftsmanship was sometimes an entry barrier and the organisers decided to change the name to Software Crafters (more inclusive but keeping the spirit of the conference). They also worked to provide tickets for the underrepresented groups and to share the C4P to try to reach more and different people. And overall, I felt way more attention to the details.

He also asked me if I wanted to send some proposal. The conditions this time were much better: the conference ticket was granted to the speakers, it included event the Saturday dinner and they had managed to provide 200 euros per speaker to cover some of the expenses. The train from Madrid costed me 160 euros with the conference discount that Renfe provides so not everything could be covered, but at least it helps. I was really lucky with the accommodation and Ana Gamito read a twit that I sent looking for someone to share a room and she offered me to stay at her apartment. This has been my first time doing coach surfing and I really liked it as I had the opportunity to know and spend some time with someone so fantastic as Ana and now I’d love to repeat the experience in future events.

In conclusion, I wanted to say that I’m really proud and happy to see hoe events like Barcelona Software Crafters evolve, how they consider the feedback and improve edition by edition. I hope that we manage to transmit that message of continuous improvement to be able to reach more people, because I’m sure that if they knew these events they would enjoy them as much as we have enjoyed it this year participants. Thank you for everything and congratulations to the organization and the attendees!

Publicado en Eventos | Deja un comentario

Google Developer Expert

El programa Google Developer Experts (GDE) es una iniciativa de Google para crear una red global de profesionales con gran experiencia en alguna de sus tecnologías y que tengan una gran relación con comunidades de desarrolladores y startups.

Yo conocía este programa desde hace unos años por mi amigo y antiguo compañero de trabajo Javier Ramírez (GDE de Cloud) y por diferentes charlas en las que he visto a Almo, el Developer Program Manager de Google en España, hablar sobre los diferentes programas existentes (GDG, WTM, GDE, etc). Hoy estoy orgullosa de anunciar que acabo de entrar a formar parte de los GDE de Cloud.

Tengo claro que lo mío con Kubernetes fue amor a primera vista porque desde que lo probé supe que era una herramienta que quería conocer más y compartir. Eso me llevó el año pasado a dar diez charlas y talleres relacionados con Kubernetes y microservicios (además de otras cuantas relacionadas con Javascript o técnicas para hablar en público). También mi trabajo en seedtag (donde por cierto, estamos contratando :p) ha hecho que profundizara en otras herramientas como Datastore, Dataproc, GCS y BigQuery…¡y todo ello ha llevado a este reconocimiento!

Hablando en Codemotion de Raspberry Pi, Kubernetes y TensorFlow con Almo

Así que esta noticia me parecía una gran forma de retomar mi pobre olvidado blog, animaros a estar en continuo aprendizaje y compartir lo que aprendéis y recordaros que si en algún tema de estos os puedo ayudar o buscáis alguna ponente podéis contactarme.

 

Publicado en Código, Eventos | Etiquetado | Deja un comentario

Google Developer Expert

The Google Developers Experts program (GDE) is a Google initiative to create a global network of professionals with experience on Google technologies and a strong relation with developer communities and startups

I have known this program for some years because of my friend and old work mate Javier Ramírez (Cloud GDE) and because of some different talks where I’ve seen Almo, Developer Program Manager at Google Spain, talking about the different programs they promote (GDG, WTM, GDE, etc). Today I’m really proud to announce that I just joined as a Cloud GDE.

I know that what I had with Kubernetes was love at first sight. Since the first time I tried it I knew that I wanted to know more about and that I wanted to share what I was learning about it. That took me to give ten talks and workshops about Kubernetes and microservices last year (with other talks about Javascript and public speaking techniques). Also, my job at seedtag (where, by the way, we are hiring :p) caused me to delve into other tools like Datastore, Dataproc, GCS and BigQuery… and all of that led to this acknowledgement!

Talking at Codemotion about Raspberry Pi, Kubernetes and TensorFlow with Almo

I thought that this announcement was a great way to use again my poor forgotten blog, to encourage you to always continue learning and sharing what you learn and remind you that if I can help you with any of these topics or you want a speaker, you can contact me!

Publicado en Events, Software | Etiquetado | Deja un comentario

Testing Pokemon Go Plus

Last year I must have been really good because the Three Kings were really generous to me.

Among all the things that I found under the tree I had Pokémon Go Plus. And yes, I play Pokémon Go. I have to blame mostly Paul Goldbaum, who made me to download the app the first day that it was officially launched in Spain, and my sister, Carmen, who shared with me information regarding the different pokémon that has caught and who went with me to chase some day.

Wearing Pokémon Go Plus as a wristband

Thanks to this device I had not needed to handle my phone always with the app open to manage the game to count the kilometers walked while opening eggs or trying to get candies with my buddy. For me this has been a great improvement, and not aly because of the battery that I saved, but also because I love to go walking with music and for some reason, since a while, when I open Pokemon Go my Spotify music stops.

You need some practice to link it with the application as sometimes, after a long time of inactivity or when the phone lacks of internet connection, the device is disconnected. But once you connect it, it is really easy: it will blink with a blue light when there is a PokeStop near, green when there is a pokémon that you already have or yellow for a pokémon that you don’t own yet. For all the cases, after pushing the button the light will blink with different colors if we were successful and we managed to get elements from the PokeStop or we caught the pokémon or will blink red if we didn’t manage. Sometimes it can be difficult to know with only that feedback if we couldn’t success because of the usual reason (pokémon run away) or because of some problems that we could fix: that we don’t have any normal pokeball (the only balls that we can use), that we don’t have any empty place for more pokémon or for more items.

First Charmander that I caught with my Pokémon Go Plus! Well… I really found it under the Christmas Tree too :p

It is true that most of the pokémon that we get are usually small ones, but sometimes I also catch some very useful ones and the rest of them are also useful to get more candies or get more experience while catching them and evolving them.

 

So, at the moment I will continue with some walks with my new toy in my wrist to try to catch them all without any trick!

And you, have you played Pokemon Go? Do you still play?

Publicado en Gadgets & Accessories | Etiquetado | Deja un comentario

Probando Pokémon Go Plus

El año pasado debí de ser muy buena porque los Reyes han sido muy generosos conmigo.

Entre las múltiples cosas que encontré debajo del árbol se encontraba Pokémon Go Plus. Y es que sí, yo juego a Pokémon Go. La culpa la tienen principalmente Paul Goldbaum, quien hizo que me la  instalara en primer lugar el día que salió oficialmente en España, y mi hermana, Carmen, con quien intercambiaba información sobre los pokémon conseguidos y algún día de caza juntas.

Pokémon Go Plus en modo pulsera

Este dispositivo me ha ayudado principalmente a no tener que llevar el móvil en la mano con la aplicación en primer plano para conseguir que me cuente los kilómetros tanto a la hora de abrir huevos como de conseguir caramelos con mi compañero. Para mí esa ha sido una gran mejora, no solo por el ahorro de batería asociado, sino también porque me encanta ir con música y por algún motivo desde hace algún tiempo al poner Pokémon Go en primer plano se corta la música de Spotify que estuviera escuchando.

Hay que cogerle un poco el truco a enlazarlo con la aplicación dado que a veces después de mucho rato de inactividad o de falta de itnernet en el teléfono se desconecta. Pero una vez conectado el funcionamiento es muy sencillo: se iluminará en azul cuando haya una pokeparada cerca, verde cuando hay cerca un pokémon que ya has capturado o amarillo para los pokémon que áun no forman parte de tu Pokédex. En todos los casos, después de pulsar el botón la luz parpadeará de múltiples colores si hemos tenido éxito y hemos conseguido los elementos de la pokeparada o capturar al pokémon o rojo en caso contrario Al tener únicamente ese feedback a veces se hace difícil saber si no se ha tenido éxito por causas normales o por algún problema que podemos solucionar: que no nos queden bolas de las normales (que son las únicas que se pueden utilizar), que tengamos demasiados pokémon, que tengamos nuestro inventario lleno, etc.

¡Primer Charmander cazado con mi Pokemon Go Plus! Bueno, realmente lo encontré también debajo del árbol :p

Es cierto que la mayoría de los pokémon que se cazan suelen ser pequeños, pero también se caza alguno bastante útil y los demás vienen bien para cambiarlos por caramelos o conseguir más experiencia al cazarlos y evolucionarlos.

¡Así que de momento seguiré dándome mis paseos con mi nuevo juguete en la muñeca para intentar cazarlos todos sin hacer trampas!

Y vosotros, ¿habéis jugado a Pokémon Go? ¿seguís jugando?

Publicado en Gadgets y Accesorios | Etiquetado | Deja un comentario

2016 retrospective and 2017 resolutions

The 2016 year has ended and we have just started a new year, so I would like to copy the ideas from my friend from GDG Lleida, Andreu Ibáñez and create post to summarise with images my 2016 and also heeding David Bonilla post, write the 2017 resolutions

2016 Retrospective

If there is something to remark from 2016 I think that it is the disappointment that I had to realize that Cabify wasn’t the place that I expected and the place for me to keep growing professionally. Nevertheless, that disappointment ended being the best thing that could had happened to me because thanks to that I met Seedtag and I found a great place with a fantastic team where I really have the opportunity to learn new things and contribute with my experience. If someone else is looking a place like that I can say that we are hiring frontend and backend developers in Madrid hehe.

Because of that process I also considered a bit my ‘personal brand’. I decided that the name from my old blog, ‘noessolocosadehombres’, wasn’t the best and I relaunched everything trying to write a bit more in this new project, ‘missbytes’. I hope that you like this new ‘brand’ more and even if I have had it a bit more abandoned this last period, at least I managed to write more than the previous year.

For 2016 I had resolved that I wanted to colaborate more to fix the lack of women in tech. So I organised with other girls the first Women Techmakers event in Madrid where we managed to get 135 attendees, a 70% of women and 14 women speakers talking us about technology at different levels.

WTM Madrid 2016

To provide more visibility to women in tech I also decided that I wanted to be an example by being the first one trying to talk at more tech talks. The result I think that is pretty nice: I have talked in 10 events (T3chfest, WTM Madrid, WTM Cáceres, WTM Logroño, WTM Porto, Spanish GDG Summit, Software Craftmanship Barcelona, Codemotion, Devfest Asturias, Mujeres@Innovación), in 7 of them I talked about something technical (Rails, TDD, hexagonal architecture, Kubernetes and testing good practices) and in the remaining 3 I talked about the need of more women as role models in tech, Women Techmakers and also about my experience working at startups.

testing_android

Android Testing in depth at Codemotion with Selene Pinillos

devfest_asturias

At Devfest Asturias with Antonio De La Torre

Also throughout the year I have been helping to organise monthly meetings with GDG Madrid.

In may, as I already told, I repeated my experience at Google I/O. Nevertheless, this year I didn’t enjoy it as much as the previous year partially because personally I was feeling a bit despondent due to the bas situation at Cabify and partially because of how they decided to organise. But I could still enjoy a few things, like the party that Uber had and where I went with my friends from GDG Porto and GDG Lleida.

bty

Uber’s party at San Francisco

2017 Resolutions:

For this new year I have 5 main resolutions:

  1. I want to continue with my work at Seedtag, to continue learning new things and work my technical and personal skills to improve my work and the work from the amazing team mates that I have found.
  2. I’d love to organise again WTM Madrid 2017 (already a work in progress) and promote that more people decide to have this event everywhere in Spain. I know that everywhere is too ambitious, but I will try that we manage to reach as many places as we can as I think that it is important that we provide that visibility to the women that talk about technology and prove that it is part of our daily work.
  3. I am going to try to help more women to start talking in public and try to improve the percentage of women speakers and attendees to events and conferences different from WTM. I will talk about some of those actions that I want to take in the future here.
  4. And of course I would love to keep being a speaker. So, if you are organising a conference or an event and you think that I have something to share there, don’t hesitate to contact me!
  5. Finally, I want to continue writing this blog. I am not going to set a frequency because I know that it is too difficult for me to keep it because I have some periods with more free time and some periods when I have a lot of work, aside projects, conferences or events. But I am going to to mix content from events, technologies that I try or that I work deeper on them, information or ideas regarding my work to improve the presence of women in tech and share gadgets or ‘toys’ that I found interesting.

I hope that you had enjoyed my summary from the year that just ended and everything that I hope to manage this new year that we are launching!

Publicado en Miscellaneous | Deja un comentario

Retrospectiva 2016 y propósitos 2017

Ya se ha terminado el 2016 y acaba de comenzar un nuevo año, así que me gustaría copiarme de las iniciativas de mi amigo del GDG Lleida, Andreu Ibáñezy hacer un post resumen con imágenes de mi 2016 y a la vez tomar la palabra de David Bonilla y dejar por escrito algunos de mis propósitos de año nuevo.

Retrospectiva del 2016

Si algo marcó mi 2016 creo que fue la desilusión que me llevé de ver que Cabify no era el sitio que yo esperaba y en el que poder seguir creciendo profesionalmente. Sin embargo, esa decepción ha acabado convirtiéndose en lo mejor que me podría haber pasado porque gracias a ella conocí Seedtag y encontré un gran sitio con un equipo maravilloso en el que realmente tengo la oportunidad de aprender cosas nuevas y a la vez aportar con mi experiencia. Si alguien más busca un sitio así aprovecho para decir que estamos contratando desarrolladores para frontend y backend en Madrid jeje.

Este proceso también llevó asociado que me planteara un poco más mi ‘marca personal’, que decidiera que el nombre de mi antiguo blog ‘noessolocosadehombres’ no era el mejor y que me animara a relanzar todo e intentar escribir un poco más en este nuevo proyecto, ‘missbytes’. Espero que esta nueva ‘marca’ os guste más y aunque en el último periodo del año lo he mantenido un poco más abandonado al menos he conseguido empezar a publicar más cosas que el año anterior.

Para el 2016 me había propuesto que quería colaborar mucho más con el tema de la falta de mujeres en la informática. Así que me metí a organizar junto con otras chicas el primer evento Women Techmakers de Madrid en el que conseguimos tener 135 asistentes de los cuales un 70% fueron mujeres y 14 mujeres ponentes hablándonos de tecnología a diferentes niveles.

WTM Madrid 2016

También con la idea de dar una mayor visibilidad a las mujeres en la informática decidí que tenía que empezar a dar ejemplo y ser yo misma la primera que me animara a dar más charlas técnicas. El resultado creo que ha sido bastante bueno: He asistido a 10 eventos como ponente (T3chfest, WTM Madrid, WTM Cáceres, WTM Logroño, WTM Porto, Spanish GDG Summit, Software Craftmanship Barcelona, Codemotion, Devfest Asturias, Mujeres@Innovación), en 7 de ellos di una charla técnica (sobre Rails, TDD, arquitectura hexagonal, Kubernetes y buenas prácticas de testing) y en los otros 3 hablé sobre la necesidad de más mujeres referentes, Women Techmakers o de mi experiencia trabajando en startups.

testing_android

Android Testing en profundidad en Codemotion con Selene Pinillos

devfest_asturias

En Devfest Asturias con Antonio De La Torre

Además durante todo el año he estado colaborando para organizar reuniones mensuales con el GDG Madrid.

En mayo, como ya os conté, repetí mi experiencia en el Google I/O, sin embargo este año no lo disfruté tanto como el anterior en parte porque personalmente me encontraba un poco desanimada por la mala situación en Cabify y en parte por cómo decidieron organizarlo. Sin embargo pude seguir disfrutando de algunas cosas, como de la fiesta que Uber dio y a la que asistí con amigos del GDG Porto y GDG Lleida

bty

Fiesta organizada por Uber en San Francisco

Propósitos para el 2017:

Para este año que entra tengo 5 propósitos principales:

  1. Quiero continuar con mi trabajo en Seedtag, seguir aprendiendo cosas y trabajar tanto en habilidades técnicas como en las habilidades personales necesarias para mejorar mi trabajo y el de los estupendos compañeros que he encontrado.
  2. Me gustaría volver a organizar el WTM Madrid 2017 (algo que ya es un trabajo en progreso) y promover que más personas se animen a llevar este evento a todos los rincones de España. Sé que todos es demasiado ambicioso, pero voy a intentar que lleguemos a cuantos más lugares mejor porque creo que es importante que seamos capaces de dar visibilidad a mujeres que hablan de tecnología y muestran que es parte de nuestro día a día.
  3. Voy a intentar ayudar a más chicas a animarse a dar charlas e intentar también que en otros eventos y conferencias distintos de los WTM consigamos que los porcentajes de ponentes mujeres y también de asistentes se vayan incrementando. De algunas de las iniciativas intentaré hablar
  4. Y por supuesto también me gustaría seguir participando yo misma como ponente. Así que si estás organizando una conferencia o evento y crees que entre mi experiencia o conocimientos puede haber algo que encaje no dudes en contactarme.
  5. Y por último quiero continuar escribiendo en este blog. No me voy a poner una frecuencia porque sé que me resulta muy difícil mantenerla dado que hay temporadas en las que tengo más tiempo libre y temporadas en las que se me juntan más eventos, charlas, trabajo o proyectos extra. Pero sí voy a intentar ir mezclando contenido sobre eventos a los que asista, entradas sobre tecnologías que vaya probando o sobre las que vaya profundizando, información o ideas para intentar mejorar la presencia de las mujeres en la tecnología y compartir gadgets o ‘juguetes’ que me parezcan interesantes.

¡Espero que os haya gustado mi resumen del año que acaba de terminar y lo que espero conseguir en el nuevo año que hoy estamos estrenando!

Publicado en Miscelánea | Deja un comentario

Google Cloud Datastore

Últimamente he estado ‘jugando’ con Google Cloud Datastore para probar cómo de util puede llegar a ser.

Lo primero que tengo que decir es que está en beta. Pero en esta ocasión no es como Gmail, que continuó siendo beta durante 5 años a pesar de ser un producto estable con un montón de usuarios. En esta caso el producto se encuentra realmente es un estado muy inicial y no pueden garantizar que no haya cambios que rompan la compatibilidad.

Una de esas cosas que cambiaron recientemente fue el protocolo usado en los clientes de ruby y node.js, ocasionando que el emulador existente que es parte del SDK de gcloud dejara de ser compatible como se explica en la documentación:

As of this release, the Datastore emulator that is part of the gcloud SDK is not compatible with gcloud-node. We usegRPC as our transport layer, while the gcloud SDK’s Datastore emulator does not support gRPC.

Use gcd.sh directly

For now, you must use the gcd.sh script.

Y como explican, empecé a usarlo. Hice un pequeño proyecto en el que importé gcloud definiendo los parámetros projectId y el apiEndpoint con los mismos valores que había dado al emulador y pude empezar a hacer la primera búsqueda:

Pero tener esos parámetros a fuego no me parecía demasiado limpio, así que después de mirar un poco más la documentación vi que podía reemplazarlos con variables de entorno. Primero borré apiEnpoint y ejecuté:

export DATASTORE_EMULATOR_HOST=localhost:8080

Y con eso establecido, todo continuaba funcionando como esperaba. Ten cuidado cuando borres apiEndpoint puesto que sin él y sin haber definido DATASTORE_EMULATOR_HOST, gcloud intentará conectarse usando las credenciales que por defecto hayas definido en tu instalación de gcloud.

A continuación borré projectId y exporté la variable de entorno definida en la documentación:
export DATASTORE_PROJECT_ID=testing-project

Pero… ups! Algo falló!

{ Error: Bad Request
at /Users/laura/testing-project/node_modules/grpc/src/node/src/client.js:417:17 code: 400, metadata: Metadata { _internal_repr: {} } }

Así que parece que el emulador no reconoce realmente ese parámetro, o quizás es un parámetro antiguo que reemplazaron. Tras continuar investigando y buscando más ejemplos encontré esta otra página de documentación en la que me percaté de que estaban usando una nueva variable de entorno, GCLOUD_PROJECT, así que intenté importar esta:

export GCLOUD_PROJECT=testing-project

Y después de eso, voilà, todo funcionaba de nuevo. En la página en la que encontré ese parámetro podemos ver que siguen definiendo projectId: process.env.GCLOUD_PROJECT así que puede ser que esa variable de entorno no se cargara automáticamente cuando la escribieron o que puede que deje de estar soportada en algún momento y por eso sugieren que nos encarguemos nosotros de establecer el valor de projectId a partir de la variable de entorno.

Con todo ya funcionando decidí crear una búsqueda más compleja que incluyera una igualdad y una desigualdad. En producción, de acuerdo con la documentación, necesitaremos crear primero el índice que contenga esos dos campos (los índices para búsquedas más sencillas como aquellas que solo contienen igualdades o únicamente contienen una desigualdad se crean automáticamente). Per si estamos usando el emulador, no fallará cuando intentemos ejecutar la búsqueda y creará el fichero index.yml definiendo el índice para así ayudarnos a crearlo luego en producción.

Así que creé mi código para leer los usuarios con un determinado nombre y mayores de una cierta edad:

Y cuando lo ejecuté, ¡me encontré con un nuevo error!

{ Error: Precondition Failed at /Users/laura/testing-project/node_modules/grpc/src/node/src/client.js:417:17 code: 412, metadata: Metadata { _internal_repr: {} } }

Malas noticias, la generación de índices parece que falla en la verisón del emulador que enlazan. Investigué un poco más hasta que me di cuenta de que si instalas gcloud en tu ordenador y listas todos los componentes, aparecen dos emuladores: Cloud Datastore Emulator (Legacy) y Cloud Datastore Emulator. Para ejecutar cualquiera de ellos es necesario tener el componente beta también instalado. Es necesario definir el id de proyecto con gcloud config set project VALUE o definiendo la variable de entorno CLOUDSDK_CORE_PROJECT. El comando que usé para ejecutar el emulador finalmente fue:

gcloud beta emulators datastore start --host-port=localhost:8888 --no-legacy

El parámetro –no-legacy resultó ser muy importante dado que es la forma que tenemos de decirle a gcloud que queremos usar el nuevo emulador en lugar del antiguo. El otro parámetro strong>–host-port, lo tuve que usar porque no encontré ninguna forma de indicar únicamente el puerto y quería asegurarme de que siempre se ejecuta en un mismo puerto conocido.

Tras ejecutar nuevamente mi búsqueda pude finalmente encontrar en el directorio de configuración mi fichero index.yaml (en mi caso /Users/laura/.config/gcloud/emulators/datastore/WEB-INF/index.yaml) que tenía esta pinta:

Y tras todos esos tests, ¡conseguí por fin tener un entorno que funcionara con un emulador!¡El siguiente paso será pasar a un entorno real!

Mi conclusión es que parece una herramienta muy prometedora, ¡pero quizás es aún un poco pronto para ella!

Publicado en Código | Deja un comentario

Google Cloud Datastore

Lately I have been ‘playing’ with Google Cloud Datastore to check how useful it could be.

First thing that I have to say is that it is in beta. But this one is not like Gmail, that continued being beta for 5 years despite of being a stable product with a lot of users. In this case they are really in a early state and they cannot guarantee that there won’t be breaking changes.

One of those changes was recently the protocol used in the ruby and node.js clients, causing the existing emulator that is part of the gcloud SDK not to be compable anymore as it is explained in the documentation:

As of this release, the Datastore emulator that is part of the gcloud SDK is not compatible with gcloud-node. We usegRPC as our transport layer, while the gcloud SDK’s Datastore emulator does not support gRPC.

Use gcd.sh directly

For now, you must use the gcd.sh script.

So I started to use it. I required gcloud defining the projectId and the apiEndpoint params and after creating the project with the same project id in my emulator, I could start running queries:

But having those params hardcoded there doesn’t look too nice, so after checking the documentation I saw that I could replace those params with environment variables. I first removed the apiEndpoint param and executed:

export DATASTORE_EMULATOR_HOST=localhost:8080

And with that set, everything kept working as expected. Be careful when you remove the apiEndpoint as without it and without the DATASTORE_EMULATOR_HOST, gcloud will try to connect using the default credentials that you define in your gcloud installation.

So after that, I removed projectId and exported the environment variable defined in the documentation:

export DATASTORE_PROJECT_ID=testing-project

But… ups! Something went wrong!

{ Error: Bad Request
at /Users/laura/testing-project/node_modules/grpc/src/node/src/client.js:417:17 code: 400, metadata: Metadata { _internal_repr: {} } }

So it looks like that param in the documentation is not really being recognized yet, or maybe it is an old param that they replaced. I continued looking for more examples and I found this other documentation page where I realized that they were using a new environment variable, GCLOUD_PROJECT, so I tried to export it this time:

export GCLOUD_PROJECT=testing-project

And after that, voilà, everything worked again. In the documentation where I found that param, they were still defining projectId: process.env.GCLOUD_PROJECT so it could be that the environment variable wasn’t automatically loaded when they wrote that documentation or that it could stop being a supported one and that’s why they suggest reading yourself the projectId from the environment variable.

With everything running I decided to create a more complex query with an equality and an inequality. In production, according to the documentation, we will need to create first an index containing those two fields (indexes for simpler queries like only equalities or one single inequality are automatically created). But if we are using the emulator, it won’t fail when we try to run the query and will create the index.yml file defining the index to help us define them later in production.

So I created my code to read the users with a given name and over a certain age:

When I executed it, I found again a new error!

{ Error: Precondition Failed at /Users/laura/testing-project/node_modules/grpc/src/node/src/client.js:417:17 code: 412, metadata: Metadata { _internal_repr: {} } }

So bad news, the index generation looks like it is failing in that emulator version that they are providing. I investigated for a while and I realized that if you install gcloud in your computer and list all the components you can find two emulators: Cloud Datastore Emulator (Legacy) and Cloud Datastore Emulator. To run any of them you will need to use the beta component too. It will require to define the project id with gcloud config set project VALUE or defining the environment variable CLOUDSDK_CORE_PROJECT. To run the emulator I needed to execute it like this:

gcloud beta emulators datastore start --host-port=localhost:8888 --no-legacy

The –no-legacy param was really important as it is the way that we tell gcloud that we want to use the new emulator instead of the old one and I couldn’t find any param to provide only the port (as I wanted to ensure that it was always running in a known port), so I needed to use the –host-port one.

And after running again the query I finally could find in my datastore configuration directory my index.yaml file (in my case /Users/laura/.config/gcloud/emulators/datastore/WEB-INF/index.yaml) looking like this:

And after all those tests, I managed to get an environment working with an emulator! Next step will be a real environment!

My conclusion is that it is a promising tool, but maybe it is a bit early for it!

Publicado en Software | 1 comentario