Does Graphhopper embedded code start a web server on local host? - graphhopper

At present I have a graphhopper instances running on server and use API from java application. I was thinking on migrating to embedded version as described here https://github.com/graphhopper/graphhopper/blob/0.4/docs/core/quickstart-from-source.md for various reasons.
It is not clear to me yet if I go this way would it actually start a graphhopper server on localhost? I have used some other products by embedding in java app and many of these products don't start server to speed up the app.
Anyone has tried this?

You can use GraphHopper as a library or as a web service that is started on localhost.
Please do not use version 0.4 it is very old. Use the most recent - 0.10 - instead.

Related

connecting an ios app to send information to a mysql database

Im doing my final project which is a taxi booking service. i intend to make an ios app for the customer so that they can book a taxi. the request will then be sent to the mysql database (held at the taxi base). i want to no how can i send the information from the app to the datatbase; and the datatbase to send a confirmation message back to the app confirming the taxi has been booked!>>>>>
i have read a lot about web servers but am very confused. can i use an web server e.g. windows home server 2008? any help would be appreciated.
I am not familiar with Windows home server 2008, but I'm pretty much sure that you can use it for your project.
If you want to keep things simple,
Just install XAMPP server which comes with all the components you need to work on this project including PHP and MySQL. It is one of the easiest servers to work with and most of all, its free and open source. http://www.apachefriends.org/en/xampp-windows.html
Then write the business logics inside your Web App using whatever the programming language you want to (for this one PHP would be enough, or choose Java if you want to have a more complex scalable solution). Writing data to a MySQL database using PHP is very easy and you can find ton of tutorials and sample source codes in the internet.
Now your web app is all set, the next step is to expose these services using REST where an iPhone can communicate with your services. Use JSON for interacting with your Web server from iPhone. Again, there are tones of tutorials on how to write a JSON RESTful service using PHP.
Finally in your iPhone app, you can access the service exposed from the server for saving data as well as to retrieve anything from it through JSON. For making this, use a good Objective-C framework such as AFNetworking. It comes with the JSON parser as well. Ref. http://afnetworking.com
Good luck with your project !
RESTful web services are going to be your best friend here.
Create a server side program in django or python or whstever. Connect it to a database (mysql).
You can host it on Amazon Web Services. I think they have windows 2008 instances. I would personally use the amazon linux ami.
Use afnetworking to invoke a get or a post on the server app and you are off to the races.
take a look at this open source taxi project
its work with RESTful web services but its better to forget about Microsoft Windows its better to use Linux hosting for your web service.

What can I do as OpenShift user?

I'm currently using a virtual server and want to try OpenShift out. But I'm not really getting yet, how it works. Do I get a root access to my "webspace"? Can I set up the server OS (e.g. Debian 7)? Can I install/uninstall software (nginx, PHP 5.5, PHP Code Sniffer PEAR package etc.)? Can I use one gear for multiple websites?
It not clear by your line of questioning what portion of OpenShift you are not understanding, so I will try and lay out the architecture and provide documentation to get you started.
OpenShift is a Red Hat developed product (so its going to be easiest to get started on RHEL or Fedora), but it can also run on other Linux systems (however you may need to piece meal the components together, but it can be done).
This is talked about in building your own live cd on the community site, however has not been done for you by the OpenShift community.
There are two starting places for OpenShift, and they dependon on what you are trying to use openshift for? As a PaaS hosting solution, or PaaS hosted solution?
For a PaaS hosting solution a good starting point is to look at the Origin page as it provides VM's and install instructions, for OpenShift's Community product.
Because OpenShift is a PaaS solution these components (see Architecture Links), when cobbled together provide users with an application space (which they do not have root access to).
https://www.openshift.com/products/architecture
https://www.openshift.com/wiki/architecture-overview
As the administrator for the box you would have (root access) but your end users would not.
For a PaaS hosted solution a good starting place for OpenShift is OpenShift Online which is Red Hat's Hosted solution for the OpenShift Origin project.
Get started by Creating an Acount
With an online account you can get started using the hosted solution very quickly by trying some of the quickstarts. Be sure to read the full set of OpenShift Documentation as well as install the client tools

Server for mobile feed app (like Instagram, Twitter...)?

I've made a mobile native app with a feed system like Instagram/Twitter. In development mode I was just running a PHP/MySQL Apache local server, but now I need to publish the app and work with a real server. Which kind of server do I need? I just need to send http requests (JSON), loads of them!
Do I just need a hosting server like 1and1? (http://www.1and1.com/linux-web-hosting?__lf=Static)
But this one, it only has 1GB MySQL databases... not enough
Is there any kind of app/server whatever? Which kind of server does Instagram use?
These days lots of users are moving to the cloud.
Check out Amazon EC2: http://aws.amazon.com/ec2/
You can setup a micro instance server and it is very cheap to run tests on and get off the ground. Then if you like how it's running, you can simply upgrade to a more powerful server without having to re-install everything.
It also allows you to scale if your application gets really popular by just cloning the server.
Really worth checking out.

Integrating a Swing App With Tomcat

I recently created a web application with GWT. Then re-used most of the code to create a Swing version of the application that accesses a local database in offline mode. I am now implementing the 'online' mode of the application and want to access the same data as my GWT application.
Any ideas? Considered connecting directly to the MySQL server via SSL, but that's not working and doesn't seem as scalable. Should I use REST?
Any suggestions would be helpful.
To solve this problem in the past, we've used Jersey to create REST Web services which returns protocol buffers. The Swing app would then interact with the protocol buffers. The GWT app would ask for content type 'json' and receive protostuff objects in return. It worked quite well. That way, both apps can communicate with the server in the exact way.
Edit:
To allow your swing app to communicate with GWT-RPC, look at this blog article.

load the mysql driver in android emulator

how to load the mysql server in android emulator
i.e
Class.forName("com.mysql.jdbc.Driver")
i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive
please reply me.
This assumes MySQL is publicly available from internet, but it is never good idea .
Setup public WebService and connect to it from mobile application.
You won't be able to run MySQL server on an Android device.
What you're doing, however, is trying to load the MySQL client library. That isn't included as part of Android so you cannot load it. You'd need to include the relevant JARs in your project, if you really do want to connect to a remote MySQL database from an Android app.
If you do want to store and access data on your Android device, the awesome SQLite database is included by default, including all the APIs you need to create, upgrade and otherwise interact with SQLite databases.
When I did this I created PHP files for the database operations. I sent data in XML and received data in XML all using PHP scripts. I found this to be the easiest way for me...but you need to know PHP of course.