A personal cloud

Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Guys,am looking forward for getting something like an internationally readable data strong(like server). I created a program that creates files and receives file so i wanted it to export and import those files to be internationally readable via my program ,any suggestions? I don't have any knowledge about the servers and those stuff so i want someone of you to direct me.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
The answer to this all depends on how you want to share files and what kind of content you're sharing. If it's just text, you could make use of a database like MySQL. If it's media, you could make use of storage services to host the files that your app then consumes. What kind of data are you looking to share?
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
The answer to this all depends on how you want to share files and what kind of content you're sharing. If it's just text, you could make use of a database like MySQL. If it's media, you could make use of storage services to host the files that your app then consumes. What kind of data are you looking to share?

actually they are text files but i want to use .txt files instead of databases as i don't know a lot about databases and at the meantime i've got no time to learn about databases.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you're only looking to store text files online and don't want to use databases (which is the best route to be honest), just use some sort of file storage service. Either find a service that host files or use something like sftp and scp to copy files back and forth. Or, better yet, see if there is a file hosting service (like Dropbox) that has an API for your programming language.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
If you're only looking to store text files online and don't want to use databases (which is the best route to be honest), just use some sort of file storage service. Either find a service that host files or use something like sftp and scp to copy files back and forth. Or, better yet, see if there is a file hosting service (like Dropbox) that has an API for your programming language.

but i don't want the user to download other than my programme which connects to my personal server instead of downloading dropbox and such a stuff,maybe you meant another thing by saying you should see if there is a file hosting service (like Dropbox) that has an API for your programming language,so what's the meaning of API?
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
If you're only looking to store text files online and don't want to use databases (which is the best route to be honest), just use some sort of file storage service. Either find a service that host files or use something like sftp and scp to copy files back and forth. Or, better yet, see if there is a file hosting service (like Dropbox) that has an API for your programming language.

I've checked for the dropbox API but am OS X developer and i don't think that they support it,
any other suggestion?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
What language are you using to write your application?

I'm not suggesting that the files be publicly accessible or suggesting that your users download something. Dropbox has a datastore API which lets you tap into Dropbox (using your account for instance) and store content there. They have API (here) and if they don't support your language, you can use HTTP requests. They've also got their Core API for managing files (here).

You, of course, don't have to go that route. You could purchase server space somewhere and use something simple like FTP (you'd want to connect over SSL or SSH though for the sake of security).
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
What language are you using to write your application?

I'm not suggesting that the files be publicly accessible or suggesting that your users download something. Dropbox has a datastore API which lets you tap into Dropbox (using your account for instance) and store content there. They have API (here) and if they don't support your language, you can use HTTP requests. They've also got their Core API for managing files (here).

You, of course, don't have to go that route. You could purchase server space somewhere and use something simple like FTP (you'd want to connect over SSL or SSH though for the sake of security).

Objective-C. look i can explain once again. I want every user of my program to read text files from my computer/from a server. the question is how to make the program read those files from my computer though the program works on another computer?



here's what i though of,1-i can make the program read from my computer via DropBox but in this case the user will need to sigh in with my DP account,2-i thought of using a server but unfortunately i don't know how to upload those files to a server and i don't neither know how to connect my program to this server, the problem is that i don't know how to work with databases as am a beginner and i don't have any knowledge about the networks other than i know the meaning of definitions xD. am not asking any one to do my job but i just gave up about thinking how this program will do its job
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you want a personal cloud, then you need a personal server. First go and find a webhost that you like and get an account on which you can run any arbitrary PHP application. Any webhost will allow what you want to do for starters, so it should be cheap.

Once you have that, you will want to make your application talk to the server and communicate through XML. On the server side you can use JSON and other PHP itself to implement the server functionality of parsing the XML data.

Now as far as the text itself is concerned, you can start with local files on the server.

You, however, should transition to a database to keep the data once you get things going..
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Raz0rEdge offered some good advice about working with the data that is probably the easiest. If you're not too concerned about the data being secure and private, uploading arbitrary text files to a server somewhere and then using PHP to serve up the data might be easy. You could even do the whole process in PHP - pass the text as a parameter to the page, use POST variables to write the file to the server in a PHP script and write a second file that calls up the text based on what you need.

So, one PHP script gets POST variables from your application and uses this to write files to the server. The other PHP script gets called when you want data - you send parameters to that one which the PHP file uses to open the text. All of that is quite insecure (no SSL, text files open to the public) but if you're not looking for security, it's probably the best.

It might be easier to tell us what kind of application you're creating. Better solutions might exist.

Also, I moved this to the development forum - it's moved in that direction.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Raz0rEdge offered some good advice about working with the data that is probably the easiest. If you're not too concerned about the data being secure and private, uploading arbitrary text files to a server somewhere and then using PHP to serve up the data might be easy. You could even do the whole process in PHP - pass the text as a parameter to the page, use POST variables to write the file to the server in a PHP script and write a second file that calls up the text based on what you need.

So, one PHP script gets POST variables from your application and uses this to write files to the server. The other PHP script gets called when you want data - you send parameters to that one which the PHP file uses to open the text. All of that is quite insecure (no SSL, text files open to the public) but if you're not looking for security, it's probably the best.

It might be easier to tell us what kind of application you're creating. Better solutions might exist.

Also, I moved this to the development forum - it's moved in that direction.

Chatting app with TXT files
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
If you want a personal cloud, then you need a personal server. First go and find a webhost that you like and get an account on which you can run any arbitrary PHP application. Any webhost will allow what you want to do for starters, so it should be cheap.

Once you have that, you will want to make your application talk to the server and communicate through XML. On the server side you can use JSON and other PHP itself to implement the server functionality of parsing the XML data.

Now as far as the text itself is concerned, you can start with local files on the server.

You, however, should transition to a database to keep the data once you get things going..

PHP apps o_O i already have created my app in objective-c
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Honestly, a database is the best solution for this problem. Indeed, a PHP interface to a SQL database would be the easiest. I've done the same - I have a mobile app that has a survey and the survey sends the data through a PHP script that inserts the responses into a database. It's the most straightforward solution to this problem.

Do you know how to make and send requests to online services?
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Honestly, a database is the best solution for this problem. Indeed, a PHP interface to a SQL database would be the easiest. I've done the same - I have a mobile app that has a survey and the survey sends the data through a PHP script that inserts the responses into a database. It's the most straightforward solution to this problem.

Do you know how to make and send requests to online services?

No xD look,am a beginner in programming it's been a year since i knew what's the meaning of programming so i don't know other than how to code with a normal IDE
I hope someone help me out cuz as a beginner i should grow up,right?
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
I'm not sure what's easier than what Raz0r and I have suggested. Thus, my recommendation would be to learn how to do this. MySQL isn't all that tricky if you have an interface for it (most web hosts use PHPmyadmin) and a PHP script to insert data into a SQL database is really easy. The tricky part is sending the data through Obj-C to the PHP script (I can't help you there since I use Flex).

If you're trying to make a chat client, saving the data online may not be the best solution anyway. Sending the data directly to an end user through a socket seems to be the most straightforward way of doing this.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
I'm not sure what's easier than what Raz0r and I have suggested. Thus, my recommendation would be to learn how to do this. MySQL isn't all that tricky if you have an interface for it (most web hosts use PHPmyadmin) and a PHP script to insert data into a SQL database is really easy. The tricky part is sending the data through Obj-C to the PHP script (I can't help you there since I use Flex).

If you're trying to make a chat client, saving the data online may not be the best solution anyway. Sending the data directly to an end user through a socket seems to be the most straightforward way of doing this.

well,what about an online storage,so i can send and read files via my program :\ but the problem is how to access this online storage via my program xD
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If you're not going to go the database route (again, I really think that will be easier than keeping track of text files), you could use something like Google Drive to store the files. They have an API for Objective-C. Here is their developer page.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
If you're not going to go the database route (again, I really think that will be easier than keeping track of text files), you could use something like Google Drive to store the files. They have an API for Objective-C. Here is their developer page.

i tried the Google Drive API,bud but i faced many problems(google's codes had a lot of mistakes-they works with old version of IOS which made problems,as well. the tutorial was fool as it showed nothing and the video didn't show the details that the author was doing and it was't cool experience with Google Drive.) got any other ideas? you could give me another link for another cloud's API,but please for OS X if you don't mind. don't tell me search by your self because i already did but didn't find any thing mostly google didn't understand what i searched for xD
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Most cloud services have an API. Did you search specifically for each? Try searching for Dropbox API, SkyDrive API, Box.net API, etc.

If you got confused looking for "OS X API," it's likely because API are designed for protocols (HTTP, SOAP, etc.) or programming languages (Obj-C, Python, JS, etc.) and not operating systems.
 
OP
Yodda_Hunter
Joined
Jun 8, 2013
Messages
158
Reaction score
0
Points
16
Location
Būr said,Egypt
Your Mac's Specs
MacBook Pro (i5)
Most cloud services have an API. Did you search specifically for each? Try searching for Dropbox API, SkyDrive API, Box.net API, etc.

If you got confused looking for "OS X API," it's likely because API are designed for protocols (HTTP, SOAP, etc.) or programming languages (Obj-C, Python, JS, etc.) and not operating systems.

Tried dropbox but the problem was that they use 42 compiler which my xcode doesn't support
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top