English 中文(简体)
一套物体及其状态的修改和退缩方法
原标题:Modification and rollback methodology for a set of objects and their state

在我撰写的系统中,我有一揽子和服务目标的概念。

“Package

一揽子计划是收集服务的集装箱,具有一套内在的可预见限制。 这些限制包括:

  • Which types of service are supported
  • The number of services that can be allocated to the package
  • The properties that need to be set to specific values within said services

需要在兼容的包之间实现升级和降级。 通过这样做,一揽子计划中的服务需要转让、修改和可能创造或删除,以适应新的一揽子计划的限制。

在任何资金到位之前,都需要这样做,以确保某些独特的资源被分配到这些服务中(并同时存在)。

问题是,如果付款失败,升级就会取消——我们如何阻止修改,回到原来的国家?

以下(非详尽)问题清单可能出现:

  • By deleting services that are no longer compatible with the new package, unique constraints could be released which are then used by other packages (in other accounts etc.) stopping rollback being possible
  • Services that are deleted are difficult to restore with references intact
  • If services aren t deleted, they continue to consume unique constraints that might need to be used by other similar services

处理目前的方式是采取一揽子措施,将物体从中排除(而不是删除),并列出在退约情况下恢复状态的步骤清单。 然而,这是在个案基础上进行的,容易发生错误,感到cl。

我很想知道,你中是否有任何人遇到类似的情况,并知道可以在这里使用的模式或方法。 基本上,我们需要能够更新一套物体的状况,进行这些改动,但可以选择追溯到以前的版本。 NB: 在该系统内,物体的状况可以序列化和储存。

任何“我不喜欢”都感激地收到替代物的意见。

例如:

www.un.org/Depts/DGACM/index_spanish.htm 升级前:

“Package

www.un.org/Depts/DGACM/index_spanish.htm 升级后:

“升级后的包装”/

最佳回答

捐出类似的东西,但很快。

为了执行“undo”/“rollback”,你需要做一些事情:

*** 在进行操作之前储存或登记特定物体(“打字”和“服务”(s))的价值。

如果该行动陷入困境,该信息便会被解冻,或仅仅作为历史数据储存。 否则,它就利用它将物体送回前一个国家。

你也不妨登记新的变化。

[2] You have to register a menu or collection of operations that can be done by your app, and eventually rollback.

+----------------+            +------------------+
|................|            |..................|
|................|            |..................|
|.......App......|/          |.....Operation....|
|................|  ----------|..................|
|................|/          |..................|
+----------------+   1      * +------------------+

例如,如果你不是“包装和服务”申请,而是在做油漆方案时。

在你的申请中,你有一套行动或行动,其中一项行动是“装满的广场”。

[3] 每当你执行其中一项行动时,即使重复进行,你就每个行动都有一个登记册或记录,可以进行,或进行滚动。

+----------------+            +------------------+
|................|            |..................|
|................|            |..................|/   1
|.......App......|/          |....Operation.....|  --------+
|................|  ----------|..................|/        |
|................|/          |..................|          |
+----------------+   1      * +------------------+          |
         /                                                 |
         /                                                 |
         |                    +------------------+          |
      1  |                    |..................|          |
         +--------------------|..................|          |
                          *   |.......Log........|----------+
                              |..................|    * (The same operation can be 
                              |..................|       registered in the log,
                              +------------------+       several times)

当你执行油漆时,你几次使用“填满的油漆”。

[4] 在您的名单上,你需要开展一项相反的行动,以恢复对应行动。

+----------------+            +------------------+
|................|            |..................|-------+ 1
|................|            |..................|       |
|.......App......|/          |.....Operation....|       |
|................|  ----------|..................|-------+ 1  
|................|/          |..................|
+----------------+   1      * +------------------+

举例来说,如果使用以前的油漆数据,你就应当有一个“填满的”操作,从而离开该地区,正如用户在油漆填充的广场之前那样。

Don how done done care care

[5] 对比运行也必须在记录中登记。

问题回答

暂无回答




相关问题
Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Passing another class amongst instances

I was wondering what is the best practice re. passing (another class) amongst two instances of the same class (lets call this Primary ). So, essentially in the constructor for the first, i can ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签