Scaling Service Boundary (SOA) - domain-driven-design

I am new learner in SOA ( Service Oriented Architecture ) I have one question for below scenario:
In a company (Mycompany), Sales Team is there ( which is a technical authority for business capability –here sales is the business capability). That company decided to create 2 products say Mycompany.Photos.com and Mycompany.Grocery.com. For both websites they need sales capability i.e. order acceptance capability.
Hence Sales team has to work for both websites. Because, both website needs sales capability.
Now the question is should sales team create 2 different databases for each websites and 2 different endpoints also ?
for example:
If Sales team initially had one queue "Mycompany.Sales.Endpoint" and it receives CreateOrderCommand. It handles CreateOrderCommand, creates order in sales DB and publishes OrderAcceptedEvent. When they were supporting just one website. If they start supporting both website with same endpoint then how would Sales differentiate weather this order is for Mycompany.Grocery.com or Mycompany.Photos ? Should we split Mycompany.Sales.Endpoint into 2 ? should sales team has to be aware of Photo website orders and Grocery Website orders ?
One answer I can think of is:
Sales team can create 2 different databases each for Mycompany.Grocery.com
and Mycompany.Photos.com
Deploy 2 different Business Components (BC) for each websites.
Sales will have 2 Endpoints say "Mycompany.Grocery.Sales.Endpoint"
for Mycompany.Grocery.com BusinessComponent and "Mycompany.Photos.Sales.Endpoint" for MycompanyPhotos.
Even though they are under same Sales Bounded context, can it have 2 Business
Components (BCs) ? Am I correct, Is this the way we scale sales team will support both products for the sales capability ?
I am sorry for the long message. I could not find any shortcut way to explain this.

I think the better way to think about this situations that you effectively have two companies - one in the grocery business, with all the corresponding capabilities that make that up, and the other in the photo business. Even if the two "companies" happen to share the same incorporation documents, you really shouldn't view this as a single entity.

A service is the technical authority of a business capability.
If you should be able to differentiate between an order from either system, but you can't, you're probably building a 'technical authority' for multiple business capabilities.
Other than that, a service can have many components. Instead of focusing on technical issues, focus on the business issue and see if you can explain that. But a platform like Stackoverflow, with a 1-to-1 ratio on question & answer probably isn't the correct medium for questions like this.

Related

BeautifulSoup4 - Concatenating multiple html elements between two different tags for batch processing url

Continuing on my earlier question Python BS4 - Concatenating multiple html elements between two different tags
I want to extend the solution for multiple url.
Consider two url link1 | link2
The html source code looks like below
<div class="job">
<p><strong>Requisition ID: </strong>223813
<strong>Work Area: </strong>Consulting and Professional Services
<strong>Expected Travel: </strong>0 - 80%
<strong>Career Status: </strong>Professional
<strong>Employment Type: </strong>Regular Full Time</p>
<p><strong>COMPANY DESCRIPTION</strong>
SAP started in 1972 as a team of five colleagues with a desire to do something new. Together, they changed enterprise software and reinvented how business was done. Today, as a market leader in enterprise application software, we remain true to our roots. That’s why we engineer solutions to fuel innovation, foster equality and spread opportunity for our employees and customers across borders and cultures.</p>
<p>SAP values the entrepreneurial spirit, fostering creativity and building lasting relationships with our employees. We know that a diverse and inclusive workforce keeps us competitive and provides opportunities for all. We believe that together we can transform industries, grow economics, lift up societies and sustain our environment. Because it’s the best-run businesses that make the world run better and improve people’s lives.</p>
.
.
.
.
.
.
<p><strong>WHAT YOU GET FROM US </strong></p>
<p>Success is what you make it. At SAP, we help you make it your own. A career at SAP can open many doors for you. If you’re searching for a company that’s dedicated to your ideas and individual growth, recognizes you for your unique contributions, fills you with a strong sense of purpose, and provides a fun, flexible and inclusive work environment – apply now<em>.</em></p>
My Requirement:
Get the section marked as dots in above the code. It is dynamic content & hence can't hardcode any of the section headers. Refer to the 2 links provided above to see the difference in content.
The only static text seems to be <p><strong>COMPANY DESCRIPTION</strong> at the top & <p><strong>WHAT YOU GET FROM US </strong></p> at the bottom.
So I need all the html tags & elemnts after "COMPANY DESCRIPTION" & before "WHAT YOU GET FROM US"
Also observe that the "COMPANY DESCRIPTION" section has 2 para <p> in it. I don't want the 2nd para either which starts with <p>SAP values the entrepreneurial spirit,
Use the css selector to check the text contains "COMPANY DESCRIPTION" and remaining code same.
Code:
import requests
from bs4 import BeautifulSoup
def scrape_url(url, method='bs4'):
session = requests.session()
page = session.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
return soup
urls=['https://jobs.sap.com/job/Kuala-Lumpur-Business-Processes-Consultant-%28FICO%29-Job-14/541909901/','https://jobs.sap.com/job/Mumbai-Senior-Account-Executive-Job-MH/539212101/']
for url in urls:
print(url)
soup = scrape_url(url)
findtag=soup.select_one('p:contains("COMPANY DESCRIPTION")')
print(findtag.text)
findnextptag=findtag.find_next_sibling('p')
for item in findnextptag.find_next_siblings():
if 'WHAT YOU GET FROM US' in item.text:
break
else:
print(item.text.strip())
print("======================================")
Output:
https://jobs.sap.com/job/Kuala-Lumpur-Business-Processes-Consultant-%28FICO%29-Job-14/541909901/
COMPANY DESCRIPTION
SAP started in 1972 as a team of five colleagues with a desire to do something new. Together, they changed enterprise software and reinvented how business was done. Today, as a market leader in enterprise application software, we remain true to our roots. That’s why we engineer solutions to fuel innovation, foster equality and spread opportunity for our employees and customers across borders and cultures.
PURPOSE AND OBJECTIVES
To address requirements in the area of Supply Chain Management Extended Warehouse Management solutions, Build competencies at Solution Delivery Center to deliver solutions especially in areas relating to SAP EWM
EXPECTATIONS AND TASKS
Independently handle large implementation projects with focus on Warehouse Management processes such as inbound, outbound and internal processes. RF Device functions and Barcode support experience is desirable
Able to lead EWM discussions, assessments and detail requirement studies with customers
Leading the team that are assigned to, in functional capacity, adding value to the project and to the final deliverables
Be actively involved in the preparation, conception, realization and Go Live of customer implementation projects
Demonstrate the ability to plan, run, and manage blueprint workshops / meetings with internal and external clients
Responsible for defining the scope of a project / opportunities, estimating efforts and project timelines
Participating in RFP discussions and estimating under guidance from a Bid Manager
Providing a creative source of ideas/solutions to address problems
Delivering billable components that meets a customer’s needs
KEY PERFORMANCE INDICATORS
Customer Feedback/customer satisfaction scores
Productive days/utilization as defined by the organization for projects/assessments/etc.
Knowledge Management and creation of effective reusable components
EXPERIENCE REQUIREMENTS
Minimum of 4+ years industry experience and a minimum of 5 to 6 years of SAP EWM experience
Domain knowledge in Supply Chain Management in the areas of Planning, Manufacturing & warehousing processes is a must
Must have strong ERP implementation experience
Experience in SAP Material Flow Systems (MFS) or any other third party automation tools will be desirable
Experience in EWM technical knowledge will be an added advantage
Knowledge on SAP S/4HANA Public Cloud solution and SAP IOT/Leonardo portfolio will be preferred but not mandatory
Good understanding of S/4HANA Order to Cash and Procure to Pay business processes
Good understanding of SAP ACTIVATE implementation methodology
Use of Solution Manager as a part of implementation life cycle is desirable
Good Communication skill in English.
EDUCATION AND QUALIFICATIONS/SKILLS AND COMPETENCIES
Degree in Engineering or IT
SAP Certification in Extended Warehouse Management (EWM) desirable
Minimum 4 to 5 full life cycle SAP EWM implementations
Strong knowledge in SAP SCM Extended Warehouse Management Solutions and S/4HANA Embedded EWM Solution
Good integration knowledge with other components with SAP S/4HANA (WM, SD, MM, PP) and other SAP or Non-SAP legacy applications
Knowledge of SCOR, APICS certification preferable
Strong client-facing experience and well-developed customer focus
Solid oral and written communication skills, with the demonstrated ability to communicate complex technical topics to management and non-technical audiences
Mobility is must – candidate must be ready to travel to project locations (short term and long term)
======================================
https://jobs.sap.com/job/Mumbai-Senior-Account-Executive-Job-MH/539212101/
COMPANY DESCRIPTION
SAP started in 1972 as a team of five colleagues with a desire to do something new. Together, they changed enterprise software and reinvented how business was done. Today, as a market leader in enterprise application software, we remain true to our roots. That’s why we engineer solutions to fuel innovation, foster equality and spread opportunity for our employees and customers across borders and cultures.
Key Areas of Responsibility and Tasks:
The Account Executive’s primary responsibilities include prospecting, qualifying, selling and closing new business to existing and net new customers. The Account Executive brings a Point of View to Customer engagement; uses all resources to solve customer problems with appropriate SAP products.
1.    Account and Customer Relationship Management, Sales and Software License and Cloud Subscription Revenue.
Annual Revenue - Achieve / exceed quota targets. 
Sales strategies - Develops effective and specific account plans to ensure revenue target delivery and sustainable growth.   Develop relationships in new and existing customers and leverage to drive strategy through organization. 
Trusted advisor - Establishes strong relationships based on knowledge of customer requirements and commitment to value (value of counsel and expertise, the value of solutions, the value of implementation expertise).  Builds a foundation on which to harvest future business opportunities and accurate account information and coaching.
Customer Acumen - Actively understand each customer’s technology footprint, strategic growth plans, technology strategy, and competitive landscape.   Review public information (e.g. new executive appointments, earnings statements, press releases) for the company and its competitors to remain updated on key industry trends and issues impacting the prospect. 
Territory and Account Leadership - Lead designated territory, including accounts, account relationships, prospect profiling, and sales cycles.  Encourage all accounts to become SAP references. 
Business Planning – Develop and deliver comprehensive business plan to address customer and prospects priorities and pain points.   Utilize VE, benchmarking and ROI data to support the customer’s decision process.
2.    Demand Generation, Pipeline and Opportunity Management
Pipeline planning - Follow a disciplined approach to maintaining a rolling pipeline. Keep pipeline current and moving up the pipeline curve.  
Pipeline partnerships – Leverage support organizations including Marketing, Inside sales, Partners and channels to funnel pipeline into the assigned territory.   
Leverage SAP Solutions – Be proficient in and bring all SAP offers to bear on sales pursuits including Industry Solutions, LOB solutions (CRM, SCM, HCM, SRM et. al) and technology solutions (Business Analytics, Mobility, Database and Technology, et. al) 
Advance and close sales opportunities - through the successful execution of the sales strategy and roadmap.
Support all SAP promotions and events in the territory
3.    Sales Excellence
Sell value.   
Maintain White Space analysis and execution of initiatives (up sell and cross sell) on customer base.
Orchestrate resources: deploy appropriate teams to execute winning sales.  Create OneSAP.
Utilize best practice sales models.
Understand SAP’s competition and effectively position solutions against them.
Maintain CRM system with accurate customer and pipeline information.
Experience & Language Requirements
10+ Years of experience in sales of complex business software / IT solutions in Govt/ PSU sector
Proven track record in business application software/ services sales
Experience in the lead role of a team-selling environment. Coordination across multiple internal and external stakeholders and partners. 
Demonstrated success with large transactions and lengthy sales campaigns in a fast-paced, consultative and competitive market.
Business level English: Fluent 
Local language: Fluent, Business Level
Education:
Bachelor equivalent: yes
======================================

Implementing Bounded Context in Domain Driven Design

I recently decided to learn Domain Driven Design. I came up with a hypothetical application and tried designing the architecture for it. It is a simple Poing-Of-Sale application with bounded contexts Sales and Inventory. This is where I have two conflicting designs when implementing the code for these bounded contexts.
Design #1:
Anything and everything that has to do with inventory belongs in inventory bounded context.
If a sales order comes in, the request initially enters the sales bounded context, then one of the steps to make the sale, you must check the inventory to see if the item is available. In which case, you request the inventory context (however this is done within the system). Inventory context will check the database and respond back with availability confirmation. This way any other bounded contexts that need any kind of inventory involved logic would use this bounded context to achieve it. Code is encapsulated and good to go.
Design #2:
The division of bounded contexts are strictly at the business level divisions in their operational contexts.
If a sales order comes in and hits the sales bounded context, it should contain all the logic in code that has to do with sales. It would check the database whether an inventory is available via the service, it would then remove that item from the inventory, record the sales in database via the service again, send out an sales made notification email to admin if this is a requirement. Just everything and anything that has to do with sales will all happen in this bounded context. Once the sale is made, it could fire an event sale made, and inventory context would listen to this to check the inventory in the database, see if new purchases need to be made to bring in new inventory or not as it is an operation related to inventories at the business level.
I am just trying to understand what Domain Driven Design approach is in such system. Thanks.
=================================
After some thought this is the added question to the original.
Let's say your business needs to do shipping. Whether it would be due to making a sale (Sales Bounded Context) or due to a warranty replacement (Support Bounded Context). What if shipping itself is complicated depending on situations. Where certain products or shipping addresses you need to make the decision to ship it yourself or via some 3rd party shipping company using a web service. Does the "shipping" deserve its own Shipping Bounded Context? Or it simply is just another domain logic embedded in the Sales Bounded Context and the Support Bounded Context? This is all within the case of simple retail store domain.
My 2 cents... Design #2 seems better as Design #1 should lead you to a distributed system. You do not want a distributed system. You should not take storage or tables into account before getting the business. Just consider business, and when you get it, consider how you could be able to get your BC run in complete isolation (offline mode vs distributed mode). If data is missing, then consider using Domain Events to propagate this knowledge to your BC.
Design #1 is the correct one. Inventory context should be the only one which decides and knows how to check for inventory. It could be the inventory context is checking from multiple places and those could be changing based on meta data updates as new data warehouses come online. At some point retailer might decide to have all physical shops as data warehouses as well.
Similarly shipping should be a context as well. Notes above said we should not aim for distributed system but I don't see why not if that provides agility.

Product ordering through flipcart

I have an eCommerce website which is having so many products. My client is having problem to deliver the ordered products. So here I am looking for a solution that, Is it possible to integrate product ordering with Bit giants (like flipcart, snapdeal), so that the product delivery can take place by them. If any solution pls share.
Multi channel fulfillment by Amazon is one to look at. Keep in mind that any fulfillment center is also going to charge to warehouse (store) the products. http://services.amazon.com/fulfillment-by-amazon/multi-channel.htm

Good customization tutorials for Dynamics CRM that are NOT sales driven

I'm brand new to Dynamics CRM and have been asked to see if this is a viable replacement for the employee tracking software we're using now (AlexSys Team 2 Pro). We're not so much of a sales based company as the tutorials i see for CRM focus on. I know CRM is more for customer relations and sales tracking but i also know it's highly customizable and can do what i need it to do. I need something that keeps track of how many new tasks have been created and how many have been done and to show a graph or a report with the results. I've looked at some PluralSight videos and some windows videos but they all seem to focus on and really push the use of its sales side usability. We do sell our product here (i work at a software development company) but we need something that isn't focused on sales and is usable to management for tracking progress. So for example, lets say im aksed to do 4 things(tasks), I do 2 of those things and am in the process of handling my 3rd. I'm not a sales agent, lets say im a programmer, I need CRM to be able to show my manager that I had 4 new tasks, completed 2, and if possible to show that im in the process of working on the 3rd. AlexSys Team gives you different options for what state the task is in, such as In-Process and Completed but it does poorly when it comes to reporting. Are there any good places to learn how to do that in CRM, we are not using a partner and will not have someone coding this or changing this for us, i will possibly be the one working on that so i need something that can help show me how to customize it without constantly talking about sales. Im off to watch more PluralSight videos but maybe a user here knows of somewhere better to learn from or maybe just a specific PluralSight video i may have missed. Thanks for any input.
Dynamics CRM is as you've discovered very customisable and will almost certainly meet the requirements you've described. Whether it is the correct choice only you can decide.
YouTube is a really good resource for CRM videos, you can also take a look at the CRM 2011 Technical Training Videos on Channel 9 produced when the product was first released. These give a high level overview of CRM 2011 technical capabilities.
You may want to look at the basics of Activities ( in particular Tasks ) and Queues. Make sure you're clear on the usage of Status and Status Reason and how you can customise them. For reporting you can either use the built-in dashboard capabilities or create your own SSRS reports using BIDS that can be hosted within CRM. The process of producing these reports whilst subtlety different will be easily understood by anyone with some some basic SSRS skills.
I'd recommend enlisting the help of a partner in the first instance even if it's to just verify your initial design. The overall cost of their time in relation to the install and running costs of CRM won't be too significant and they may even be able to save you some money.
I'm not sure of a better place for videos, but I can speak to CRM's ability to serve as a rapid application development platform and the areas it excels. It allows you to create new fields and entities (think Database Tables) without touching a database, as well as customize forms, roles, and security with 0 code. You can also sign up for a free months trial online to setup a quick Proof of Concept.
There is so much that it can do, and do quickly, that your company may be better served to seek outside help, resulting in a better product, delivered quicker, with less overall costs than trying to do everything "in-house".

What is the best practice about sharing the model for different projects when use domain driven design?

So we may apply the domain driven design for multiple projects but there could be intersection of the same piece of domain model.
In this case, how to apply the domain driven design (use ORM, model first, generating database schema)? Create multiple databases with a lot of same tables? Or how to share data? Use synonyms? What is the possible strategy to resolve the sharing model (including data)?
Any suggestion is welcome. Thanks in advance!
In my previous project we had a lot of discussions regarding having redundant info in several models that have some shared parts.
What we found interesting is that we thought that several projects (not C# proj, but real large development projects) or call it systems very rarely share the exact same perspective on how using the model. We thought that in a larger domain that spans over several application/systems/projects you could spot several core's where you don't want the cores to be duplicated in each application.
It all ended up with a domain that where distributed on several machines. And we had GUID keys to bind them together in database. But since we did this "model first", sub domains looked at each other like infrastructure related services that where reached through Domain events.
Complicated? Not really. Here's an example:
Domain one (Salary review system) - We have a Salary Review statistic system which conduct evaluation on employees salary and how they related to their experience, age and performance. The Core is questionnaire form, work evaluation, questionnaire answers, rating. salary modification advices etc.
Domain two (Employee system) - Here you manage your employee, register new employees, handle rehab, maybe personal development, salary, employee contract, employee benefits etc.
Domain three (Performance management) - Here you handle history of employee experience, goals, achievements, and agreements between boss and employees about personal development, rating and grade of performance.
As you notice the Core of each domain is different but they share some concerns. Depending on deployment, infrastructure and requirement on how tight they should relate/respond to each other - the tech how to solve this could differ.
I Prefer to do this tech independent. We used NServiceBus for synchronizing domain through Domain Events (Udi Dahn's Domain Event Pattern).
For instance, Once we have completed a salary review for an employee and boss should be informed that Joe should get a chance of salary increase with 200 - 500 $ this year.
The method ApplySalaryReview on entity aggregate root Employee do not only save the review result, it also trigger domain event NotifySalaryReviewSubscribers which trigger an eventhandler HandleNotifySalaryReviewSubscribersEvent in Application layer that takes a infrastructure service in ctor. That service puts result in a message queue that all systems that need this info can subscribe on this message.
In our case, it is Domain two (Employee system). The employee system import result and notify employee's boss that he got new info for the upcoming salary talk with this particular employee.
I hope I may have shread some light on one way of doing it. There are so many other ways as well...
You might want to (re-)read the strategic design patterns in the blue book.

Resources