Puppet versus Chef: 1. Puppet wins. Puppet, Chef, cfengine, and Bcfg. If you’re looking for Linux automation solutions, or server configuration management tools, the two technologies you’re most likely to come across are Puppet and Opscode Chef. They are broadly similar in architecture and solve the same kinds of problems. Puppet, from Reductive Labs, has been around longer, and has a large user base. Chef, from Opscode, has learned some of the lessons from Puppet’s development, and has a high- profile client: Engine. Yard. You have an important choice to make: which system should you invest in? When you build an automated infrastructure, you will likely be working with it for some years. Once your infrastructure is already built, it’s expensive to change technologies: Puppet and Chef deployments are often large- scale, sometimes covering thousands of servers. Chef vs. Puppet is an ongoing debate, but here are 1. Download all the sample projects used in Gontu Series from here. Retrouvez toutes les discothèque Marseille et se retrouver dans les plus grandes soirées en discothèque à Marseille. Based on the authors’ market leading data structures books in Java and C++, this book offers a comprehensive, definitive introduction to data structures in Python. I believe Puppet has over Chef today. Larger installed base. Put simply, almost everyone is using Puppet rather than Chef. While Chef’s web site lists only a handful of companies using it, Puppet’s has over 8. Google, Red Hat, Siemens, lots of big businesses worldwide, and several major universities including Stanford and Harvard Law School. This means Puppet is here to stay, and makes Puppet an easier sell. When people hear it’s the same technology Google use, they figure it works. Chef deployments don’t have that advantage (yet). Devops and sysadmins often look to their colleagues and counterparts in other companies for social proof. Contents Preface xiii I Preliminaries 1 1 Data Structures and Algorithms 3 1.1 A Philosophy of Data Structures 4 1.1.1 The Need for Data Structures 4. Free practice programming interview questions. Interview Cake helps you prep for interviews to land offers at companies like Google and Facebook. One of the best forum on engineering where students can discuss about their courses and download study material here, they can upload new eBooks for others. A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice. Larger developer base. Puppet is so widely used that lots of people develop for it. Puppet has many contributors to its core source code, but it has also spawned a variety of support systems and third- party add- ons specifically for Puppet, including Foreman. Popular tools create their own ecosystems. Chef’s developer base is growing fast, but has some way to go to catch up to Puppet - and its developers are necessarily less experienced at working on it, as it is a much younger project. Choice of configuration languages. The language that Puppet uses to configure servers is designed specifically for the task: it is a domain language optimised for the task of describing and linking resources such as users and files. Chef uses an extension of the Ruby language. Ruby is a good general- purpose programming language, but it is not designed for configuration management - and learning Ruby is a lot harder than learning Puppet’s language. Some people think that Chef’s lack of a special- purpose language is an advantage. Unfortunately, there are many things about Ruby that aren’t so intuitive, especially for beginners, and there is a large and complex syntax that has to be mastered. There is experimental support in Puppet for writing your manifests in a domain language embedded in Ruby just like Chef’s. So perhaps it would be better to say that Puppet gives you the choice of using either its special- purpose language, or the general- purpose power of Ruby. I tend to agree with Chris Siebenmann that the problem with using general- purpose languages for configuration is that they sacrifice clarity for power, and it’s not a good trade. Longer commercial track record. Puppet has been in commercial use for many years, and has been continually refined and improved. It has been deployed into very large infrastructures (5,0. Puppet’s development. Chef is still at an early stage of development. It’s not mature enough for enterprise deployment, in my view. It does not yet support as many operating systems as Puppet, so it may not even be an option in your environment. Chef deployments do exist on multiple platforms, though, so check availability for your OS. Better documentation. Puppet has a large user- maintained wiki with hundreds of pages of documentation and comprehensive references for both the language and its resource types. In addition, it’s actively discussed on several mailing lists and has a very popular IRC channel, so whatever your Puppet problem, it’s easy to find the answer. While there are Chef tutorials, they’re a little sketchy. There are bits and pieces scattered around, but it’s hard to find the piece of information you need. Wider range of use cases. You can use both Chef and Puppet as a deployment tool. The Chef documentation seems largely aimed at users deploying Ruby on Rails applications, particularly in cloud environments - Engine. Yard is its main user and that’s what they do, and most of the tutorials have a similar focus. Chef’s not limited to Rails, but it’s fair to say it’s a major use case. In contrast, Puppet is not associated with any particular language or web framework. Its users manage Rails apps, but also PHP applications, Python and Django, Mac desktops, or AIX mainframes running Oracle. To make it clear, this is not a technical advantage of Puppet, but rather that its community, documentation and usage have a broader base. Whatever you’re trying to manage with Puppet, you’re likely to find that someone else has done the same and can help you. More platform support. Puppet supports multiple platforms. Whether it’s running on OS X or on Solaris, Puppet knows the right package manager to use and the right commands to create resources. The Puppet server can run on any platform that supports Ruby, and it can run on relatively old and out- of- date OS and Ruby versions (an important consideration in many enterprise environments, which tend to be conservative about upgrading software). Chef supports fewer platforms than Puppet, largely because it depends on recent versions of both Ruby and Couch. DB. As with Puppet, though, the list of supported platforms is growing all the time. Puppet and Chef can both deploy all domains of your infrastructure, provided it’s on the supported list. Doesn’t reinvent the wheel. Chef was strongly inspired by Puppet. It largely duplicates functionality that already existed in Puppet - but it doesn’t yet have all the capabilities of Puppet. If you’re already using Puppet, Chef doesn’t really offer anything new that would make it worth switching. Of course, Puppet itself reinvented a lot of functionality that was present in earlier generations of config management software, such as cfengine. What goes around comes around. Explicit dependency management. Some resources depend on other resources - things need to be done in a certain order for them to work. Chef is like a shell script: things are done in the order they’re written, and that’s all. But since there’s no way to explicitly say that one resource depends on another, the ordering of your resources in the code may be critical or it may not - there’s no way for a reader to tell by looking at the recipe. Consequently, refactoring and moving code around can be dangerous - just changing the order of resources in a text file may stop things from working. In Puppet, dependencies are always explicit, and you can reorder your resources freely in the code without affecting the order of application. A resource in Puppet can . Conversely, resources can . Andrew Clay Shafer has written thoughtfully on this distinction: Puppet, Chef, Dependencies and Worldviews). Chef fans counter that its behaviour is deterministic: the same changes will be applied in the same order, every time. Steve Traugott and Lance Brown argue for the importance of this property in a paper called Why Order Matters: Turing Equivalence in Automated Systems Administration. Bigger mindshare. Though not a technical consideration, this is probably the most important. When you say . Puppet owns this space. I know there is a large and helpful community I can call on for help, and even books published on Puppet. Puppet is so widely adopted that virtually every problem you could encounter has already been found and solved by someone. Conclusion. Currently . Puppet’ is a rather unfair comparison. Many of the perceived disadvantages of Chef that I’ve mentioned above are largely due to the fact that Chef is very new. Technically, Puppet and Chef have similar capabilities, but Puppet has first mover advantage and has colonised most corners of the configuration management world. One day Chef may catch up, but my recommendation today is to go with Puppet. Engineering Forum and Discussions for Engineers. Collection of all Questions from engineering entrance exam for undergraduate courses like JEE mains, JEE- Advance, VIT, BISAT, etc and others. In this section you will find all the previous years question of all the important entrance exam at undergraduate level, such as Joint Entrance Exam, JEE- Mains, JEE- Advanced, Karnataka Common Entrance Test (KCET), BCECE Entrance Examination, LPU National Entrance and Scholarship Test (NEST), KEAM - Kerala Engineering, Architecture, Medical, COMEDK, BITSAT, VITEEE, APIIT NAT, ATIT, NATA, MHT CET, UPSEE, CENTAC, SRMJEE, Symbiosis SET, PU CET UG and much more. Java 1. 01: Datastructures and algorithms, Part 1. Computer science emphasizes two important topics: datastructures and algorithms. Those topics are important because the choices you make for a program's datastructures and algorithms affect that program's memory usage (for datastructures) and CPU time (for algorithms that interact with those datastructures). When choosing a datastructure or algorithm, you sometimes discover an inverse relationship between memory usage and CPU time: the less memory a datastructure uses, the more CPU time associated algorithms need to process the datastructure's data items, which are primitive type values or objects, via references. Also, the more memory a datastructure uses, the less CPU time associated algorithms need to process the data items—and faster algorithms result. This inverse relationship appears in Figure 1. The inverse relationship between memory usage and CPU time. An example of the inverse relationship between memory usage and CPU time involves the one- dimensional array and doubly- linked list datastructures, and their insertion/deletion algorithms. For any given list of data items, a one- dimensional array occupies less memory than a doubly linked list: a doubly linked list needs to associate links with data items to find each data item's predecessor and successor, which requires extra memory. In contrast, a one- dimensional array's insertion/deletion algorithms are slower than a doubly linked list's equivalent algorithms: inserting a data item into or deleting a data item from a one- dimensional array requires data item movement to expose an empty element for insertion or close an element made empty by deletion. The article begins with a presentation of basic concepts and continues with a tour of the array datastructure. You learn about one- dimensional, two- dimensional, and ragged arrays, plus linear- search, bubble- sort, binary- search, and matrix- multiplication array- oriented algorithms. The article ends by asserting that Java's arrays are objects. What is an algorithm? How do you represent an algorithm? Knowledge of those concepts helps you understand this series. A definition from that era: a datastructure is a set of types, a designated type from that type set, a set of functions, and a set of axioms. That definition implies that a datastructure is a type with implementation. In our object- oriented programming era, type with implementation means class. Although those classes structure various data items, they do so to describe real- world entities (in the form of objects) instead of describing container objects for other entity (and possibly container) objects. This containment idea leads to a more appropriate datastructure definition: a datastructure is a container class that provides storage for data items, and capabilities for storing and retrieving data items. Examples of container datastructures: arrays, linked lists, stacks, and queues. An algorithm is a sequence of instructions that accomplishes a task in a finite time period. The algorithm receives zero or more inputs, produces at least one output, consists of clear and unambiguous instructions, terminates after a finite number of steps, and is basic enough that a person can carry out the algorithm using a pencil and paper. In contrast, a program is not necessarily finite: the program, such as a Web server, may never terminate without external intervention. Examples of algorithms associated with datastructures: linear- search, bubble- sort, binary- search, matrix- multiplication, linked- list- concatenation, stack- push- and- pop, and queue- insert- and- delete. The most obvious representation: Java source code. However, writing source code before you fully understand an algorithm often leads to difficult- to- find bugs. One technique for overcoming those bugs involves flowcharts. That representation illustrates statements that need to execute, decisions that need to be made, logic flow (for iteration and other purposes), and terminals that indicate start and end points. To present that visual representation, a flowchart uses various symbols, which Figure 2 shows. Flowchart symbols for statements, decisions, logic flow, and terminals. What does a flowchart look like? Suppose you have a simple algorithm that initializes a counter to 0, reads characters until a new- line (\n) character is seen, increments the counter for each read digit character, and prints the counter's value after the new- line character has been read. Figure 3's flowchart illustrates this algorithm's control flow. A flowchart for counting digit characters. Click on thumbnail to view full- size image. Flowcharts also have disadvantages. Highly- detailed flowcharts can introduce errors or inaccuracies. Extra time is required to position, label, and connect a flowchart's symbols, even though tools speed up this process. This delay might slow your understanding of an algorithm. Because flowcharts are tools of the structured programming era, they aren't as useful in an object- oriented context. The Unified Modeling Language (UML) is more appropriate for providing object- oriented visual representations. Pseudocode is useful for quickly writing down an algorithm's representation. Because syntax is not a concern, no rules define how to write pseudocode. Consider the following example. DECLARE CHARACTER ch. DECLARE INTEGER count = 0. IF ch IS '0' THROUGH '9' THEN. UNTIL ch IS '\n'. The example above presents the pseudocode equivalent of Figure 3's flowchart. Although locating control flow in pseudocode can prove harder than finding it in a flowchart, typically, writing pseudocode takes less time than drawing a flowchart. Because arrays are so prevalent and because I needed to use the one- dimensional array variant in several of this column's earlier programs, I briefly introduced the array datastructure in . That definition raises four interesting points. Each element occupies the same number of bytes; the exact number depends on the type of the element's data item. All elements share the same type. We tend to think of an array's elements as occupying consecutive memory locations. When I discuss two- dimensional arrays, you'll discover that isn't always the case. The number of indexes associated with any element is the array's dimension. Note This section focuses exclusively on arrays of one and two dimensions because higher- dimensional arrays are not used as frequently. One- dimensional arrays. The simplest kind of array has one dimension: each element associates with a single index. Java provides three techniques for creating a one- dimensional array: use only an initializer, use only keyword new, and use keyword new with an initializer. Because I showed you how to create a one- dimensional array with only an initializer in . That technique requires either of the following syntaxes. Because the one- dimensional array variable holds a reference to the one- dimensional array, the variable's type is type. Keeping all type information in one place improves the source code's readability. Each element holds a single integer and initializes to 0. Operator equal- to (=) assigns the one- dimensional array's reference to test. Figure 4 illustrates the resulting one- dimensional array variable and elements. Click on thumbnail to view full- size image. Caution When creating a one- dimensional array based on a primitive type, the compiler requires the same primitive type keyword to appear on both sides of the equal- to operator. Otherwise, the compiler reports an error. For example, int . In contrast, reference type one- dimensional arrays store data items that reference objects. The following code fragment uses only keyword new to create a pair of one- dimensional arrays that each store data items based on a reference type. Clock . Each element must contain a reference to either a Clock object (assuming Clock is a concrete class) or an object created from a concrete Clock subclass, and initializes to null. That technique requires either of the following syntaxes. Because the one- dimensional array variable holds a reference to the one- dimensional array, the variable's type is type. You do not specify the number of elements between the square brackets because the compiler determines that count from the number of initializer's entries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |