Java application integration with a server and Rails? [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have just finished production of a java application that scrapes a website, takes information such as prices and names from it, and sorts the data. The data is then stored in a server. A colleague is then going to use ruby on rails to extract the information from the server that my application has stored, and display it to the user. In this case, what would be the most useful tool to place my application server-side and make it continuously running? Would JSP or the use of a servlet be the solution? Sorry for the noob question, my background is OOP and this is my first web-based project. Thanks for any help!
EDIT: The server is an amazon web server which uses a PostGreSQL database.

Your question lacks some information.
Who is the "server"?
Is it just a machine connected to the web and you stored data files on its hard-drive?
Is it a daemon running on a machine, such as database servers or ftp server?
How do you store the data on server?
If it's files on a machine I can suggest using Apache web server on that machine to gain access to resources on your "server machine". Another idea is installing an ftp server on your machine. It will grant access to a declared part of the machine's file system.
If it's a database (whether SQL or No-SQL), all databases have the server side program that runs as a daemon and is accessible with database connectors through the machine's IP address and the port the DB uses.
Another option is, as you mentioned, using an active web server, such as Apache's Tomcat. This way you can run a web application (html/jsp that use your java project) which will provide an easier access to the data for your colleague. For example, the web app can extract the needed data and export it as json or xml or plain text.
Then your colleague will have the ability to access your stored data with his web-application written in ruby.

Related

How to sync data from a local database to a remote database [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 7 years ago.
Improve this question
I have a java application that collects data (such as login user, logon time, ...) into a local database (probably a Derby database or similar). This application will run on several PCs (windows XP, 7 ...). I would like to collect all data from each PC and save into a main database that reside on a remote server. Then a web application could display the results and statistics for all PCs. The local database is important as we need to collect data even if the link to the main servers database is down.
I would like to be able to push the data from each PCs to the main database. (notice that this ideas come from the splunk application where log entries are push from local applications to a main server).
How can the java application of each PCs communicate with the main database. Any good examples are welcomed?
Is it possible to use some HTTP request (json or rest) from the local java application to send the data? If so, how can this be done (examples)? What is needed on the local PCs to accomplish this?
Any better ideas or suggestion are welcomed.
How can the java application of each PCs communicate with the main
database.
Whatever method you're using to communicate with your derby database will be the same to communicate with your remote database. Typically this would be done with JPA or Hibernate or a similar ORM library.
See: http://docs.oracle.com/javaee/6/tutorial/doc/bnbpz.html
Is it possible to use some HTTP request (json or rest) from the local
java application to send the data? If so, how can this be done
(examples)? What is needed on the local PCs to accomplish this?
For this you'd want to investigate JAX-RS which is the java standard way of communicating with restful web services.
See: https://jersey.java.net/documentation/latest/client.html

Best Practices for Scalable File Storage [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Say we are writing applications with Play Framework, or Spring for instance, and we want to use a standard way to manage and store binary file uploads using an API (object storage), as opposed to managing a file system yourself. In a similar way to using Amazon cloud storage, but without locking into an external provider.
Imagine we would also like to be able start by running this service on the same server as the application you are developing, until growth requires it you to move the file storage to it's own server (or cluster) and your application itself in it's own cluster. If we start off with a cluster-ready service then surely we can scale up quickly.
Do we continue to manage the file system ourselves while running at a small scale, or do we adopt something else?
Is this where we need to look at running a local Hadoop HDFS instance for example, this way we wouldn't need to rewrite our file upload and handling in our application, and could scale-out the file management system into a cluster when the need arises. It would be great if this functionality was provided as a service with a common API, such as running H2DB in-memory for integration testing.
Or are Hadoop HDFS, OpenStack Swift or Ceph overkill when we're still making our simple prototype application?
I'm sure that I'm missing something - but struggling to find the solution. Managing a file system by hand feels dirty and wouldn't allow me to push applications to any PaaS provider without rewriting. Again, I think there should also be a local solution rather than always integrating with Amazon and the likes.
Any thoughts?

Android App with Online Database [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'm creating an app wherein the database are uploaded online without website, the concept of the app is like Waze app. I dont know where to start im asking for ideas and help. do i need to create a web server?how?i will mark this correct for those who can answer thanks.
This is not a simple task because it relies on many parts doing its proper job... In order to do what you want to do you need basically 5 things:
1.- Server: which will feed live information to the app.(There is a ton of servers that can be used to get this part done. If you are used to, or willing to learn php, I suggest you to start researching XAMPP (it uses Apache server running php stuff) [https://www.apachefriends.org/es/index.html]).
2.- Database: Most likely the server will need to work with information stored in some place. databases are perfect for just that. XAMPP also comes with MySQL which happens to be the most popular open source database out there.
3.- Format :You need to determine how the information will be passed from the server to the mobile device. The most common ways are: JSON which is plain text, XML that also is plain text but formatted diferently. this is important because you have to send the information from the server using this format and also your mobile devices will need to interpret the information in this format.
4.- Choose a way to send and recive the information : i would suggest Http/Ip protocol for this, as it is very common. Investigate Http requests and responses.
5.- Your device must be listening (or asking) for the content : the device will have to implement some sort of timer to ask the server for new information. This is determined by the logic and prupose of what you wish to do.
do i need to create a web server?
Yes! You need to create a web server, then, a webservice (database query etc...) which communicate between your application and your webserver. I think that all!

which technologies shall I use to offer an out-of-box server installation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to build a client-server architecture software, and I want the server component can be easily installed by average people on their Windows or Mac OS X operating systems.
The server-side:
1. contains a self-running web server
2. hosts a web-based administrator site to manage business data and master data
3. provides API endpoints (in JSON) over WIFI
4. has sqlite 3 or MySQL database to hold business data
5. the data volume is low, the
The client-side are mobile applications which talk with server via API endpoints over WIFI.
I started thinking about Java, as JVM is installed on almost every computer, but what about the web-server and database? In a sense, as I use MAMP on my Mac a lot, I like the approach of this nice product, easy install, one click to launch all services.
Can anyone point me a possible direction?
You have suggested MySQL. That sounds fine to me.
I would suggest Tomcat as a pretty widely used web-server.

host java website in Windows machine [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Anybody knows why godaddy.com cannot host Java based website in Windows machine? Is there any technical difficulty to do so?
EDIT:
this link has answer and solution: http://www.oreillynet.com/onjava/blog/2006/09/why_is_javaenabled_hosting_so_1.html
To host a Java-based website (I guess you mean JSP or similar), then you need a Java application server, e.g. Apache Tomcat.
There is no technical reason why a Java application server cannot run on Windows. There are commercial reasons why web hosting providers generally do not offer, or charge more for, Java hosting versus more "standard" configurations based on Apache httpd or Windows IIS.
Is your hosting option from GoDaddy for a Linux based host or a full Linux virtual machine?
The problem is likely that you have a Linux based host where you have your own chroot to isolate your files and data from other customers and your pages are served with their webserver.
What you would need to find is a hosting plan which includes a Java server, like Glassfish or Websphere. You could also find a host where you get an entire Linux virtual machine that you can install your own software on and run your own webserver.
Can you please identify what the problem is? You are asking why Godaddy.com does not offer Java web application hosting on Windows. This is a strategic decision by Godaddy.com, there is no technical reason behind it. Your question is like asking why Ford does not offer pink as a stock color on their cars.
If you are looking for an alternative hosting provider who offers Java web application hosting, you should ask a new question stating exactly that.

Categories

Resources