• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Design pattern for bulk data handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Design pattern for bulk data handling


  • Subject: Design pattern for bulk data handling
  • From: Ben <email@hidden>
  • Date: Sat, 08 Feb 2014 18:20:48 +0000

Hi list,

I'm looking for the right design pattern for providing different types of access to an SQLite database.

Currently I have a database object where queries are run on a serial NSOperationQueue and each operation has a completion block for reporting its results. The operation queue is an implementation detail behind a more basic API.

This is fine for most things, except that I sometimes need faster access to the underlying database - for example, when importing/exporting data. In these cases I'm after bulk data throughput without the overhead of creating/destroying many NSOperations with completion handlers since there can be in the order of millions of statements to handle.

In the past I had simply broken encapsulation by exposing the underlying database engine API. I'd rather find a better method than this for the future.

Options considered so far:

1. Continue exposing underlying DB engine
2. Add a simpler synchronous API for use on a separate thread
3. Expose NSOperationQueue and allow custom import operations to be queued
4. Add importing functions to the database object itself

Does anyone have any suggestions as to how best to approach this problem?

- Ben
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Design pattern for bulk data handling
      • From: Ben <email@hidden>
    • Re: Design pattern for bulk data handling
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
  • Next by Date: Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
  • Previous by thread: Re: Getting QuickLook to work with NSDocument
  • Next by thread: Re: Design pattern for bulk data handling
  • Index(es):
    • Date
    • Thread