top of page
Writer's pictureZach - Product Owner

The Spaghetti Anti-Pattern

Updated: Jul 30

Welcome back! let's go back to the metaphor-verse and look at our next anti-pattern.


Italian Restaurant

Spaghetti


Today you’ve taken over food purchasing for our Italian restaurant. Your job is to optimize our ingredient usage, ensuring we don’t waste food while meeting daily demands and special events.


This means tracking how much food is eaten daily, accounting for holidays, weekends, special events, and birthdays. Our previous purchasing manager got frustrated trying to account for spaghetti consumption, so hopefully, you can streamline this process. Let me walk you through what I know…

   

Linda is the events manager and she is responsible for our VIP guests. Having a shortage for any upcoming parties would be a disaster. Linda refers to the sous-chef Kate when accessing plate counts, who talks to the head chef Mark for ingredients. But it doesn't stop there. Kate often needs to coordinate with Jack, the line cook, who keeps track of daily prep needs and specials, and Jack frequently consults with Maria, the pantry supervisor, to ensure all dry goods are stocked. Maria, in turn, gets updates from Alex, the delivery coordinator, who communicates daily with each supplier to confirm delivery schedules and quantities.


Alex, however, also relies on Sarah, the produce manager, who tracks all fresh produce deliveries, and Mike, the dry goods manager, who handles all non-perishable items. Then there's Emily, the fishmonger, who ensures seafood deliveries, and Carl, the butcher, who manages meat supplies.


Our pastry chef, Sophie, requires separate orders for desserts, which she communicates to Kate but also double-checks with Hannah, the assistant pastry chef. Hannah often finds herself running last-minute checks with Lucas, the inventory manager, who verifies stock levels daily. Lucas works closely with Ben, the storage coordinator, who manages the placement and rotation of all stored goods, and Jenna, the supply chain analyst, who tracks usage trends and forecasts needs.


Additionally, Olivia, the beverage manager, is responsible for ordering drinks and coordinates with Tom, the bar supervisor, for special cocktail ingredients. All these roles intertwine with Peter, the budget analyst, who keeps an eye on costs, and reports back to you for final approvals.


The Anti-Pasta


Keeping up with Spaghetti is an exhausting job when 18 other people are involved and everyone has a slightly different role and their roles intertwine so deep. The spider-web of responsibility makes following along difficult.


Your business and the software you use can easily fall into this spaghetti process. The roles are defined but not implemented effectively as there is far too much interdependency and lack of role responsibility.


  • When spaghetti isn’t on the table, whose fault is it?

  • When you make a change, how does that ripple through your web of processes?

  • Who is the responsible entity here for verifying that the next VIP receives delicious, fresh well seasoned pasta?


Any veteran in the business has been on an “all hands on deck” call where something in the spaghetti of operations went down. I know for me personally, it’s involved sifting through 300,000 daily logs and we were not sure who even dropped the ball, or what system, or if there even was a system involved.


The Secret Ingredient


Let’s examine how we can help avoid spaghetti in our application.

We need a clear and defined separation of logic as this assigns a responsibility to a process. It’s important that this process is separated from other processes by definition.. Separation guarantees several things:


  1. No overlap in responsibility means tasks are easy to understand and follow. 

  2. Updates to this process guarantee they do not affect other processes. 

  3. Modularity in design allows easier restructuring and modification when new specifications arise. 

  4. Scaling becomes possible when bottlenecks arise.

  5. Issues in one defined process do not affect other processes.


Clear separation can quickly fix poor architecture, whether it's code or roles in your business. 


How Does Perigee Help?


Perigee is designed from the core with separation of logic in mind.


Our threading system forces you to define walled-off processes that do not affect other processes. This means that from the start of your application, you’re guaranteed to develop independent tasks.


Threads are programmatic and self-restarting on uncaught exceptions. This means you’re in complete control over every aspect of your application. If you need to turn off a portion of your app, you can do so. If an uncaught exception is thrown, that thread will automatically restart, giving you the power to define the logic on how and when to restart.


Because the definitions of all tasks occur at startup, it’s very easy to read and understand how an application works. Every registered refresh, thread, and connection is clearly understandable, leading to little to no onboarding time for new developers.


Interdependencies among credentials, watermarks, limiters, and even file operations are all thread-safe. This means you can register and use them anywhere in the application without breaking the modular design.



 

Email Icon

Follow all the exciting developments of the Perigee Revolution by joining our Perigee Email List today! Or simply email us at info@perigee.software



Youtube icon

Watch the latest disrupting videos at Perigee Software - YouTube



twitter icon

Tweet at us at @PerigeeNinja




documentation icon

Get full documentation with ready-to-run examples at Perigee Documentation 




Facebook icon

Like us on Facebook at Perigee Facebook Page 

5 views0 comments

Recent Posts

See All

Comments


bottom of page