Using Redis with any Java IDE on a Windows system - spring-boot

I have been finding it hard to configure spring session in spring boot. I have seen a lot of implementation using Redis and using gem-fire and H2 JDBC has not resulted in anything productive. Can I use Redis with IntelliJ on my Windows system, because I heard it is not supported on Windows?

It is true that there is no official support for Redis on Windows. From official docs:
There is no official support for Windows builds, but Microsoft develops and maintains a Win-64 port of Redis.
But as mentioned Microsoft has been maintaining it's own version for over a year now, where you can find new releases and well defined steps for setup on Windows.
Tutorials:
There is also a tutorial on how to build Redis using visual studio. You also should look into the JetBrains plugin iedis.
Here is a tutorial for Redis with Spring, also here's an implementation of Spring Session with Redis.

Related

Mixing microProfile-5.0 and Jakarta EE 9.1 messaging features in Liberty

Migrating server from microProfile-4.1 to microProfile-5.0 and based on https://openliberty.io/blog/2021/11/26/jakarta-ee-9.1.html, I map wasJmsClient-2.0 to messagingClient-3.0 and wasJmsServer-1.0 to messagingServer-3.0.
<featureManager>
<feature>microprofile-5.0</feature>
<feature>messagingServer-3.0</feature>
<feature>messagingClient-3.0</feature>
</featureManager>
The server seems not able to start reporting some conflicting versions of features.
From what I understand all are Jakarta EE 9.1 compatible but if not what are the best option to replace wasJmsClient-2.0 and wasJmsServer-1.0 ?
Yes this should work. I am not sure how you are installing liberty and the features which could make a difference. There were some issues with installing of features not including all dependent features earlier this year. So I would ask that you include what version of liberty you are using and how you installed it and possibly how you installed the features. I just tried with the latest code and it started up cleanly for me. So if you can also provide details about what the error message looks like that would be helpful.

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

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.

is it possible to connect to cloudsql in golang?

the google documentation seems to hint that the app engine go SDK should support using cloudsql, but from this snippet of code, it looks like it's not yet supported.
is there a newer version of the SDK that does allow you to interface with cloudsql?
Cloud SQL works with the latest SDK. The online docs haven't been updated. Pick a MySQL driver of your choosing that can work with appengine/cloudsql package and the databse/sql package will work. Some of the working drivers : mymysql https://github.com/ziutek/mymysql or go-sql-driver : https://github.com/go-sql-driver/mysql

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.

Tomcat native library benefits

Can anyone advise on the main benefits of installing the Tomcat native library?
I am running a standard installation of Tomcat to serve a moderately complex intranet based web app using Ext Js on the front end so lots of javascript and AJAX over the network and VPN from various locations.
Is it even worth installing this library for the comparatively small amount of requests it will be getting.
The app can be very slow at times and I'm looking to boost performance. I am already refactoring Java code based on profile data but as the problem seems to be more generalised I am also looking at the app server configuration and I can't seem to find any detail on whether this library would actually benefit me in this scenario.
Thank you
I assume you are speaking about Tomcat APR. I personally don't believe that by simply switching the connector from non-native to native will automagically solve your performance problems.
Unless you have exercised all code inefficiencies (it seems that you are doing this already with the help of profiler) and solved them, it is probably not worth it.
I would envisage that APR helps in cases where most of requests are static and delivering static content becomes a bottleneck. To achieve this, you probably need to be delivering millions pages per day and having thread pool going through the roof (which I assume is not likely for your intranet).
Some of tomcat apr is not found in ubuntu repositories as they are no longer supported.
Please make sure these configurations are correct:
In eclipse under windows->preferences->servers-> runtime environment,
choose the server where your project is deployed. Select the option installed jre and choose the java version you have installed or one you prefer.
Under project properties -> runtime environment select the server and press apply.
Under build path double click on jre library and choose the java version you have installed.
Native libraries are required when there is a mismatch between the code in the project in the jre version or the tomacat version.
Make sure that in your build and code, both are for the latest version of servlet that tomcat supports and jre is at its latest version that tomcat supports.
For example, if tomcat v8.5 supports java version 7 or above, you should have java version latest above 7 and tomcat v8.5 supports servlet version 3.1 so in your build set up. Make sure to use a container that uses servlet 3.1.

Resources