iOS - Tackling Syncing with MySql - mysql

I am wanting to learn about syncing data in my iPhone app with my MySql database.
I have nto done to much reading up on it yet, as it is pretty hard to find concrete information on it.
What is the best route to explore for this?
Do I go down this route? ASIHTTPRequest Setup Instructions
My Question really is, where do I go to find out about this. I appreciate it is a big topic and I don't really want to go down a wrong route thinking it is the right one.
Any hints and tips are appreciated.

I'd go with a REST interface for the server that will host the MySQL database, and RestKit with CoreData support (Managed Object Loader) on iOS.
But this is really a very broad question, and the answer depends on a lot of factors (availability of skills and tools, access to server, taste, philosophy, size of project, accuracy and timeliness of synchronization).

Related

Web alternative to MS Access

I've seen multiple questions, along the same lines as this, however they're usually quite outdated, and/or not answered well if at all.
I've been experimenting with Visual Studio LightSwitch, but it has many problems, and is also considered dead by much of the community now, just as Access is.
There isn't really much to say, so my question is, IS there a decent alternative? Or do I just have to make do with Access?
As you've already seen, there is no straight route. What to choose usually ends up in "that depends", and so it does - the only common factor is, that you are facing a total rewrite.
However, one way to cut it really short for a setup with few and known remote users, is to use Remote Desktop and Terminal Services of a Windows Server.
LightSwitch is not officially dead. I have done a few applications with it, and it is fun because it is so much different from Access with its firm screen design. Originally, it required Silverlight which now is dead, but today you use HTML5 at the client, so it won't get outdated right away.
From Access to Web the usual path is PHP.

Which server os to use for small office with very limited requirements

We are currently moving to a new office. We currently use a combination of OneDrive and GoogleDrive to store all of our photography and shared folders however the new premises are not fibre ready so I do not want to use all the bandwidth on uploading / downloading photos. Therefore we require a really basic server.
I need the server to hold all images and shared files, then after 5pm open up OneDrive and GoogleDrive to begin the synch (whilst everyone is out of the office) then close those programs down before 7am the next morning.
Could anyone recommend a Server OS that would allow me to do this quite easily, it's the only requirement we have for the server.
I've heard that freeNas or Ubuntu may be a good way to go but have no experience with any.
I know this question isn't very specific to one language etc. however I'm not sure where else to ask it, so if anyone has any information on better places to post the question then I'd be really greatfull for that to.
Thank you
Glynn
I think most server OS'es should be able to fulfil your needs. If you want convenience, then I would suggest Ubuntu server. It's very easy to setup, compatible with most hardware and lots of documentation available on the interwebs. For your file sharing needs: I would suggest checking out Bittorrent Sync. It's really nice!

How to database iOS app data and display it on a webpage

First time post here, so forgive me for any bad etiquette/format.
I will preface by saying:
I have (over the last few months) been developing an iOS app for work. To be more specific, I am developing an inventory app to track bar inventory (liquor, beer, wine, etc). I can give more specifics on request if needed. I have most of the functionality done, only a couple more things I would like to implement. Eventually I will be porting it to Android as well.
At the moment, I have the model objects being archived to the local filesystem for saving and loading of data. However, my goal would be to database the model objects with the ability to display the information on a webpage. My logic is that no matter where the user is, he/she will be able to sign in to a service using a username and password, and view correctly formatted current/past inventories online. This is to allow the ability for a bartender to record the inventory, and have the bar manager view the inventory instances without having to have the physical device that recorded the inventory in his/her possession.
So here is my question:
Without being too general, what kind of service would I need to pull this off? I have a good amount of relevant front-end experience, specifically with iOS, Objective-C, HTML and CSS. However, I have ZERO experience on the back-end. I have researched around the internet, and I am aware of things such as cloud databases, web hosting and MySQL, etc. However, I cannot seem to find a definitive answer without asking my specific question. I suppose I would just like to be pointed in the right direction before investing money and time into a service that may prove useless to my cause.
Any resources and help would be greatly appreciated. Thank you!
There's not a definitive answer and you have a lot of options.
For me, the simplest is to set up a server with a database incorporated (mysql for example) and with a web service (written in PHP for example) that manages the database and queries on that.
Online you can find tons of guide on how to write a script in PHP that manages a database:
http://www.freewebmasterhelp.com/tutorials/phpmysql/2
For the iOS part you can follow also this guide:
http://www.techrepublic.com/blog/software-engineer/create-your-own-web-service-for-an-ios-app-part-one/
Good luck!

Would AJAX, PHP and MySQL make a good socket for a online poker game?

I haven't yet determined what the UI would use (flash, HTML, etc.) but I'm curious if you guys think mysql could make for an acceptable socket for a multiplayer poker game? The reason I'm considering using a DB is because that is the only way I know how to accomplish this and I know nothing about XML sockets or anything like that. Would performance be an issue for dialup and slower mobile connections? Could I potentially run into problems with trying to sync user turns and flops? Should I just bite the bullet and go with a different type of socket? If so, what would you suggest and where would be a good place to start educating myself? Thanks.
To make an inline poker game the technology you will use will certainly be the less important problem. The main problem will be in the way you get all subsystems connected between each others and how you ensure security at all levels (from the humans ensuring physical health of you server to the OS envirronment of your players, with maybe some jurists and gunmens -- and that makes a LoooOOot of levels :-) )
But if you want technical considerations I would personnaly use Zend Framework as a PHP library/framework and PostgreSQL as the database. And a really big part of the application would rather be coded in the database, via pl-pgsql things, than in PHP. PHP would be there to provide some ui in different levels (humans, web services, etc), and some of the security levels checks. Ajax interactions would be made with jQuery. No doubt I would prefer PostgreSQl to MySQL for an application with a lot of data, fine security levels, a lot of replications, and a lot of data checks and automatic updates.
PHP / MySQL isn't as fast as some systems (e.g. as ASP.NET) but in slow connections like dialup/mobile that won't be a problem.
The advantage of PHP from my standpoint (which isn't what everyone needs) is that it is very transparent, i.e. you easily control the HTTP transmission and the response. That may be an advantage for you.

Real time web application

I really need your help with this. We are planning on developing a real-time web application. We look at different libraries and concepts and a little confused.
What we need is: clients connect to websites and send data(usually an integer + client machine name) whenever they want (usually 1-5 seconds). Also, the same clients must receive data(the data received from other clients) from the server in a real-time mode. (maximum 0.5 seconds). Also, this data must be stored in the database.
We were thinking about using different technologies, but cannot decide which one to use.
We need this web application to be supported on Iphones and Android Phones (maybe blackberry).
and, of course desktop browsers.
Pooling seems not a very good Idea in this situation, due to highloads.
Html 5 web sockets kinda new, and probably not supported by all browsers.
Have anyone used nodejs ?
or twisted matrix: http://twistedmatrix.com/trac/?
or orbited(cannot post more than one link)?
or tornado?
Or XMPP(Jabber. I did not find good examples.)?
or something else?
What technology is the best to use in this type of project? Also, we would probably prefer the technology that has some community support and free to use.
Thanks a lot!
There is a lot of things to consider here. I would say that HTML 5 is not an option, simply due to support across platform.
Running with NodeJS is most likely possible, but the communication methods are really complicated. Pushing data to a page isn't really something that HTML/web apps are designed to do....
To get a valid answer you are going to need to get someone to come in and sit with you to really iron out details and implementation.
When you say that clients "connect to a website", do you really need it to be a website? It sounds like all the client is sending is a number and for that you don't need a website. Just pick the language of your choice, open up a socket, and go from there.
Are you streaming data to be visualized? You might want to take a look at graphite (and/or "pyped" which is part of graphite).
What kind of data? What is the purpose?
For real-time you're not going to get a web site unless you use some type of RIA but even then, it isn't going to be enough. Services aren't going to be good enough either. You're going to end up doing some type of polling which will only ever be psuedo-real-time unless you do duplex mode which wont be supported on most of the platforms you want to support.
sockets are the way to go but that requires a client for each platform you want to handle. Maybe you should rethink your requirements.