<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog @ SIB Visions &#187; vert.x</title>
	<atom:link href="http://blog.sibvisions.com/tag/vert-x/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sibvisions.com</link>
	<description>Blog @ SIB Visions</description>
	<lastBuildDate>Mon, 13 Apr 2026 09:47:01 +0000</lastBuildDate>
		<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Release day - Merry Christmas</title>
		<link>https://blog.sibvisions.com/2015/12/24/release-day-merry-christmas/</link>
		<comments>https://blog.sibvisions.com/2015/12/24/release-day-merry-christmas/#comments</comments>
		<pubDate>Thu, 24 Dec 2015 08:40:26 +0000</pubDate>
		<dc:creator>rjahn</dc:creator>
				<category><![CDATA[Release notes]]></category>
		<category><![CDATA[headlessUI]]></category>
		<category><![CDATA[JVx]]></category>
		<category><![CDATA[vaadinUI]]></category>
		<category><![CDATA[vert.x]]></category>

		<guid isPermaLink="false">http://blog.sibvisions.com/?p=5324</guid>
		<description><![CDATA[Yesterday, we've released JVx 2.4, VaadinUI 1.4, HeadlessUI 1.1 and JVx vert.x 3.0.
Headless UI and JVx vert.x are maintenance updates because of JVx changes. JVx 2.4 is a bugfix release with some new cool features and VaadinUI is a performance tuning and bugfix release.
JVx and VaadinUI are available on Maven central. The other releases are [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, we've released <strong>JVx 2.4</strong>, <strong>VaadinUI 1.4</strong>, <strong>HeadlessUI 1.1</strong> and <strong>JVx vert.x 3.0</strong>.</p>
<p>Headless UI and JVx vert.x are maintenance updates because of JVx changes. JVx 2.4 is a bugfix release with some new cool features and VaadinUI is a performance tuning and bugfix release.</p>
<p>JVx and VaadinUI are available on <a href="http://search.maven.org/#search%7Cga%7C1%7Csibvisions">Maven central</a>. The other releases are hosted on <a href="http://sourceforge.net/projects/jvx/files/?source=navbar">SourceForge</a>.</p>
<h4 style="padding-top: 15px;"><strong>What's new in JVx 2.4?</strong></h4>
<ul>
<li><strong>Thread safety</strong>
<p>DataBook (MemDataBook, RemoteDataBook) are now Thread safe. It wasn't guaranteed before 2.4.</li>
<li><a href="http://blog.sibvisions.com/2015/12/18/using-boolean-datatype-with-oracle-and-jdbc/">Support for Boolean</a> <strong>and Arrays (Oracle)</strong>
<p>JVx' OracleDBAccess supports Boolean DataTypes via JDBC calls and Arrays as well. We wrapped the functionality in our existing API and it makes no difference for you. Arrays are wrapped as List of IBeans.</li>
<li><strong>Parameter changed event in WorkScreen</strong>
<p>The WorkScreen class got a new event: eventParameterChanged. It enables notification about parameter changes.</li>
<li><strong>New AbstractFactory</strong>
<p>We introduced AbstractFactory and changed all factory implementations. With AbstractFactory, it's possible to set custom factory properties. We use this new feature for vaadin UI. With new Vaadin UI it's possible to use the old Table or the new Grid implementation. Simply set a property for that.</li>
<li><strong>API change: IFactory</strong>
<p>The invokeInThread method now returns the Thread instance.</li>
<li><a href="http://blog.sibvisions.com/2015/10/02/official-fontawesome-support-in-jvx/">FontAwesome support</a></li>
<li><a href="http://forum.sibvisions.com/viewtopic.php?f=11&#038;t=928">Automatic Record translation</a></li>
</ul>
<h4 style="padding-top: 15px;"><strong>What's new in Vaadin 1.4?</strong></h4>
<ul>
<li><strong>Based on vaadin 7.5.7</strong></li>
<li><a href="http://blog.sibvisions.com/2015/09/29/jvx-vaadinui-supports-fontawesome-and-vaadin/">FontIcon support</a></li>
<li><strong>Grid support (experimental)</strong>
<p>Set the factory property: <strong>vaadin.component.legacy_table</strong> to true (via web.xml as init parameter or as URL parameter).</li>
<li><strong>Lazy loading of LinkedCellEditor</strong>
<p>Before 1.4, all LinkedCellEditors were loaded immediate. This was a performance impact. With 1.4 this was changed and data will be loaded, when needed.</li>
<li><strong>Performance tuning</strong>
<p>The performance is now about 5 times faster than before. We improved the performance because we reduced our CssExtension and reduced the database calls. You can feel the new performance <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<h4 style="padding-top: 15px;"><strong>What's new in JVx vert.x 3.0?</strong></h4>
<p>It's based on <a href="http://vertx.io/">Vert.x 3</a> and works with JVx 2.4.<br />
(JVx vert.x is hosted on <a href="https://github.com/sibvisions/jvx.vert.x">GitHub</a>)</p>
<h4 style="padding-top: 15px;"></h4>
<p>You can find all changes in the project Changelogs.<br />
Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.sibvisions.com/2015/12/24/release-day-merry-christmas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JVx.vert.x update to vert.x 3.0</title>
		<link>https://blog.sibvisions.com/2015/06/28/jvx-vert-x-update-to-vert-x-3-0/</link>
		<comments>https://blog.sibvisions.com/2015/06/28/jvx-vert-x-update-to-vert-x-3-0/#comments</comments>
		<pubDate>Sun, 28 Jun 2015 16:28:55 +0000</pubDate>
		<dc:creator>rjahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JVx]]></category>
		<category><![CDATA[vert.x]]></category>

		<guid isPermaLink="false">http://blog.sibvisions.com/?p=4605</guid>
		<description><![CDATA[Our JVx connection implementation for vert.x is up-to-date. It's now based on vert.x 3.0. We support http and socket connections - no API changes.
Updating to vert.x 3.0 from 2.2 was not funny because package structure was changed and some APIs as well. Whatever, it's working.
If you're interested in our vert.x implementation, check the github repository [...]]]></description>
			<content:encoded><![CDATA[<p>Our JVx connection implementation for vert.x is up-to-date. It's now based on vert.x 3.0. We support http and socket connections - no API changes.</p>
<p>Updating to vert.x 3.0 from 2.2 was not funny because package structure was changed and some APIs as well. Whatever, it's working.</p>
<p>If you're interested in our vert.x implementation, check the <a href="https://github.com/sibvisions/jvx.vert.x">github repository</a> because we don't offer binaries.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.sibvisions.com/2015/06/28/jvx-vert-x-update-to-vert-x-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JVx with vert.x</title>
		<link>https://blog.sibvisions.com/2015/02/07/jvx-with-vert-x/</link>
		<comments>https://blog.sibvisions.com/2015/02/07/jvx-with-vert-x/#comments</comments>
		<pubDate>Sat, 07 Feb 2015 18:56:46 +0000</pubDate>
		<dc:creator>rjahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JVx]]></category>
		<category><![CDATA[vert.x]]></category>

		<guid isPermaLink="false">http://blog.sibvisions.com/?p=3731</guid>
		<description><![CDATA[We had our first contact with vert.x in 2012 as we tried to use it for our first RaspberryPi project. We did a simple implementation of our JVx connection interface and used the Vertx net implementation to run our applications without application server on a RasPi. Our implementation was based on vert.x 1.2. We didn't [...]]]></description>
			<content:encoded><![CDATA[<p>We had our <a href="http://blog.sibvisions.com/2013/01/03/power-control-with-raspberrypi-jvx-and-vert-x/">first contact</a> with <a href="http://vertx.io/">vert.x</a> in 2012 as we tried to use it for our first RaspberryPi project. We did a simple implementation of our JVx connection interface and used the Vertx net implementation to run our applications without application server on a RasPi. Our implementation was based on vert.x 1.2. We didn't use our implementation since that time. We re-used the project in the last weeks because vert.x is still alive and we changed some things in our connection to support streaming protocols. It was a great test case for our changes.</p>
<p>First of all, we did an update to <a href="http://vertx.io/downloads.html">vert.x 2.1.5</a>. Our implementation is now up-to-date. We also changed the implementation because it wasn't an optimized solution. We removed our internal buffering and used vert.x core classes. We also created verticles to support the core concept of vert.x.</p>
<p>If you're interested, simply check the <a href="http://sourceforge.net/p/jvx/code/HEAD/tree/trunk/java/vertx/">source code</a>. There are two test cases: TestNetSocketConnection and TestHttpConnection in the test folder.</p>
<p>You could use the solution to run a JVx application on an embedded device <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  without a Java application server.</p>
<p>But you should know that this project isn't an official project of SIB Visions, and we don't offer support for it. But we try to answer your questions via Forum.</p>
<p>The project is currently located in the JVx repository, but we'll move it to its own repository in next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.sibvisions.com/2015/02/07/jvx-with-vert-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Power control with RaspberryPi, JVx and Vert.x</title>
		<link>https://blog.sibvisions.com/2013/01/03/power-control-with-raspberrypi-jvx-and-vert-x/</link>
		<comments>https://blog.sibvisions.com/2013/01/03/power-control-with-raspberrypi-jvx-and-vert-x/#comments</comments>
		<pubDate>Thu, 03 Jan 2013 15:59:05 +0000</pubDate>
		<dc:creator>rjahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[JVx]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[vert.x]]></category>

		<guid isPermaLink="false">http://blog.sibvisions.com/?p=1943</guid>
		<description><![CDATA[My idea was to create a programmable timer for some lamps at home. I wanted to control the timer via mobile phone (not only smartphone). I decided to use simple SMS'.
The timer app was not really a challenge and the SMS interface was also very straight forward, so I added a little bit network communication [...]]]></description>
			<content:encoded><![CDATA[<p>My idea was to create a programmable timer for some lamps at home. I wanted to control the timer via mobile phone (not only smartphone). I decided to use simple SMS'.</p>
<p>The timer app was not really a challenge and the SMS interface was also very straight forward, so I added a little bit network communication and complexity. The result:</p>
<div id="attachment_1945" class="wp-caption aligncenter nomargin" style="width: 265px"><a href="http://blog.sibvisions.com/wp-content/uploads/2013/01/power_control1.png" rel="lightbox[1943]"><img src="http://blog.sibvisions.com/wp-content/uploads/2013/01/power_control1-255x300.png" alt="Power control" title="Power control" width="255" height="300" class="size-medium wp-image-1945" /></a><p class="wp-caption-text">Power control</p></div>
<p>My Hardware:</p>
<ul>
<li>Raspberry Pi Model B</li>
<li>Cinterion TC65i</li>
<li>Standard table lamp</li>
<li>Solid State Relay (found <a href="https://blogs.oracle.com/speakjava/entry/the_power_to_control_power">here</a>)</li>
<li>Laptop as cluster client</li>
<li>Mobile Phone <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>My software:</p>
<ul>
<li><a href="http://jdk8.java.net/fxarmpreview/">JDK 8 ARM Preview with JavaFX</a></li>
<li><a href="http://smslib.org/">SMSlib</a></li>
<li><a href="http://pi4j.com/">Pi4J</a></li>
<li><a href="http://vertx.io/">Vertx</a></li>
<li><a href="http://rxtx.qbang.org">RxTx</a></li>
<li><a href="http://sourceforge.net/projects/jvx/">JVx</a></li>
</ul>
<p>My first question was - Which application server should I use for my Pi? I thought that JBoss or Tomcat would be overhead and I would save resources. I decided for Vert.x and a simple socket server. I wanted to show the integration of Vert.x with JVx and so my server got a JVx application with some business logic for publishing messages.</p>
<p>The server "thing" was clear and for reading SMS' I wrote a simple polling app. The app reads SMS from my hardware via RS232 and forwards received SMS via JVx APIs to my server (with Vert.x' NetClient).<br />
I didn't use the EventBus for sending messages becasue I wanted to show the seamless integration of JVx and Vert.x.</p>
<p>The code for forwarding messages:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;">MasterConnection macon <span class="sy0">=</span> <span class="kw1">new</span> MasterConnection<span class="br0">&#40;</span><span class="kw1">new</span> NetSocketConnection<span class="br0">&#40;</span><span class="st0">&quot;10.0.0.39&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
macon.<span class="me1">setApplicationName</span><span class="br0">&#40;</span><span class="st0">&quot;demo&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
macon.<span class="me1">setUserName</span><span class="br0">&#40;</span><span class="st0">&quot;user&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
macon.<span class="me1">setPassword</span><span class="br0">&#40;</span><span class="st0">&quot;password&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
macon.<span class="me1">setAliveInterval</span><span class="br0">&#40;</span><span class="sy0">-</span>1<span class="br0">&#41;</span><span class="sy0">;</span><br />
macon.<span class="me1">open</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>macon.<span class="me1">callAction</span><span class="br0">&#40;</span><span class="st0">&quot;publishMessage&quot;</span>, msg.<span class="me1">getOriginator</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, msg.<span class="me1">getText</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>The server application is a standard JVx application (only server-side). It uses a standard XmlSecurityManager without the need for a database. The "business logic" is very simple:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="kw1">public</span> Vertx getVertx<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">return</span> <span class="br0">&#40;</span>Vertx<span class="br0">&#41;</span>get<span class="br0">&#40;</span><span class="st0">&quot;vertx&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></p>
<p><span class="kw1">public</span> <span class="kw4">void</span> publishMessage<span class="br0">&#40;</span><span class="kw3">String</span> pNr, <span class="kw3">String</span> pMessage<span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw3">System</span>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;publishMessage (&quot;</span> <span class="sy0">+</span> pMessage <span class="sy0">+</span> <span class="st0">&quot;)&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw3">String</span> sNumber <span class="sy0">=</span> pNr<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; sNumber <span class="sy0">=</span> sNumber.<span class="me1">substring</span><span class="br0">&#40;</span>0, 5<span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="co1">//hide last characters</span><br />
&nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw4">int</span> i <span class="sy0">=</span> <span class="nu0">5</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> pNr.<span class="me1">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> i<span class="sy0">++</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; sNumber <span class="sy0">+=</span> <span class="st0">&quot;*&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; JsonObject jsobj <span class="sy0">=</span> <span class="kw1">new</span> JsonObject<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; jsobj.<span class="me1">putString</span><span class="br0">&#40;</span><span class="st0">&quot;number&quot;</span>, sNumber<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; jsobj.<span class="me1">putString</span><span class="br0">&#40;</span><span class="st0">&quot;message&quot;</span>, pMessage<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; getVertx<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">eventBus</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">publish</span><span class="br0">&#40;</span><span class="st0">&quot;sms.received&quot;</span>, jsobj<span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span></div>
</div>
<p>I made some tests with vert.x clustering and decided to implement a (very) simple JavaFX application that shows published SMS'. The application contains following code:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;">vertx <span class="sy0">=</span> Vertx.<span class="me1">newVertx</span><span class="br0">&#40;</span><span class="nu0">25502</span>, <span class="st0">&quot;10.0.0.11&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></p>
<p>EventBus ebus <span class="sy0">=</span> vertx.<span class="me1">eventBus</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
ebus.<span class="me1">registerHandler</span><span class="br0">&#40;</span><span class="st0">&quot;sms.received&quot;</span>, <span class="kw1">new</span> Handler<span class="sy0">&lt;</span>Message<span class="sy0">&lt;</span>JsonObject<span class="sy0">&gt;&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> handle<span class="br0">&#40;</span><span class="kw1">final</span> Message<span class="sy0">&lt;</span>JsonObject<span class="sy0">&gt;</span> pMessage<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Platform.<span class="me1">runLater</span><span class="br0">&#40;</span><span class="kw1">new</span> <span class="kw3">Runnable</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> run<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mdb.<span class="me1">insert</span><span class="br0">&#40;</span><span class="kw2">false</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mdb.<span class="me1">setValues</span><span class="br0">&#40;</span><span class="kw1">new</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="br0">&#123;</span><span class="st0">&quot;NUMBER&quot;</span>, <span class="st0">&quot;MESSAGE&quot;</span><span class="br0">&#125;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">new</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> <span class="br0">&#123;</span>pMessage.<span class="me1">body</span>.<span class="me1">getString</span><span class="br0">&#40;</span><span class="st0">&quot;number&quot;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pMessage.<span class="me1">body</span>.<span class="me1">getString</span><span class="br0">&#40;</span><span class="st0">&quot;message&quot;</span><span class="br0">&#41;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mdb.<span class="me1">saveSelectedRow</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">catch</span> <span class="br0">&#40;</span>ModelException me<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">throw</span> <span class="kw1">new</span> <span class="kw3">RuntimeException</span><span class="br0">&#40;</span>me<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Finally, I created a short video that shows all in action. It shows three applications on the same laptop. The first is the JavaFX application that shows published SMS. The second is the Power control (includes SMS check), started via PuTTY. The third application is the server instance, started via PuTTY. You can see a table lamp that will be turned on and off with SMS, sent from a smartphone.</p>
<p>Enjoy it <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="wp-caption aligncenter nomargin" style="width: 430px"><iframe width="420" height="315" src="http://www.youtube.com/embed/P8nZ8bBXg64" frameborder="0" allowfullscreen></iframe><br />
<p class="wp-caption-text">Power Control with RaspberryPi</p></div>
]]></content:encoded>
			<wfw:commentRss>https://blog.sibvisions.com/2013/01/03/power-control-with-raspberrypi-jvx-and-vert-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vert.x + JVx</title>
		<link>https://blog.sibvisions.com/2012/12/30/vert-x-jvx/</link>
		<comments>https://blog.sibvisions.com/2012/12/30/vert-x-jvx/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 12:53:22 +0000</pubDate>
		<dc:creator>rjahn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JVx]]></category>
		<category><![CDATA[vert.x]]></category>

		<guid isPermaLink="false">http://blog.sibvisions.com/?p=1921</guid>
		<description><![CDATA[Do you know vert.x?
It's like node.js but written in Java and without JavaScript limitations. It's very powerful and easy to use. I don't describe features of vert.x or tell you how it works. If you want to know more about it, you'll find everything you need on the official site.
How and why do we use [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Do you know </strong><a href="http://vertx.io">vert.x</a><strong>?</strong></p>
<p>It's like <a href="http://nodejs.org/">node.js</a> but written in Java and without JavaScript limitations. It's very powerful and easy to use. I don't describe features of vert.x or tell you how it works. If you want to know more about it, you'll find everything you need on the official site.</p>
<p><strong>How and why do we use vert.x?</strong></p>
<p>We simply tried it out to find out how it works and if an integration with JVx makes sense. We started a simple Research project with some goals:</p>
<ul>
<li>Create a simple http server that will run without an application server, e.g. on a Raspberry Pi</li>
<li>Create a simple net/socket server, also for Raspberry Pi</li>
<li>Deploy an existing JVx application (e.g. FirstApp) and connect to the new server</li>
<li>Integrate the EventBus in an existing JVx application</li>
<li>Create a simple JavaScript app (show data in a grid) with jQuery, jQueryUI and vert.x EventBus</li>
<li>Use EventBus in Cluster mode (Java IPC)</li>
</ul>
<p>The documentation of vert.x is great and there are a lot of examples, not what we needed but good for a quick start.</p>
<p>It was easy to create a http and socket server. The only problem was that everything was asynchronous and JVx expected synchronous calls. The HttpConnection of JVx worked without modifications because the JDK solved everything. We didn't use the vert.x http client.</p>
<p>It was a little bit tricky to implement an IConnection for socket communication because the server has to know when a command ends. It only reads a stream and does not know the protocol! We didn't introduce a new protocol, instead we wrote a delimiter after each command. This worked like a charm. </p>
<p>After we had http and socket support, the usage of an existing JVx application was easy. We copied existing files and it worked out-of-the-box. That was as expected <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>What about the event bus?</strong></p>
<p>With JVx we have a super fast and simple client/server communication and it's possible to send messages from the client to the server, but the client polls. It's not live!</p>
<p>The event bus offers more power and flexibility. We thought it would be a great benefit for JVx applications or applications written in technologies that are supported from vert.x e.g. JavaScript.</p>
<p>It's already possible to use JVx' REST interface from non Java applications but if you use vert.x it would be cool to use the event bus.</p>
<p>The EventBus support was soo easy because the API is very nice and simple. It's enough to register a handler (like a listener) for a specific address (= string). After the registration you'll receive events from the bus <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>We had some problems with clustering vert.x because we didn't read the (whole) documentation and the information was in a different place as expected. If you use vert.x embedded and start multiple applications with different Vertx instances, be sure to use free cluster (communication) ports (see <a href="http://vertx.io/manual.html">manual</a>):</p>
<blockquote><p>
-cluster-port If the cluster option has also been specified then this determines which port will be used for cluster communication with other vert.x instances. Default is 25500. If you are running more than one vert.x instance on the same host and want to cluster them, then you'll need to make sure each instance has its own cluster port to avoid port conflicts.
</p></blockquote>
<p>We had to create Vertx instances with a specific port, e.g. 25501, 25502 (for the second and third application):</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;">Vertx vertx <span class="sy0">=</span> Vertx.<span class="me1">newVertx</span><span class="br0">&#40;</span><span class="nu0">25501</span>, <span class="st0">&quot;10.0.0.11&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</div>
<p>Without port and host, the instance is not clustered!</p>
<p>The last goal was a simple JavaScript application. Here is a screenshot:</p>
<div id="attachment_1931" class="wp-caption aligncenter nomargin" style="width: 308px"><a href="http://blog.sibvisions.com/wp-content/uploads/2012/12/jvx_vertx_jquery.png" rel="lightbox[1921]"><img src="http://blog.sibvisions.com/wp-content/uploads/2012/12/jvx_vertx_jquery-298x300.png" alt="JVx with Vert.x and JQuery" title="jvx_vertx_jquery" width="298" height="300" class="size-medium wp-image-1931" /></a><p class="wp-caption-text">JVx with Vert.x and JQuery</p></div>
<p>The application connects with username and password and retrieves data from a database via business logic (standard JVx). We used an existing JVx application and wrote one html page for our JavaScript application. Here is the source code:</p>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc0">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a> xmlns<span class="sy0">=</span><span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;en&quot;</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;en&quot;</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/meta.html"><span class="kw2">meta</span></a> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;text/html; charset=utf-8&quot;</span> <span class="sy0">/</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span>JVx + vert.x + jQuery<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span><br />
&nbsp; <br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/link.html"><span class="kw2">link</span></a> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">media</span><span class="sy0">=</span><span class="st0">&quot;screen&quot;</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;css/jquery-ui.custom.css&quot;</span> <span class="sy0">/</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/link.html"><span class="kw2">link</span></a> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">&quot;stylesheet&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">media</span><span class="sy0">=</span><span class="st0">&quot;screen&quot;</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;css/ui.jqgrid.css&quot;</span> <span class="sy0">/</span>&gt;</span></p>
<p><span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;js/jquery-1.7.2.min.js&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;js/i18n/grid.locale-en.js&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;js/jquery.jqGrid.min.js&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;http://cdn.sockjs.org/sockjs-0.2.1.min.js&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;js/vertxbus.js&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;</span><br />
&nbsp; $.jgrid.no_legacy_api = true;<br />
&nbsp; $.jgrid.useJSON = true;<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;</span><br />
jQuery(document).ready(function(){<br />
&nbsp; $.jgrid.defaults = $.extend($.jgrid.defaults,{loadui:&quot;enable&quot;});</p>
<p>&nbsp; jQuery(&quot;#grid&quot;).jqGrid(<br />
&nbsp; {<br />
&nbsp; &nbsp; datatype: &quot;local&quot;,<br />
&nbsp; &nbsp; height: 400,</p>
<p>&nbsp; &nbsp; colNames:['ID','PLZ-ID', 'ZIP', 'STRA-ID', 'Street', 'House #', 'Floor', 'Door #'],<br />
&nbsp; &nbsp; colModel:[<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'ID', width:60, sorttype:&quot;int&quot;},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'POST_ID', hidden:true},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'POST_PLZ', width:50, align:&quot;right&quot;, sorttype:&quot;text&quot;},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'STRA_ID', hidden:true},<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'STRA_NAME', width:200, sorttype:&quot;text&quot;}, &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'HAUSNUMMER', width:50, align:&quot;right&quot;, sorttype:&quot;int&quot;}, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'STIEGE', width:70, align:&quot;right&quot;, sorttype:&quot;int&quot;}, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {name:'TUERNUMMER', width:60, align:&quot;right&quot;, sorttype:&quot;int&quot;}<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],<br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; multiselect: false,<br />
&nbsp; &nbsp; rowNum: 200,<br />
&nbsp; &nbsp; forceFit: true,<br />
&nbsp; &nbsp; loadonce: true,<br />
&nbsp; &nbsp; caption: &quot;Address data&quot;<br />
});</p>
<p>eb = new vertx.EventBus(&quot;http://10.0.0.11:8080/eventbus&quot;);</p>
<p>eb.onopen = function() <br />
{<br />
&nbsp; &nbsp; eb.send('jvx.createSession', <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {application: 'demo', username: 'rene', password: 'rene'}, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function (reply) <br />
&nbsp; &nbsp; { &nbsp;<br />
&nbsp; &nbsp; &nbsp; eb.send('jvx.fetch',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {sessionId: reply.sessionId, object: 'adrData'}, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function (reply2) <br />
&nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; gdata = reply2.data;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; for(var i = 0; i <span class="sc2">&lt;<span class="sy0">=</span> gdata.length; i++<span class="br0">&#41;</span></span><br />
<span class="sc2"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#123;</span></span><br />
<span class="sc2"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jQuery<span class="br0">&#40;</span><span class="st0">&quot;#grid&quot;</span><span class="br0">&#41;</span>.jqGrid<span class="br0">&#40;</span><span class="st0">'addRowData'</span>, i + 1, gdata<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span>;</span><br />
<span class="sc2"> &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></span><br />
<span class="sc2"> &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span><span class="br0">&#41;</span>;</span><br />
<span class="sc2"> &nbsp; &nbsp;<span class="br0">&#125;</span><span class="br0">&#41;</span>; &nbsp; &nbsp;</span><br />
<span class="sc2"><span class="br0">&#125;</span>;</span></p>
<p><span class="sc2"><span class="br0">&#125;</span><span class="br0">&#41;</span>;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;GridPane&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/table.html"><span class="kw2">table</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;grid&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/table.html"><span class="kw2">table</span></a>&gt;</span><br />
&nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div>
</div>
<p>The authentication is hardcoded, of course. It's not a problem to show a login page, but not necessary for our project.</p>
<p><strong>Summary</strong></p>
<p>We have a great integration of JVx for vert.x and it's now possible to use JVx on remote hosts without application server. Simply use Vert.x as http or socket server. It's very cool to use a Raspberry Pi with JVx without Tomcat, Jetty or JBoss - it saves system resources and is cool <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It's now possible to use JavaScript, Python, Ruby or Groovy as client technology together with vert.x and JVx. Use the power of JVx for your preferred client technology.</p>
<p>The EventBus is a powerful feature to enrich your rich applications <img src='https://blog.sibvisions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Our integration project is open source and free for everyone!</strong></p>
]]></content:encoded>
			<wfw:commentRss>https://blog.sibvisions.com/2012/12/30/vert-x-jvx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
