Friday 18 March 2016

Vodafone R216 Pocket WiFi with Telstra

The R216 Pocket WiFi is a nice little 4G WiFi router from Vodafone (Australia).   It's currently supplied unlocked which is nice.  Most router/SIMs seem to be plug and play these days and often there's no need for additional configuration, however my Telstra prepaid broadband SIM would not work in the device.  It found the Telstra 4G network, but remained disconnected.  The solution: go to the Mobile Broadband tab and connection menu.  Select Custom, and then set IPV4/IPV6 APN field to telstra.internet and IP4/IPV6 Number field to *99#.  Leave the other fields untouched, save and it should then be able to connect.

Sunday 13 March 2016

Eventuate with a Cassandra Event Log

I'm just starting out with Eventuate.  I've previously successfully experimented with Akka Persistence, but was looking for a little more for a system we're developing.   Although it looks a lot cleaner to integrate into a pure Scala project, we've decided to use the Java API as the core team are experienced Java developers.  The following blog articles will document our experiences and hopefully ease adoption of this technology for others.

So it all looked great in theory.... I created the Event Log actor as follows:
ActorRef eventLogRef = actorSystem.actorOf(CassandraEventLog.props("test", true));
I downloaded the latest (3.3.0) version of Cassandra from the Datastax website.  Ran the program and bang! the following (truncated) error:
 
    [ERROR] [03/13/2016 17:24:27.798] [ActorSystem-eventuate.log.dispatchers.write-dispatcher-8] [com.rbmhtechnology.eventuate.log.cassandra.Cassandra] Cannot connect to cluster (attempt 1/4 ...)
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table schema_keyspaces))
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:223)

In the Eventuate documentation it notes that Cassandra v2.1 or higher is required.  Perhaps I'd gone to high?  Uninstalled v3.3.0 and re-installed v2.1.13 and the problem disappeared.  I'm still a Cassandra novice, but it seems schema_keyspaces was removed in Cassandra v3.0, therefore it would appear Eventuate cannot currently support Cassandra v3.0+.

Note: to verify Eventuate was actually writting data, I fired up the Cassandra CQL shell and did a "select * from eventaute.log_test;" which showed the written events.