+ All Categories
Home > Technology > Open source applied: Real-world uses

Open source applied: Real-world uses

Date post: 13-Apr-2017
Category:
Upload: rogue-wave-software
View: 86 times
Download: 2 times
Share this document with a friend
46
1 © 2016 Rogue Wave Software, Inc. All Rights Reserved. 1 Top open source lessons for every enterprise Episode 3: Open source applied: Real- world uses
Transcript
Page 1: Open source applied: Real-world uses

1© 2016 Rogue Wave Software, Inc. All Rights Reserved.

1

Top open source lessonsfor every enterpriseEpisode 3:

Open source applied: Real-world uses

Page 2: Open source applied: Real-world uses

2© 2016 Rogue Wave Software, Inc. All Rights Reserved.

2

Justin ReockSenior director, support & professional

servicesRogue Wave Software

Presenter

Page 3: Open source applied: Real-world uses

3© 2016 Rogue Wave Software, Inc. All Rights Reserved.

3

Poll #1What percentage of your mission critical software is open source?

A: 0-25%B: 26 to 50%C: 51 to 75%D: More than 75%

Page 4: Open source applied: Real-world uses

4© 2016 Rogue Wave Software, Inc. All Rights Reserved.

4

Agenda

1. Introduction2. PupBand: E-commerce website3. UniTrack: Mobile PaaS4. HelpingHumans: HPC machine

learning5. Conclusion6. Q&A

Page 5: Open source applied: Real-world uses

5© 2016 Rogue Wave Software, Inc. All Rights Reserved.

5

IntroductionOSS is everywhere!• As we covered in our previous OSS webinar, OSS has eaten the world!

• How enterprises learned to stop worrying and love open source• When is free not free: The true costs of open source

• Commonly we see businesses of all sizes utilizing open source solutions to decrease time to market and reduce development effort

• Anyone with a great idea can build an infrastructure using open source solutions without the financial barriers that existed a decade ago

• So how are people in the real world benefitting from open source?• What technologies are they using, and where are they putting them?

Page 6: Open source applied: Real-world uses

6© 2016 Rogue Wave Software, Inc. All Rights Reserved.

6

Case studiesWho’s using OSS?• Today’s webinar centers around three fictitious companies• Although the architecture and use cases are inspired by our real

customers, we’re going to protect their privacy• All of these companies have built a full infrastructure stack using

only OSS solutions• We’ll discuss the chosen architecture, point out some pitfalls,

and see how these development teams flexed the power of OSS to meet the demands of their businesses

Page 7: Open source applied: Real-world uses

7© 2016 Rogue Wave Software, Inc. All Rights Reserved.

7

PupBandE-commerce website

Page 8: Open source applied: Real-world uses

8© 2016 Rogue Wave Software, Inc. All Rights Reserved.

8

E-commerce websitePupBand The only online store featuring specialty headbands for dogs!

Infrastructure needs• Website front-end• Order processing

middleware• Inventory database

Technology stack• Apache web server• OpenSSL• PHP• Apache ActiveMQ• Apache Camel• PostgreSQL

Page 9: Open source applied: Real-world uses

9© 2016 Rogue Wave Software, Inc. All Rights Reserved.

9

Building PupBandSelecting the stack

Front end • For the front end, the developers knew they needed a robust web framework to work

with and a capable web server technology that supports SSL• They looked at Java and PHP and decided on PHP 7. It’s easy to find qualified PHP

developers and the storefront didn’t need the overhead that comes with Java EE technologies.• PHP 7 brings a number of significant enhancements, including a huge boost to

performance

• OpenSSL is the de-facto standard for SSL encryption on the web and compiles easily into Apache Web Server. Since the company collects sensitive payment data, strong SSL is a must!

• Nginx was considered, but, the development group was familiar with Apache and chose to implement it for the web server stack

To get this project going, PupBand’s IT organization needed to vet out the best open source projects they could find to build their stack

Page 10: Open source applied: Real-world uses

10© 2016 Rogue Wave Software, Inc. All Rights Reserved.

10

Building PupBandSelecting the stack

Order processing middleware• Next, the company needed a reliable way of shuffling data

between their PHP front-end application and a backend inventory management system, customer communications platform, and fulfillment warehouse

• They chose Apache ActiveMQ and Apache Camel • ActiveMQ gave them the flexibility and reliability to integrate

their PHP front-end with Camel• Camel ensured that they would have compatibility with all of the

backend systems needed to orchestrate their orders

Page 11: Open source applied: Real-world uses

11© 2016 Rogue Wave Software, Inc. All Rights Reserved.

11

Building PupBandSelecting the stackInventory database• Finally, the developers at PupBand needed a way to store inventory

and order data • They knew they needed a flexible and scalable solution, with

replication and disaster recovery functions• And the data models they would be building might be fairly complex,

integrating customer data, fulfillment data, payment status, and RMA• In the end, they settled on PostgreSQL, a truly FOSS database solution

meeting all their needs for performance, reliability, and RDBMS SQL compliance

Page 12: Open source applied: Real-world uses

12© 2016 Rogue Wave Software, Inc. All Rights Reserved.

12

Building PupBandA complete picture

Page 13: Open source applied: Real-world uses

13© 2016 Rogue Wave Software, Inc. All Rights Reserved.

13

Building PupBandFront end

• The team deployed on CentOS in the cloud but, when they installed OpenSSL and Apache using the CentOS repository framework, their security scans were alerting them to vulnerabilities

• That’s because the newest version of OpenSSL and the newest version of Apache weren’t available to them through CentOS’s repo

• They quickly decided to build the newest version of Apache from source, against the newest version of OpenSSL

• They removed all legacy SSL protocol versions, and settled on TLS1.2, to keep them protected from Heartbleed and DROWN

Page 14: Open source applied: Real-world uses

14© 2016 Rogue Wave Software, Inc. All Rights Reserved.

14

Building PupBandMiddleware tier• The middleware tier was complex, it needed

to integrate seamlessly with all the backend systems

• At first, the team decided to use the version of Camel that was built into ActiveMQ

• ActiveMQ allowed the team to receive events from the PHP front end and to queue those events for processing

• But ActiveMQ became overwhelmed quickly when using it’s embedded Camel implementation

• The team decided to deploy the Camel routes standalone in a separate Java container, and ActiveMQ’s footprint was reduced significantly

Page 15: Open source applied: Real-world uses

15© 2016 Rogue Wave Software, Inc. All Rights Reserved.

15

Building PupBandThe backend• The credit card API used RESTful services• The team built a small webservices layer in front of Postgres, to loosely

couple the database• And the fulfillment warehouse made use of traditional SOAP

webservices• Using Camel Components, the team was able to find a compatible

solution for all of the various integration endpoints they needed to interact with

Page 16: Open source applied: Real-world uses

16© 2016 Rogue Wave Software, Inc. All Rights Reserved.

16

Building PupBand

• In the end, the development team at PupBand was able to develop their entire E-commerce solution using community-supported, free, and open source software

• The project was not without its challenges and the team had to research and experiment to determine the safest, fastest, and most robust ways of implementing the technology stack they chose

• Challenges around versioning, proper deployment, and performance optimization took many cycles and hard work to overcome

• But in the end, PupBand was left with an infrastructure free from proprietary commercial licenses, with room to grow

• And puppies everywhere rejoiced in their new head gear!

Code complete

Page 17: Open source applied: Real-world uses

17© 2016 Rogue Wave Software, Inc. All Rights Reserved.

17

Poll #2Which of the packages/technologies that we just

discussed are you using?

A: Apache ActiveMQB: Apache Camel

C: OpenSSLD: PHPE: PostgreSQL

Page 18: Open source applied: Real-world uses

18© 2016 Rogue Wave Software, Inc. All Rights Reserved.

18

UniTrackMobile Platform as a

Service

Page 19: Open source applied: Real-world uses

19© 2016 Rogue Wave Software, Inc. All Rights Reserved.

19

Mobile PaaS

Infrastructure needs• API front-end• Scalable event-processing

middleware• Location database• Data visualization platform

Technology stack• Nginx• Node.js• Docker• Puppet• Apache Cassandra• Apache Spark

UniTrackA crowd-sourced platform tracking the movement and migratory patterns of unicorns

Page 20: Open source applied: Real-world uses

20© 2016 Rogue Wave Software, Inc. All Rights Reserved.

20

Building UniTrackSelecting the stack

API front end• The team selected a combination of Nginx as a web server and Node.js as

a development platform• The API was packaged in Docker containers, to allow for elastic auto-scaling

of the system• Node.js would allow them strong concurrency and the ability to handle

thousands of simultaneous API calls• Docker would allow the API servers to scale based on demand, and Puppet

would assist in spinning up new containers and deploying the API code

The dev team at UniTrack knew that they needed a lightweight, fast, and concurrent system for receiving location data from millions of mobile clients and presenting the data to subscribers

Page 21: Open source applied: Real-world uses

21© 2016 Rogue Wave Software, Inc. All Rights Reserved.

21

Building UniTrackSelecting the stack

Event-processing middleware / location database• The team needed a highly concurrent and highly redundant solution to

store event and location data that came in through the front-end APIs• The data would be spread across multiple cloud datacenters to allow the

best regional connectivity possible, along with disaster recovery features• They chose Apache Cassandra for its easy replication strategy, its ability

to store and provide incredibly large datasets, and its performance optimization capabilities

• Node.js was integrated directly with Cassandra, to shuttle data from the front-end APIs into the database itself

• Puppet integration ensured easy deployment of additional Cassandra nodes in the cloud, as system demand increased

Page 22: Open source applied: Real-world uses

22© 2016 Rogue Wave Software, Inc. All Rights Reserved.

22

Building UniTrackSelecting the stack

Data visualization• Finally, the team needed a way to make sense of all this location and

event data• The large data sets needed to be analyzed• And data visualization needed to be provided to unicorn enthusiasts

everywhere via their smartphones• Apache Spark was chosen for its lightning-fast data analytics capabilities• And the GraphX plugin was implemented to visualize the large sets of

unicorn tracking data coming in from millions of worldwide users through the smartphone client

Page 23: Open source applied: Real-world uses

23© 2016 Rogue Wave Software, Inc. All Rights Reserved.

23

Building UniTrackA complete picture

Page 24: Open source applied: Real-world uses

24© 2016 Rogue Wave Software, Inc. All Rights Reserved.

24

Building UniTrackFront-end APIs• The team built Docker containers bundling Nginx with a lightweight node.js

application. The learning curve for Node.js proved to be a bottleneck, as traditional JavaScript developers needed to rethink the way they developed

• A Puppet master server was built and orchestration for spinning up new containers on-demand was developed. Security became a major concern, as access to the Puppet master server by a malicious user could lead to disastrous consequences

Page 25: Open source applied: Real-world uses

25© 2016 Rogue Wave Software, Inc. All Rights Reserved.

25

Building UniTrackEvent-processing middleware• Integration of the Node.js containers with Cassandra

proved to be easy, using Cassandra’s asynchronous connection drivers for Node.js

• The real challenge was building a NoSQL data model that could meet all of their data processing and visualization needs, while remaining fast and responsive

• Cassandra’s deployment itself was simple, spinning up nodes in various data centers using Cassandra’s in-built deployment utilities and native replication protocol

Page 26: Open source applied: Real-world uses

26© 2016 Rogue Wave Software, Inc. All Rights Reserved.

26

Building UniTrackVisualization and analytics

• Spark made it easy to pull in and analyze the vast amounts of data provided by UniTrack’s enormous user base

• The biggest challenge lay in determining which of the many client libraries should be used to power Spark

• The team could pick from Java, Scala, Python, or R• In the end, Java was selected, and a standalone application was

built around the Spark libraries to provide visualization of data via GraphX

• GraphX’s output was compressed and standardized for mobile platform consumption

Page 27: Open source applied: Real-world uses

27© 2016 Rogue Wave Software, Inc. All Rights Reserved.

27

Building UniTrack

• By leveraging the elastic scale and microservice capabilities of Docker and Node.js, the team was able to build a highly concurrent architecture capable of servicing thousands of requests a second

• The choice for Cassandra as a persistence backend proved wise, as the development team was able to scale the Cassandra implementation into multiple regional datacenters, and service the huge amount of traffic input by the front-end APIs

• Puppet worked well in detecting increases in load, and elastically scaling the API containers on demand

• Spark and GraphX allowed the application to make sense of the huge amount of data, and provide visual analysis to mobile clients

• Though so far all unicorn location claims have proven spurious, the UniTrack community feels confident that with the powerful platform they have built, it is only a matter of time before a real live unicorn is discovered and captured

Code complete

Page 28: Open source applied: Real-world uses

28© 2016 Rogue Wave Software, Inc. All Rights Reserved.

28

Poll #3In your opinion, how different are containers/microservices

vs. service-oriented architectures?A: Very little differenceB: About the sameC: Very big differenceD: Don’t know

Page 29: Open source applied: Real-world uses

29© 2016 Rogue Wave Software, Inc. All Rights Reserved.

29

HelpingHumansHPC Machine

Learning

Page 30: Open source applied: Real-world uses

30© 2016 Rogue Wave Software, Inc. All Rights Reserved.

30

HPC machine learning

HelpingHumansAdvancing human society through artificial intelligence and robot sentience

Infrastructure needs• Multi-platform data gathering

automation• Redundant storage and analytics• Dashboard front-end

Technology stack• Apache Camel• Apache Cassandra• Kubernetes• TensorFlow• AngularJS

Page 31: Open source applied: Real-world uses

31© 2016 Rogue Wave Software, Inc. All Rights Reserved.

31

Building HelpingHumansSelecting the stack

Multi-platform data gathering• The secret development group responsible for building the platform knew they

would need a framework capable of gathering data from hundreds of potential sources

• The platform needed to be capable of querying CDC data, military intelligence, social media, human history, and more

• Apache Camel was chosen to act as a central data gathering platform for pulling unstructured data from multiple, disparate sources

• Camel’s huge component library would allow for this kind of flexibility, while developing against a standard, domain-specific language and reducing boilerplate code

In order to assist the human race in performing useful tasks, the machines must be capable of learning as much as they can about our species

Page 32: Open source applied: Real-world uses

32© 2016 Rogue Wave Software, Inc. All Rights Reserved.

32

Building HelpingHumansSelecting the stack

Redundant storage and analytics• Once the data had been gathered, the dev group knew that they would

need a redundant storage system capable of quickly writing and reading a gigantic amount of data

• And once that data was gathered, a machine learning analytics library was necessary to normalize all that data and understand human activities, capabilities, and behavior

• Apache Cassandra would be capable of storing all the data• And the open source TensorFlow machine learning framework could help

in building learning patterns to make sense of all the disparate data

Page 33: Open source applied: Real-world uses

33© 2016 Rogue Wave Software, Inc. All Rights Reserved.

33

Building HelpingHumansSelecting the stack

Dashboard front-end• The team needed a way to take data processed by TensorFlow and

pushed back into Cassandra, and build a useful dashboard to check the progress of various learning initiatives

• The dashboard needed to be lightweight and cross-browser compatible

• It also needed a relatively low learning curve, since the bulk of the development work would be spent on the learning and analytics engine

• The team decided on AngularJS, which allows a full MVC framework, reusable components, and a low learning curve for developers who already understand JavaScript

Page 34: Open source applied: Real-world uses

34© 2016 Rogue Wave Software, Inc. All Rights Reserved.

34

Building HelpingHumansSelecting the stack

Container orchestration• Both the Camel data-gathering components and the TensorFlow analytics

needed to be deployed in such a way that they could be easily scaled up to provide concurrent gathering and processing of data

• Ultimately, the architecture would contain thousands of individual containers operating in concert

• For this, orchestration of Docker through Puppet was simply not sophisticated enough, so the team implemented Kubernetes to provide a full management platform for their large container infrastructure

• Service discovery, monitoring, and deployment would all be provided by the Kubernetes management engine

Page 35: Open source applied: Real-world uses

35© 2016 Rogue Wave Software, Inc. All Rights Reserved.

35

Building HelpingHumansA complete picture

Page 36: Open source applied: Real-world uses

36© 2016 Rogue Wave Software, Inc. All Rights Reserved.

36

Building HelpingHumansMulti-platform data gathering• Camel allowed the HelpingHumans team to source data from the hundreds of various

data sources they wished to pull from• Initially, the development team thought it best to deploy Camel inside of a Tomcat

container and then contained inside of Docker• Ultimately this solution had just too much overhead, and multiple instances of

Tomcat were found to be redundant when deployed in a containerized infrastructure• The Dev team chose to build standalone Camel applications running per container

and the system was much more efficient

Page 37: Open source applied: Real-world uses

37© 2016 Rogue Wave Software, Inc. All Rights Reserved.

37

Building HelpingHumansRedundant storage and analytics• It turned out TensorFlow was a great starting point for the type of machine learning the

HelpingHumans Dev team wanted to implement but there was functionality missing that was critical to their work

• Ultimately they leveraged the power of FOSS by modifying the source code of TensorFlow and spinning off their own internal branch

• And, in the spirit of their altruistic mission, the dev team offered these enhancements back to the TensorFlow community

Page 38: Open source applied: Real-world uses

38© 2016 Rogue Wave Software, Inc. All Rights Reserved.

38

Building HelpingHumansOrchestration and dashboarding

• Kubernetes forced the development team at HelpingHumans to change the way they thought about containerized deployment and microservice management

• After the paradigm shift was complete, the team ended up with an amazing elastically-scaling architecture that was able to meet the high demands their data gathering and analytics needed

• AngularJS proved easy to learn and highly functional, and integrated well with Cassandra

• Ultimately a lot of the visualization work was offloaded to backend servers, though, with Angular acting as a proxy, since the client-side limitations of Angular limited the analysis of the data

Page 39: Open source applied: Real-world uses

39© 2016 Rogue Wave Software, Inc. All Rights Reserved.

39

Building HelpingHumans

• By leveraging powerful open source frameworks, the HelpingHumans team was able to develop a sophisticated engine for learning new ways to analyze human needs and behaviors

• Advanced container management through Kubernetes allowed for the complex orchestration necessary to elastically scale their Camel and TensorFlow based applications

• And Cassandra’s high performance big data storage allowed HelpingHumans to efficiently store all the data they gathered from hundreds of sources

• Human civilization as we know it ended roughly six months after deployment

Code complete

Page 40: Open source applied: Real-world uses

40© 2016 Rogue Wave Software, Inc. All Rights Reserved.

40

Conclusion and wrap-Up

Page 41: Open source applied: Real-world uses

41© 2016 Rogue Wave Software, Inc. All Rights Reserved.

41

Support from a group like the OSS Support team at Rogue Wave can ensure that what you implement works well, stays available, and is scaled for growth

Conclusion

You can safely build an entire IT infrastructure on FOSS technologies, if you make disciplined decisions surrounding the choice of technology and the practices of development, implementation, and deployment

Careful vetting can help you ensure that the packages you choose truly meet your use case

There is a ton of open source available to you, but certain applications and projects will rise to the top based on their maturity, the strength of their communities, and their reactiveness to bug fixes and vulnerabilities

Page 42: Open source applied: Real-world uses

42© 2016 Rogue Wave Software, Inc. All Rights Reserved.

42

Q & A

Page 44: Open source applied: Real-world uses

44© 2016 Rogue Wave Software, Inc. All Rights Reserved.

44

Follow up

Free newsletter: vulnerabilities, industry news, and enterprise support stories

http://www.openlogic.com/products-services/openlogic-exchange/openupdate

For OpenLogic support customers:

OSS Radio

Get a free OSS support ticket to experience our expertise

roguewave.com/freeticket

Page 45: Open source applied: Real-world uses

45© 2016 Rogue Wave Software, Inc. All Rights Reserved.

45

Stay tuned

Top open source lessons for every enterpriseJuly 27: Top issues in the top enterprise packagesDive into specific packages with two architects to discover what goes right and what goes wrong.

Page 46: Open source applied: Real-world uses

46© 2016 Rogue Wave Software, Inc. All Rights Reserved.

46


Recommended