Using Couchbase Lite (not Couchbase Server) in a Golang application - go

I'm wondering if anyone has ever tried to use Couchbase Lite (not Couchbase Server) in a Golang application. In other words building it into a Golang binary?
I came across this library Couchbase Lite Core and through a quick read, it looks like the underlying library for Couchbase Lite (I stand corrected)? What I couldn't find though was how to use it.
Has anyone tried to make this work with something like cgo perhaps? I'm looking to build it statically into the application so it doesn't have dependencies when distributed.

Lite Core is the underlying implementation of the upcoming 2.0 version of Couchbase Lite. It's still under development. The intention is to have a common core, with platform and language specific bindings on top.
There is currently no Go implementation I'm aware of. cgo does look like an option. Given the goal of Lite Core being the underlying implementation for all platforms, this seems on its face like a reasonable approach.
If you're interested, there's a GitHub account for community projects at https://github.com/couchbaselabs. If you work on this, it would be great to have it included there.
To see an example of platform integration, take a look at https://github.com/couchbase/couchbase-lite-ios/tree/feature/2.0

I haven't tried embedding Couchbase Lite, but my team and I make extensive use of embedded datastores like BoltDB Assuming you aren't using Couchbase's replication features heavily, BoltDB may meet your requirements.

Related

Xamarin Forms: How do I implement WebSockets?

We want to transfer data from a client to a server in realtime, so we have decided to go with WebSockets.
Using Xamarin.Forms it was surprisingly difficult to find a suitable WebSocket library.
The best match was "WebSocket4Net" because it is directly suggested on Xamarin's Homepage. However I was not able to install this library, because it only supports versions of .NET up to v4.0. (We are using v4.5)
Whenever I try to change the target framework of my PCLs from v4.5 to v4.0 I get loads of weird errors stating "Windows.Input library could not be found", "ObservableCollection could not be found" etc.
So we are currently using the library "WebSocket.Portable.Core", which although lacking some functionality worked out. However for some reason we can only receive one message. The event "MessageReceived" always is just called once.
Has anyone heard about such a problem with WebSockets? Maybe it is just time to use another library, but I just can't find one?
I also can't find any solution how to implement WebSockets natively for each platform.
WebSockets.PCL has a native implementation for each platform and it's well documented
https://github.com/NVentimiglia/WebSockets.Pcl

MongoDB C# 2.0 upgrade

We are currently in the process of upgrading the MongoDb c# driver. There used to be "GrdFS" functionality to save large BSON document into chunks. Looks like the 2.0 doesn't have that feature.
We would like to know whether it is still in the scope or when can we expect this feature to be out there?
Much appreciate your response regarding the same.
You can track the feature here: https://jira.mongodb.org/browse/CSHARP-1191.
It is largely implemented, but we are waiting for the specification to be finalized. It will ship with the 2.1 version of the driver.

Why one might need JeroMQ if it can use JZMQ?

Simple question. Why "porting" zmq on java and call it JeroMQ is good idea?
JeroMQ is an official project of the ZeroMQ community; it's a full port of the C++ libzmq library, supporting version 3.2.
Advantages:
Pure Java, so no need to link in C/C++ via JNI. This is extremely helpful on devices where native libraries are difficult or impossible.
100% compatible with the JZMQ API (the two projects agreed on a single API so you can import one or the other transparently).
100% compatible with the ZeroMQ wire protocol, so you can run some nodes using JeroMQ and some using the native library, and it works as expected.
Good performance, relatively close to the native library.
Disadvantages:
No PGM multicast - there is no Java version of that library yet.
Does not yet support ZeroMQ v4 functionality, including security.
JeroMQ is a pure Java implementation of ZeroMq. If your target language is Java, it's easier to get started with JeroMq since it uses a single jar file. ZeroMq (zmq), on the other hand, is written in C. You must build zmq, libzmq, and the Java language bindings, jzmq, to use it in a Java app. The JeroMq API is identical to jzmq, so starting with JeroMq and switching to jzmq later has no impact on your application with the exception of performance; zmq performs better than JeroMq.
Hope that helps,

Need a mongo driver that supports replica sets and eventmachine for ruby

I am trying to find a ruby based mongo driver to use in my project. It has to support replicasets and eventmachine. I'm aware of em-mongo, but it does not support replicasets. It looks like there is not a good option at the moment, but I wanted to see if anyone was aware of one before I explore mongo alternatives...
I'm a maintainer for the 10gen Ruby driver. Hang tight, we'll have support for this in the near future.
I don't believe there is anything out there (from 10gen or otherwise) that does this currently but we're actively working on a version of our driver that supports asynchronous reads and writes.
All of the official 10gen drivers are aiming to support this by mid to end of the year and the ruby driver team is already working on it. Hopefully we'll have something for you much earlier than that (likely in our 2.0 release).
You can try my fork of em-mongo with Replica Set support.
Also I am working on gem Monga which should support some modern features of MongoDB. But it is totally not production ready right now.

Graphical Application in Windows, Linux, MacOS

I would like to build a graphical application that must work on at least Windows, Linux and MacOS. I would like to know what do you suggest I should use.
I have some experience with Java and C++ but I thought about using Java Swing first. What do you think or further suggest (like maybe tools or frameworks)? I also may be needing to connect to a PostgreSQL database to store data.
Java is probably the simplest way to get your application working on all 3 platforms as well as to add database support. All of these are equally possible in C++, but it definitely involves more work because you need to learn to use a cross-platform widget toolkit. Also, C++ database drivers usually have wildly varying designs but Java presents a unified interface via JDBC - this also means that you can change your underlying DB at any time without having to change your code.
I would use the Qt platform from Nokia. It supports all the OSes that you've mentioned and has also database connectors for PostgreSQL but also for MySQL, SQLite, etc.
It also has a very nice IDE, the QT Creator that you can use should you pick Qt.
I would suggest Qt too. Qt has seen very good development recently, their examples and documentation base is quite large, and the LGPL license is flexible too, for creating proprietary software. It has a good Qt Creator IDE, a Qt GUI Designer. Plus is has quite a number of modules, enabling it to be used in conjunction with other language developed apps/libraries. And, it is used in commercial/public apps like Google Earth, Skype (maybe only the linux version). So, it has a good history of reliability. And yeah, for Database, it has modules, like Qt-Sql. Another advantage you get over java is speed.
wxWidgets does cross-platform easily enough, using available native toolkits. You could probably use a ORM for the database part, but I don't have enough experience using them under C++ to provide an actual informed opinion there.
GTK is cross-platform. Pidgin uses it and manages to get away with being generally considered a fully-cross-platform app. The installer size is a problem, though.

Resources