Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I would like to integrate an existing application with Kafka.
The application is not under my control so I am not able to change the way it communicates. Application sends JSON request to REST API backend.
How can I put Kafka between application and its backend without changing the code?
Simply inserting Kafka between 2 existing applications is not necessarily a good idea especially if they won't be taking advantage of it, like scale for example. As you didn't describe your use case, I can't tell.
That said if it's what you want to do, you can use Kafka Connect to integrate existing applications with Kafka. You should be able to build:
a Source connector: to receive JSON requests from the app and insert them as records into Kafka
a Sink connector: to extract records from Kafka and send them to the backend
See the Connect docs: http://kafka.apache.org/documentation/#connect
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am developing one android application in java and i am using neo4j as a database for this app.
Lets, consider i will store the static cypher query in a string. Then after the user clicks on the button, i want to send this query(string) to neo4j server and then execute it on neo4j server and return the result.
My question is that, Is it possible? If yes, how can i do this ? Is there any easy/proper way to do?
Any help will be highly appreciated.
If you want to talk directly to Neo4j, you can use either:
The HTTP API
The Binary Bolt Protocol
If you would rather use middleware, there are many many different options:
Java
.NET
JavaScript
Python
Go
Ruby
PHP
...
When building mobile apps my personal preference is to build a standard API in a middleware server then use HTTPS calls from the app (neo4j-graphql-js has also been awesome for a couple projects), but there are enough stacks that you have the freedom to do it your way.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm given a task to implement Message queue to publish and consume message over queue but my requirement is, i'm gonna need to interact with queue using REST API (eg: ActiveMQ having REST API but problem with ActiveMq is when implementing consumer we don't have way to keep waiting for message queue to fetch,we cant listen to the queue using REST client ).
So i'm leaving my problem to you guys to give me better alternative for this
NOTE - solution should use only open source product only
The issue you are describing is the fundamental difference between messaging (stateful connections) and http-based services (stateless). A stateful consumer can process messages, b/c the broker knows the connection is active. This is also known as a "push" semantic. HTTP-based services are "pull". WebSockets provide a level of "push" available to web-browsers, but in the end you are really just doing STOMP or MQTT over WebSockets.
If you are doing a web application, look to web sockets. If it is a backend application go JMS+Openwire.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have photo sharing application running on Parse. So if I will migrate to Parse Server, should I change my Android Code or it's just backend thing? And what is the best and the easiest way to migrate from parse without building new system on my own physical server.
Thank you.
If you are migrating to parse server, you shouldn't need to change your Android code. You will need to update to the latest android sdk and initialize parse with your own serverURL however. The serverURL is wherever you decide to host your parse server.
Hosting parse server is straight forward. Check out the parse server example here. They have links to one click deployment to a bunch of different paas providers such as heroku. If you have a lot of cloud code the migration process can become more complicated and is probably out of scope for this question. Most of it is outlined in the docs however.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am building an android app and i have following doubts:-
I need help in how to create back end that is server (application layer).(I am good in java . so if you could guide me a way using java that would be nice)
I need know how to connect the server to my app both on app and on server side.
It depends on you're needs but you're best bet is using something like Django, Ruby on Rails or Python.
Building Awesome Rails API's Part 1
If you want to use Java, there are more ways. Here is one of them (pretty common these days). Your backend app could be a spring based and use REST controllers as the endpoints. There are plenty of introductions, e.g. http://spring.io/guides/gs/rest-service . Once you have established and run the backend app (either deployment to a web server or spring boot - see http://spring.io/guides/gs/spring-boot/) you can connect to the server via TCP/IP. Your android app could use http-client.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In my case there is a cloud server and personal application server.
I have to make a communication between both servers for accessing the data periodically.
How to create api for communication using servlet.
Is possible to use timer in servlet?
Any other suggestions?
Thanks in advance.
Yes, you can user a timer within a servlet, but as Stanley suggested, web services is a layer on top of http that you can use and it may be easier.
If you just need some quick and dirty way, you can write a servlet to receive the http request in one end and some http client to do the request.
If you go Java EE, it's even easier because you can generate web services using annotations and there's already a TimerService so you won't have to reinvent the wheel.