Migrating From Hibernate To EclipseLink On JHipster

by Olivier Barais     JHipster   Hibernate   EclipseLink   Diversity  

Posted 2018.07.18 — Stockhoml, Sweden

Working on automatic library substitution.

We are currently working with Orange on a software diversification project. In this framework, we study the ability to automatically migrate a project from one dependency to another in order to understand the difficulties in practice. To understand these difficulties, we study a nominal case that should work perfectly. The replacement of an implementation of one JSR by another on a real project.

What is JSR?

The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. The JCP involves the use of Java Specification Requests (JSRs) – the formal documents that describe proposed specifications and technologies for adding to the Java platform. A JSR defines a common contract for a given concern in the Java community.

Among the JSRs, we study the use of the JSR 338: JPA. This JSR provides a common framework for relational database access using relational object mapping techniques in Java. Many libraries implement this JSR including the famous hibernate library or the no less known eclipselink. On top of this API, higher level libraries like Spring-data have been built and are commonly used in enterprise projects.

From this common contract, the promise is to be able to change implementation at relatively low cost.

Let us have a look at the reality

Read More

Add wifi to any camera

by Olivier Barais     OpenWRT   Camera   Canon  

Posted 2018.05.29 — Rennes, France

I have an old camera that makes very nice pictures (CANON EOS 400D), however it does not offer an easy way to share pictures with my smartphone. It’s not a big issue but I tend to use it less because I can’t instantly share these photos.

In this small blog post, I share a homemade solution to add this capacity to any device with a USB connection. The main idea is to connect a compact router to the network and automatically push the photos to the smartphone when it joins the wireless network. Of course, we can imagine others scenarios.

Materials required:

Read More

Play with curl to test generated JHipster application API

by Olivier Barais     jhipster   swagger   curl   authentification  

Posted 2017.04.12 — Rennes, France

I often used JHipster to create my Rest API. I often want to test this API using curl.
However, if you tak the curl command line method from swagger, it always misses the authentification mechanism.

To manage this authentification, you can use the following commands.

If you use oauth:

Read More

Deploying openvpn on top of raspberry pi with docker

by Olivier Barais     docker   rpi   raspberrypi   raspberry  

Posted 2017.02.07 — Rennes, France

With the emergence of cloud offers with arm based server, it is convenient to be able to deploy vpn server on top of these platforms. For example Scaleway is a simple, scalable cloud platform. It’s the a platform where you can start x86 64bit and ARM BareMetal servers from a unique and simple graphical interface but also through API. Next you can use docker to deploy your micro-services. In this blog post, I just summarize how you can deploy your own openvpn server.

Read More

Integration api-platform and angularjs 2

by Olivier Barais     api-platform   symfony3   angularjs   ng2   angularjs2  

Posted 2017.02.03 — Rennes, France

Even if I prefer to use Spring Boot as a basis for the the server stack and JHipster to generate the apps skeleton, I often have to use Php framework for students projects. This blog post explains how you can integrate api-platform, a PHP framework to build modern web APIs built on top symfony 3, and angularJS 2 with angular cli for building Single Page Application.

Read More

Some techniques to transform PPTX slides to reveal.js slides;

by Olivier Barais     slides   reveal.js   powerpoint   migration  

Posted 2016.11.30 — Rennes, France

This blog post try to explain how I transform my pptx slides to html slides using open-source projects.

Read More

Play with Kevoree with your own model registry

by Olivier Barais     kevoree   javascript   java  

Posted 2016.05.11 — Rennes, France

There are different reasons for using Kevoree with your own Kevoree model (default execution use http://registry.kevoree.org). The registry contains the model of existing kevoree artefacts (market place). Among the motivations to deploy your own registry, we can cite:

  • the first one is to use Kevoree offline.
  • the second one is to avoid the global registry deterioration.
Read More

Using Go-Docker and Docker Swarm on top of a cluster of raspberry pi.

by Olivier Barais     docker   swarm   go-docker   raspberry pi  

Posted 2016.03.24 — Rennes, France

Lightweight containers technologies such as Docker are more and more adopted for deploying and managing micro-services architectures. Indeed, they hide a part of the complexity resulting from the language heterogeneity and the large choice of existing implementation frameworks that can be used to implement modern applications. Containers provide those benefits without introducing the general cost of the virtualization.

It exists lots of open-source configuration managers such as kubernetes, nomad, apache Mesos, or docker swarm to define and keep a standard modular applications in a consistent state and to dispatch its services on a cluster of remote nodes. Tools such as Go-Docker would complement these stacks to provide a batch computing/cluster management tool using Docker as execution/isolation system. It can be seen like Sun Grid Engine/Torque/.

Go-Docker acts as an additional layer above those tools on multiple user systems where users do not have Docker priviledges or knowledge.

In this blog post, I will present some experiments to run Go-Docker on top of a cluster of raspberry pi.

Read More

Using Go-Docker and Docker Swarm to create a high-volume live and on demand video encoding solutions

by Olivier Barais     docker   swarm   go-docker  

Posted 2015.12.01 — Rennes, France

The idea is to propose an initial solution to securely manages high-volume live and on demand video encoding solutions in combination with the scale and elasticity of the cloud. The providing service will automatically provisions and dynamically scales docker instances, and can seamlessly integrate those resources with on site infrastructure to instantly expand video processing capacity. This flexibility enables video providers to rapidly enhance multiscreen video offerings, grow audiences, generate greater revenues, and decrease capital expenses.

Read More

EJCP15 CBSE Course

by Olivier Barais     ejcp   software engineering  

Posted 2015.06.26 — Nancy, France

Materials for the course is available online:

Read More

JHipster and Software Engineering teaching

by Olivier Barais     jhipster   software engineering  

Posted 2015.03.20 — Rennes, France

I am a fan of the JHipster framework. Recently, through a discussion with Jean-Marc Jézéquel, we decide to use it as a support for teaching advanced concepts in Software Engineering and Sofware Architecture at the University of Rennes 1 in a flip classroom.

Read More

Playing with docker and opendaylight

by Olivier Barais     sdn   opendaylight   docker  

Posted 2015.03.13 — Rennes, France

A short blog post to share my experience in playing with opendaylight and docker.

Currently there is no native integration of Open vSwitch in Docker, i.e., one cannot use the Docker client to automatically add a container’s network interface to an Open vSwitch bridge during the creation of the container. However the last version of ovs provides a utility to use ovs with docker. As ovs support openflow 1.3. It provides a greate playground for practical work combining opendaylight, docker and ovs.

Read More

Some tips for JHipster

by Olivier Barais     jhipster  

Posted 2015.01.28 — Rennes, France

I really like JHipster project. The server stack is clean and ready for production

  • Spring Boot for easy application configuration
  • Maven or Gradle configuration for building, testing and running the application
  • “development” and “production” profiles (both for Maven and Gradle)
  • Spring Security
  • Spring MVC REST + Jackson
  • Optional WebSocket support with Spring Websocket
  • Spring Data JPA + Bean Validation
  • Database updates with Liquibase
  • MongoDB support if you’d rather use NoSQL instead of a classical relational database

Ready to go into production:

  • Monitoring with Metrics
  • Caching with ehcache (local cache) or hazelcast (distributed cache)
  • Optional HTTP session clustering with hazelcast
  • Optimized static resources (gzip filter, HTTP cache headers)
  • Log management with Logback, configurable at runtime
  • Connection pooling with HikariCP for optimum performance
  • Builds a standard WAR file or an executable JAR file

and the client part is also clean

Single Web page application:

  • Responsive Web Design
  • HTML5 Boilerplate
  • Twitter Bootstrap
  • AngularJS
  • Full internationalization support with Angular Translate
  • Optional WebSocket support with Spring Websocket

With the great Yeoman development workflow:

  • Easy installation of new JavaScript libraries with Bower
  • Build, optimization and live reload with Grunt or Gulp.js
  • Testing with Karma and PhantomJS

For me, it mainly misses some entity code geenrator that use TypeScript.

Read More

Quick and dirty integration of JQuery module with AngularJS

by Olivier Barais     angularjs   jquery  

Posted 2015.01.28 — Rennes, France

This morning, I have to integrate a JQuery libs with angularJS. Of course, the propper way to do it is the use of directives but I have to do it quickly.

Read More

Install KevoreeJS on an Intel Edison

by Olivier Barais     kevoreejs   edison  

Posted 2015.01.19 — Rennes, France

Just a doc to show how to install a debian wheezy on an Intel Edison and install KevoreeJS tooling.

Read More

Using Kevoree to drive Docker

by Olivier Barais     docker   kevoree  

Posted 2014.10.15 — Rennes, France

Just a doc to show how you can drive docker using Kevoree Models@runtime frmaework.

Read More

Tips for starting any X11 apps (e.g. eclipse) in a docker container from a linux host

by Olivier Barais     docker   eclipse  

Posted 2014.08.26 — Rennes, France

Just a tips for starting any X11 apps (e.g. eclipse) in a docker container from a linux host

Read More

Running MDMS and MDMS Diversified using docker

by Olivier Barais     docker   diversify  

Posted 2014.08.23 — Rennes, France

I am just finishing the docker image to run mdms quickly.

To play with it, just pull the following images.

docker pull barais/mdmsredis #contains the redis databases
docker pull barais/mdmssosies #contains the sosies (it is big)
docker pull barais/nginxsosies #contains nginx and the websocket server for displaying connection

To create quickly a cluster of regular mdms worker

#start nginx
export ID_REDIS=$(docker  run -i -d -t barais/mdmsredis /usr/bin/redis-server)
export IP_REDIS=`docker inspect --format='{{ .NetworkSettings.IPAddress }}' $ID_REDIS` 
#start some sosies
#run just once
export ID_SOSIES=$(docker  run -i -d -t barais/mdmssosies /bin/bash -xec "sed -i "s/$IP_REDIS/g" /opt/mdms-ringojs/config.json && /opt/sosies/ringojs-0.10/bin/ringo /opt/mdms-ringojs/tools/fakedb.js")

#run for each sosies

for i in {1..10}
	export ID_SOSIES=$(docker  run -i -d -t barais/mdmssosies /bin/bash -xec "sed -i "s/$IP_REDIS/g" /opt/mdms-ringojs/config.json && /opt/sosies/ringojs-0.10/bin/ringo /opt/mdms-ringojs/main.js")
	export IP_SOSIES=`docker inspect --format='{{ .NetworkSettings.IPAddress }}' $ID_SOSIES`
	if [ -z "$IPS_WORKER" ]; then export IPS_WORKER=$IP_SOSIES; else export IPS_WORKER="$IP_SOSIES;$IPS_WORKER"; fi  

#start some nginx and websocket server
export ID_NGINX=$(docker  run -i -d -t barais/nginxsosies /main $IPS_WORKER) #you can add a second parameter for the public name of your website e.g. cloud.diversify.org
export IP_NGINX=`docker inspect --format='{{ .NetworkSettings.IPAddress }}' $ID_NGINX`
echo $IP_NGINX

To create quickly a cluster of diversified mdms workers:

Read More

Tips for cleaning my personal website repo

by Olivier Barais     website  

Posted 2014.08.22 — Rennes, France

Just a tips for cleaning my personal website repo

Read More

New cloud infrastructure is arriving

by Olivier Barais     cloud  

Posted 2014.08.18 — Rennes, France

Just to follow the new DiverSE cloud

Read More

Test the use of dillo and jenkins to post

by Olivier Barais     website  

Posted 2014.08.12 — Rennes, France

Ok first try to use dillinger.io to edit or create a new post and jenkins to push it.

Great it works ;)

Read More

Test the use of stackedit and jenkins to post

by Olivier Barais     website  

Posted 2014.08.12 — Rennes, France

Welcome to StackEdit

Hello, I am your first Markdown document within StackEdit. Don’t delete me, I can be helpful. I can be recovered anyway in the Utils tab of the Settings dialog.

Read More

Test the use of stackedit and jenkins to post

by Olivier Barais     website  

Posted 2014.08.12 — Rennes, France

Welcome to StackEdit!

Hello, I am your first Markdown document within StackEdit[^stackedit]. Don’t delete me, I can be helpful. I can be recovered anyway in the Utils tab of the Settings dialog.


StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline!


  • StackEdit is accessible offline after the application has been loaded for the first time.
  • Your local documents are not shared between different browsers or computers.
  • Clearing your browser’s data may delete all your local documents! Make sure your documents are backed up using Google Drive or Dropbox synchronization (see Synchronization section).

Create a document

The document panel is accessible using button in the navigation bar. You can create a new document by clicking the New document sub-menu in the document panel.

Switch to another document

All your local documents are listed in the document panel. You can switch from one to another by clicking a document in the document panel or you can also use Ctrl+[ and Ctrl+] to toggle documents by most recently used.

Rename a document

You can rename the current document by clicking the document title in the navigation bar.

Delete a document

You can delete the current document by clicking the Delete document sub-menu in the document panel.

Export a document

You can save the current document to a file using the Export to disk sub-menu from the menu panel.

Tip: See Publish a document section for a description of the different output formats.

Read More

Running a DHT (ETCD) in a cluster using docker

by Olivier Barais     docker  

Posted 2014.08.12 — Rennes, France

I am just playing using docker and etcd.

To create a distributed dht within a cluster using etcd and docker. I create a container based on ubuntu. I just add the go language git and etcd. If you want to play with it you can pul it

docker pull barais/etcd

and start your three containers.

sudo docker run -p 4001:4001 -p 7001:7001 -t -i barais/etcd   /etcd/bin/etcd -peer-addr -addr  -data-dir machines/machine1 -name machine

sudo docker run -p 4002:4002 -p 7002:7002 -t -i barais/etcd   /etcd/bin/etcd -peer-addr -addr  -peers, -data-dir machines/machine2 -name machine2

sudo docker run -p 4003:4003 -p 7003:7003 -t -i barais/etcd   /etcd/bin/etcd  -peer-addr -addr -peers, -data-dir machines/machine3 -name machine3

Next step: doing the same thing using kubernetes.

To follow …

Read More

Just finishing new web site

by Olivier Barais     website  

Posted 2014.08.11 — Rennes, France

I just finish my new website based on the template provided by Walter and using gihub page as web page provider. Please feel free to send me bugs reports or feature updates. Banner or footer photos come from Carcan.

Read More

Finishing long CV for the HDR

by Olivier Barais     markdown   untidy  

Posted 2014.08.11 — Rennes, France

Just finishing my long CV for the HDR.

Read More

Testing different markup options

by Olivier Barais     markdown   untidy  

Posted 2014.02.06 — Rennes, France

This post is a test for markdown and Jekyll. I basically have all kinds of examples of how to do stuff in markdown, but it’s not tidy at all.

Read More

First post using jekyll

by Olivier Barais     first-post   jekyll   github-pages  

Posted 2014.02.04  

This is the my first post after configuring my site to use github pages, and more specifically, after I started using Jekyll.

Read More