English 中文(简体)
• 如何用目标C构建一个HPC查询系统
原标题:How to model a HPC queueing system with Objective-C

我试图对玉米申请进行规划,以便询问一个高性能计算组,了解其运作和轮值计算工作。 目的是能够监测已提交的工作,如果这些职位仍然被解雇和等待处决,或者如果他们正在经营,并且是该组群的 no或主人。

在“全球倡议”方面,我希望能够展示一个<条码>可衡量的<>条码>,其中显示所有已提交的工作,另外还有第二个选择,即看到该组的所有东道方,以及每个节点有多少和哪些工作正在进行。

模型本身并不难做,我最大的是生命周期和东道方与工作对象之间的所有权关系。 这必须设计得好,否则,我将面临记忆管理问题。

www.un.org/Depts/DGACM/index_spanish.htm 请注意,如果可能的话,我想不使用核心数据。

“DataModel”/

1. Possibility
The yellow queue object is the root object of my object graph and it owns all the host objects (has an NSArray of custom host objects). Each host object owns all the job object which are running on this host (also by having an NSArray of custom job objects). I think that there are two major problems with this approach:

  1. where are all the job objects store which are still queued and are not already running on a host. They lack a parent host object.
  2. How would one implement a NSTableView containing all the job objects?

2. Possibility
The yellow root object holds directly references to all job objects by having them stored in a NSArray. Each job has an instance variable retaining a host object. Again here are some problems

  1. I would also have the hosts in the model which are currently idle, so no job is currently executed on them.
  2. How would one implement the data source for a NSTableView showing all the hosts.
  3. How does one make sure that there are no duplicate host objects, so that each host in the cluster is represented by one host object only.

My questions are: 1. Which of the two possibilities make most sense? Are there alternatives? 2. Would one better implement it with CoreData? 3. How would one manage the object lifecycle so that there are no retain cycles or dangling pointers.

www.un.org/Depts/DGACM/index_spanish.htm 谢谢<>。

最佳回答

如果你对记忆管理感到关切,核心数据就是前进的道路。 它在绝大多数情况下为你们管理记忆。

总的来说,你们通过确保每个班级都自我清理来管理记忆。 然后,你将物体置于等级之下,因为每一级均将物体自动清理到底下。

至于具体结构,它取决于你所仿照的情况逻辑。 如果本组织合乎逻辑地做到:

 queue{
    jobs{
        host
    }
}

......那么,你就应当弄清你的数据结构。

我强烈建议你使用核心数据。 如果你以手方式执行,将最终复制许多核心数据功能。 核心数据专门用来管理类似物体图表。 这是它的首要作用。 所有数据库都经过深思熟虑。 没有必要重新发明轮.。

问题回答

暂无回答




相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签