M
M
mitaichik2016-03-11 01:26:25
PHP
mitaichik, 2016-03-11 01:26:25

How to connect php and java?

Hello! I have a site in php. Now you need to write an application in java and link them.
The scenario is simple: the java application will always be running, php sends requests to it and waits for a response. Java starts a thread, processes, returns. Data exchange in json.
In principle, we already have a queue server (gearman) - you can use it. There is redis - it is possible through its pub/sub.
But does anyone know a better way?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2016-03-11
@mitaichik

pub/sub to rabbitmq/zeromq/activemq etc. Of course, you can organize RPC, but ...

O
OnYourLips, 2016-03-11
@OnYourLips

Queues in my opinion - the most correct way.

P
Pavel Volintsev, 2016-03-11
@copist

Have you looked at Apache Thrift?
https://thrift.apache.org/about
https://thrift.apache.org/tutorial/php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question