Event Location:
UCSD Extension - University City Center
6256 Greenwich Dr.
San Diego, California
Abstract:
In-Memory OLTP (code name: Hekaton) is the most important new feature in SQL Server 2014, and this session will teach you how query processing and optimization work with this new database engine. After explaining the basics, we will discuss how the query optimizer is used in In-Memory OLTP by both natively compiled stored procedures and by traditional stored procedures accessing memory-optimized tables through the query interop functionality. We will also take a look at how the new hash and range indexes are used, as well as how their performance implications are also covered along with the process of translating the plan created by the query optimizer into C code. Finally, some limitations with the current release will also be explained.
Speaker(s): Benjamin Nevarez,
Abstract:
At last year’s SQLSaturday (#249) we made the case for “Pumping up your Access application with a SQL Server back-end”. This year we’re going to going to look at the code to make that happen. We’ll pull the covers off a real-world application and see how we read and write SQL Server data using VBA. We’ll also examine SQL code on the back end (views, stored procedures, triggers) and how to apportion the workload so that we’re taking advantage of the respective strengths of both Access and SQL Server in manipulating data and managing resources. We might also get a peek at some performance metrics to see the impact of different indexing schemes and querying approaches. Even though the topic is about interfacing Access to SQL Server, there will be a lot of emphasis on server-side coding and will be a good intro or refresher for people who just want to learn how to write T-SQL scripts.
Speaker(s): Darrell Burns,
Abstract:
This session will begin with the tasks necessary to model a dimensional data structure to maintain and present geographic data. We will discuss various requirements that can affect a data model such as granularity, surrogate keys, slowly changing dimensions. Real life examples and solutions will provided to give better context to each step in the process. After the data structure has been created we will focus on how to best “clean” and validate the geographic data. We will focus on using SSIS to obtain latitude and longitude and then how this can be converted SQL Server spatial types. Finally we will cover presenting this data using SSRS and Power Map and how to create dynamic and aesthetically pleasing graphical reports. This portion of the session concentrates on presenting reports using the geographic data type that answer specific questions such as: Events that occurred at a specific address, zip code, and even block range and events within a mile radius.
Speaker(s): David Dye,
Abstract:
There are any number of tricks and traps around getting the query optimizer to provide you with an optimal execution plan that gets you your data quickly and efficiently. But, at the end of the day, the principal driving factor of the optimizer, and therefore of your queries, are the statistics that define your data. This session teaches you how those statistics are put together and maintained by SQL Server. Different types of maintenance results in different levels of accuracy within statistics so we detail what the structures and information looks like after this maintenance. Your understanding of how the optimizer works with statistics will better enable you to understand why you’re getting the performance and types of execution plans that you are getting. Understanding enables you to write better t-sql statements and deal with performance problems such as bad parameter sniffing.
Speaker(s): Grant Fritchey,
Abstract:
It has been a long established practice to keep maintain application code in version control. Versioning your application code allows you to view changes made by several developers working on the same project. It allows the team to get the latest changes in a consistent and reliable manner. It allows you to return your code to a prior state. It even acts as a safety net for when that day comes when your developer’s computer won’t turn on. So, what about your SQL Objects? Join me in this demo heavy session where we will explore the benefits of versioning your SQL Objects and learn how it can enable streamlined database development without sacrificing control and visibility. We’ll be using Red Gate’s SQL Source Control tool for demos, and we’ll see how it integrates with your existing version control software to manage your SQL Objects just like application code.
Speaker(s): Mickey Stuewe,
Abstract:
You'll learn about a best practice framework that alleviates many of the pain points for deploying, managing, and supporting multiple SQL Server deployments from development to production. There are many variables to consider when supporting SQL Servers in the real world, including: • Cloud systems (Microsoft Azure/Amazon AWS), virtualization (VMware/HyperV), physical servers • Different versions of SQL Servers, and different editions (Standard/Enterprise) • Service packs and specific Hotfixes • Configuration differences based on OS/Memory/Disk configuration • Different products need specific configurations and features of SQL Server • Post installation steps and default access The best practice framework will get us past the complexities and provide us with the following capabilities and benefits: • A Process framework configured to support the above requirements • Flexibility to easily add new configurations • A consistent experience
Speaker(s): Prakash Heda,
Abstract:
This 500 level session will focus on using undocumented statements and trace flags to get insight into how the query optimizer works and show you which operations it performs during query optimization. I will use these undocumented features to explain what the query optimizer does from the moment a query is submitted to SQL Server until an execution plan is generated including operations like parsing, binding, simplification, trivial plan, and full optimization. Concepts like transformation rules, the memo structure, how the query optimizer generates possible alternative execution plans, and how the best alternative is chosen based on those costs will be explained as well.
Speaker(s): Benjamin Nevarez,
Abstract:
If "Data is the Lifeblood of Modern Business," then most businesses are walking corpses with sludge in their veins, because 10% to 25% of all data records in the average enterprise are wrong. Until the dramatic problems of Data Quality Management are addressed, SQL can never fulfill its original promise to eliminate application "silos", enable systems to communicate and provide useful, actionable information to the modern business. I believe that we are on the cusp of a revolution in Data Quality that is even greater in scope and impact than the revolution in manufacturing quality that began over 40 years ago. Businesses that make the transition will survive and thrive. Those that don't will finally stop shambling about and lay down to die.What is this revolution in Data Quality? How can you be a part of it (and avoid the headman's ax)?!? This presentation will change the way you think about your jobs as Database Administrators and Application Developers.
Speaker(s): David Moutray,
Abstract:
Learn about Cisco Unified Computing System (UCS) and why it is an optimal platform for Microsoft SQL Server. During this session we’ll discuss key differentiators that place Cisco well ahead of the competition. Learn about UCS’ management model, Service Profiles, Virtual Interface Adapters, and how they help to simplify and standardize SQL Server deployments. We will also discuss how these differentiators drastically reduce deployment and recovery times, and how UCS provides the best of class hardware platform that can help to achieve the highest levels of consolidation and performance for both virtual and bare metal SQL Server implementations.
Speaker(s): Aaron Rigney,
Abstract:
The APPLY operator is available in T-SQL for quite some time now, but for many people it’s under the radar. People who do know it can’t stop using it, and this session will show you why. The session starts with a brief overview of the operator and its fundamental optimization aspects. Then the session demonstrates some of its more creative uses.
Speaker(s): Itzik Ben-Gan,
Abstract:
Turbo charge your SQL Server development with the amazing SQL# CLR library. We will do a quick overview of the SQL# library and then jump into examining a few real world implementations of some of the functions and procedures. Some examples will include string manipulation, file handling, as well as some RegEx usage. There are over 245 procedures and functions, user defined aggregates, and user defined types ... and counting. Come explore some of the interesting problems that SQL# can solve. If you'd like to download and view the CLR library ahead of the presentation, you can get most of the CLR features for free at www.sqlsharp.com.
Speaker(s): David Sumlin,
Abstract:
A session focused on ramping you up on what Hadoop is, how its works and what it's capable of. We will also look at what Hadoop 2.x and YARN brings to the table and some future projects in the Hadoop space to keep an eye on.
Speaker(s): Joe Rossi,
Abstract:
"All animals are created equal but some of the more equal than the other." - and so are algorithms. Data masking is used to secure privacy of data and brings data lifecycle processes into the compliance with HIPAA, FEPRA, GLBA , state and European regulations. Data masking uses a variety of algorithms. Each algorithm has a different strength and your understanding how secure the algorithms are protects your organization from not only from non-compliance risks, but also from reputational and monetary damages - and it saves your job.
Speaker(s): Virginia Mushkatbat,
Abstract:
With SQL 2012 comes a slew of enhancements on the Programmability side. This session will explore some of those new features such as Analytic Functions, Over Clause (Window Functions), Date Functions, Conversion Functions, Sequence Objects, Paging and FileTables to name just a few. If you want to get a jump on those features you will be seeing in SQL 2012 this is the session for you.
Speaker(s): Andrew Karcher,
Abstract:
This session is about tools in T-SQL that allow you to generate a sequence of values, often used as surrogate keys, but sometimes for other purposes. The session covers the identity column property and the limitations it imposes. It covers the sequence object which was added in SQL Server 2012. It compares and contrasts the sequence object with the identity property, including a performance comparison. If time permits, the session will also discuss generating sequences of integers with the ROW_NUMBER function, and describe some creative ways to use it.
Speaker(s): Itzik Ben-Gan,
Abstract:
The very nature of a database system is to be dynamic; rarely static. The applications that use databases tend to change, requiring changes to occur within our databases. The totality of pieces and parts that comprise this ‘change’ will be combined into a ‘Release’ that will be applied to your systems. Controlling this change is not rocket science, but it is not without its complexities. We will discuss various terms, define processes, share ideas, and suggest tools to assist you in performing this necessary function, while minimizing risk, and impacting your systems in a graceful fashion.
 Transaction related issues in real world. Look at inside of Transaction details. And check what's the best solution for each case. A little bit of minimal logging information. Best practices for compose Stored procedure to prevent all possible cases.
Speaker(s): Simon Cho,
Abstract:
Parameter sniffing is a good thing: it is used by the Query Optimizer to produce an execution plan tailored to the current parameters of a query. However, due to the way that the plan cache stores these plans in memory, sometimes can also be a performance problem. This session will show you how parameter sniffing works and in which cases could be a problem. How to diagnose and troubleshoot parameter sniffing problems and their solutions will be discussed as well. The session will also include details on how the Query Optimizer uses the histogram and density components of the statistics object and some other advanced topics.
Speaker(s): Benjamin Nevarez,
Abstract:
You have all probably heard about this "NoSQL" thing and wondered what is about, how does it differ from SQL Server and how will this affect me. You might want to just stick your head in the sand and ignore it, but as database professionals it is always good to know about what other technologies might be out there to compliment your existing solutions. We will not be going deep into any one solution, but by the end of this session, the goal will be that you understand the following: 1. The different types of NoSQL databases 2. Some use cases where they might be applicable 3. Some of the major solutions out there for each one
Speaker(s): Andrew Karcher,
Abstract:
This session will cover important information about how to set up Reporting Services. We'll go beyond the simple installation and configuration issues. Covered topics will include shared data sources, managing the folder structure, using linked reports, and the management user interfaces. We'll also cover the database that Reporting Services uses to house report definitions.
Speaker(s): Robert Hatton,
Abstract:
Come and learn about all the classic struggles between developers and DBAs
Speaker(s): David Moutray,
Abstract:
This session will provide an introduction to Master Data Management (MDM). We explore the basic concepts, types of MDM solution, and the basics for a successful MDM Implementation. With a working definition in hand, we'll discuss strategies for beginning a successful MDM pilot in your organization and look at some of the pitfalls to avoid. We'll wrap the business discussion up with some tips for selecting the right domains to solve and some tips for managing the politics of MDM. After we've set the stage for what, how and why you need MDM, we'll take a brief look at SQL Server MDS through the Excel add-in and talk about the Architecture of MDS
Speaker(s): John McAllister,
Abstract:
Experienced craftsmen can produce works of a much higher quality than a lay person could. They can usually accomplish this feat more quickly than lay folk can too. It's not necessarily because the craftsmen have better dexterity or strength than most people, it's because they understand an effective way to think about their craft. Join us for a conversation about SQL, why it's different from traditional procedural languages, and how to effectively use this truly elegant programming language. Rather than focus on the kinds of information easily located on the Web, we'll concentrate on how to use SQL for the tasks that it's really good at.
Speaker(s): Robert Hatton,
Abstract:
Each of our database systems has its complexities, its idiosyncrasies, its touchy points. Digging into each of these, understanding them, baselining them and monitoring them is an essential part of a DBA's job. Doing these simple tasks in such a way that allows you to sleep at night while your systems churn away safely and gracefully is an art that we all attempt to accomplish. We will discuss various ideas, tools, approaches, and solutions to how to monitor different pieces of our systems. Examples, code, tools, will all be shown off and shared so we can all do better.
Speaker(s): TJay Belt,
Abstract:
Come and hear about all the tips and tricks to become a better SQL Server Developer
Speaker(s): David Moutray,
Abstract:
We will discuss some of the most important things that you as a Data Professional can document to make your job much easier, ensure information consistency between groups, and better prepare your organizations for raising the bar on your day to day business. Think of this as a sort of Database Library that allows you to finally detail the processes you follow currently to perform repetitive tasks. This Library will also allow you to simply document your systems for your and others knowledge.
Speaker(s): TJay Belt,
Abstract:
This session will introduce column level encryption using t-sql. We will discuss the introduction of cryptographic services in SQL Server and how this enables native encryption as well as real life scenarios and uses of column level encryption.
Speaker(s): David Dye,
Abstract:
SQL Audit provides the ability to track and log activities and changes at the instance or database level built upon Extended Events SQL Audit provides both synchronous and asynchronous capabilities. The granularity of events that can be monitored and tracked with SQL Audit can only be matched by means of using a SQL Profiler trace, but provides reduced overhead. This presentation will provide insight into the internals of SQL Audit, along with how to plan, create, and monitor instance and database level audits.
Speaker(s): David Dye,
Abstract:
The Relational Data Model is the foundation of everything we do in SQL Server, and yet I often see basic violations of it. These violations hurt query performance, compromise data integrity and reduce the value of our business's data. In this presentation, I cover the most basic aspect of the Relational Data Model: First Normal Form. I will describe what it is, common violations of it and the programming problems these violations create.
Speaker(s): David Moutray,
Abstract:
Partitioning allows us to isolate parts of our table as small chunks called partitions. In turn, these partitions allow us to do some really cool tricks for manageability and performance. In this session we'll look at the concepts surrounding partitioning and how we can apply them. We'll reinforce what we cover with some cool demo's showing some really neat tricks.
Speaker(s): Brandon Leach,
Abstract:
SSIS is a tool that simplifies ETL and other workflow development., automates DB maintenance and can be used to automate lifecycle. It has a lot of faculties that allow to extend its functionality, from built-in expressions mechanisms to scripts to custom components building. However, it takes patience to explore these capabilities - and we want to help developers cut time necessary to learn the intricacies of the SSIS development.
Speaker(s): Virginia Mushkatbat,
Abstract:
Ever wonder what goes on under the hood of your SQL Servers? SQL Server is a complicated system. Understanding how your data is actually stored on disk can have a profound effect on the choices you make while designing and architecting a solution. In this session I'll show you how data is physically stored and how choices you make effect performance. We'll look at the structure of rows and data pages, index allocation maps, and the physical differences between heaps and clustered indexes.
Speaker(s): Brandon Leach,
Abstract:
NAND flash storage is becoming the storage of choice on which to run performance-demanding workloads. Moving to flash storage without architectural changes, however, may not result in reaching the desired goal. This session will give an overview of how our technology works, what to look for in the world of flash, and how to modernize your database architecture with this new technology.
Speaker(s): Chuck Armstrong,
Abstract:
Through this I will cover the things that you need to consider when you are implementing CI for DB including DB schema, SSIS and SSRS.
Speaker(s): Yong Ji,
Abstract:
SQL Server query tuning is often more art than science and it can quickly eat up a lot of DBA and/or Developer time. This presentation will show how Ignite(DPA) can help with tuning your queries and even break down the wait events to help determine how to fix the queries. One dashboard to monitor and tune: SQL, Oracle, Sybase and DB2 databases.
Speaker(s): Carlos Parra,
This is a list of speakers from the XML Guidebook records. The details and URLs were valid at the time of the event.
LinkedIn: http://www.linkedin.com/pub/prakash-heda/8/a60/b77
Contact: http://www.sqlfeatures.com/
Prakash Heda works as Manager (Data-IT) at SSC Advent. His expertise encompasses the work of automation, performance tuning/troubleshooting, high availability, san configuration and windows administration. Heda has 13+ years of experience managing enterprise-wide data needs in both high volume transactional and data warehouse environments. Heda holds certifications for MCDBA and MCITP. His background includes administration development using VB/ASP/SSIS with SQL server 2000 to 2017. He is an active member of PASS, SQLSaturday, and as well a frequent presenter at user groups, SQLSaturdays, and other community events. He is also an avid tweeter, blogger and runner.
LinkedIn: http://www.linkedin.com/in/simonsql
Contact: http://simonsql.com
Simon Cho is one of the founders of SQLAngeles.com, which is a Los Angeles Korean Tech PASS community group. As a Local Group leader, he is a Microsoft SQL community speaker. He has presented many times at SQLSaturdays and to PASS Local Groups. He moved his passion to VISA Inc, the largest credit card provider in the world, where he used database technology to build a strong solution and a secure environment, with new strategies and features to maintain thousands of SQL Servers. He has now joined the Nowcom Corp, as a Director of DevOps, where he leads the DevOps team and DBA team. He is pretty much working on SQL server running on kubernetes.
Contact: http://mask-me.net
Virginia Mushkatblat is currently a founder of Hush-Hush, a data masking company. She wrote her first computer program at the age of 14 and has been in technology ever since, progressively rising through the ranks and trying on different hats including database architecture, development, security and operations. She has worked for Startups and Fortune 100 companies in finance, entertainment, e-commerce, internet advertisement, manufacturing, and communications industries and dealt with both heavily transactional and BI applications.She holds B.S. and Masters Degrees in Engineering and in Computer Science, originated a couple of patents, and currently teaches databases and multimedia to graduating seniors in CSUN, her Alma Mater.
David is a Sergeant with the Cape Coral Police Department and currently works as a database administrator and developer in the Administrative Services Division. He began his career with the police department in 1990 in the patrol division and worked various assignments until being promoted to Sergeant in 1998. Based on his education and experience David was assigned to his current position in 2002 and is responsible for database administration, software integration, and development for public sa
Database Administrator with five years experience in database design, business intelligence, application development, performance tuning and day-to-day administration with SQL Server. Experience covers administration of both transactional and data-warehouse databases, application development and database design for business applications. Certifications include MCITP Database Administrator and Developer. Passionate about database security and promoting data integrity through rock-solid database design and good development practices.
LinkedIn: http://www.linkedin.com/in/tjaybelt/
Contact: http://tjaybelt.blogspot.com
TJay Belt is an outdoorsman at heart who enjoys riding dirtbikes, waterskiing, boating, playing racquetball and spending time with his family. When he can't be out playing, TJay loves to tinker with databases. TJay has been an IT professional for over a decade and a half. Currently serving as a Senior Database Administrator with Imagine Learning. TJay has progressed through several roles in his database career including developer, data guy, database developer, database analyst and DBA.
LinkedIn: https://www.linkedin.com/in/rob-hatton-3ab4b845
Contact: http://www.RobertJHatton.com
Rob Hatton is the author of the Business Intelligence Team Handbook. Rob is also a past president of the PASS Business Intelligence User Group here in Tampa. He is a veteran B.I. developer with more than 30 years of database experience and dozens of successful B.I. project deployments.
Contact: http://mask-me.net
Virginia Mushkatblat is currently a founder of Hush-Hush, a data masking company. She wrote her first computer program at the age of 14 and has been in technology ever since, progressively rising through the ranks and trying on different hats including database architecture, development, security and operations. She has worked for Startups and Fortune 100 companies in finance, entertainment, e-commerce, internet advertisement, manufacturing, and communications industries and dealt with both heavily transactional and BI applications.She holds B.S. and Masters Degrees in Engineering and in Computer Science, originated a couple of patents, and currently teaches databases and multimedia to graduating seniors in CSUN, her Alma Mater.
David is a Sergeant with the Cape Coral Police Department and currently works as a database administrator and developer in the Administrative Services Division. He began his career with the police department in 1990 in the patrol division and worked various assignments until being promoted to Sergeant in 1998. Based on his education and experience David was assigned to his current position in 2002 and is responsible for database administration, software integration, and development for public sa
Database Administrator with five years experience in database design, business intelligence, application development, performance tuning and day-to-day administration with SQL Server. Experience covers administration of both transactional and data-warehouse databases, application development and database design for business applications. Certifications include MCITP Database Administrator and Developer. Passionate about database security and promoting data integrity through rock-solid database design and good development practices.
LinkedIn: https://www.linkedin.com/in/sqlservernerd
A Microsoft Data Platform MVP, Brandon manages the DB Operations team for financial company x. With a data estate of several petabytes, he puts a high focus on performance tuning and automation. He is a frequent speaker at events like conferences and user groups.
LinkedIn: http://www.linkedin.com/in/tjaybelt/
Contact: http://tjaybelt.blogspot.com
TJay Belt is an outdoorsman at heart who enjoys riding dirtbikes, waterskiing, boating, playing racquetball and spending time with his family. When he can't be out playing, TJay loves to tinker with databases. TJay has been an IT professional for over a decade and a half. Currently serving as a Senior Database Administrator with Imagine Learning. TJay has progressed through several roles in his database career including developer, data guy, database developer, database analyst and DBA.
Database Administrator with five years experience in database design, business intelligence, application development, performance tuning and day-to-day administration with SQL Server. Experience covers administration of both transactional and data-warehouse databases, application development and database design for business applications. Certifications include MCITP Database Administrator and Developer. Passionate about database security and promoting data integrity through rock-solid database design and good development practices.
LinkedIn: http://www.linkedin.com/in/tjaybelt/
Contact: http://tjaybelt.blogspot.com
TJay Belt is an outdoorsman at heart who enjoys riding dirtbikes, waterskiing, boating, playing racquetball and spending time with his family. When he can't be out playing, TJay loves to tinker with databases. TJay has been an IT professional for over a decade and a half. Currently serving as a Senior Database Administrator with Imagine Learning. TJay has progressed through several roles in his database career including developer, data guy, database developer, database analyst and DBA.
Contact: http://www.convitali.com/BI
Rob Hatton is past President of the Tampa Bay SQL Server Business Intelligence User Group. He's a veteran B.I. developer with more than 30 years of database experience and dozens of successful B.I. project deployments. He's currently working with Kore One Technologies on a B.I. project for CHOC.
LinkedIn: http://www.linkedin.com/in/scarydba
Contact: http://scarydba.com
Grant Fritchey is a Data Platform MVP with over 20 years’ experience in IT, including time spent in support and development. He has worked with SQL Server since 6.0 back in 1995. He has also developed in VB, VB.NET, C#, and Java. Grant has written books for Apress and Simple-Talk. Grant presents at conferences and user groups, large and small, all over the world. He joined Redgate Software as a product evangelist in January 2011.
David is a Sergeant with the Cape Coral Police Department and currently works as a database administrator and developer in the Administrative Services Division. He began his career with the police department in 1990 in the patrol division and worked various assignments until being promoted to Sergeant in 1998. Based on his education and experience David was assigned to his current position in 2002 and is responsible for database administration, software integration, and development for public sa
LinkedIn: http://lnkd.in/bbSFidq
Contact: https://sqlperformance.com/author/itzikbengan
Itzik Ben-Gan is a mentor and Co-Founder of SolidQ. A Data Platform Microsoft MVP (Most Valuable Professional) since 1999, Itzik has delivered numerous training events around the world focused on T-SQL querying, query tuning, and programming. Itzik is the author of several books including T-SQL Fundamentals, T-SQL Querying, and T-SQL Window Functions. Itzik’s speaking activities include PASS Summit, SQLBits, and various user groups around the world. Itzik is the author of SolidQ’s Advanced T-SQL Querying, Programming and Tuning, and T-SQL Fundamentals courses, along with being a primary resource within the company for their T-SQL related activities.
Database Administrator with five years experience in database design, business intelligence, application development, performance tuning and day-to-day administration with SQL Server. Experience covers administration of both transactional and data-warehouse databases, application development and database design for business applications. Certifications include MCITP Database Administrator and Developer. Passionate about database security and promoting data integrity through rock-solid database design and good development practices.
LinkedIn: https://www.linkedin.com/in/sqlservernerd
A Microsoft Data Platform MVP, Brandon manages the DB Operations team for financial company x. With a data estate of several petabytes, he puts a high focus on performance tuning and automation. He is a frequent speaker at events like conferences and user groups.
Contact: http://www.andrewkarcher.com
Andrew is a Data Professional that is super passionate about the ability of data to drive change in our world, work, and personal lives. He has over 15 years of experience across multiple roles, companies and technologies. A passion for learning is core to how I approach life. Over 10+ years I have spoken at User Groups, Code Camps, SQLSaturdays and Conferences along with supporting my local community as a SQLSaturday Organizer, User Group leader, and advocate for community involvement for all technology professionals. I was also recognized by Microsoft as a four-time SQL Server MVP for my technical community contributions.
Contact: http://www.andrewkarcher.com
Andrew is a Data Professional that is super passionate about the ability of data to drive change in our world, work, and personal lives. He has over 15 years of experience across multiple roles, companies and technologies. A passion for learning is core to how I approach life. Over 10+ years I have spoken at User Groups, Code Camps, SQLSaturdays and Conferences along with supporting my local community as a SQLSaturday Organizer, User Group leader, and advocate for community involvement for all technology professionals. I was also recognized by Microsoft as a four-time SQL Server MVP for my technical community contributions.
LinkedIn: http://www.linkedin.com/in/mickeystuewe/
Contact: http://www.MickeyStuewe.com
Mickey Stuewe has been working with SQL Server since 6.5. That gives her over 20 years of experience. She has not only been a database developer, but also an application developer, even before Visual Studio existed. She is now thankful to be focusing on database design, t-SQL development, and query optimization. She also has a habit of enjoying SSIS and data warehouse design. She blogs regularly on her website mickeystuewe.com and contributes to sites such as SQL Server Central and SQL Server Pro. She enjoys presenting at PASS Summit, SQLSaturdays, User Groups and other events. When she is not immersed in SQL related activities, she enjoys action movies, art, reading, and laughing. She laughs loudly and often...just ask her children.
Contact: http://www.benjaminnevarez.com/
Benjamin Nevarez is a SQL Server MVP and independent consultant based in Los Angeles, California who specializes in SQL Server query tuning and optimization. He is the author of “SQL Server 2014 Query Tuning Optimization”, “Inside the SQL Server Query Optimizer” and has contributed to other SQL Server books including “SQL Server 2012 Internals”. Benjamin has also been a speaker at many SQL Server conferences, including the PASS Summit, SQL Server Connections and SQLBits.
Contact: http://www.profisee.com
John McAllister co-founded Stratature, an Independent MDM software vendor, in 2001. Following Microsoft’s acquisition of Stratature in 2007 John served as Group Program Manager for MDS and oversaw the incorporation of MDM into SQL Server. John now serves as the Regional Sales Director for Profisee, Inc. which provides enterprise-class MDM Solutions built on top of Microsoft’s MDS offering. John has worked with 100’s of organizations around the world in all phases of MDM projects.
LinkedIn: https://www.linkedin.com/in/ji-yong-72b44a4
Contact: https://speaksql.wordpress.com/
Yong Ji is a Certified Data Vault 2.0 Practitioner and Cloud big data specialist with expertise in Big data, DevOps, Data Engineering, BI, data modeling, automation, and process improvement. He was a speaker for several SQLSaturday and User group events. He contributed some open-source projects like digdag by developing a SQL Server plugin(digdag-plugin-mssql).
Contact: http://www.benjaminnevarez.com/
Benjamin Nevarez is a SQL Server MVP and independent consultant based in Los Angeles, California who specializes in SQL Server query tuning and optimization. He is the author of “SQL Server 2014 Query Tuning Optimization”, “Inside the SQL Server Query Optimizer” and has contributed to other SQL Server books including “SQL Server 2012 Internals”. Benjamin has also been a speaker at many SQL Server conferences, including the PASS Summit, SQL Server Connections and SQLBits.
Darrell has been designing and building custom database applications since 1992, for businesses of all sizes and across all industries. He has a keen sense for understanding complex business processes and translating that into automation solutions. He specializes in integrated MS Access and SQL Server systems.
Contact: http://bigdatajoe.io/
“Big Data Joe” is the Engineering Lead and Big Data Architect at Trace3's Big Data Intelligence Practice. Joe is certified in most Hadoop distributions as an administrator, engineer and developer. Joe is the technical Big Data evangelist for Trace3 and speaks at T3’s workshops, training sessions and events. He has 16 years of experience in the IT field as hands-on engineer with startups to Fortune 5 companies. He enjoys sharing his findings and helping others make sense of new technologies.
Contact: http://www.benjaminnevarez.com/
Benjamin Nevarez is a SQL Server MVP and independent consultant based in Los Angeles, California who specializes in SQL Server query tuning and optimization. He is the author of “SQL Server 2014 Query Tuning Optimization”, “Inside the SQL Server Query Optimizer” and has contributed to other SQL Server books including “SQL Server 2012 Internals”. Benjamin has also been a speaker at many SQL Server conferences, including the PASS Summit, SQL Server Connections and SQLBits.
Contact: http://www.solarwinds.com/
Carlos Parra has more than twenty years of DBA experience, including design, development, and implementation of many critical database applications. Before coming to Solarwinds - Confio Software, Carlos applied his skill set in roles which have included programmer, developer, analyst, and database administrator in the financial and healthcare industry.
LinkedIn: https://www.linkedin.com/pub/david-sumlin/3/2b0/49
David is currently a Senior Database Architect and Consultant within the Enterprise Data amp; Analytics group at Wells Fargo. He has been developing data driven applications and working with SQL Server and many other RDBMS for the last 15 years. He has implemented both small and large OLTP applications as well as large DSS data warehouses.
Aaron Rigney is a Consulting Systems Engineer for Cisco focusing on datacenter technologies including UCS, Nexus, and Invicta solutions.
Storage Solution Architect for 15 years; designing storage solutions for database and virtualization environments. Chuck’s focus for the past three years has been on performance of storage, primarily in database environments, using several aspects of flash; including all-flash arrays.
LinkedIn: http://lnkd.in/bbSFidq
Contact: https://sqlperformance.com/author/itzikbengan
Itzik Ben-Gan is a mentor and Co-Founder of SolidQ. A Data Platform Microsoft MVP (Most Valuable Professional) since 1999, Itzik has delivered numerous training events around the world focused on T-SQL querying, query tuning, and programming. Itzik is the author of several books including T-SQL Fundamentals, T-SQL Querying, and T-SQL Window Functions. Itzik’s speaking activities include PASS Summit, SQLBits, and various user groups around the world. Itzik is the author of SolidQ’s Advanced T-SQL Querying, Programming and Tuning, and T-SQL Fundamentals courses, along with being a primary resource within the company for their T-SQL related activities.
The following is a list of sponsors that helped fund the event.


When this page loads a message appears after 5 seconds.
To go to the second page Click Here
Rate us here!Click here


{% extends "home/index.html" %} {% load static %} {% block start %}
The reference library was founded in 2001 with the establishment of I.E.R.T. to provide a complete information. It has been catering to the need of students of undergraduates, faculty members, and staff members of the departments of the institute. The Library is well equipped as per AKTU norms and contains all modern resources. It has a collection of numerous books and documents. In addition, it has relevant technical magazines for offering many benefits to the students and faculties as well.


Total Services
#
Service Types
Service Type Distribution
Service Type (Top 5)
|
Top 5 |
Service Percentage |
|---|---|
|
|
Service Sectors
Service Sector Distribution
Service Sector (Top 5)
|
Top 5 |
Service Percentage |
|---|---|
|
|


!-- This document is appended to an active server page before it is sent back to the client. Search for lblASPmess.txt-->
✧Analyze any Sudoku puzzle.
✧Pick a puzzle for me or Create my own scenario.
✧Version 12.0 Updates Feb 2015
✧This app contains only a sophisticated Sudoku Solving engine.
✧Advanced Techniques implemented in order of difficulty are: X-Wing, Swordfish, Co-joined Chains, Coloring, Gordonian Rectangle, One-Sided Gordonian Rectangle, Gordonian Polygon Plus and Nishio. A brute force algorithm is used to ensure a solution does exist and to check for multiple solutions. Peter Gordon's book 'Mensa Guide to Solving Sudoku'


Kenya correspondent Bill Hatworn was one of the very greatest letter-writers of the twentieth century. Although most of his correspondence has already been gathered in the forthcoming Collected Letters Of Bill Hatworn, new items continue to come to light, including this unsigned and undated example, sent to an unknown recipient:
Meet me at the fireworks factory. I'll be wearing red. You in your shoes, and me at the end of my tether. Speak to me—fourteen words. You can make them up. I will listen, but I won't swim in your muddy waters. Truth, or grit, or something foreign to my senses—you had better see me right re: my expenses. I paid through the nose and it hurt me much, but where I goes is such and such.


Toggle navigation
Cookster Admin
Āµ
Dashboard
Recipes
New Recipe
Categories
Levels
Products
Measurements
Users
Authors
Home
Dashboard


This plugin adds a SASL mechanism to Openfire that allows users to authenticate with a Tiki-generated access token.
Copy the plugin JAR file into the plugins directory of your Openfire installation. The plugin will then be automatically deployed.
To upgrade to a new version, copy the new plugin JAR file into the plugins directory of your Openfire installation, overwriting the JAR file from the previous version. Within a minute or so, Openfire will detect the new plugin, unload the previous version and load the new version. You can verify that the new version has been loaded by observing the plugin version number in the Openfire Admin Console.
The base URL of the Tiki suite against which authentication is performed needs to be defined in a property named org.tiki.tikitoken.baseUrl


Neuroplasticity is based around the belief that the brain can be moulded over time and indeed even new skills be learnt.
Previously it was believed that individuals were unable to learn new skills and grow parts of their brain and that a skill was something a person was ‘born with’. However, studies in this filed has shown that this is not the case and that with effort and training an individual can develop parts of their brain and learn new skills.
As one can imagine this comes with a number of benefits such as:
It is refreshing to hear that all is not lost when it comes to turning ones hand to learning a new skill. Given that I am in the middle of trying to change careers into a pathway I have never been down before it is good to know that the parts of my brain that will help with this can be worked on and developed.
From research there are a number of activities one can engage in to enhance neuroplasticity (which I will discuss later) which are all attainable and not anything out of the ordinary and I can incorporate into my day.
There are a number of different ways you can increase your neuroplasticity - these are a few that i thought were relevant to me and my situation:
I also found this to be a great succinct resource on the topic
Growth mindset believes that everyones basic qualities are things that can be cultivated, that our talents and aptitudes, interests and temperaments can change and grow through our experiences and application.
This is important when it comes to learning or changing a career path (as I am doing here) as it means that I am not pre-determined to a specific route and that new disciplines, such as coding asn web development, are beyond my reach.
Through out the course of this research it has become apparent that there are a number of ways I can introduce the growth mindset into my learning journey to help enhance it. In no particular order these are:
I believe by keeping the above mentioned points foremost in the mind will help push me along this learning journey and achieve my goals.
For further reading I found this article to be particularly useful.


Post by: mayank gupta, Ranch Hand
on Feb 10, 2010 03:30:17
Hi,
I am running some code and I get this exception:
I/O Socket is closed
java.net.SocketException: Socket is closed
at java.net.Socket.getOutputStream(Socket.java:808)
at iitm.donlab.mpp.transport.IsoClient.sendMessage(IsoClient.java:282)
at iitm.donlab.mpp.manager.IsoMsgHandler.performActionPush(IsoMsgHandler.java:568)
at iitm.donlab.mpp.transport.IsoClient$ProcessorClient.run(IsoClient.java:175)
at java.lang.Thread.run(Thread.java:619)
The snippet of code is as follows:
I get sock.isConnected() as true and sock.inInputShutdown() and sock.isOutputShutdown() both as false. sick.isBound() is also true.
Could you please tell me the reasons I could get the error at this line "isoMsg.write(sock.getOutputStream(), 2);" even when the socket is connected and the streams are not shut down.
Post by: Rob Spoor, Sheriff
on Feb 10, 2010 09:35:57
isInputShutdown() will always return false until shutdownInput() has been called. This does not occur when the socket is closed, as far as I could see. Likewise for isOutputShutdown().
isBound() and isConnected() return whether or not sometime in the past the socket was bound / connected. Once they have returned true they will never again return false. In that manner the names should have been hasBeenBound() and hasBeenConnected().
What does isClosed() return?
Post by: mayank gupta, Ranch Hand
on Feb 10, 2010 10:56:20
I have been able to solve the problem.
I was closing the socket in a finally block which i had overlooked earlier.
Thank you for the information on the methods.
All times above are in ranch (not your local) time.
The current ranch time is Dec 13, 2013 17:03:48.


Artistic Style can be compiled as a shared library (DLL) or a static library and linked with a C or C++ program.
To compile AStyle for use with a C or C++ program the compile option ASTYLE_LIB must be defined. Then AStyle will accept the files and options as parameters from a function call. It is the responsibility of the calling program to read the source files and accept the options from the user via a graphical interface or other method. These are then passed via the function call. After the source files are formatted they will be returned to the calling program, which must then save the source file and take other appropriate action.
Visual Studio users can also use the option ASTYLE_NO_VCX (no Visual C exports) to remove the __declspec(dllexport) definition from Visual C. Use this only for static libraries or when the AStyle source is included in the compile. Do NOT use this when compiled as a shared (dynamic) library. It is effective only for Visual Studio 2012 and higher. It will NOT work with previous versions. It has no effect with other compilers since they require a separate option to create the import library and export files.
The source can also be included in a program or another shared library (DLL) instead of being compiled by itself. It should be compiled with the options ASTYLE_LIB (and ASTYLE_NO_VCX for Visual C) to get the function call instead of the console build. Then include it with the other source modules and call it using the AStyleMain function.
This function is called to format the source code.
extern "C" char* STDCALL AStyleMain(const char* pSourceIn, const char* pOptions, void (STDCALL* fpError)(int, char*), char* (STDCALL* fpAlloc)(unsigned long));
pSourceIn
A pointer to the source file to be formatted.
pOptions
A pointer to the formatting options. They should be in the same format as in the default options file. The options
may be set apart by new-lines, commas, tabs or spaces. The long options do not need the "--" prefix. Comments
may be used but they must be terminated by a new-line "\n" character.
If the file to be formatted is a Java or C# file, the file mode option must be included (e.g. mode=java or mode=cs).
fpError
A pointer to the error handling function. If there are errors in the parameters pSourceIn
or pOptions, this function is called. It should display an error message and then either abort or continue the
program depending on the error. The first parameter is a number identifying the error. The second parameter is
a pointer to a standard error message.
Error messages numbered 100-199 are errors that prevent the file from being formatted. A NULL pointer is returned to the calling program. Error messages numbered 200-299 are errors that do NOT prevent the file from being formatted. A valid pointer and a formatted file are returned. This will occur if an invalid option is sent to AStyleMain. The calling program has the option of accepting or rejecting the formatted file.
fpAlloc
A pointer to the memory allocation function. The calling program must allocate memory for
the output source file. This function will be called when the memory is needed. The parameter is the amount of
memory that should be allocated.
Memory should be allocated using the operator "new (nothrow)". With this method, if there is an allocation exception, Artistic Style will generate an error message and return a NULL pointer from the AStyleMain function. The calling program can handle the exception at this point rather than in the memory allocation function. See the following example program for the procedure.
A "new" without "(nothrow)" can be used if you want but do not abort the program in the memory allocation function. An error message may be printed but return a NULL pointer to AStyle and handle the error when AStyle returns from formatting the text.
The calling program is responsible for freeing the allocated mem
The calling program is responsible for freeing the allocated memory when it is no longer needed.
If the function succeeds, the return value is a pointer to the formatted source code.
If the function fails, the return value is NULL. Before the NULL is returned an error message will be sent to the error handling function.
This function typically fails for one of the following reasons:
The STDCALL macro is defined for Windows as __stdcall. It is needed if AStyle is compiled as a Windows shared library (DLL). For Linux it is defined but does not have a value.
The calling program is responsible for freeing the memory allocated by fpAlloc when it is no longer needed.
This function is called to get the Artistic Style version number.
extern "C" char* STDCALL AStyleGetVersion();
A pointer to the Artistic Style version number.
The STDCALL macro is defined for Windows as __stdcall. It is needed if AStyle is compiled as a Windows shared library (DLL). For Linux it is defined but does not have a value.
The following example formats source files by calling the Artistic Style formatter. It is a console application but the procedure for a GUI is the same. The example can be copied and pasted into a source file. Or it can be downloaded with test data from the "Developer Information" page. The source code for Artistic Style must be added as a shared library (DLL), a static library, or included with the example source.
// Example.cpp /* This program calls the Artistic Style formatter (AStyleMain) * to format the astyle source files in a test-data directory. */ #include <stdlib.h> #include <string> #include <fstream> #include <iostream> #if defined(__GNUC__) #include <string.h> // need both string and string.h for GCC #endif using namespace std; // allow for different calling conventions in Linux and Windows #ifdef _WIN32 #define STDCALL __stdcall #else #define STDCALL #endif // functions to call AStyleMain extern "C" const char* STDCALL AStyleGetVersion(void); extern "C" char* STDCALL AStyleMain(const char* sourceIn, const char* optionsIn, void (STDCALL* fpError)(int, const char*), char* (STDCALL* fpAlloc)(unsigned long)); void STDCALL ASErrorHandler(int errorNumber, const char* errorMessage); char* STDCALL ASMemoryAlloc(unsigned long memoryNeeded); // other functions void error(const string message); string getProjectDirectory(const string& subPath); char* getText(const string& filePath); void setText(const char* textOut, const string& filePathStr); // Main function for this example. int main(int, char**) { // options to pass to AStyle const string fileName[] = { "AStyleDev/test-data/ASBeautifier.cpp", "AStyleDev/test-data/ASFormatter.cpp", "AStyleDev/test-data/astyle.h" }; const char* options = "-A2tOP"; size_t arraySize = sizeof(fileName) / sizeof(fileName[0]); // get Artistic Style version const char* version = AStyleGetVersion(); cout << "Example C++ - AStyle " << version << endl; // process the input files for (size_t i = 0; i < arraySize; i++) { // get the text to format string filePath = getProjectDirectory(fileName[i]); char* textIn = getText(filePath); // call the Artistic Style formatting function char* textOut = AStyleMain(textIn, options, ASErrorHandler, ASMemoryAlloc); // does not need to terminate on an error // an error message has been displayed by the error handler if (textOut == NULL) error(string("Cannot format " + filePath)); // return the formatted text cout << "Formatted " << fileName[i] << endl; setText(textOut, filePath); // must delete the temporary buffers delete [] textIn; delete [] textOut; } // system("pause"); return EXIT_SUCCESS; } // Error handler for the Artistic Style formatter. void STDCALL ASErrorHandler(int errorNumber, const char* errorMessage) { cout << "astyle error " << errorNumber << "\n" << errorMessage << endl; } // Allocate memory for the Artistic Style formatter. char* STDCALL ASMemoryAlloc(unsigned long memoryNeeded) { // error condition is checked after return from AStyleMain char* buffer = new(nothrow) char [memoryNeeded]; return buffer; } // Error message function for this example. void error(string message) { cout << message << endl; cout << "The program has terminated!" << endl; exit(EXIT_FAILURE); } // Prepend the project directory to the subpath. // This may need to be changed for your directory structure. string getProjectDirectory(const string& subPath) { #ifdef _WIN32 char* homeDirectory = getenv("USERPROFILE"); #else char* homeDirectory = getenv("HOME"); #endif if (!homeDirectory) error("Cannot find HOME directory"); string projectPath = string(homeDirectory) + "/Projects/" + subPath; return projectPath; } // Get the text to be formatted. // Usually the text would be obtained from an edit control. char* getText(const string& filePath) { // open input file ifstream in(filePath.c_str()); if (!in) error("Cannot open input file " + filePath); // get length of buffer const int bufferSizeIn = 131072; // 128 KB // allocate memory char* bufferIn = new(nothrow) char [bufferSizeIn]; if (bufferIn == NULL) { in.close(); error("Memory allocation failure on input"); } // read data as a block in.read(bufferIn, bufferSizeIn); // get actual size - must be smaller than buffer size int textSizeIn = static_cast<int>(in.gcount()); if (textSizeIn > bufferSizeIn) { in.close(); error("Read buffer is too small"); } bufferIn[textSizeIn] = '\0'; in.close(); return bufferIn; } // Return the formatted text. // Usually the text would be returned to an edit control. void setText(const char* textOut, const string& filePathStr) { // create a backup file const char* filePath = filePathStr.c_str(); string origfilePathStr = filePathStr + ".orig"; const char* origfilePath = origfilePathStr.c_str(); remove(origfilePath); // remove a pre-existing file if (rename(filePath, origfilePath) < 0) error("Cannot open input file " + filePathStr); // open the output file ofstream out(filePath); if (!out) error("Cannot open output file " + filePathStr); // write the text size_t textSizeOut = strlen(textOut); out.write(textOut, static_cast<streamsize>(textSizeOut)); out.close(); }


Creation of Sanitation Ministry defeats purpose of decentralisation - ILGS Director
The Director for the Institute of Local Government Studies is questioning the rationale behind the Akufo-Addo government’s creation of the Sanitation Ministry.
Dr Nicholas Awortwi insists the creation of the Ministry defeats the purpose of decentralisation.
According to him, the creation of the Ministry only shows how far the central government is willing to go to keep powers at the top hierarchy.
Speaking at a news conference in Accra Monday, he said, “We currently have a broken local government system that has failed to deliver basic services like sanitation.
“The fact that we have a Ministry of Sanitation is an indictment of the basis of decentralisation in the local government.”
Water and sanitation services for the first time, got the attention from central government after it took step to prioritise the sector with the creation of the Water and Sanitation Ministry.
Presenting the second batch of 12-ministerial appointees after being sworn into office in January 2017, President Nana Akufo-Addo announced the new Ministry for Sanitation and Water Resources among others.
He also named Joseph Kofi Adda, an MP for Navrongo as the Minister.
According to the president, the decision to respectively split water and sanitation from the Ministry of Water Resources Works and Housing and the Ministry of Local Government and Rural Development stemmed from the neglect of the sub-sectors.
This, the ILGS Director disagrees.
According to him, it tells of “the interest of central government politicians to keep power still at the top and to keep the resources still at the top.”
“So if we have 260 local governments that cannot deliver sanitation and the whole Ministry is created, it tells you the interest of central government politicians and bureaucrats, and if the system is not working it has to be repaired or it has to be fixed; if the system is broken then currently, the local government system is broken,” he stated.


AWS::AmazonMQ::Broker
A broker is a message broker environment running on Amazon MQ. It is the basic building block of Amazon MQ.
The AWS::AmazonMQ::Broker
resource lets you create Amazon MQ brokers, add
configuration changes or modify users for the specified broker, return information
about the
specified broker, and delete the specified broker. For more information, see Amazon MQ Basic Elements in the
Amazon MQ Developer Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AmazonMQ::Broker", "Properties" : { "AutoMinorVersionUpgrade" :
Boolean
, "BrokerName" :String
, "Users" : [ User, ... ], "Configuration" : ConfigurationId, "DeploymentMode" :String
, "EngineType" :String
, "EngineVersion" :String
, "HostInstanceType" :String
, "Logs" : LogsConfiguration, "MaintenanceWindowStartTime" : MaintenanceWindow, "PubliclyAccessible" :Boolean
, "SecurityGroups" : [String
, ... ], "SubnetIds" : [String
, ... ], "Tags" : [Resource Tag, ...
] } }
YAML
Type: "AWS::AmazonMQ::Broker" Properties: AutoMinorVersionUpgrade:
Boolean
BrokerName:String
Users: - User Configuration: ConfigurationId DeploymentMode:String
EngineType:String
EngineVersion:String
HostInstanceType:String
Logs: LogsConfiguration MaintenanceWindowStartTime: MaintenanceWindow PubliclyAccessible:Boolean
SecurityGroups: -String
SubnetIds: -String
Tags: -Resource Tag
Properties
AutoMinorVersionUpgrade
-
Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.
Required: Yes
Type: Boolean
Update requires: No interruption
BrokerName
-
The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.
Required: Yes
Type: String
Update requires: Replacement
Users
-
The list of all ActiveMQ usernames for the specified broker.
Required: Yes
Type: List of User property types
Update requires: Some interruptions
Configuration
-
The broker configuration. If no configuration exists for a broker, Amazon MQ creates a default configuration.
Note
You can use AWS CloudFormation to modify—but not delete—an Amazon MQ configuration.
Required: No
Type: ConfigurationId
Update requires: Some interruptions
DeploymentMode
-
The deployment mode of the broker.
SINGLE_INSTANCE
creates a single-instance broker in a single Availability Zone.ACTIVE_STANDBY_MULTI_AZ
creates an active/standby broker for high availability.Required: Yes
Type: String
Update requires: Replacement
EngineType
-
The type of broker engine.
Note
Currently, Amazon MQ supports only
ACTIVEMQ
.Required: Yes
Type: String
Update requires: Replacement
EngineVersion
-
The version of the broker engine.
Note
For a list of supported engine versions, see: Broker Engine.
Required: Yes
Type: String
Update requires: Some interruptions
HostInstanceType
-
The broker's instance type. For more information, see Instance Types in the Amazon MQ Developer Guide.
Required: Yes
Type: String
Update requires: Replacement
Logs
-
The Amazon CloudWatch Logs configuration for the broker.
Required: No
Type: LogsConfiguration
Update requires: Some interruptions
MaintenanceWindowStartTime
-
The parameters that determine the
WeeklyStartTime
.Required: No
Type: MaintenanceWindow
Update requires: Replacement
PubliclyAccessible
-
Enables connections from applications outside of the VPC that hosts the broker's subnets.
Required: Yes
Type: Boolean
Update requires: Replacement
SecurityGroups
-
The list of rules (1 minimum, 125 maximum) that authorize connections to brokers.
Required: No
Type: List of String values
Update requires: Replacement
SubnetIds
-
The list of groups (2 maximum) that define which subnets and IP ranges the broker can use from different Availability Zones. A
SINGLE_INSTANCE
deployment requires one subnet (for example, the default subnet). AnACTIVE_STANDBY_MULTI_AZ
deployment requires two subnets.Required: No
Type: List of String values
Update requires: Replacement
Tags
-
An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.
Required: No
Type: List of Resource Tag
Update requires: No interruption
Return Values
Ref
When you pass the logical ID of an AWS::AmazonMQ::Broker
resource to
the intrinsic Ref
function, the function returns the Amazon MQ broker ID. For
example:
b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Fn::GetAtt
returns a value for a specified attribute of this type. The following are the available
attributes and sample return values.
Arn
-
The Amazon Resource Name (ARN) of the Amazon MQ broker.
arn:aws:mq:us-east-2:123456789012:broker:MyBroker:b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
ConfigurationId
-
The unique ID that Amazon MQ generates for the configuration.
c-1234a5b6-78cd-901e-2fgh-3i45j6k178l9
ConfigurationRevision
-
The revision number of the configuration.
1
IpAddresses
-
The IP addresses of each broker instance as a list of strings.
['<IP_ADDRESS>', '<IP_ADDRESS>']
MqttEndpoints
-
The MQTT endpoints of each broker instance as a list of strings.
mqtt+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:8883
OpenWireEndpoints
-
The OpenWire endpoints of each broker instance as a list of strings.
ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61617
AmqpEndpoints
-
The AMQP endpoints of each broker instance as a list of strings.
amqp+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:5671
StompEndpoints
-
The STOMP endpoints of each broker instance as a list of strings.
stomp+ssl://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61614
WssEndpoints
-
The WSS endpoints of each broker instance as a list of strings.
wss://b-4aada85d-a80c-4be0-9d30-e344a01b921e-1.mq.eu-central-amazonaws.com:61619
For more information about using Fn::GetAtt
, see Fn::GetAtt
.
Examples
Basic Amazon MQ Broker
The following example creates a basic Amazon MQ broker with one user that belongs to a group.
Note
We don't recommend including plaintext passwords in AWS CloudFormation templates.
To securely retrieve your user credentials, add a Ref
to your template.
For example, you can create a Lambda function and use it to retrieve encrypted credentials
stored in a DynamoDB table.
For more information, see Using AWS Lambda with Amazon DynamoDB
in the AWS Lambda Developer Guide.
JSON
{ "Description": "Create a basic AmazonMQ broker", "Resources": { "BasicBroker": { "Type": "AWS::AmazonMQ::Broker", "Properties": { "AutoMinorVersionUpgrade": "false", "BrokerName": "MyBasicBroker", "DeploymentMode": "SINGLE_INSTANCE", "EngineType": "ActiveMQ", "EngineVersion": "5.15.0", "HostInstanceType": "mq.t2.micro", "PubliclyAccessible": "true", "Users": [ { "ConsoleAccess": "true", "Groups": [ "MyGroup" ], "Password" : { "Ref" : "AmazonMqPassword" }, "Username" : { "Ref" : "AmazonMqUsername" } } ] } } } }
YAML
--- Description: "Create a basic AmazonMQ broker" Resources: BasicBroker: Type: "AWS::AmazonMQ::Broker" Properties: AutoMinorVersionUpgrade: "false" BrokerName: MyBasicBroker DeploymentMode: SINGLE_INSTANCE EngineType: ActiveMQ EngineVersion: "5.15.0" HostInstanceType: mq.t2.micro PubliclyAccessible: "true" Users: - ConsoleAccess: "true" Groups: - MyGroup Password: Ref: "BrokerPassword" Username: Ref: "BrokerUsername"
Complex Amazon MQ Broker
The following example creates a complex Amazon MQ broker with two users that don't belong to a group and one user that belongs in a group.
Note
We don't recommend including plaintext passwords in AWS CloudFormation templates.
To securely retrieve your user credentials, add a Ref
to your template.
For example, you can create a Lambda function and use it to retrieve encrypted credentials
stored in a DynamoDB table.
For more information, see Using AWS Lambda with Amazon DynamoDB
in the AWS Lambda Developer Guide.
JSON
{ "Description": "Create a complex AmazonMQ broker", "Resources": { "ComplexBroker": { "Type": "AWS::AmazonMQ::Broker", "Properties": { "AutoMinorVersionUpgrade": "false", "BrokerName": "MyComplexBroker", "Configuration": { "Id": { "Ref": "Configuration1" }, "Revision" : { "Fn::GetAtt": ["Configuration1", "Revision"] } }, "DeploymentMode": "SINGLE_INSTANCE", "EngineType": "ActiveMQ", "EngineVersion": "5.15.0", "HostInstanceType": "mq.t2.micro", "Logs": { "General": true, "Audit": false }, "MaintenanceWindowStartTime": { "DayOfWeek": "Monday", "TimeOfDay": "22:45", "TimeZone": "America/Los_Angeles" }, "PubliclyAccessible": "true", "SecurityGroups": [ "sg-a1b234cd", "sg-e5f678gh" ], "SubnetIds": [ "subnet-12a3b45c", "subnet-67d8e90f" ], "Users": [{ "ConsoleAccess": "true", "Password" : { "Ref" : "AmazonMqPassword1" }, "Username" : { "Ref" : "AmazonMqUsername1" } }, { "Password" : { "Ref" : "AmazonMqPassword2" }, "Username" : { "Ref" : "AmazonMqUsername2" } }, { "Groups": [ "MyGroup1", "MyGroup2" ], "Password" : { "Ref" : "AmazonMqPassword3" }, "Username" : { "Ref" : "AmazonMqUsername3" } }] } } } }
YAML
--- Description: "Create a complex AmazonMQ broker" Resources: ComplexBroker: Type: "AWS::AmazonMQ::Broker" Properties: AutoMinorVersionUpgrade: "false" BrokerName: MyComplexBroker Configuration: Id: !GetAtt Configuration1.Id Revision: !GetAtt Configuration1.Revision DeploymentMode: SINGLE_INSTANCE EngineType: ActiveMQ EngineVersion: "5.15.0" HostInstanceType: mq.t2.micro Logs: General: "true" Audit: "false" MaintenanceWindowStartTime: DayOfWeek: Monday TimeOfDay: "22:45" TimeZone: America/Los_Angeles PubliclyAccessible: "true" SecurityGroups: - "sg-a1b234cd" - "sg-e5f678gh" SubnetIds: - "subnet-12a3b45c" - "subnet-67d8e90f" Users: - ConsoleAccess: "true" Password: Ref: "BrokerPassword1" Username: Ref: "BrokerUsername1" - Password: Ref: "BrokerPassword2" Username: Ref: "BrokerUsername2" - Groups: - MyGroup1 - MyGroup2 Password: Ref: "BrokerPassword3" Username: Ref: "BrokerUsername3"


All Classes
Bag
BagTest
Board
BoardTest
Client
ClientPlayer
ClientProtocol
ComputerPlayer
ConnectionHandler
Field
Game
GUI
GUIGame
GUIGameList
GUILogInScreen
GUIServerBrowser
IllegalNameException
Move
MoveException
NetworkPlayer
Player
Protocol
RandomStrategy
Server
ServerProtocol
SimpleStrategy
Strategy
Tile
TileTest
TUI
Utils
View


{% extends 'layout.html' %} {% block pageTitle %} Social Media Sharing Buttons {% endblock %} {% block beforeContent %} {{ breadcrumb({ href: "/docs", text: "Home" }) }} {% endblock %} {% block content %}
PTC 190 - Once a user has completed the sign-up journey they can easily share the link to the service through their social media channels.


|
libpampa
A library with some algorithms I implemented during my CS course @ unipampa.
|
Go to the source code of this file.
Classes | |
| struct | node_s |
| Double linked list node. More... | |
Typedefs | |
| typedef struct node_s | node_t |
| Double linked list node. More... | |
Functions | |
| void | node_free (node_t *node) |
| Free node allocated memory. More... | |
| bool | node_alloc (node_t **node) |
| Allocate memory for the node. More... | |
| bool | node_copy (node_t *source, node_t **destination) |
| Copy one node to another. More... | |
| node_t * | list_get_tail (node_t *head) |
| Get tail from list. More... | |
| void | list_append (node_t *head, node_t *node) |
| Append node to list. More... | |
| node_t * | list_find_data (node_t *head, const data_t *data) |
| Find if given data is on this list. More... | |
| bool | list_push (node_t *src_node, node_t *dest_tail) |
| Create new tail on destination from source node. More... | |
| node_t * | list_single_copy (node_t *src_head, node_t *cmp_head, node_t *dest_head, node_t *dest_tail) |
| Make a copy of each element of source list into destination list without repeating the elements of comparison list. More... | |
| node_t * | list_repeat_copy (node_t *src_head, node_t *cmp_head, node_t *dest_head, node_t *dest_tail) |
| Make a copy of each element of source list into destination list, but only if the element is also on comparison list. More... | |
| void | list_union (node_t *first_head, node_t *second_head, node_t **out_head) |
| Make union between two lists. More... | |
| void | list_intersection (node_t *first_head, node_t *second_head, node_t **out_head) |
| Make intersection between two lists. More... | |
| void | list_difference (node_t *first_head, node_t *second_head, node_t **out_head) |
| Make symmetric difference between two lists. More... | |
| bool | list_subset (node_t *first_head, node_t *second_head) |
| Verify if second list is subset of first list. More... | |
| void | list_free (node_t *head) |
| Free all nodes on list. More... | |
Append node to list.
| head | first node on list |
| node | node to be appended |
Make symmetric difference between two lists.
| first_head | first list head |
| second_head | second list head |
| out_head | reference to pointer where resulting list head will be stored |
Find if given data is on this list.
| head | first node on list |
| data | data to be searched for |
| void list_free | ( | node_t * | head | ) |
Free all nodes on list.
| head | first node on list |
Get tail from list.
| head | fisrt node on the list |
Make intersection between two lists.
| first_head | first list head |
| second_head | second list head |
| out_head | reference to pointer where resulting list head will be stored |
Create new tail on destination from source node.
| src_node | node to be copied |
| dest_tail | destination list tail |
| node_t* list_repeat_copy | ( | node_t * | src_head, |
| node_t * | cmp_head, | ||
| node_t * | dest_head, | ||
| node_t * | dest_tail | ||
| ) |
Make a copy of each element of source list into destination list, but only if the element is also on comparison list.
| src_head | first node on source list |
| cmp_head | comparison list head |
| dest_head | destination list head |
| dest_tail | destination list tail |
| node_t* list_single_copy | ( | node_t * | src_head, |
| node_t * | cmp_head, | ||
| node_t * | dest_head, | ||
| node_t * | dest_tail | ||
| ) |
Make a copy of each element of source list into destination list without repeating the elements of comparison list.
| src_head | first node on source list |
| cmp_head | comparison list head |
| dest_head | destination list head |
| dest_tail | destination list tail |
Verify if second list is subset of first list.
| first_head | first list head |
| second_head | second list head |
Make union between two lists.
| first_head | first list head |
| second_head | second list head |
| out_head | reference to pointer where resulting list head will be stored |
| bool node_alloc | ( | node_t ** | node | ) |
Allocate memory for the node.
| node | reference to pointer that will receive the node address |
Copy one node to another.
| source | node to be copied |
| destination | where the node copy will be placed |
| void node_free | ( | node_t * | node | ) |
Free node allocated memory.
| node | reference to node |


Summary
Vital Signs
Settings
Patient
last name:
first name:
date of birth:
age:
assigned sex:
code status
dnr
full
limited
Intubation
Defibrillation
Chest Compressions
New

id:


In this article, we will see a SaaS (multi-tenant) application developed using the following frameworks:
You can see live demo before reading the article.
ASP.NET Boilerplate provides templates to make a project startup easier. We create the startup template from https://aspnetboilerplate.com/Templates:
I selected ASP.NET MVC 5.x, AngularJS and Entity Frameowork including "Options". It creates a ready and working solution for us including a login page, navigation and a bootstrap based layout. After downloading and opening the solution with Visual Studio 2017+, we see a layered solution structure including a unit test project:
First, we select EventCloud.Web as startup project. Solution comes with Entity Framework Code-First Migrations. So, (after restoring nuget packages) we open the Package Manager Console (PMC) and run Update-Database command to create the database:
Package Manager Console's Default project should be EventCloud.EntityFramework (since it contains the migrations). This command creates EventCloud database in local SQL Server (you can change connection string from web.config file).
Now, we can run the application. We see the pre-built login page. We can enter default as tenancy name, admin as user and 123qwe as password to login:
After login, we see the following pages: Events and About pages
This is a localized UI with a dynamic menu. Angular layout, routing and basic infrastructure are working properly. I take this project as a base for the event cloud project.
In this article, I will show the key parts of the project and explain it. So, please download the sample project, open in Visual Studio 2017+ and run migrations just like above before reading rest of the article (Be sure that there is no database named EventCloud before running the migrations). I will follow some DDD (Domain Driven Design) techniques to create domain (business) layer and application layer.
Event Cloud is a free SaaS (multi-tenant) application. We can create a tenant which has it's own events, users, roles... There are some simple business rules applied while creating, canceling and registering to an event.
So, let's start to review the source code.
Entities are parts of our domain layer and located under EventCloud.Core project. ASP.NET Boilerplate startup template comes with Tenant, User, Role... entities which are common for most applications. We can customize them based on our needs. Surely, we can add our application specific entities.
The fundamental entity of event cloud project is the Event entity:
[Table("AppEvents")]
public class Event : FullAuditedEntity<Guid>, IMustHaveTenant
{
public const int MaxTitleLength = 128;
public const int MaxDescriptionLength = 2048;
public virtual int TenantId { get; set; }
[Required]
[StringLength(MaxTitleLength)]
public virtual string Title { get; protected set; }
[StringLength(MaxDescriptionLength)]
public virtual string Description { get; protected set; }
public virtual DateTime Date { get; protected set; }
public virtual bool IsCancelled { get; protected set; }
/// <summary>
/// Gets or sets the maximum registration count.
/// 0: Unlimited.
/// </summary>
[Range(0, int.MaxValue)]
public virtual int MaxRegistrationCount { get; protected set; }
[ForeignKey("EventId")]
public virtual ICollection<EventRegistration> Registrations { get; protected set; }
/// <summary>
/// We don't make constructor public and forcing to create events using <see cref="Create"/> method.
/// But constructor can not be private since it's used by EntityFramework.
/// Thats why we did it protected.
/// </summary>
protected Event()
{
}
public static Event Create(int tenantId, string title, DateTime date, string description = null, int maxRegistrationCount = 0)
{
var @event = new Event
{
Id = Guid.NewGuid(),
TenantId = tenantId,
Title = title,
Description = description,
MaxRegistrationCount = maxRegistrationCount
};
@event.SetDate(date);
@event.Registrations = new Collection<EventRegistration>();
return @event;
}
public bool IsInPast()
{
return Date < Clock.Now;
}
public bool IsAllowedCancellationTimeEnded()
{
return Date.Subtract(Clock.Now).TotalHours <= 2.0; //2 hours can be defined as Event property and determined per event
}
public void ChangeDate(DateTime date)
{
if (date == Date)
{
return;
}
SetDate(date);
DomainEvents.EventBus.Trigger(new EventDateChangedEvent(this));
}
internal void Cancel()
{
AssertNotInPast();
IsCancelled = true;
}
private void SetDate(DateTime date)
{
AssertNotCancelled();
if (date < Clock.Now)
{
throw new UserFriendlyException("Can not set an event's date in the past!");
}
if (date <= Clock.Now.AddHours(3)) //3 can be configurable per tenant
{
throw new UserFriendlyException("Should set an event's date 3 hours before at least!");
}
Date = date;
DomainEvents.EventBus.Trigger(new EventDateChangedEvent(this));
}
private void AssertNotInPast()
{
if (IsInPast())
{
throw new UserFriendlyException("This event was in the past");
}
}
private void AssertNotCancelled()
{
if (IsCancelled)
{
throw new UserFriendlyException("This event is canceled!");
}
}
}
Event entity has not just get/set properties. Actually, it has not public setters, setters are protected. It has some domain logic. All properties must be changed by the Event entity itself to ensure domain logic is being executed.
Event entity's constructor is also protected. So, the only way to create an Event is the Event.Create method (They can be private normally, but private setters don't work well with Entity Framework since Entity Framework can not set privates when retrieving an entity from database).
Event implements IMustHaveTenant interface. This is an interface of ASP.NET Boilerplate (ABP) framework and ensures that this entity is per tenant. This is needed for multi-tenancy. Thus, different tenants will have different events and can not see each other's events. ABP automatically filters entities of current tenant.
Event class inherits from FullAuditedEntity which contains creation, modification and deletion audit columns. FullAuditedEntity also implements ISoftDelete, so events can not be deleted from database. They are marked as deleted when you delete it (soft delete). ABP automatically filters (hides) deleted entities when you query database.
In DDD, entities have domain (business) logic. We have some simple business rules those can be understood easily when you check the entity.
Second entity of our application is EventRegistration:
[Table("AppEventRegistrations")]
public class EventRegistration : CreationAuditedEntity, IMustHaveTenant
{
public int TenantId { get; set; }
[ForeignKey("EventId")]
public virtual Event Event { get; protected set; }
public virtual Guid EventId { get; protected set; }
[ForeignKey("UserId")]
public virtual User User { get; protected set; }
public virtual long UserId { get; protected set; }
/// <summary>
/// We don't make constructor public and forcing to create registrations using <see cref="CreateAsync"/> method.
/// But constructor can not be private since it's used by EntityFramework.
/// Thats why we did it protected.
/// </summary>
protected EventRegistration()
{
}
public async static Task<EventRegistration> CreateAsync(Event @event, User user, IEventRegistrationPolicy registrationPolicy)
{
await registrationPolicy.CheckRegistrationAttemptAsync(@event, user);
return new EventRegistration
{
TenantId = @event.TenantId,
EventId = @event.Id,
Event = @event,
UserId = @user.Id,
User = user
};
}
public async Task CancelAsync(IRepository<EventRegistration> repository)
{
if (repository == null) { throw new ArgumentNullException("repository"); }
if (Event.IsInPast())
{
throw new UserFriendlyException("Can not cancel event which is in the past!");
}
if (Event.IsAllowedCancellationTimeEnded())
{
throw new UserFriendlyException("It's too late to cancel your registration!");
}
await repository.DeleteAsync(this);
}
}
As similar to Event, we have a static create method. The only way of creating a new EventRegistration is this CreateAsync method. It gets an event, user and a registration policy. It checks if given user can register to the event using registrationPolicy.CheckRegistrationAttemptAsync method. This method throws exception if given user can not register to given event. With such a design, we ensure that all business rules are applied while creating a registration. There is no way of creating a registration without using registration policy.
See Entity documentation for more information on entities.
EventRegistrationPolicy class is defined as shown below:
public class EventRegistrationPolicy : EventCloudServiceBase, IEventRegistrationPolicy
{
private readonly IRepository<EventRegistration> _eventRegistrationRepository;
public EventRegistrationPolicy(IRepository<EventRegistration> eventRegistrationRepository)
{
_eventRegistrationRepository = eventRegistrationRepository;
}
public async Task CheckRegistrationAttemptAsync(Event @event, User user)
{
if (@event == null) { throw new ArgumentNullException("event"); }
if (user == null) { throw new ArgumentNullException("user"); }
CheckEventDate(@event);
await CheckEventRegistrationFrequencyAsync(user);
}
private static void CheckEventDate(Event @event)
{
if (@event.IsInPast())
{
throw new UserFriendlyException("Can not register event in the past!");
}
}
private async Task CheckEventRegistrationFrequencyAsync(User user)
{
var oneMonthAgo = Clock.Now.AddDays(-30);
var maxAllowedEventRegistrationCountInLast30DaysPerUser = await SettingManager.GetSettingValueAsync<int>(EventCloudSettingNames.MaxAllowedEventRegistrationCountInLast30DaysPerUser);
if (maxAllowedEventRegistrationCountInLast30DaysPerUser > 0)
{
var registrationCountInLast30Days = await _eventRegistrationRepository.CountAsync(r => r.UserId == user.Id && r.CreationTime >= oneMonthAgo);
if (registrationCountInLast30Days > maxAllowedEventRegistrationCountInLast30DaysPerUser)
{
throw new UserFriendlyException(string.Format("Can not register to more than {0}", maxAllowedEventRegistrationCountInLast30DaysPerUser));
}
}
}
}
This is an important part of our domain. We have two rules while creating an event registration:
EventManager implements business (domain) logic for events. All Event operations should be executed using this class. It's defined as shown below:
public class EventManager : IEventManager
{
public IEventBus EventBus { get; set; }
private readonly IEventRegistrationPolicy _registrationPolicy;
private readonly IRepository<EventRegistration> _eventRegistrationRepository;
private readonly IRepository<Event, Guid> _eventRepository;
public EventManager(
IEventRegistrationPolicy registrationPolicy,
IRepository<EventRegistration> eventRegistrationRepository,
IRepository<Event, Guid> eventRepository)
{
_registrationPolicy = registrationPolicy;
_eventRegistrationRepository = eventRegistrationRepository;
_eventRepository = eventRepository;
EventBus = NullEventBus.Instance;
}
public async Task<Event> GetAsync(Guid id)
{
var @event = await _eventRepository.FirstOrDefaultAsync(id);
if (@event == null)
{
throw new UserFriendlyException("Could not found the event, maybe it's deleted!");
}
return @event;
}
public async Task CreateAsync(Event @event)
{
await _eventRepository.InsertAsync(@event);
}
public void Cancel(Event @event)
{
@event.Cancel();
EventBus.Trigger(new EventCancelledEvent(@event));
}
public async Task<EventRegistration> RegisterAsync(Event @event, User user)
{
return await _eventRegistrationRepository.InsertAsync(
await EventRegistration.CreateAsync(@event, user, _registrationPolicy)
);
}
public async Task CancelRegistrationAsync(Event @event, User user)
{
var registration = await _eventRegistrationRepository.FirstOrDefaultAsync(r => r.EventId == @event.Id && r.UserId == user.Id);
if (registration == null)
{
//No need to cancel since there is no such a registration
return;
}
await registration.CancelAsync(_eventRegistrationRepository);
}
public async Task<IReadOnlyList<User>> GetRegisteredUsersAsync(Event @event)
{
return await _eventRegistrationRepository
.GetAll()
.Include(registration => registration.User)
.Where(registration => registration.EventId == @event.Id)
.Select(registration => registration.User)
.ToListAsync();
}
}
It performs domain logic and triggers needed events.
See domain services documentation for more information on domain services.
We may want to define and trigger some domain specific events on some state changes in our application. I defined 2 domain specific events:
We handle these events and notify related users about these changes. Also, I handle EntityCreatedEventDate<Event> (which is a pre-defined ABP event and triggered automatically).
To handle an event, we should define an event handler class. I defined EventUserEmailer to send emails to users when needed:
public class EventUserEmailer :
IEventHandler<EntityCreatedEventData<Event>>,
IEventHandler<EventDateChangedEvent>,
IEventHandler<EventCancelledEvent>,
ITransientDependency
{
public ILogger Logger { get; set; }
private readonly IEventManager _eventManager;
private readonly UserManager _userManager;
public EventUserEmailer(
UserManager userManager,
IEventManager eventManager)
{
_userManager = userManager;
_eventManager = eventManager;
Logger = NullLogger.Instance;
}
[UnitOfWork]
public virtual void HandleEvent(EntityCreatedEventData<Event> eventData)
{
//TODO: Send email to all tenant users as a notification
var users = _userManager
.Users
.Where(u => u.TenantId == eventData.Entity.TenantId)
.ToList();
foreach (var user in users)
{
var message = string.Format("Hey! There is a new event '{0}' on {1}! Want to register?",eventData.Entity.Title, eventData.Entity.Date);
Logger.Debug(string.Format("TODO: Send email to {0} -> {1}", user.EmailAddress, message));
}
}
public void HandleEvent(EventDateChangedEvent eventData)
{
//TODO: Send email to all registered users!
var registeredUsers = AsyncHelper.RunSync(() => _eventManager.GetRegisteredUsersAsync(eventData.Entity));
foreach (var user in registeredUsers)
{
var message = eventData.Entity.Title + " event's date is changed! New date is: " + eventData.Entity.Date;
Logger.Debug(string.Format("TODO: Send email to {0} -> {1}",user.EmailAddress, message));
}
}
public void HandleEvent(EventCancelledEvent eventData)
{
//TODO: Send email to all registered users!
var registeredUsers = AsyncHelper.RunSync(() => _eventManager.GetRegisteredUsersAsync(eventData.Entity));
foreach (var user in registeredUsers)
{
var message = eventData.Entity.Title + " event is canceled!";
Logger.Debug(string.Format("TODO: Send email to {0} -> {1}", user.EmailAddress, message));
}
}
}
We can handle same events in different classes or different events in same class (as in this sample). Here, we handle these events and send email to related users as a notification (not implemented emailing actually to make the sample application simpler). An event handler should implement IEventHandler<event-type> interface. ABP automatically calls the handler when related events occur.
See EventBus documentation for more information on domain events.
Application services use domain layer to implement use cases of the application (generally used by presentation layer). EventAppService performs application logic for events.
[AbpAuthorize]
public class EventAppService : EventCloudAppServiceBase, IEventAppService
{
private readonly IEventManager _eventManager;
private readonly IRepository<Event, Guid> _eventRepository;
public EventAppService(
IEventManager eventManager,
IRepository<Event, Guid> eventRepository)
{
_eventManager = eventManager;
_eventRepository = eventRepository;
}
public async Task<ListResultOutput<EventListDto>> GetList(GetEventListInput input)
{
var events = await _eventRepository
.GetAll()
.Include(e => e.Registrations)
.WhereIf(!input.IncludeCanceledEvents, e => !e.IsCancelled)
.OrderByDescending(e => e.CreationTime)
.ToListAsync();
return new ListResultOutput<EventListDto>(ObjectMapper.Map<List<EventListDto<<(events));
}
public async Task<EventDetailOutput> GetDetail(EntityRequestInput<Guid> input)
{
var @event = await _eventRepository
.GetAll()
.Include(e => e.Registrations)
.Where(e => e.Id == input.Id)
.FirstOrDefaultAsync();
if (@event == null)
{
throw new UserFriendlyException("Could not found the event, maybe it's deleted.");
}
return ObjectMapper.Map<EventDetailOutput>(@event);
}
public async Task Create(CreateEventInput input)
{
var @event = Event.Create(AbpSession.GetTenantId(), input.Title, input.Date, input.Description, input.MaxRegistrationCount);
await _eventManager.CreateAsync(@event);
}
public async Task Cancel(EntityRequestInput<Guid> input)
{
var @event = await _eventManager.GetAsync(input.Id);
_eventManager.Cancel(@event);
}
public async Task<EventRegisterOutput> Register(EntityRequestInput<Guid> input)
{
var registration = await RegisterAndSaveAsync(
await _eventManager.GetAsync(input.Id),
await GetCurrentUserAsync()
);
return new EventRegisterOutput
{
RegistrationId = registration.Id
};
}
public async Task CancelRegistration(EntityRequestInput<Guid> input)
{
await _eventManager.CancelRegistrationAsync(
await _eventManager.GetAsync(input.Id),
await GetCurrentUserAsync()
);
}
private async Task<EventRegistration> RegisterAndSaveAsync(Event @event, User user)
{
var registration = await _eventManager.RegisterAsync(@event, user);
await CurrentUnitOfWork.SaveChangesAsync();
return registration;
}
}
As you see, application service does not implement domain logic itself. It just uses entities and domain services (EventManager) to perform the use cases.
See application service documentation for more information on application services.
Presentation layer for this application is built using AngularJS as a SPA.
When we login to the application, we first see a list of events:
We directly use EventAppService to get list of events. Here, the Angular controller to create this page:
(function() {
var controllerId = 'app.views.events.index';
angular.module('app').controller(controllerId, [
'$scope', '$modal', 'abp.services.app.event',
function ($scope, $modal, eventService) {
var vm = this;
vm.events = [];
vm.filters = {
includeCanceledEvents: false
};
function loadEvents() {
eventService.getList(vm.filters).success(function (result) {
vm.events = result.items;
});
};
vm.openNewEventDialog = function() {
var modalInstance = $modal.open({
templateUrl: abp.appPath + 'App/Main/views/events/createDialog.cshtml',
controller: 'app.views.events.createDialog as vm',
size: 'md'
});
modalInstance.result.then(function () {
loadEvents();
});
};
$scope.$watch('vm.filters.includeCanceledEvents', function (newValue, oldValue) {
if (newValue != oldValue) {
loadEvents();
}
});
loadEvents();
}
]);
})();
We inject EventAppService as 'abp.services.app.event' into Angular controller. We used dynamic web api layer feature of ABP. It creates needed Web API controller and AngularJS service automatically and dynamically. So, we can use application service methods like calling regular JavaScript functions. So, to call EventAppService.GetList C# method, we simply call eventService.getList JavaScript function which returns a promise ($q for angular).
We also open a "new event" modal (dialog) when user clicks to "+ New event" button (which triggers vm.openNewEventDialog function). I will not go in details of Angular views, since they are simple, you can check it out in the source code.
When we click "Details" button for an event, we go to event details with a URL like "http://eventcloud-mvc5x.aspnetboilerplate.com/#/events/b680ad0a-d751-4d85-a7ad-34df5c8a86c2". GUID is id of the event.
Here, we see event details with registered users. We can register to the event or cancel registration. This view's controller is defined in detail.js as shown below:
(function () {
var controllerId = 'app.views.events.detail';
angular.module('app').controller(controllerId, [
'$scope', '$state','$stateParams', 'abp.services.app.event',
function ($scope, $state, $stateParams, eventService) {
var vm = this;
function loadEvent() {
eventService.getDetail({
id: $stateParams.id
}).then(function (result) {
vm.event = result.data;
});
}
vm.isRegistered = function () {
if (!vm.event) {
return false;
}
return _.find(vm.event.registrations, function(registration) {
return registration.userId == abp.session.userId;
});
};
vm.isEventCreator = function() {
return vm.event && vm.event.creatorUserId == abp.session.userId;
};
vm.getUserThumbnail = function(registration) {
return registration.userName.substr(0, 1).toLocaleUpperCase();
};
vm.register = function() {
eventService.register({
id: vm.event.id
}).then(function (result) {
abp.notify.success('Successfully registered to event. Your registration id: ' + result.data.registrationId + ".");
loadEvent();
});
};
vm.cancelRegistertration = function() {
eventService.cancelRegistration({
id: vm.event.id
}).then(function () {
abp.notify.info('Canceled your registration.');
loadEvent();
});
};
vm.cancelEvent = function() {
eventService.cancel({
id: vm.event.id
}).then(function () {
abp.notify.info('Canceled the event.');
vm.backToEventsPage();
});
};
vm.backToEventsPage = function() {
$state.go('events');
};
loadEvent();
}
]);
})();
We simply use event application service to perform actions.
Top menu is automatically created by ABP template. We define menu items in EventCloudNavigationProvider class:
public class EventCloudNavigationProvider : NavigationProvider
{
public override void SetNavigation(INavigationProviderContext context)
{
context.Manager.MainMenu
.AddItem(
new MenuItemDefinition(
AppPageNames.Events,
new LocalizableString("Events", EventCloudConsts.LocalizationSourceName),
url: "#/",
icon: "fa fa-calendar-check-o"
)
).AddItem(
new MenuItemDefinition(
AppPageNames.About,
new LocalizableString("About", EventCloudConsts.LocalizationSourceName),
url: "#/about",
icon: "fa fa-info"
)
);
}
}
We can add new menu items here. See navigation documentation for more information.
Defining the menu only shows it on the page. Angular has it's own route system. This application uses Angular ui-router. Routes are defined in app.js as shown below:
//Configuration for Angular UI routing.
app.config([
'$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/events');
$stateProvider
.state('events', {
url: '/events',
templateUrl: '/App/Main/views/events/index.cshtml',
menu: 'Events' //Matches to name of 'Events' menu in EventCloudNavigationProvider
})
.state('eventDetail', {
url: '/events/:id',
templateUrl: '/App/Main/views/events/detail.cshtml',
menu: 'Events' //Matches to name of 'Events' menu in EventCloudNavigationProvider
})
.state('about', {
url: '/about',
templateUrl: '/App/Main/views/about/about.cshtml',
menu: 'About' //Matches to name of 'About' menu in EventCloudNavigationProvider
});
}
]);
ASP.NET Boilerplate provides tools to make unit and integration tests easier. You can find all test code from source code of the project. Here, I will briefly explain basic tests. Solution includes EventAppService_Tests class which tests the EventAppService. See 2 tests from this class:
public class EventAppService_Tests : EventCloudTestBase
{
private readonly IEventAppService _eventAppService;
public EventAppService_Tests()
{
_eventAppService = Resolve<IEventAppService>();
}
[Fact]
public async Task Should_Create_Event()
{
//Arrange
var eventTitle = Guid.NewGuid().ToString();
//Act
await _eventAppService.Create(new CreateEventInput
{
Title = eventTitle,
Description = "A description",
Date = Clock.Now.AddDays(2)
});
//Assert
UsingDbContext(context =>
{
context.Events.FirstOrDefault(e => e.Title == eventTitle).ShouldNotBe(null);
});
}
[Fact]
public async Task Should_Not_Create_Events_In_The_Past()
{
//Arrange
var eventTitle = Guid.NewGuid().ToString();
//Act
await Assert.ThrowsAsync<UserFriendlyException>(async () =>
{
await _eventAppService.Create(new CreateEventInput
{
Title = eventTitle,
Description = "A description",
Date = Clock.Now.AddDays(-1)
});
});
}
private Event GetTestEvent()
{
return UsingDbContext(context => GetTestEvent(context));
}
private static Event GetTestEvent(EventCloudDbContext context)
{
return context.Events.Single(e => e.Title == TestDataBuilder.TestEventTitle);
}
}
We use xUnit as test framework. In the first test, we simply create an event and check database if it's in there. In the second test, we intentionally trying to create an event in the past. Since our business rule don't allow it, we should get an exception here.
With such tests, we tested everything starting from application service including all aspects of ASP.NET Boilerplate (like validation, unit of work and so on). See my Unit testing in C# using xUnit, Entity Framework, Effort and ASP.NET Boilerplate article for details on unit testing.
Startup template uses cookie based authentication for browsers. However, if you want to consume Web APIs or application services (those are exposed via dynamic web api) from a mobile application, you probably want a token based authentication mechanism. Startup template includes bearer token authentication infrastructure. AccountController in *.WebApi project contains Authenticate action to get the token. Then we can use the token for next requests.
We will use Postman (chrome extension) to demonstrate requests and responses.
Just send a POST request to http://localhost:6334/api/Account/Authenticate with Context-Type="application/json" header as shown below:
We sent a JSON request body includes tenancyName, userNameOrEmailAddress and password. tenancyName is not required for host users. As seen above, result property of returning JSON contains the token. We can save it and use for next requests.
After authenticate and get the token, we can use it to call any authorized action. All application services are available to be used remotely. For example, we can use the EventAppService to get a list of events:
Just made a POST request to http://localhost:6334/api/services/app/event/GetList with Content-Type="application/json" and Authorization="Bearer your-auth-token". Request body was just empty {}. Surely, request and response body will be different for different APIs.
Almost all operations available on UI also available as Web API (since UI uses the same Web API) and can be consumed easily.
You can get the latest source code from https://github.com/aspnetboilerplate/eventcloud/tree/master/mvc-angularjs/src
In this article, I introduced a Multi Tenant (SaaS) application built on ASP.NET Boilerplate (ABP) framework. Use the following links for more information on ASP.NET Boilerplate:


Home
Menu
Location
About
Contact
DONUT DELIGHTS
2112 Main Street Urbana, Illinois 61801
217.555.1234
contact@donutdelights.com