a single database for 2 apps: desktop and android [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I've searched throw your many posts but I didn't find the answer to my question.
I want to make a project which involves two applications: a desktop one written in java, on the pc and the other in android that will be on a mobile phone. I would like to connect both of the applications to a single database but I don't know were to start it from and how to do it.
Could you give me an example or a hint please? Thank you very much for your time.

I think you want to run your desktop in different PC than the database, if yes, than on the database site you can do a minimal PHP which will be the server with database connection. You can find many php + mysql free hosting. Many php examples are how to receive a GET and a POST parameters, connect to database and return results. Use that server side for serving both mobiles and desktops. So the Communication is via HTTP POST and HTTP GET. Distributed applications like this are used in commercial environments and in school usually you can get a little better note. Google it for keywords implementations. Good luck.

Related

How can I host a LAN server on an Android device? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to know if there is a way to host a LAN server on Android without using a third party library.
I want the solution to work without rooting the device.
I want to know if there is a way to host a LAN server on Android without using a third party library.
It is possible. You have to use Sockets and ServerSockets, Object[Input/Output]Stream(or a different way to send data). Basically design a server.
Here is an SO post on creating a server
Here is the Java documentation on servers
You can use third party libraries to make servers too(see the first link), and sometimes that may be easier.

Creating a server side for android application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm currently making an android application that will be used by a certain number of clients. Each client will have an account and will access information from the server. This information is stored in a DB.
My question is what is the best way to create a server side that will, later on, be compatible with other platforms (iOS, Windows, etc.)?
Can I use sockets on different platforms? Or should I create a Web Service?
I found a certain tutorial that I think is explaining a similar thing, but I think it demands a certain amount of knowledge, and I'm totally new to this, and haven't learned this at faculty (I'm good with sockets but I never had much confidence in them, and the idea of sending HTTP requests to the server looks much better).
Can someone divert me to a tutorial or lectures of how this is supposed to be done?
Connection between Android and a server would most easily be done with http requests.
There are several libraries available who make this easy like Retrofit.
For server-side applications you can take a look at Jersey in combination with a tomcat server.
There are of course many applications who can do these... so it comes down to a matter of preference.
There are many web development frameworks that works on many platforms such as spring, vertx, play and many others to name. You can you create rest like api for this purpose. Give all the low level works to the framework. You should not worry about low level details as most off them are handled by frameworks today.

Java Local Network Chat [closed]

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
I have spent much time researching how to create a chat system that would work between computers on the same local network, and so far have had no success (in Java). Could anyone provide me with references to things that actually work, or guide me?
Here are some useful resources that I found on Google.
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
http://www.youtube.com/watch?v=eANjtQ6wJv0
http://www.youtube.com/watch?v=eANjtQ6wJv0
There are many more if you just ask "how to make a LAN chat program in Java" in your favorite search engine. There are tutorials online, but it is recommended that you are pretty competent in the language as well as networking. Go back to the basics and read a bunch of books on Java.
For future reference, don't ask questions like that on Stack Exchange. Put problems that you have about code. Be specific!
You have two problems. One is discovery, the other is connections.
For discovery on the local network you want mDNS aka Bonjour.
jMDNS offers a pure java Bonjour implementation.
You need to setup a service advertisement and a service discovery.
Once you discover a service you can then connect to the daemon you have setup on each machine.

WebRTC Java Server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is there a way to make a simple Java server be able to connect with a WebRTC browser page?
I'm asking because I have a Java server that talks to a Websocket browser page and it'd sure be nice to have it capable of making a second WebRTC connection for fast and unreliable data transfers.
I'm having a hard time finding WebRTC Java server code.
Edit: It appears the status of this question is applied to the ones who applied it. As they apparently have minimal knowledge of my question.
It is possible. There is a couple of examples in the webrtc source code base (https://code.google.com/p/webrtc/). Look under talk/examples.
However unreliable data channels are currently being deprecated and swapped for reliable ones. Google Chrome will probably drop unreliable (UDP based) data channels altogether in the near feature and support only reliable (SCTP based). More to the point unreliable data channels are currently bandwidth limited (about 30Kbits/s). I don't know what you are doing but I am pretty sure that websockets (TCP based) are fast enough and using WebRTC will just be a huge time investment for little to none benefit.

Starting at Web Service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to start writing a web service which will most probably using Microsoft SQL for Database.
I am unsure how to start about it since I have never written web service before. I know SQL for database. Java for programming as well but no information regarding web service. I am quick learner and wish to know how shall I start ?
What my project will do is get data from database and post in a front end. I chose Web Service as it uses XML and most compatible with many interfaces.
please guide.
A web service uses a web server as a container to run in. I suggest that you look at Tomcat as a easy but reliable web server. In the Tomcat web server you can make a web service by using jsp and servlets (written in Java).
try having a look at http://www.roseindia.net/jsp/jsp.shtml
You can use the book "OReilly Head First Servlet and JSP" to learn about Web Services in Java.. Thats what i did.

Categories