I come from Clearcase world and am trying to learn Perforce at my new company
Clearcase has a concept of streams (which is different than a branch). Likewise Perforce also has a concept of Streams.
The Question
Is the perforce stream same as Clearcase stream.
Thanks
Pedro
Perforce Streams follows the same logic than ClearCase UCM Streams, in that they:
Model the flow of change
Provide Fast context switching and in-place branching
Manage stream composition and dependencies
You do find the same notion of parent/children stream hierachy (see p4 stream).
The main difference is in its content:
P4 Stream contents are defined by the paths that you map (so you can map any path you want)
UCM Streams are defined by the baselines of the components (which are fixed paths, one for each component: you cannot specify any path)
And through the new virtual Streams (2012.1 version of Perforce), they even allows you to visualize a subset of configuration (filtered view): that isn't present in UCM streams.
Related
How can I route a "signal" though a Software Composition without having to copy it (with some code)?
Use-case: The SW-Composition has some RPorts where the data has to be modified and then provided on some PPorts. But for some RPorts/PPorts combination the data does not need to be touched and therefore "simply routed" from RPort to PPort.
The idea would be to simply connect the RPortPrototype with the PPortPrototype with a DelegationSwConnector. But as per specification this is not possible.
Any idea how to do this without the need of "copy-code"?
If I understand correctly that your P- and R- ports are on the composition itself (that is, they are outer ports), you can use the pass-through connector (PassThroughSwConnector model element) for your use case. It's a child element of compositions, so you add a PassThroughSwConnector to your CompositionSwComponentType, and use it to connect your two ports directly.
Note that this will be impossible if there's another path between the two ports via assembly connectors. That would create a loop consisting of pass-through and assembly connectors, which is explicitly forbidden in the specification.
Software Compositions are only a structural grouping. Before generating the Rte, you have to run a tool that creates an "EcuExtract" (see System Template) which flattens the model. So, the input for the Rte is one big root composition that contains atomic components only and no further compositions. Therefore, there will be no "copy node" and data is alway passed through.
However, (with some limitations) it is possible that in the Ecu Extract the port of the root composition has a different type then the port of the component which will lead to data conversion (e.g. rescaling the data or picking an element out of a structure).
I am migrating from Clearcase to Perforce.
Clearcase has a concept of "Recommended Baseline". Is there a similar concept in Perforce?
Also I think that the recommended baseline in clearcase is just a "Floating label". Is that correct? If so is there a floating label concept in Perforce?
The recommended baseline isn't a floating label.
It designated a label (or baseline, which won't float) used to rebase the child stream with said baseline.
You can change the recommended baseline (without triggering any rebase), but that doesn't make it "floating".
As such, it is a marker to reference to baseline which could be used to initialize or update any sub-stream.
The Perforce directory Standard (zip file with a ppt in it) is there to establish "Common elements conveyed by directory structure (non-streams) or stream model".
You find the idea of "sharable quality" labels which can then be used to initialize another stream (here "Patch").
But I didn't found any specific p4 operation which would mark that label as the one to use by default, like "recommended baseline" in ClearCase does.
(This is an example of a lifecycle phase from the PDS document, one process amongst many)
I don't think it's exactly equivalent, but Perforce promotes a mainline branching model for each product or component. In normal cases the recommended baseline would simply be the latest on the main branch. Work isn't promoted to main until it reaches a point of useful stability, while release branches isolate legacy bug fixes and customizations.
This blog post is a good starting point:
http://www.perforce.com/blog/100607/perforce-directory-standard-pds
The author is very helpful and used to be a ClearCase administrator, so you can leave some comments for him.
I am modelling an archive which is part of an video demand system. Think of the archive like windows explorer where multiple users can create folders, upload videos, restructure folders etc. There are business rules (permissions) which determine if the user is allowed to do the task (i.e. rename folder, move folders, view folders etc).
I have modeled each folder as an aggregate root and moving one folder to another folder appears to affect two aggregate roots.
From what I understand is I should send an event to modify the other aggregate. However what concerns me is if the second folder has also been modified (say deleted or removed from the system) then I need to send a compensating command to undo the first aggregate change.
I would prefer some sort of transaction that deals with the move (change on both aggregates) together and if it fails then at least I do not need to undo the first part of the move or raise the first part of the event.
This leads me to, is CQRS right for the problem I am trying to solve? And if so could it be that my aggregates are wrong?
In DDD the Aggregate should represent the transactional boundary. A transaction that requires the involvement of more than one aggregate is often a sign that either the model should be refined, or the transactional requirements should be reviewed, or both.
This a pure DDD issue and is independent of CQRS or any other architectural pattern.
On the other hand, do you really need to reinvent hierarchical structures like folders containing files? As far as I can tell this has been a solved problem for quite some time. Maybe there's no inherent advantage in formalizing that specific domain once again.
Domain modeling using the patterns of DDD makes most sense in bounded contexts where (1) the domain is very complex and (2) modeling the domain will give your software a real (e.g. competitive) advantage over similar applications. If that specific bounded context is rather simple and/or remodeling it doesn't bring a really great advantage, you are better off using the simplest possible solution.
This represents the IMHO most important concept in Domain-Driven Design, which is Focus on the Core Domain
Could please anybody interpret JCR 2.0 specification in regard to JCR workspaces ?
I understand that a session is always bound to exactly one persistent workspace, though a single persistent workspace may be bound to multiple sessions.
Which probably relates to versioning and transactions, though I don't know why.
Some observations :
references are only possible between nodes of the same workspace
executing a query will always be targeted to a single workspace
Workspaces seem to be about nodes that represent the same content (same UUID), in :
different versions of "something", project maybe ?
different phase of workflow
And shouldn't be used for ACL.
Also in JackRabbit, each workspace has its persistence manager. Whereas ModeShape has a connector for source - workspace independent.
David's model ( http://wiki.apache.org/jackrabbit/DavidsModel ) Rule #3 recommends using workspaces only if you need clone(), merge() or update(). For the vast majority of JCR applications, this means not using workspaces. Putting things under different paths, setting specific property values or mixin node types on them and using JCR's versioning covers the versioning and workflow use cases that you mention.
To manage print jobs for example, you could simply move them between JCR folders named "new", "in-progress", "rejected" and "done". That's how it is done in some unix versions, using filesystem folders. JCR allows you to do the same, while benefitting from its "filesystem on steroids" features, so as to keep things very simple, transparent and efficient.
Note also David's Rule #5: references are harmful - we (Apache Sling and Day/Adobe CQ /CRX developers) tend to just use paths instead, as looser and more flexible references.
And as you mention queries: we also use very few of those - navigation in a JCR tree is much more efficient if your content model's path structure makes sense for the most common use cases.
Suppose you have a Parser class that reads the file and does something with the data it contains. On a diagram how to you show that it gets data from some entity that is not represented by a class, but rather exists separately as, in this example - file.
Assuming you want to show the structure. Use a class or interface, as UML does not have to mean a Java class, you can also use an artifact which is more part of the deployment notation, but is fine to use elsewhere. If you think about it a file is a fairly concrete concept, especially if it has a name.
From the OMG UML spec:
10.3.1 Artifact (from Artifacts, Nodes)
An artifact is the specification of a physical piece of information
that is used or produced by a software development process, or by
deployment and operation of a system. Examples of artifacts include
model files, source files, scripts, and binary executable files, a
table in a database system, a development deliverable, or a
word-processing document, a mail message.