Jelastic or Cloudbees support for websockets - websocket

Does anyone know if it's possible to use websockets on Cloudbees or Jelastic. I deployed a Railo project with websockets on port 10126, it works beautifully on my Tomcat local setup however nothing happens when deployed to both Jelastic and Cloudbees.

At Jelastic we do. That is one of the outcomes of our making Public IPs available. We will be doing a short how-to article coming up this very topic. You can look out for it on our blog (http://blog.jelastic.com) or our twitter account (#jelastic).

Cloudbees now supports Websockets.
This is done via a proxy - so can work with any app via http upgrade.
simply set:
bees app:proxy:update http_version=1.1
as http 1.1 support Upgrade to websocket (thus ws and wss will work).

CloudBees now offers support for WebSockets - you just need to use a different endpoint to access your application: http://developer.cloudbees.com/bin/view/RUN/WebSockets

AFAIK, only dotCloud supports websockets for now: http://docs.dotcloud.com/guides/websockets/

Ok in my understanding with Jelastic they support running Websockets in GlassFish and can support Public IPs.
while Cloudbees supports running separate JVMs (plain java apps, no app server) but without Public IPs.
Here are some references:
Cloudbees JVM container

Related

How do I forward requests from a client to a Windows Service running on Windows Server

I have an Angular application deployed to/via IIS. This app is sending requests to REST endpoints exposed by a Spring Boot application which I am running as a Windows Service (The Spring Boot application is accessing a MongoDB but this should not be relevant, I think). The exposed REST interface is accessable via port 8080 on the servers localhost.
The Angular app is accessible as it should be but there seems to be a problem when the web app tries to access the Spring Application's REST interfaces. More specific: The client seems to be receiving HTML documents when he should be receiving JSON files.
I am new to working with IIS so beginner errors are not unlikely. I'm happy to share more information if needed!
Edit: I read again the question, and understood something wrong:
Looks like you were sending requests to your Angular server. For development you should use the embedded web server (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html) in order to ease your server configuration steps. And from within the windows server, send request to localhost:springboot_port.
Once you want your service to be available for an external client, and to keep your service available/awake (something similar to systemd in Linux), you could try this: https://www.baeldung.com/spring-boot-app-as-a-service

How we configure API gateway, service discovery for micro services in pcf?

I am learning building microservices using spring boot, Spring Cloud(netflix OSS Components). I have used netflix Eureka for service discovery, zuul for api gateway, ribbon, feign while running in my local machine.
Netflix eureka, zuul, ribbon, feign spring cloud config are not useful when we deploy to PCF?(if yes what are the alternatives available in pcf and how to configure them?)
As who are building microservices follows CI/CD approach, how developer verify working of their micro services before pushing code as we don't use eureka, zuul,ribbon,feign in production pcf. (how to simulate pcf environment in developer machine?).
I'd suggest to read below content before implementing if you have any doubt regarding usage of Eureka and Zuul, you will get all answers yourself.
https://github.com/Netflix/eureka/wiki/Eureka-at-a-glance
https://github.com/Netflix/zuul/wiki
As who are building microservices follows CI/CD approach, how developer verify working of their micro services before pushing code as we don't use eureka, zuul,ribbon,feign in production pcf.
Answer to this question is: You must be aware of JUnit test cases, so you can run you test cases using deployment pipelines to make sure all your functionalities are working as expected or you can use Test Automation for the same.
(how to simulate pcf environment in developer machine?).
Answer to this one:
You can use eclipse plugin you are using eclipse/STS IDE. Or you can connect all PCF services from you local machine using CloudFactory
#Bean
public Cloud cloud() {
return new CloudFactory().getCloud();
}
https://docs.pivotal.io/pivotalcf/2-1/buildpacks/java/sts.html
Here are some thoughts:
Eureka Service discovery: in my opinion this is not strictly necessary when running on PCF. When you push an app on PCF usually a route is assigned to your app, and you can use this Route as a poor man's service discovery. Eureka would allow you to use client-side load balancing in the case of container-to-container networking, but usually you wouldn't need this.
Zuul: Can be very useful also on CloudFoundry in case you are doing things like writing frontend-for-backend services, providing frontends for different devices (mobiles, desktops, i-pads) that use the same backend services. Might also be useful for an authentication/authorization layer or rate-limiting. One native CloudFoundry alternative would be to use route-services for tasks such as rate limiting, authentication/authorization.
spring-cloud-config: makes sense if you want your configuration to be under version control for different environments. This is useful no matter if you are running on CloudFoundry or not. I don't know of any alternatives on plain CloudFoundry.
spring-cloud-feign: makes sense if you want use annotations such as #RequestMapping with your Feign client interfaces. This is independent on if you are running on CloudFoundry or not. AFAIK there are no alternatives for this in case you want to use Spring MVC annotations with Feign.
ribbon: makes sense if you want to use client side load balancing as opposed to let the CloudFoundry router to do the load balancing for you.
How developers can check locally if this works for them:
In general, I don't believe developers should need to check locally if their app is working fine together with zuul, cloud-config-service, and eureka.
They could check this in a dev or test space or environment though.
If they really want to check this on their local machine, they could download PCFDev and run these infrastructure components there.
Hope this helps.

wso2 api manager cloudfoundry

I am trying to deploy wso2 api manager to cloudfoundry.
I have created a buildpack including the wso2 api manager. I am able to start the tomcat server and listen to http port. The https redirect doesn't work, an infinite redirect happens, when accessing https only urls like publisher. I tried changing the proxyport in catalina-server.xml (tried adding X-Forward-Proto in remote valve config). http urls work
According to This blog post this is a limitation, I assume.
The existing CF architecture only supports exposing one port from a
container. Therefore a WSO2 server cluster can only expose one
transport from CF.

How to disable tomcat 8 websocket server endpoint autodiscovery

I need to do some processing on the endpoint classes before they can be deployed and then deploy them manually. However it seems simply having a class annotated with #ServerEndpoint in my war is enough to deploy the endpoint in Tomcat and when I try to manually deploy later obviously I can't because the URL has been deployed already. Is there any way to disable the autodiscovery of endpoints?
Looking at the source for the version I'm using - 8.0.28, there's no dedicated option. The code deploying the endpoints is in org.apache.tomcat.websocket.server.WsSci. The quickest 'shurest' hack is to put my endpoints into the javax.websocket package. I elected to use their ServerApplicationConfig hook instead which serves my purposes if with some minor issues.

Running WSO2 API Manager on Heroku

Is there a straightforward way to run WSO2 API Manager on Heroku? I've been through the basic Heroku docs on how to deploy Java applications and understand that process but it seems like jumping through hoops that maybe aren't needed.
I'd like to be able to simply upload the installed application (binary version of application) and a procfile that defines the bootstrap class file as the starting point.
Is this possible? Is there another way to get Java apps to run in Heroku without defining a pom.xml and having it build the application prior to deployment?
Thanks,
Dave
WSO2 offers the hybrid API model to deploy your WSO2 API gateway on Heroku and use WSO2 API Cloud to manage your APIs.
You can use WSO2 WSO2 Heroku Add-on which can be used as WSO2 API publisher and Store. Then use Heroku Button to deploy WSO2 API Gateway on Heroku.
More info: https://devcenter.heroku.com/articles/wso2apicloud
It looks like there is no straightforward way to run WSO2 API Manager on Heroku. I looked at how Java programs are run on Heroku and it seems your requirement cannot be achieved currently. Heroku seems to be depending on Maven projects.
WSO2 API Manager product is built from WSO2 Carbon platform, which is not a simple Maven Java project.
Heroku also runs the Java application on OpenJDK, which is not supported by WSO2 API Manager. Only Oracle JDK is supported as mentioned in Installation Prerequisites.
I hope this helps.

Resources