Couchbase Lite 2.0 Java support

New to Couchbase. Need your inputs…

We’re currently evaluating Couchbase Mobile framework for our application.

Our application is Java based (spring boot) and can be accessed in 2 ways. Cloud via web browser and as windows application. Some of our users will be using the windows application in their desktops/laptops and saving data to local database (Couchbase lite). Once internet connection is available, the local database syncs with cloud database. Couchbase Mobile framework would have been a suitable solution for us, but since there is no support for Java in Couchbase Lite 2.0, this is a blocker for us.

Please let us know if there are any workarounds when Java will be supported in Couchbase Lite 2.0.

We don’t have immediate plans to support “Desktop” Java in CBM 2.0. I would expect that decision to be driven by demand .
You mentioned that you looking to develop a Windows application - We do support .Net UWP that you can leverage for desktops/laptops. It’s not the language you are looking for but mentioning it as an option for consideration.
As you are aware, the source code for CE version is available on GitHub. Maybe you can look into what it would take to get it working for regular JVM yourself and contribute back as a community project ?

(CC @ssmotra)

Hi Priya,

Thank you for your response. Ours is a spring boot java application running in the user’s laptop with Windows 7/10 operating system.

I have a few questions…

  1. Can we install Couchbase Lite 2.0 in the user’s Windows laptop?
  2. Couchbase Lite 2.0 doesn’t have Java support. So the spring boot application cannot directly interact with Couchbase Lite 2.0. Please confirm.
  3. Does Couchbase Lite 2.0 expose a RESTful API?
  4. If Couchbase Lite 2.0 exposes a RESTful API, I believe the spring boot application can interact with Couchbase Lite 2.0 via the RESTful API. Please confirm.

Thanks in advance for your help.

  1. There is nothing to “install”. Couchbase Lite is an embedded library that gets bundled with your application
  2. Couchbase Lite 2.0 has a Java version, but it uses some Android specific classes. The demand for Java Desktop in 1.x was very low and so its priority was lowered accordingly. That being said, the community edition is open source as mentioned and so if you feel like it you could see what it would take to replace those Android specific classes with ones that work in standard Java.
  3. No, it does not
  4. I don’t know the answer to this, but it is not relevant because of the answer to 3

Thanks, borrrden. I initially thought that couchbase lite could be installed as a standalone app.

Looks like version 1.5 of couchbase supports Java. May be that version suits our needs.

Verion 1.4.1 is the latest version there, but yes (Sync gateway is at 1.5 so it is confusing). It has a Java API. However, be warned that with the release of 2.0 the 1.4.x versions have begun their 18 month window to end of life. There will not be any new features introduced onto them, and only critical bug fixes will get considered. For enterprise subscribers, of course, there are more options but for community users that is the situation.

Thanks, borrrden. We’ll be going for enterprise license if we decide to use Couchbase Lite + Sync gateway. Really hoping that in version 2.1 Java support will be included.

Even then - I would not recommend going with CBL 1.4 if you are just starting off …you would have to plan on migrating away to 2.0 at some point in the future. You may want to reach out through the Couchbase Enterprise Account executive and they can evaluate options for 2.0

Version 2.1 (tentatively due in summer) will not have support for desktop Java. Support for java beyond 2.1 will be driven by demand. So please work through the enterprise account …

Thank you for your response, Priya.

I need CBM 2.x for java desktop version to migrate from 1.x to 2.x.

I am using CBM 1.x this way: Eclipse RCP framework with java to develop cross OS desktop app for Windows/Mac/Linux, and android for mobile app.

Now i am stucked without CBM 2.x for java desktop supporting. Hope you provide it.

It is on our roadmap for early next year. So stay tuned. The good news is that the API will be more or less in alignment with the Android 2.x version of Couchbase Lite if you are familiar with the Android APIs, migrating to this should be quite seamless.

Glad to here this. As an widely used solution, CBL can NOT give up the java world. Even the percentage of java desktop application is low now, but the whole number is still quite big especially for enterprise information management system.

just FYI
My mobile app is Android based and desktop side is using Eclipse RCP framework. Through this approach, the desktop side and mobile side can share lots of code and common libraries as they are all java based, so it’s easy to shift functionalities between desktop and mobile.

And also Eclipse RCP is cross desktop OS framework, it can run well with windows/mac os/linux. Why no iPhone app provided? More and more government orgs and big companies here treat iPhone as un-securited factors, and moving to Android based, because for Android they can however find a phone provider to customize phones for them but iPhone do not do in this way. This is also happening with desktop from windows to linux, but not easy as mobile side as many legency applications were sticked with windows. So with Eclipse RCP, i do not need to care the desktop OS related issues.

Thanks for the details. Always helps to get more context on use cases and applications. It’s interesting that orgs out there think that iPhone is not secure.
My personal opinion - Being a single vendor platform and with Apple owning the entire platform and stack, they are able to influence security features at the hardware level.

But I can understand that being a closed system, you cannot customize the platform (unless you jailbreak) and it’s probably an important requirement for your applications.

The good thing is when we have Java CBL out, you should be able to leverage a lot of the app logic and DOA layer