Integrating Hazelcast with a web application running on tomcat with MongoDB as backend - mongodb

I want to integrate Hazelcast with a web application running on a tomcat server. The backend is MongoDB. So far I have managed to integrate MongoDB with Hazelcast how do I integrate it with tomcat so that changes made to the DB through the UI can be seen in the IMaps used when i do a get call.

Not every get call will load from DB, only those keys that are not present in Hazelcast cluster will be loaded from the DB.
As for integrating with a web server, not sure what you meant there because the code that loads from DB runs on Hazelcast server. An application, whether it is a simple public static void main(...) or a web app running in a container or a web server, is a client to Hazelcast server - means, you will be required to use client proxies to connect to servers.

Related

Localhost Spring Boot service not found

I am studying Spring Cloud and I am developing a study project.
I create a project that represents a simple REST API using Spring Boot and I run this in localhost.
I also created another project API Gateway, this one gets the request coming and calls the REST API, I am also running this one in localhost.
When I run the REST API and send a request to it, it responds properly, but if I send the request to API Gateway when API Gateway tries to call the REST API using RestTemplate it is getting this exception:
java.lang.IllegalStateException: No instances available for localhost
Both services are running in localhost.
Do anyone knows what is the cause of this error?

possible to access an application in Websphere application server cluster without load balances or web server?

I am trying setting up an websphere application server cluster and deploy an web application on it. I have successfully access the application with a web server. but i have some question, if i would access the application bypassing the web server by using 9080 to the single server, i get error when sign in servlet respond.redirect to jsp page. the session was lost, are we not suppose to access the application in cluster environment with out the web server ?
As long as you target an individual server in the cluster, you should not lose your session or suffer any other ill effects for not using/having a proxy server between you and the cluster. You should look closely at the Cookies issued through that flow and make sure they don't have a bad domain or path and that you don't get redirected back through the webserver or otherwise to another JVM.
Also verify there is no DNS-based load balancing. If you don't have session persistence/distribution/replication it won't work.

Spring boot admin behind firewall

I have a spring-boot client app deployed in a customer network and I want to use SBA as a GUI for its actuator endpoints. I cannot use register-client-applications to register the app, mainly because the client app has no connectivity to SBA (its behind a firewall).
Is there a way how to add a client to SBA manually?
You can add use a static configuration for spring cloud's discovery client. So there is no need that the client reach the sba server. See http://codecentric.github.io/spring-boot-admin/current/#spring-cloud-discovery-static-config

How to add security to run Ignite Web Console in k8s

I am running Ignite Web Console and Web Agent in k8s v1.9, but connection fails when using security - works fine without security. I am able to access Ignite REST API by passing 'X-Signature' value in Header using Postman, but see no way to do this through the Web Console. Same with dBeaver.
Web Console do not support connection to secured cluster.
I created issue: IGNITE-8428 Web Console: Support connect to secured cluster.
You can track it.

How to write a REST web service using Apache jclouds

I want to write a REST web service using Apache jclouds .
This web service will list the number of virtual machine running on openstack.
Can you please tell me from where to start with the REST web service development using Apache jclouds
You wouldn't actually use jclouds to write a web service. It's probably best to use a JAX-RS based framework like Jersey or RESTEasy to write a REST web service.
jclouds is effectively for reading cloud web services. To list the number of virtual machines running on OpenStack, have a look at the jclouds Nova Example that lists servers.