Re: Cocoa Newbie & MySQL

2010-04-29 Thread Dru Satori
Yes, Marko's BaseTen is excellent, and the PostgreSQL support for the Mac as a 
platform is quite good.  The only downside really, is that there is an 
outstanding issue with regards to collation in certain locales on BSD based 
systems, of which OS X is one, so long as you are us_EN and UTF-8, you'll be 
fine, but there are issues with the us_FR and a few others.


Andy 'Dru' Satori

On Apr 29, 2010, at 12:53 PM, Joshua Tidsbury  wrote:

> Flavio,
>> Well... That's a good enough reason. Driving that Sun stuff through exec() 
>> and command-line utilities should be extremely painful and hard to maintain 
>> in the future.
>> 
> Indeed, I did consider that for about 5 seconds, then smacked myself in the 
> forehead...
>> Do you really need to use MySQL -- or any other full-fledged RDBMS? I am not 
>> sure how big will be your dataset, how often it will be updated and how many 
>> users you'll have, so I can't help that much.
>> 
> We're looking at about 100 users (for now), and a dataset starting at about 3 
> million rows. This will grow steadily through the years though, at a rate of 
> about 3+ million rows per year.
>> If you really need an RDBMS, you could consider PostgreSQL and the BaseTen 
>> framework (basetenframework.org). It feels a lot like Core Data, but for 
>> Postgres.
>> 
> I actually had my head buried in the sand solely thinking of MySQL, only for 
> sake of familiarity. But this framework looks fantastic - I'll play around 
> with it and see what I can come up with. And I have little doubt that 
> PostgreSQL has plenty of power to pull this sort of project off.
>> Why do we, developers, love challenges? ;)
>> 
> The question of the ages :)
> 
> Take care,
> Josh___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/dru%40druware.com
> 
> This email sent to d...@druware.com
> 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-29 Thread Joshua Tidsbury
Flavio,
> Well... That's a good enough reason. Driving that Sun stuff through exec() 
> and command-line utilities should be extremely painful and hard to maintain 
> in the future.
> 
Indeed, I did consider that for about 5 seconds, then smacked myself in the 
forehead...
> Do you really need to use MySQL -- or any other full-fledged RDBMS? I am not 
> sure how big will be your dataset, how often it will be updated and how many 
> users you'll have, so I can't help that much.
> 
We're looking at about 100 users (for now), and a dataset starting at about 3 
million rows. This will grow steadily through the years though, at a rate of 
about 3+ million rows per year.
> If you really need an RDBMS, you could consider PostgreSQL and the BaseTen 
> framework (basetenframework.org). It feels a lot like Core Data, but for 
> Postgres.
> 
I actually had my head buried in the sand solely thinking of MySQL, only for 
sake of familiarity. But this framework looks fantastic - I'll play around with 
it and see what I can come up with. And I have little doubt that PostgreSQL has 
plenty of power to pull this sort of project off.
> Why do we, developers, love challenges? ;)
> 
The question of the ages :)

Take care,
Josh___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-29 Thread Flavio Donadio
Josh,


> Unfortunately, the other key piece of information I have left out is that I 
> also need to tie into some C based APIs in order to drive some large Sun 
> robotic tape libraries. I also wish to achieve as high a degree of 
> concurrency as possible in the file moving/compression processes, and am 
> hoping to take advantage of the newer concurrent technologies that accompany 
> OS 10.6.

Well... That's a good enough reason. Driving that Sun stuff through exec() and 
command-line utilities should be extremely painful and hard to maintain in the 
future.

Do you really need to use MySQL -- or any other full-fledged RDBMS? I am not 
sure how big will be your dataset, how often it will be updated and how many 
users you'll have, so I can't help that much.

I've heard of projects using a CoreData app as a server, and it doesn't seem to 
be that difficult to implement. You could make this server app expose a SOAP 
service that your web app (or any other client) could use so. If you ever need 
to develop a client for Windows, Linux or whatever, it would be much simpler, 
but it does seem to be the case.

I've heard that Core Data is very scalable if you use the SQLite store. Maybe 
you should give it a try.

If you really need an RDBMS, you could consider PostgreSQL and the BaseTen 
framework (basetenframework.org). It feels a lot like Core Data, but for 
Postgres.

> Should prove to be fun (or at least very interesting...)

Why do we, developers, love challenges? ;)


Cheers,
Flavio___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-29 Thread Joshua Tidsbury
Flavio,
> > The application is essentially a server side app that will manage various 
> > background file moving/archiving processes and store metadata about the 
> > files in a database.  The heavy lifting in terms of file analysis and 
> > moving the materials around and storing the metadata in the database will 
> > entirely be done by a Cocoa application running on a server.
> 
> I don't really understand the need for a Cocoa app on the server. The web app 
> will only handle file operations and metadata storage on the database? If 
> this is the case, maybe you can drop Cocoa entirely.
> 
> > I want the end users to be able to browse/search the metadata from a web 
> > based application for the sake of cross-platform compatibility, and 
> > ultimately their actions within the web app will trigger jobs within the 
> > server app. I was planning on some sort of SOAP interface in the Cocoa app 
> > to accept commands from the web application to trigger the jobs.
> 
> So, you need to move files around and store metadata on the database. Why 
> don't you do it in PHP or Rails? PHP comes with Mac OS X and can be easily 
> updated through packages. Rails can be easily installed.
> 
Unfortunately, the other key piece of information I have left out is that I 
also need to tie into some C based APIs in order to drive some large Sun 
robotic tape libraries. I also wish to achieve as high a degree of concurrency 
as possible in the file moving/compression processes, and am hoping to take 
advantage of the newer concurrent technologies that accompany OS 10.6.

The original application was built entirely with Rails, but the scope has 
expanded significantly, and so I am now having to look in other directions in 
order to communicate with all of the systems I will ultimately have to talk to.

Should prove to be fun (or at least very interesting...)

Take care,
Josh___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-29 Thread Flavio Donadio
Josh,


On Apr 28, 2010, at 10:57 AM, Joshua Tidsbury wrote:

> The application is essentially a server side app that will manage various 
> background file moving/archiving processes and store metadata about the files 
> in a database.  The heavy lifting in terms of file analysis and moving the 
> materials around and storing the metadata in the database will entirely be 
> done by a Cocoa application running on a server.

I don't really understand the need for a Cocoa app on the server. The web app 
will only handle file operations and metadata storage on the database? If this 
is the case, maybe you can drop Cocoa entirely.

> I want the end users to be able to browse/search the metadata from a web 
> based application for the sake of cross-platform compatibility, and 
> ultimately their actions within the web app will trigger jobs within the 
> server app. I was planning on some sort of SOAP interface in the Cocoa app to 
> accept commands from the web application to trigger the jobs.

So, you need to move files around and store metadata on the database. Why don't 
you do it in PHP or Rails? PHP comes with Mac OS X and can be easily updated 
through packages. Rails can be easily installed.

I am not an expert in Rails, but I believe that, like PHP, it can access your 
filesystem. In PHP, besides all of the filesystem handling functions, you can 
always use exec() to access command line tools like ditto if, for example, you 
need to handle resource forks.

This way, you can have a pure web application and won't have to deal with the 
current lack of RDBMS Frameworks for Cocoa.

Unless you need something that only Cocoa can offer...


Cheers,___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Jens Alfke


On Apr 28, 2010, at 10:57 AM, Joshua Tidsbury wrote:

I haven't yet decided on the framework for the web app (often use  
Rails for standalone web apps, may use PHP), but just don't want to  
box myself into a corner by a bad decision early on.  Obviously, the  
notion of being able to use Core Data/SQLite on the server is highly  
appealing due to the clean integration with the Cocoa app.


I don't know if CoreData is going to be appropriate for this. It's not  
a general-purpose ORM like ActiveRecord, rather a Cocoa object  
persistence API that happens to be able to use sqlite as its backing  
store. The databases created by CoreData are opaque, i.e. you should  
treat their schema as a private data format used by CoreData. CD will  
make up a SQL schema based on your data model, but you shouldn't make  
any assumptions about what it is, or use other tools to directly  
access the sqlite database.


If you don't use CoreData, then MySQL might be a better fit for you,  
since it already supports networked access. I am pretty sure there are  
open-source Cocoa libraries for accessing MySQL, although they're  
lower-level than CoreData (i.e. more like the PEAR db API than like  
ActiveRecord.)


—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Joshua Tidsbury
Thank you all for your helpful replies so far - greatly appreciated!

To add some clarity: The application is essentially a server side app that will 
manage various background file moving/archiving processes and store metadata 
about the files in a database.  The heavy lifting in terms of file analysis and 
moving the materials around and storing the metadata in the database will 
entirely be done by a Cocoa application running on a server. I want the end 
users to be able to browse/search the metadata from a web based application for 
the sake of cross-platform compatibility, and ultimately their actions within 
the web app will trigger jobs within the server app. I was planning on some 
sort of SOAP interface in the Cocoa app to accept commands from the web 
application to trigger the jobs.

I haven't yet decided on the framework for the web app (often use Rails for 
standalone web apps, may use PHP), but just don't want to box myself into a 
corner by a bad decision early on.  Obviously, the notion of being able to use 
Core Data/SQLite on the server is highly appealing due to the clean integration 
with the Cocoa app.  But would I be foolish to assume that performance (at 
most, 50 web users at a time) would be fine with the web app also querying that 
same database?

Thanks again,
Josh


On 2010-04-28, at 1:39 PM, Bill Bumgarner wrote:

> 
> On Apr 28, 2010, at 10:35 AM, Jens Alfke wrote:
> 
> > SQLite works fine with multiple clients — it uses file locking to support 
> > transactions and ACID properties. I’ve used it that way myself. It just 
> > doesn’t scale as well as a full server-based system, because doing locking 
> > via the filesystem is slower than doing it in memory. But this is unlikely 
> > to affect you unless you’re doing really heavy-duty stuff. On the plus 
> > side, sqlite is already installed in the OS and is a zillion times easier 
> > to maintain than mysql (since the database is just a file, with no special 
> > access/permissions issues.)
> 
> Only if the underlying filesystem absolutely positively gets locking right.   
> Fine for HFS+, not so fine for various network filesystems and/or other 
> operating systems.   Even in the network filesystem case where locking is 
> correct, it may be horrendously inefficient.   Coherency can be an issue, 
> too, depending on filesystem.
> 
> I.e. avoid network filesystems with SQLite & multiple clients.  Down that 
> path lies pain.
> 
> Related, don't use SQLite modifications as an IPC mechanism.  If you need app 
> A to detect changes to the database from app B, use some other notification 
> mechanism beyond watching the database file for changes.
> 
> b.bum
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Bill Bumgarner

On Apr 28, 2010, at 10:35 AM, Jens Alfke wrote:

> SQLite works fine with multiple clients — it uses file locking to support 
> transactions and ACID properties. I’ve used it that way myself. It just 
> doesn’t scale as well as a full server-based system, because doing locking 
> via the filesystem is slower than doing it in memory. But this is unlikely to 
> affect you unless you’re doing really heavy-duty stuff. On the plus side, 
> sqlite is already installed in the OS and is a zillion times easier to 
> maintain than mysql (since the database is just a file, with no special 
> access/permissions issues.)

Only if the underlying filesystem absolutely positively gets locking right.   
Fine for HFS+, not so fine for various network filesystems and/or other 
operating systems.   Even in the network filesystem case where locking is 
correct, it may be horrendously inefficient.   Coherency can be an issue, too, 
depending on filesystem.

I.e. avoid network filesystems with SQLite & multiple clients.  Down that path 
lies pain.

Related, don't use SQLite modifications as an IPC mechanism.  If you need app A 
to detect changes to the database from app B, use some other notification 
mechanism beyond watching the database file for changes. 

b.bum

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Jens Alfke

On Apr 27, 2010, at 6:04 PM, Joshua Tidsbury wrote:

> The application I am going to be writing ultimately needs to access MySQL as 
> a datastore. I'd love to go with Core Data and SQLite, but based on some 
> reading, SQLite wouldn't be ideal if multiple clients were to be accessing 
> the same datastore.

SQLite works fine with multiple clients — it uses file locking to support 
transactions and ACID properties. I’ve used it that way myself. It just doesn’t 
scale as well as a full server-based system, because doing locking via the 
filesystem is slower than doing it in memory. But this is unlikely to affect 
you unless you’re doing really heavy-duty stuff. On the plus side, sqlite is 
already installed in the OS and is a zillion times easier to maintain than 
mysql (since the database is just a file, with no special access/permissions 
issues.)

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Rui Pacheco
Are you trying to write a MySQL client or are you trying to store stuff into
MySQL?

On 28 April 2010 17:58, Dru Satori  wrote:

> Well, the short version is CoreData & SQLLite will not help you in any way
> with MySQL.  As to using another framework or rolling your own, that largely
> depends upon your needs.  Obviously the GPL is not an issue if you are going
> against MySQL anyways, so I would probably look hard at not reinventing the
> wheel and using a preexisting framework.
>
> Andy 'Dru' Satori
>
> On Apr 27, 2010, at 9:04 PM, Joshua Tidsbury 
> wrote:
>
> > Hello everyone,
> >
> > I'm in the process of developing one of my first Cocoa applications, and
> I'm looking for some advice to keep myself from wandering into the wrong
> direction.
> >
> > The application I am going to be writing ultimately needs to access MySQL
> as a datastore. I'd love to go with Core Data and SQLite, but based on some
> reading, SQLite wouldn't be ideal if multiple clients were to be accessing
> the same datastore.
> >
> > So, the question is this: Would I be advised to use the MySQL C API and
> write my own wrappers or use the slightly more recent mysql-cocoa framework
> at http://code.google.com/p/mysql-cocoa-framework/ ?  Or perhaps a third
> option I am unaware of?
> >
> > Many thanks,
> > Josh
> >
> >
> > Joshua Tidsbury | Systems Specialist, Creative Technology Systems
> > t 416.384.7253 | m 416.433.3968 | joshua.tidsb...@ctv.ca
> >
> >
> > ___
> >
> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> >
> > Please do not post admin requests or moderator comments to the list.
> > Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/cocoa-dev/dru%40druware.com
> >
> > This email sent to d...@druware.com
> >
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/rui.pacheco%40gmail.com
>
> This email sent to rui.pach...@gmail.com
>



-- 
Best regards,
Rui Pacheco
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Cocoa Newbie & MySQL

2010-04-28 Thread Dru Satori
Well, the short version is CoreData & SQLLite will not help you in any way with 
MySQL.  As to using another framework or rolling your own, that largely depends 
upon your needs.  Obviously the GPL is not an issue if you are going against 
MySQL anyways, so I would probably look hard at not reinventing the wheel and 
using a preexisting framework.

Andy 'Dru' Satori

On Apr 27, 2010, at 9:04 PM, Joshua Tidsbury  wrote:

> Hello everyone,
> 
> I'm in the process of developing one of my first Cocoa applications, and I'm 
> looking for some advice to keep myself from wandering into the wrong 
> direction.
> 
> The application I am going to be writing ultimately needs to access MySQL as 
> a datastore. I'd love to go with Core Data and SQLite, but based on some 
> reading, SQLite wouldn't be ideal if multiple clients were to be accessing 
> the same datastore.
> 
> So, the question is this: Would I be advised to use the MySQL C API and write 
> my own wrappers or use the slightly more recent mysql-cocoa framework at 
> http://code.google.com/p/mysql-cocoa-framework/ ?  Or perhaps a third option 
> I am unaware of?
> 
> Many thanks,
> Josh
> 
> 
> Joshua Tidsbury | Systems Specialist, Creative Technology Systems
> t 416.384.7253 | m 416.433.3968 | joshua.tidsb...@ctv.ca
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/dru%40druware.com
> 
> This email sent to d...@druware.com
> 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com